版本:
docker desktop : 3.0.4(51218)
docker Engine:20.10.2
kubernetes:v1.19.3
镜像准备
images=( # 下面的镜像应该去除"k8s.gcr.io/"的前缀,版本换成上面获取到的版本
kube-apiserver:v1.19.3
kube-controller-manager:v1.19.3
kube-scheduler:v1.19.3
kube-proxy:v1.19.3
pause:3.2
etcd:3.4.13-0
coredns:1.6.7
)
for imageName in ${images[@]} ; do
#docker pull k8s.gcr.io/$imageName
docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/$imageName
docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/$imageName k8s.gcr.io/$imageName
docker rmi registry.cn-hangzhou.aliyuncs.com/google_containers/$imageName
done
相关命令
docker运行日志:~/Library/Containers/com.docker.docker/Data/log
获取token
kubectl -n kube-system describe secret default| awk '$1=="token:"{print $2}'
kubernetes-dashboard
从github上安装recommended.yaml 时注意namespaces是否一致,否则会无法正常访问:http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/login