0/1 nodes are available: 1 node(s) had taints that the pod didn't tolerate.報錯
這是因為k8s集群默認不讓在master節點創建pod,也就是說Master Node不參與工作負載。
①允許master部署pod
[root@k8s-master nginx]# kubectl taint nodes --all node-role.kubernetes.io/master-
node/k8s-master untainted
②禁止master部署pod
[root@k8s-master]# kubectl taint nodes k8s node-role.kubernetes.io/master=true:NoSchedule