Change Hostnames

CHANGE KUBERNETES

Warning: Whenever you teardown the cluster be sure to back up your data first.

To change a node's hostname, you must teardown your Kubernetes cluster.

sevone-cli cluster down

UPDATE ANSIBLE INVENTORY

  1. Run the following command on every node to change their hostname.
    Example
    sudo hostnamectl set-hostname "sdi-node01"
  2. On the control plane node, update /etc/ansible/hosts with your new hostname.
    Example
    [server]
    sdi-node01 ansible_connection=local
  3. If you have agent nodes, update their hostnames as well.
    Example
    [server]
    sdi-node01 ansible_connection=local
    
    [agent]
    sdi-node02 ansible_host=10.123.45.68
    sdi-node03 ansible_host=10.123.45.69

PROVISION KUBERNETES

Warning: If you have torn down a running cluster, after executing the command below, you must restore your data first.
sevone-cli cluster up