0
点赞
收藏
分享

微信扫一扫

nodes are available: 1 node(s) had taints that the pod didn‘t tolerate

Java架构领域 2022-01-17 阅读 74

首先、异常的发现

Troubleshooting was easy... kubectl describe node <node> revealed the taint, and figuring out the required configuration change was simple.

$ kubectl get nodes                                                                                                         
NAME      STATUS   ROLES    AGE   VERSION                                                                                            
homelab   Ready    master   23h   v1.17.0

$ kubectl describe node homelab
Name:               homelab
Roles:              master
Labels:             beta.kubernetes.io/arch=amd64
                    beta.kubernetes.io/os=linux
                    kubernetes.io/arch=amd64
                    kubernetes.io/hostname=homelab
                    kubernetes.io/os=linux
                    node-role.kubernetes.io/master=
Annotations:        kubeadm.alpha.kubernetes.io/cri-socket: /var/run/dockershim.sock                                             
                    node.alpha.kubernetes.io/ttl: 0
                    volumes.kubernetes.io/controller-managed-attach-detach: true                                                 
CreationTimestamp:  Sat, 28 Dec 2019 13:28:27 -0800
Taints:             node-role.kubernetes.io/master:NoSchedule
Unschedulable:      false

官方描述

And there it is – by default, kubeadm init configured this node as a Kubernetes master, which would normally take care for managing other Kubernetes "worker" (or "non-master") nodes. The Kubernetes Concepts documentation describes the distinction between the Kubernetes master and non-master nodes as follows:

So anyway, as soon as I saw node-role.kubernetes.io/master:NoSchedule I began nodding my head, realizing what the issue was. One Google search returned me straight back to the very installation guide I followed I had skimmed over, and the instruction I had skipped:

So... one quick kubectl taint nodes --all node-role.kubernetes.io/master- command later, and my single-node K8s cluster was now actually useful for running pods!

NOTE: there's a LOT more output from kubectl describe node <node> that this; I'm just trimming the rest for brevity; all we needed was this clue about the configured Taints.

举报

相关推荐

0 条评论