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 <jose.a.lamego@intel.com>
This commit is contained in:
Jose Lamego
2018-10-10 14:11:10 -05:00
parent 5ea027a47c
commit 71f7de4740
@@ -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: