1.your configuration file uses an old API spec: "kubeadm.k8s.io/v1alpha2".

执行kubeadm init --config /etc/kubernetes/kubeadm-master.config --ignore-preflight-errors=all报错

apiVersion: kubeadm.k8s.io/v1alpha3
kind: MasterConfiguration

2.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.

[root@localhost kubernetes]# vi /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true --fail-swap-on=false"
[root@localhost kubernetes]# systemctl daemon-reload  
[root@localhost kubernetes]# systemctl restart kubelet

 

 

3./etc/kubernetes/manifests/kube-apiserver.yaml already exists

rm -rf /etc/kubernetes/manifests

 4.kubectl get pod状态为ErrImagePull && ImagePullBackOff  ErrImageNeverPull,请确保node上有相应的镜像,没有则在node机器上进行docker pull,且deployment中imagePullPolicy:IfNotPresent

image: tomcat:8 #确保node节点上有该镜像且可正常运行,注意是node节点机器上,不是master机器
         imagePullPolicy: IfNotPresent ##Always,IfNotPresent,Never

 

转载于:https://www.cnblogs.com/pu20065226/p/10641312.html

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐