From d8d1468f03ecbe4b13c7125d8f0d0d2049ab4a8c Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Sun, 15 Apr 2018 21:54:12 -0700 Subject: [PATCH] Update kubelet system container image to mount /etc/hosts * Fix kubelet port-forward on Google Cloud / Fedora Atomic * Mount the host's /etc/hosts in kubelet system containers * Problem: kubelet runc system containers on Atomic were not mounting the host's /etc/hosts, like rkt-fly does on Container Linux. `kubectl port-forward` calls socat with localhost. DNS servers on AWS, DO, and in many bare-metal environments resolve localhost to the caller as a convenience. Google Cloud notably does not nor is it required to do so and this surfaced the missing /etc/hosts in runc kubelet namespaces. --- aws/fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl | 2 +- aws/fedora-atomic/kubernetes/workers/cloudinit/worker.yaml.tmpl | 2 +- .../fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl | 2 +- bare-metal/fedora-atomic/kubernetes/cloudinit/worker.yaml.tmpl | 2 +- .../fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl | 2 +- .../fedora-atomic/kubernetes/cloudinit/worker.yaml.tmpl | 2 +- .../fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl | 2 +- .../fedora-atomic/kubernetes/workers/cloudinit/worker.yaml.tmpl | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/aws/fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl b/aws/fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl index 1a5493a4..7cebe94c 100644 --- a/aws/fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl +++ b/aws/fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl @@ -111,7 +111,7 @@ runcmd: - "atomic install --system --name=etcd quay.io/dghubble/etcd:0265e6680d2533f3fbf4512af868d29ff07451ca" - [systemctl, start, --no-block, etcd.service] - [systemctl, enable, cloud-metadata.service] - - "atomic install --system --name=kubelet quay.io/dghubble/kubelet:8767d4433f7c5a38c55edf6e682efb53fcd06f61" + - "atomic install --system --name=kubelet quay.io/dghubble/kubelet:0c2a541d26c1716f495f1dd17c26e9b36304eede" - [systemctl, start, --no-block, kubelet.service] users: - default diff --git a/aws/fedora-atomic/kubernetes/workers/cloudinit/worker.yaml.tmpl b/aws/fedora-atomic/kubernetes/workers/cloudinit/worker.yaml.tmpl index f904fb3f..fab918bb 100644 --- a/aws/fedora-atomic/kubernetes/workers/cloudinit/worker.yaml.tmpl +++ b/aws/fedora-atomic/kubernetes/workers/cloudinit/worker.yaml.tmpl @@ -59,7 +59,7 @@ bootcmd: runcmd: - [systemctl, daemon-reload] - [systemctl, enable, cloud-metadata.service] - - "atomic install --system --name=kubelet quay.io/dghubble/kubelet:8767d4433f7c5a38c55edf6e682efb53fcd06f61" + - "atomic install --system --name=kubelet quay.io/dghubble/kubelet:0c2a541d26c1716f495f1dd17c26e9b36304eede" - [systemctl, start, --no-block, kubelet.service] users: - default diff --git a/bare-metal/fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl b/bare-metal/fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl index 7d573434..afad8ab2 100644 --- a/bare-metal/fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl +++ b/bare-metal/fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl @@ -101,7 +101,7 @@ runcmd: - "atomic install --system --name=etcd quay.io/dghubble/etcd:0265e6680d2533f3fbf4512af868d29ff07451ca" - [systemctl, start, --no-block, etcd.service] - [hostnamectl, set-hostname, ${domain_name}] - - "atomic install --system --name=kubelet quay.io/dghubble/kubelet:8767d4433f7c5a38c55edf6e682efb53fcd06f61" + - "atomic install --system --name=kubelet quay.io/dghubble/kubelet:0c2a541d26c1716f495f1dd17c26e9b36304eede" - [systemctl, enable, kubelet.path] - [systemctl, start, --no-block, kubelet.path] users: diff --git a/bare-metal/fedora-atomic/kubernetes/cloudinit/worker.yaml.tmpl b/bare-metal/fedora-atomic/kubernetes/cloudinit/worker.yaml.tmpl index 98d3785c..11d9181c 100644 --- a/bare-metal/fedora-atomic/kubernetes/cloudinit/worker.yaml.tmpl +++ b/bare-metal/fedora-atomic/kubernetes/cloudinit/worker.yaml.tmpl @@ -49,7 +49,7 @@ bootcmd: runcmd: - [systemctl, daemon-reload] - [hostnamectl, set-hostname, ${domain_name}] - - "atomic install --system --name=kubelet quay.io/dghubble/kubelet:8767d4433f7c5a38c55edf6e682efb53fcd06f61" + - "atomic install --system --name=kubelet quay.io/dghubble/kubelet:0c2a541d26c1716f495f1dd17c26e9b36304eede" - [systemctl, enable, kubelet.path] - [systemctl, start, --no-block, kubelet.path] users: diff --git a/digital-ocean/fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl b/digital-ocean/fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl index 2c816d0d..0dcaa039 100644 --- a/digital-ocean/fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl +++ b/digital-ocean/fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl @@ -115,7 +115,7 @@ runcmd: - "atomic install --system --name=etcd quay.io/dghubble/etcd:0265e6680d2533f3fbf4512af868d29ff07451ca" - [systemctl, start, --no-block, etcd.service] - [systemctl, enable, cloud-metadata.service] - - "atomic install --system --name=kubelet quay.io/dghubble/kubelet:8767d4433f7c5a38c55edf6e682efb53fcd06f61" + - "atomic install --system --name=kubelet quay.io/dghubble/kubelet:0c2a541d26c1716f495f1dd17c26e9b36304eede" - [systemctl, enable, kubelet.path] - [systemctl, start, --no-block, kubelet.path] users: diff --git a/digital-ocean/fedora-atomic/kubernetes/cloudinit/worker.yaml.tmpl b/digital-ocean/fedora-atomic/kubernetes/cloudinit/worker.yaml.tmpl index 610850ba..25dc81ae 100644 --- a/digital-ocean/fedora-atomic/kubernetes/cloudinit/worker.yaml.tmpl +++ b/digital-ocean/fedora-atomic/kubernetes/cloudinit/worker.yaml.tmpl @@ -63,7 +63,7 @@ bootcmd: runcmd: - [systemctl, daemon-reload] - [systemctl, enable, cloud-metadata.service] - - "atomic install --system --name=kubelet quay.io/dghubble/kubelet:8767d4433f7c5a38c55edf6e682efb53fcd06f61" + - "atomic install --system --name=kubelet quay.io/dghubble/kubelet:0c2a541d26c1716f495f1dd17c26e9b36304eede" - [systemctl, enable, kubelet.path] - [systemctl, start, --no-block, kubelet.path] users: diff --git a/google-cloud/fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl b/google-cloud/fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl index c1dedf54..1a04e5d8 100644 --- a/google-cloud/fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl +++ b/google-cloud/fedora-atomic/kubernetes/cloudinit/controller.yaml.tmpl @@ -112,7 +112,7 @@ runcmd: - "atomic install --system --name=etcd quay.io/dghubble/etcd:0265e6680d2533f3fbf4512af868d29ff07451ca" - [systemctl, start, --no-block, etcd.service] - [systemctl, enable, cloud-metadata.service] - - "atomic install --system --name=kubelet quay.io/dghubble/kubelet:8767d4433f7c5a38c55edf6e682efb53fcd06f61" + - "atomic install --system --name=kubelet quay.io/dghubble/kubelet:0c2a541d26c1716f495f1dd17c26e9b36304eede" - [systemctl, start, --no-block, kubelet.service] users: - default diff --git a/google-cloud/fedora-atomic/kubernetes/workers/cloudinit/worker.yaml.tmpl b/google-cloud/fedora-atomic/kubernetes/workers/cloudinit/worker.yaml.tmpl index b0eeee39..e8c6ba9a 100644 --- a/google-cloud/fedora-atomic/kubernetes/workers/cloudinit/worker.yaml.tmpl +++ b/google-cloud/fedora-atomic/kubernetes/workers/cloudinit/worker.yaml.tmpl @@ -60,7 +60,7 @@ bootcmd: runcmd: - [systemctl, daemon-reload] - [systemctl, enable, cloud-metadata.service] - - "atomic install --system --name=kubelet quay.io/dghubble/kubelet:8767d4433f7c5a38c55edf6e682efb53fcd06f61" + - "atomic install --system --name=kubelet quay.io/dghubble/kubelet:0c2a541d26c1716f495f1dd17c26e9b36304eede" - [systemctl, start, --no-block, kubelet.service] users: - default