PodSecurity: update webhook manifest to use named port

This commit is contained in:
Jordan Liggitt 2021-11-03 11:36:04 -04:00
parent f6456d098e
commit 9f92fb0d7e
2 changed files with 7 additions and 3 deletions

View File

@ -31,7 +31,11 @@ spec:
image: k8s.gcr.io/sig-auth/pod-security-webhook:v1.23-beta.0
terminationMessagePolicy: FallbackToLogsOnError
ports:
- containerPort: 8443
- name: webhook
# A port > 1024 avoids needing low port bind privileges.
# Using the same port as the kubelet is likely to already be permitted in apiserver -> node firewall rules.
# The pod has its own IP and doesn't run with hostNetwork, so there's no port conflict with the kubelet.
containerPort: 10250
args:
[
"--config",
@ -41,7 +45,7 @@ spec:
"--tls-private-key-file",
"/etc/pki/tls.key",
"--secure-port",
"8443",
"10250",
]
resources:
requests:

View File

@ -8,7 +8,7 @@ metadata:
spec:
ports:
- port: 443
targetPort: 8443
targetPort: webhook
protocol: TCP
name: https
selector: