gpt4 book ai didi

kubernetes - 如何在 istio 运营商补丁中添加服务注释

转载 作者:行者123 更新时间:2023-12-02 11:36:22 24 4
gpt4 key购买 nike

我正在使用 istioctl 安装 istio 1.6.0使用以下配置文件:

--
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
profile: default
components:
egressGateways:
- name: istio-egressgateway
enabled: true
ingressGateways:
- name: istio-ingressgateway
enabled: true
k8s:
overlays:
- kind: Service
name: istio-ingressgateway
patches:
- path: spec.loadBalancerIP
value: x.x.x.x
- path: spec.externalTrafficPolicy
value: Local
- path: metadata.annotations.[service.beta.kubernetes.io/azure-load-balancer-resource-group]
value: az-rg-group

这部分给了我一个错误:
- path: metadata.annotations.[service.beta.kubernetes.io/azure-load-balancer-resource-group]
value: az-rg-group

Error: failed to apply manifests: errors occurred during operation



注释的路径不正确。如何提供具有有效语法的注释路径?

在此示例代码之后: https://github.com/istio/istio/blob/master/operator/samples/pilot-advanced-override.yaml

最佳答案

有一个用于服务注释的新字段。问题在这里提出 https://github.com/istio/istio/issues/20078
请引用以下示例
ingressgateway_k8s_settings.yaml

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
components:
pilot:
enabled: false
ingressGateways:
- namespace: istio-system
name: istio-ingressgateway
enabled: true
k8s:
service:
externalTrafficPolicy: Local
serviceAnnotations:
manifest-generate: "testserviceAnnotation"
securityContext:
sysctls:
- name: "net.ipv4.ip_local_port_range"
value: "80 65535"

关于kubernetes - 如何在 istio 运营商补丁中添加服务注释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61963659/

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