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
curl -s https://raw.githubusercontent.com/rancher/k3d/master/install.sh | bash
k3d create
export KUBECONFIG=$(k3d get-kubeconfig)
原文:https://www.cnblogs.com/aric2016/p/12770844.html