mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-30 06:13:29 -02:30
Set priorityClassName and priority on static pods (#13580)
With priority only (#13490), the API server rejects the mirror pods and the kubelet does not give the pods the node-critical OOM score. Set both fields, like kubeadm does for its static pods. Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com> Co-authored-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
This commit is contained in:
co-authored by
Ali Afsharzadeh
parent
fcf9f9d6f0
commit
99086c85bf
@@ -13,10 +13,10 @@ spec:
|
|||||||
dnsPolicy: ClusterFirstWithHostNet
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/os: linux
|
kubernetes.io/os: linux
|
||||||
{# Static pods do not support priorityClassName, so set the numeric priority of
|
{# Set both, like kubeadm. The kubelet does not resolve priorityClassName for static pods,
|
||||||
system-node-critical directly, otherwise kubelet may evict this pod early:
|
and the API server rejects the mirror pod when priority does not match the class. #}
|
||||||
https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#pod-selection-for-kubelet-eviction #}
|
|
||||||
priority: 2000001000
|
priority: 2000001000
|
||||||
|
priorityClassName: system-node-critical
|
||||||
containers:
|
containers:
|
||||||
- name: haproxy
|
- name: haproxy
|
||||||
image: {{ haproxy_image_repo }}:{{ haproxy_image_tag }}
|
image: {{ haproxy_image_repo }}:{{ haproxy_image_tag }}
|
||||||
|
|||||||
@@ -144,10 +144,10 @@ spec:
|
|||||||
- kubernetes
|
- kubernetes
|
||||||
ip: 127.0.0.1
|
ip: 127.0.0.1
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
{# Static pods do not support priorityClassName, so set the numeric priority of
|
{# Set both, like kubeadm. The kubelet does not resolve priorityClassName for static pods,
|
||||||
system-node-critical directly, otherwise kubelet may evict this pod early:
|
and the API server rejects the mirror pod when priority does not match the class. #}
|
||||||
https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#pod-selection-for-kubelet-eviction #}
|
|
||||||
priority: 2000001000
|
priority: 2000001000
|
||||||
|
priorityClassName: system-node-critical
|
||||||
volumes:
|
volumes:
|
||||||
- hostPath:
|
- hostPath:
|
||||||
path: /etc/kubernetes/{{kube_vip_admin_conf}}
|
path: /etc/kubernetes/{{kube_vip_admin_conf}}
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ spec:
|
|||||||
dnsPolicy: ClusterFirstWithHostNet
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/os: linux
|
kubernetes.io/os: linux
|
||||||
{# Static pods do not support priorityClassName, so set the numeric priority of
|
{# Set both, like kubeadm. The kubelet does not resolve priorityClassName for static pods,
|
||||||
system-node-critical directly, otherwise kubelet may evict this pod early:
|
and the API server rejects the mirror pod when priority does not match the class. #}
|
||||||
https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#pod-selection-for-kubelet-eviction #}
|
|
||||||
priority: 2000001000
|
priority: 2000001000
|
||||||
|
priorityClassName: system-node-critical
|
||||||
containers:
|
containers:
|
||||||
- name: nginx-proxy
|
- name: nginx-proxy
|
||||||
image: {{ nginx_image_repo }}:{{ nginx_image_tag }}
|
image: {{ nginx_image_repo }}:{{ nginx_image_tag }}
|
||||||
|
|||||||
Reference in New Issue
Block a user