Skip to content

Commit

Permalink
Fake --apiserver-advertise-address flag
Browse files Browse the repository at this point in the history
See comment; kubeadm is validating this properly now, so we need to give
it an IP.
  • Loading branch information
discordianfish committed Jan 11, 2019
1 parent 388c934 commit eedc2c1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ $(BUILD_KUBEADM)/sa.pub:

$(BUILD_KUBEADM)/admin.conf: $(BUILD_KUBEADM)/ca.crt
kubeadm alpha phase kubeconfig admin \
--apiserver-advertise-address $(CONTROLLER_FQDN) \
--apiserver-advertise-address 1.2.3.4 \
--cert-dir $(TOP)/$(dir $@)
# FIXME: Somehow --apiserver-advertise-address isn't working so we need to
# patch file manually.
# FIXME: --apiserver-advertise-address requires to use an IP now. We should
# generate a config with apiServer.cert-sans and controlEndpoint and use this
# instead. For now, keep patching file manually.
sed 's|\(server: https://\)[^:]*\(.*\)|\1$(CONTROLLER_FQDN)\2|' \
/etc/kubernetes/admin.conf \
| install -m600 /dev/stdin $(dir $@)/admin.conf

0 comments on commit eedc2c1

Please sign in to comment.