TA的每日心情 | 无聊 7 天前 |
---|
签到天数: 1644 天 [LV.Master]伴坛终老
|
1.把master上的/etc/kubernetes/admin.conf文件拷贝到node节点上
scp /etc/kubernetes/admin.conf root@192.168.47.47:/etc/kubernetes/
2.配置环境变量
echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> ~/.bash_profile
source ~/.bash_profile #立即生效
3.测试
[root@k8s-node1 ~]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
k8s-master Ready master 70d v1.18.0
k8s-node1 Ready <none> 70d v1.18.0
k8s-node2 Ready <none> 70d v1.18.0
|
|