gpt4 book ai didi

amazon-web-services - Kubectl tls 补丁返回 “not patched”

转载 作者:行者123 更新时间:2023-12-02 11:29:57 25 4
gpt4 key购买 nike

我正在尝试通过以下方式使用 ACM 修补 istio-ingressgateway 服务


kubectl -n istio-system patch service istio-ingressgateway -p "$(cat<<EOF
metadata:
name: istio-ingressgateway
namespace: istio-system
annotations:
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:xx-xxxx-1:123456789:certificate/xxxx-xxx-xxxxxxxxxxx"
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "tcp"
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "443"
service.beta.kubernetes.io/aws-load-balancer-internal: "true"
service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: "*"
spec:
type: LoadBalancer
externalTrafficPolicy: Cluster
selector:
app: istio-ingressgateway
istio: ingressgateway
EOF
)"

但它返回 未修补 。这里有什么问题?

最佳答案

问题是缩进尝试将补丁放在 yaml 文件中:
ingress_patch.yaml

metadata:
name: istio-ingressgateway
namespace: istio-system
annotations:
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:xx-xxxx-1:123456789:certificate/xxxx-xxx-xxxxxxxxxxx"
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "tcp"
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "443"
service.beta.kubernetes.io/aws-load-balancer-internal: "true"
service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: "*"
spec:
type: LoadBalancer
externalTrafficPolicy: Cluster
selector:
app: istio-ingressgateway
istio: ingressgateway
然后按如下方式应用它:
kubectl -n istio-system patch service istio-ingressgateway -p "$(cat ./ingress_patch.yaml)"

关于amazon-web-services - Kubectl tls 补丁返回 “not patched”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63578352/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com