From 71f7de4740ea544fc15c5fd27996d9f947308c9e Mon Sep 17 00:00:00 2001 From: Jose Lamego Date: Wed, 10 Oct 2018 14:11:10 -0500 Subject: [PATCH] kubernetes: Add /etc/hosts file Kubernetes looks for a hosts file that is not delivered by default. This change creates (or adds to it if it exists) the /etc/hosts file with the localhost and hostname mapping to IP 127.0.0.1 Signed-off-by: Jose Lamego --- source/clear-linux/tutorials/kubernetes.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/clear-linux/tutorials/kubernetes.rst b/source/clear-linux/tutorials/kubernetes.rst index 8f5dc748..2be546a7 100644 --- a/source/clear-linux/tutorials/kubernetes.rst +++ b/source/clear-linux/tutorials/kubernetes.rst @@ -103,6 +103,12 @@ deployment and your security needs. "sudo systemctl mask `sed -r -n -e 's#^/dev/\([0-9a-z]*\).*#dev-\1.swap#p' /proc/swaps`" with "sudo systemctl mask $(sed -n -e 's#^/dev/([0-9a-z]).#dev-\1.swap#p' /proc/swaps)" +#. Create (or edit if it exists) the hosts file that kubernetes will read to locate + master's host: + + .. code-block:: bash + + echo "127.0.0.1 localhost `hostname`" >> /etc/hosts #. Configure the Kubernetes runtime interface, either: