- Add image registry to the
kubeadm init
command as below kubeadm init --pod-network-cidr=10.222.0.0/16 --service-cidr=10.111.0.0/24
--apiserver-advertise-address=192.168.0.182
--image-repository registry.aliyuncs.com/google_containers
- Add this
deb http://packages.cloud.google.com/apt/ kubernetes-xenial main
- Do this
curl -4 -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
- Run below commands to check errors
- kubectl get pods -n kube-system
- kubectl -n kube-system describe pod coredns-576cbf47c7-xxxx
- kubectl -n kube-system logs -f coredns-576cbf47c7-nxxx
- kubectl -n kube-system describe pod kube-apiserver-masternode
- Disable the CoreDNS loop detection
- Edit the CoreDNS configMap
kubectl -n kube-system edit configmap coredns
- Remove CoreDNS pods
kubectl -n kube-system delete pod -l k8s-app=kube-dns
kubectl get nodes -o json | jq '.items[].spec'
kubectl get nodes -o json | jq '.items[].spec.taints'
kubectl get nodes -o custom-columns=NAME:.metadata.name,TAINTS:.spec.taints --no-headers
kubectl get nodes -o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.taints[*].key}{"\n"}{end}'
kubectl get nodes \
-o custom-columns=NAME:.metadata.name,ARCH:.status.nodeInfo.architecture,KERNEL:.status.nodeInfo.kernelVersion,KUBLET:.status.nodeInfo.kubeletVersion,CPU:.status.capacity.cpu,RAM:.status.capacity.memory
docker ps -a | grep private-reg
docker logs -f <container id>. << docker logs
kubectl describe pods private-reg
kubectl --v=8 logs private-reg:
kubectl --v=8 logs ps-agent-2028336249-3pk43 --namespace=default -p
check entrypoint : kubectl logs <pod name> --namespace <ns>