安装Rancher并导入现有k8s集群

 

docker run -d --privileged --restart=unless-stopped \

-p 80:80 -p 443:443 \
-e NO_PROXY="localhost,127.0.0.1,0.0.0.0,10.0.0.0/8,192.168.0.0/24" \
rancher/rancher:latest

Rancher 登录地址:

https://116.63.40.110

 

 

 

 然后输入集群名字点创建:

 

 在安装Rancher服务的主机上执行如下,集群导入命令:

[root@node1 ~]# curl --insecure -sfL https://116.63.40.110/v3/import/xmnrn2h25nbwb6fm29js7zc6ftjdk45k94j5mtcl6mnp78gmcnm22s_c-m-zj2dmtgx.yaml | kubectl apply -f -

clusterrole.rbac.authorization.k8s.io/proxy-clusterrole-kubeapiserver created
clusterrolebinding.rbac.authorization.k8s.io/proxy-role-binding-kubernetes-master created
namespace/cattle-system created
serviceaccount/cattle created
clusterrolebinding.rbac.authorization.k8s.io/cattle-admin-binding created
secret/cattle-credentials-3d91dc1 created
clusterrole.rbac.authorization.k8s.io/cattle-admin created
deployment.apps/cattle-cluster-agent created
service/cattle-cluster-agent created

等导入集群状态就绪。

 

 

posted @ 2022-10-14 17:41  beawh  阅读(868)  评论(0编辑  收藏  举报