Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • v2.28.0
  • v2.27.0
  • v2.25.1
  • v2.24.3
  • v2.26.0
  • v2.24.2
  • v2.25.0
  • v2.24.1
  • v2.22.2
  • v2.23.3
  • v2.24.0
  • v2.23.2
  • v2.23.1
  • v2.23.0
  • v2.22.1
  • v2.22.0
  • v2.21.0
  • v2.20.0
  • v2.19.1
  • v2.18.2
21 results

nodes.md

Blame
  • nodes.md 4.61 KiB

    Adding/replacing a node

    Modified from comments in #3471

    Limitation: Removal of first kube_control_plane and etcd-master

    Currently you can't remove the first node in your kube_control_plane and etcd-master list. If you still want to remove this node you have to:

    1) Change order of current masters

    Modify the order of your master list by pushing your first entry to any other position. E.g. if you want to remove node-1 of the following example:

      children:
        kube_control_plane:
          hosts:
            node-1:
            node-2:
            node-3:
        kube_node:
          hosts:
            node-1:
            node-2:
            node-3:
        etcd:
          hosts:
            node-1:
            node-2:
            node-3:

    change your inventory to:

      children:
        kube_control_plane:
          hosts:
            node-2:
            node-3:
            node-1:
        kube_node:
          hosts:
            node-2:
            node-3:
            node-1:
        etcd:
          hosts:
            node-2:
            node-3:
            node-1:

    2) Upgrade the cluster

    run upgrade-cluster.yml or cluster.yml. Now you are good to go on with the removal.

    Adding/replacing a worker node

    This should be the easiest.

    1) Add new node to the inventory

    2) Run scale.yml

    You can use --limit=NODE_NAME to limit Kubespray to avoid disturbing other nodes in the cluster.

    Before using --limit run playbook facts.yml without the limit to refresh facts cache for all nodes.

    3) Remove an old node with remove-node.yml

    With the old node still in the inventory, run remove-node.yml. You need to pass -e node=NODE_NAME to the playbook to limit the execution to the node being removed.

    If the node you want to remove is not online, you should add reset_nodes=false to your extra-vars: -e node=NODE_NAME -e reset_nodes=false. Use this flag even when you remove other types of nodes like a master or etcd nodes.