1
0
mirror of https://github.com/rancher/rke.git synced 2025-08-22 08:35:49 +00:00

Don't schedule Linux addons to Windows node

**Problem:**
Schedule default-http-backend and metrics-server to Windows node will be failed.

**Solution:**
Add nodeAffinity to default-http-backend and metrics-server workload
spec

**Issue:**
https://github.com/rancher/rancher/issues/19929
This commit is contained in:
Frank Mai 2019-05-02 22:58:59 +08:00 committed by Alena Prokharchyk
parent 1127a90a9c
commit d3c89372bf
2 changed files with 18 additions and 0 deletions

View File

@ -106,6 +106,15 @@ spec:
labels:
k8s-app: metrics-server
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: beta.kubernetes.io/os
operator: NotIn
values:
- windows
serviceAccountName: metrics-server
containers:
- name: metrics-server

View File

@ -275,6 +275,15 @@ spec:
labels:
app: default-http-backend
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: beta.kubernetes.io/os
operator: NotIn
values:
- windows
terminationGracePeriodSeconds: 60
containers:
- name: default-http-backend