向创建的loadbalacner网关添加标签和注释

问题描述 投票:0回答:1

我正在创建一个网关对象,我想向提供的服务器添加标签和注释。

---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: Gateway
metadata:
  name: obs-gateway
  namespace: default
  labels:
    advertise-bgp: 'true'
  annotations:
    "io.cilium/lb-ipam-ips": "10.253.5.33"
spec:
  gatewayClassName: cilium
  listeners:
    - protocol: HTTP
      hostname: "*.obs.painful.me"
      port: 80
      name: web-gw
      allowedRoutes:
        namespaces:
          from: All
kubernetes gateway
1个回答
0
投票

目前这是一个实验性功能,需要应用实验性的crds才能使用它

GEP-1762跟踪此功能

...
spec:
  infrastructure:
    labels:
      advertise-bgp: 'true'
    annotations:
      "io.cilium/lb-ipam-ips": "10.253.5.33"
© www.soinside.com 2019 - 2024. All rights reserved.