ユーザ用ツール

サイト用ツール


サイドバー

このページの翻訳:



最近の更新



Tag Cloud

06_virtualization:05_container:15_kubernetes_error

文書の過去の版を表示しています。


15 Kubernetes Error

ContainerCreatingままスタック

kubectl describe pods で見ると下記のエラーが出ている

  Warning  FailedCreatePodSandBox  90s               kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "49a5d016c6aacfbea51d08b00f0edef8575396ba4843294ee176269bdc2d4132": failed to delegate add: failed to set bridge addr: "cni0" already has an IP address different from 10.244.6.1/24

対応

Nodeを1度再起動してあげれば治る

Unable to connect to the server: x509

Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")

対応

下記実行

mkdir -p $HOME/.kube
cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
chown $(id -u):$(id -g) $HOME/.kube/config
unset KUBECONFIG
export KUBECONFIG=/etc/kubernetes/admin.conf

rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService

root@g-master:~# kubeadm init --pod-network-cidr=10.224.0.0/16
[init] Using Kubernetes version: v1.23.5
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
	[ERROR CRI]: container runtime is not running: output: time="2022-04-19T02:14:43Z" level=fatal msg="getting status of runtime: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService"
, error: exit status 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher

対応

rm /etc/containerd/config.toml
systemctl restart containerd

Warning FailedScheduling that the pod didn't tolerate

  Warning  FailedScheduling  63s   default-scheduler  0/4 nodes are available: 1 node(s) had taint {node-role.kubernetes.io/master: }, that the pod didn't tolerate, 3 node(s) had taint {node.kubernetes.io/not-ready: }, that the pod didn't tolerate.

対応1

taintが付いている可能性

これはマスターはスケージュールしないというtaint
taintの後ろに「-」ハイフンを付けると、untaintする。

# kubectl describe node g-master | grep -i taint
Taints:             node-role.kubernetes.io/master:NoSchedule

#kubectl taint node g-master node-role.kubernetes.io/master:NoSchedule-

# kubectl describe node g-master | grep -i taint
Taints:             node.kubernetes.io/not-ready:NoSchedule

対応2

STATUSがNotReady、これだとスケージュールされない

# kubectl get node
NAME       STATUS     ROLES                  AGE    VERSION
g-master   NotReady   control-plane,master   147m   v1.23.5
g-work01   NotReady   <none>                 146m   v1.23.5
g-work02   NotReady   <none>                 146m   v1.23.5
g-work03   NotReady   <none>                 52m    v1.23.5

fannelがapplyされてない可能性

# kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
06_virtualization/05_container/15_kubernetes_error.1650343619.txt.gz · 最終更新: 2022/04/19 13:46 by matsui