#问题一:8080端口未开 #解决方案: echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> ~/.bash_profile source ~/.bash_profile #问题二: [kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused. #解决方案: vim /usr/lib/systemd/system/docker.service ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --exec-opt native.cgroupdriver=systemd
sudo systemctl daemon-reload sudo systemctl restart docker #问题三: node Failed to get imageFs info: non-existent label "docker-images" 解决方案: 重启一下 k8s #问题五 The connection to the server 10.0.2.15:6443 was refused - did you specify the right host or port? 解决方案: sudo -i swapoff -a exit strace -eopenat kubectl version
创建 Nginx 应用
1 2 3
kubeadm run nginx-deploy --image=nginx:1.14-alpine --port=80 --replicas=2