安装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 @   beawh  阅读(892)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 一文读懂知识蒸馏
· 终于写完轮子一部分:tcp代理 了,记录一下
点击右上角即可分享
微信分享提示