安装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秘钥配置。

相关文章:

  • 2021-09-16
  • 2021-11-06
  • 2021-11-20
  • 2023-02-26
  • 2022-01-29
  • 2022-02-27
  • 2023-02-25
  • 2021-08-23
猜你喜欢
  • 2022-02-22
  • 2022-12-23
  • 2022-02-02
  • 2022-12-23
  • 2022-12-23
  • 2022-01-17
  • 2022-12-23
相关资源
相似解决方案