CC00035.CloudKubernetes——|KuberNetes&二进制部署.V13|5台Server|——|kubernetes-node|kube-proxy配置|

一、kube-proxy配置
### --- kube-proxy注意事项

~~~     # 注意,如果不是高可用集群,192.168.1.20:8443改为master01的地址,
~~~     # 8443改为apiserver的端口,默认是6443

二、创建kube-proxy服务

### --- 创建kube-proxy服务
~~~     # 创建kube-proxy服务;以下操作在Master01执行

[root@k8s-master01 ~]# cd /root/k8s-ha-install
~~~     # 创建ServiceAccount

[root@k8s-master01 k8s-ha-install]# kubectl -n kube-system create serviceaccount kube-proxy
~~~     输出结果:
serviceaccount/kube-proxy created
~~~     # 创建ClusterRoleBinding

[root@k8s-master01 k8s-ha-install]# kubectl create clusterrolebinding system:kube-proxy         --clusterrole system:node-proxier         --serviceaccount kube-system:kube-proxy
~~~     输出结果:
clusterrolebinding.rbac.authorization.k8s.io/system:kube-proxy created
~~~     # 创建cluster

[root@k8s-master01 k8s-ha-install]# SECRET=$(kubectl -n kube-system get sa/kube-proxy \
     --output=jsonpath='{.secrets[0].name}')
[root@k8s-master01 k8s-ha-install]# JWT_TOKEN=$(kubectl -n kube-system get s

你可能感兴趣的:(docker,kubernetes,java,zookeeper,hadoop)