Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit 616e523

Browse files
authored
Add --advertise-address to bootstrap-apiserver manifest. (#460)
This should ensure that the bootstrap apiserver advertises itself on the same interface as the kubelet (since hostnetwork = true) rather than an arbitrary one. Fixes #453.
1 parent f5236e5 commit 616e523

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/asset/internal/templates.go

+6
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ spec:
238238
- /hyperkube
239239
- apiserver
240240
- --admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,ResourceQuota
241+
- --advertise-address=$(POD_IP)
241242
- --allow-privileged=true
242243
- --authorization-mode=RBAC
243244
- --bind-address=0.0.0.0
@@ -258,6 +259,11 @@ spec:
258259
- --tls-ca-file=/etc/kubernetes/secrets/ca.crt
259260
- --tls-cert-file=/etc/kubernetes/secrets/apiserver.crt
260261
- --tls-private-key-file=/etc/kubernetes/secrets/apiserver.key
262+
env:
263+
- name: POD_IP
264+
valueFrom:
265+
fieldRef:
266+
fieldPath: status.podIP
261267
volumeMounts:
262268
- mountPath: /etc/ssl/certs
263269
name: ssl-certs-host

0 commit comments

Comments
 (0)