其他分享
首页 > 其他分享> > Rancher加入k8s集群

Rancher加入k8s集群

作者:互联网

Rancher+k8s

1.准备工作

ip 主机名 配置
172.16.215.130 K8s-Master 2U2G
172.16.215.132 K8s-Node01 1U2G
172.16.215.133 rancher 2U2G

2.安装Rancher

3.添加k8s集群

3.1导入方式

4.一些k8s命令

kubectl get pods --all-namespaces -o wide
kubectl logs cattle-cluster-agent-65b74b775c-b2q5l -n cattle-system
# 获取pod
[root@k8s-master ~]# kubectl get pods -n cattle-system
NAME                                    READY   STATUS             RESTARTS   AGE
cattle-cluster-agent-6d9b5d97b9-fspbr   0/1     CrashLoopBackOff   7          13m
cattle-cluster-agent-d6d8d494-4vpfw     0/1     CrashLoopBackOff   9          27m
# 删除pod
kubectl delete pod cattle-cluster-agent-6d9b5d97b9-fspbr -n cattle-system

# 获取deployment
kubectl get deployment -n cattle-system
NAME                   READY   UP-TO-DATE   AVAILABLE   AGE
cattle-cluster-agent   0/1     1            0           31m

# 删除deployment
kubectl delete deployment cattle-cluster-agent -n cattle-system

标签:kubectl,--,rancher,集群,cattle,Rancher,pod,k8s
来源: https://www.cnblogs.com/xujunkai/p/14670827.html