Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
fix: each apiserver process listens on its own IP address
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis committed Mar 23, 2020
1 parent e9e76b7 commit 7ca9d85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion parts/k8s/cloud-init/masternodecustomdata.yml
Expand Up @@ -412,6 +412,7 @@ MASTER_CONTAINER_ADDONS_PLACEHOLDER
content: |
#!/bin/bash
set -e
PRIVATE_IP=$(hostname -i | cut -d" " -f1)
{{if IsMasterVirtualMachineScaleSets}}
{{if .MasterProfile.IsCoreOS}}
PRIVATE_IP=$(hostname -I | cut -d" " -f1)
Expand All @@ -424,7 +425,7 @@ MASTER_CONTAINER_ADDONS_PLACEHOLDER
# Redirect ILB (4443) traffic to port 443 (ELB) in the prerouting chain
iptables -t nat -A PREROUTING -p tcp --dport 4443 -j REDIRECT --to-port 443
{{end}}
sed -i "s|<advertiseAddr>|{{WrapAsVariable "kubernetesAPIServerIP"}}|g" /etc/kubernetes/manifests/kube-apiserver.yaml
sed -i "s|<advertiseAddr>|$PRIVATE_IP|g" /etc/kubernetes/manifests/kube-apiserver.yaml

{{if EnableDataEncryptionAtRest }}
sed -i "s|<etcdEncryptionSecret>|\"{{WrapAsParameter "etcdEncryptionKey"}}\"|g" /etc/kubernetes/encryption-config.yaml
Expand Down
3 changes: 2 additions & 1 deletion pkg/engine/templates_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7ca9d85

Please sign in to comment.