Skip to content

Commit

Permalink
Bind ingress controller to linux nodes to avoid Windows scheduling on…
Browse files Browse the repository at this point in the history
… kubernetes cluster includes linux nodes and windows nodes
  • Loading branch information
wawa0210 committed Oct 13, 2019
1 parent 2c6fbdc commit 1908d0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deploy/static/mandatory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ spec:
# wait up to five minutes for the drain of connections
terminationGracePeriodSeconds: 300
serviceAccountName: nginx-ingress-serviceaccount
nodeSelector:
kubernetes.io/os: linux

This comment has been minimized.

Copy link
@petersalomonsen

petersalomonsen Oct 14, 2019

I'm using the default kubernetes version with Azure Kubernetes Service, and had to change to beta.kubernetes.io/os: linux to make it work. Would it be possible to add an additional selector?

This comment has been minimized.

Copy link
@nayasis

nayasis Oct 25, 2019

I experienced similar issue...

This comment has been minimized.

Copy link
@tobiasmcnulty

tobiasmcnulty Oct 26, 2019

Same on AWS EKS. I just removed this additional altogether, since my cluster is Linux-only...

This comment has been minimized.

Copy link
@tobiasmcnulty

tobiasmcnulty Oct 26, 2019

I created an issue here: #4718

This comment has been minimized.

Copy link
@aledbf

aledbf Oct 26, 2019

Member

Well, this is a chicken and egg situation, if we don't have this annotation, hybrid clusters cannot use the ingress controller and clusters using old versions of Kubernetes (beta.kubernetes.io/os is deprecated) cannot schedule the pod because kubernetes.io/os is not supported.

For those reasons, I only see two options:

  • Remove the annotation and only add a note in the deployment docs
  • Change the location of the note. Currently is

Screenshot from 2019-10-26 19-09-10

This comment has been minimized.

Copy link
@tobiasmcnulty

tobiasmcnulty Oct 26, 2019

Oh, sure enough. Maybe it's fine then since (in theory) this issue will go away once the default K8s version on these cloud providers is 1.14+

This comment has been minimized.

Copy link
@wawa0210

wawa0210 Oct 27, 2019

Author Contributor

Because this label kubernetes.io/os was added after 1.14. The original label beta.kubernetes.io/os will be deprecated in later versions.

containers:
- name: nginx-ingress-controller
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.26.1
Expand Down
2 changes: 2 additions & 0 deletions deploy/static/with-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ spec:
# wait up to five minutes for the drain of connections
terminationGracePeriodSeconds: 300
serviceAccountName: nginx-ingress-serviceaccount
nodeSelector:
kubernetes.io/os: linux
containers:
- name: nginx-ingress-controller
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.26.1
Expand Down

0 comments on commit 1908d0e

Please sign in to comment.