只是想知道是否有任何方法可以从代理的远程服务器覆盖/删除响应Cache-Control:private.设置架构看起来像这样(是的,它是一个反向代理设置):
[我的服务器] - > [远程服务器]
我的服务器站点可用/默认设置:
server {
listen 80; ## listen for ipv4
listen [::]:80 default ipv6only=on; ## listen for ipv6
server_name localhost;
location / {
if ($arg_AWSACCESSKEY) {
proxy_pass http://localhost:8088;
}
try_files $uri $uri/ /index.php /index.html /index.htm;
}
# other setting goes here
}
Run Code Online (Sandbox Code Playgroud)
我的服务器站点可用/远程的设置:
server {
listen 8088; ## listen for ipv4; this line is default and implied
# Make site accessible from http://localhost/
# server_name localhost;
location / {
proxy_pass http://remoteserver;
proxy_set_header Host remoteserverhostname.com;
proxy_ignore_headers Cache-Control …Run Code Online (Sandbox Code Playgroud) 只是想知道如何将文件直接通过管道传输到 aws ssm 参数存储?例如
# Put into ssm parameter store
cat my_github_private.key | aws ssm put-parameter --region ap-southeast-1 --name MY_GITHUB_PRIVATE_KEY --type SecureString --key-id alias/aws/ssm --value ???
# And read it back
aws ssm get-parameter --region ap-southeast-1 --name MY_GITHUB_PRIVATE_KEY --with-decryption --query Parameter.Value --output text > my_github_private.key.1
# Two should be identical
diff my_github_private.key my_github_private.key.1
Run Code Online (Sandbox Code Playgroud) 两年前我参加CKA考试时,我就已经有这个问题了。当时我只能看k8s.io官方文档。现在只是对通过纯 kubectl cli 生成 pv / pvc / storageClass 感到好奇。我寻找的是与部署类似的逻辑,例如:
$ kubectl create deploy test --image=nginx --port=80 --dry-run -o yaml
W0419 23:54:11.092265 76572 helpers.go:553] --dry-run is deprecated and can be replaced with --dry-run=client.
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: test
name: test
spec:
replicas: 1
selector:
matchLabels:
app: test
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: test
spec:
containers:
- image: nginx
name: nginx
ports:
- containerPort: 80
resources: {}
status: {}
Run Code Online (Sandbox Code Playgroud)
或运行单个 Pod 的类似逻辑:
$ …Run Code Online (Sandbox Code Playgroud)