k3d安装k3s


k3d安装k3s

安装kubectl

curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.17.4/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl

安装k3d

curl -s https://raw.githubusercontent.com/rancher/k3d/master/install.sh | bash

# 单master
k3d create
export KUBECONFIG=$(k3d get-kubeconfig)
# 集群1master +2 worker
k3d create  rancher/k3s:v1.0.0  --workers 2
export KUBECONFIG=$(k3d get-kubeconfig)

如果重复操作,注意删除$(k3d get-kubeconfig)所指向的config秘钥配置。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM