Enable Service Topology on k8s

后端 未结 2 1120
闹比i
闹比i 2020-12-22 09:44

I\'m using k8s with kubeadm version 1.17. I\'m trying to enable Service Topology feature gates but I can\'t. Documentation say to use \"--feature-gates=\"ServiceTopology=tru

2条回答
  •  囚心锁ツ
    2020-12-22 10:03

    In my case (kubeadm version 1.18.2), it works with the following kubeadm configuration .yaml file (podSubnet is there because I am using Flannel CNI). The key of kube-proxy is "featureGates" as mentioned in https://godoc.org/k8s.io/kube-proxy/config/v1alpha1#KubeProxyConfiguration

    ---
    apiVersion: kubeadm.k8s.io/v1beta2
    kind: ClusterConfiguration
    apiServer:
      extraArgs:
        feature-gates: "ServiceTopology=true,EndpointSlice=true"
    controllerManager:
      extraArgs:
        feature-gates: "ServiceTopology=true,EndpointSlice=true"
    scheduler:
      extraArgs:
        feature-gates: "ServiceTopology=true,EndpointSlice=true"
    networking:
       podSubnet: "10.244.0.0/16"
    
    ---
    apiVersion: kubeproxy.config.k8s.io/v1alpha1
    kind: KubeProxyConfiguration
    featureGates:
      ServiceTopology: true
      EndpointSliceProxying: true
    

提交回复
热议问题