0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

NGINX Ingress ControllerのPodがPendingになる

Posted at

環境

  • EKS v1.13
  • NGINX Ingress Controller 0.26.1

事象

公式通りにデプロイ

$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml

Pendingになる

$ kubectl get pod -n ingress-nginx
NAME                                       READY     STATUS    RESTARTS   AGE
nginx-ingress-controller-5bcd4b688-9hlzz   0/1       Pending   0          2m50s

describe pod(eventのみ記載)

$ kubectl describe pod -n ingress-nginx
Events:
  Type     Reason            Age                From               Message
  ----     ------            ----               ----               -------
  Warning  FailedScheduling  17s (x2 over 17s)  default-scheduler  0/3 nodes are available: 3 node(s) didn't match node selector.

スケジューラが適切なノードが発見できない、と言っている。
ちなみに、kubectl logsは、ログが出力されませんでした。つまりコンテナは作成されていない。

ノードに異常は見られない

$ kubectl get node -o wide
NAME                                        STATUS    ROLES     AGE       VERSION               INTERNAL-IP   EXTERNAL-IP   OS-IMAGE         KERNEL-VERSION                  CONTAINER-RUNTIME
ip-10-0-16-149.us-east-2.compute.internal   Ready     <none>    146m      v1.13.11-eks-5876d6   10.0.16.149   <none>        Amazon Linux 2   4.14.146-119.123.amzn2.x86_64   docker://18.6.1
ip-10-0-44-207.us-east-2.compute.internal   Ready     <none>    146m      v1.13.11-eks-5876d6   10.0.44.207   <none>        Amazon Linux 2   4.14.146-119.123.amzn2.x86_64   docker://18.6.1
ip-10-0-78-170.us-east-2.compute.internal   Ready     <none>    146m      v1.13.11-eks-5876d6   10.0.78.170   <none>        Amazon Linux 2   4.14.146-119.123.amzn2.x86_64   docker://18.6.1

直接的な原因

NginxのPodにNodeSelectorが追加された

背景

KubernetesがWindowsノードにも対応していくが、NGINX Ingress ControllerはLinuxノードで起動する必要があるため、NodeSelectorが追加された。
恐らく、今後はkubeadmやクラウドのマネージドサービスなど、ノードにはデフォルトでLinux/Windowsを示すラベルが貼られるのだと思う。
たぶん公式のWell-Known Labelsにあるようなものだろう。

おわり

何か不思議に感じたら最新の公式手順最新のマニフェストを見た方が良いと思います。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?