Skip to content

Commit

Permalink
Don't explicitly set insecure-bind-address on newer k8s
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole Markus With committed Sep 9, 2020
1 parent d7fbc2f commit 5f10b87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/model/components/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ func (b *KubeAPIServerOptionsBuilder) BuildOptions(o interface{}) error {
c.SecurePort = 443

c.BindAddress = "0.0.0.0"
c.InsecureBindAddress = "127.0.0.1"

c.AllowPrivileged = fi.Bool(true)
c.ServiceClusterIPRange = clusterSpec.ServiceClusterIPRange
Expand Down Expand Up @@ -217,9 +216,11 @@ func (b *KubeAPIServerOptionsBuilder) BuildOptions(o interface{}) error {

if b.IsKubernetesGTE("1.17") {
// We query via the kube-apiserver-healthcheck proxy, which listens on port 3990
c.InsecureBindAddress = ""
c.InsecurePort = 0
} else {
// Older versions of kubernetes continue to rely on the insecure port: kubernetes issue #43784
c.InsecureBindAddress = "127.0.0.1"
c.InsecurePort = 8080
}

Expand Down

0 comments on commit 5f10b87

Please sign in to comment.