Expanding or Shrinking a Kubernetes Cluster

Prerequisites

The hosts that will added to the Kubernetes cluster must be added to the deployment before you can add them to the Kubernetes cluster.

If you are expanding a Kubernetes cluster that was created on a previous version of HPE Ezmeral Runtime Enterprise and has not been migrated to use the Hewlett Packard Enterprise distribution of Kubernetes,you must override the default Kubernetes runtime when you add the new hosts to the deployment.

See Kubernetes Worker Installation Overview.

About this task

You can expand or shrink the size of an internal (not imported) Kubernetes cluster while editing that cluster.

If you are expanding a Kubernetes cluster that was created on a previous version of HPE Ezmeral Runtime Enterprise and has not been migrated to use the Hewlett Packard Enterprise distribution of Kubernetes, you must select hosts that use the Docker container runtime (see Prerequisites). Otherwise, select hosts that use the containerd runtime.

Procedure

  1. In the Kubernetes Clusters screen (see The Kubernetes Clusters Screen), click the Edit icon (pencil).

    The Step 1: Hosts Configuration screen appears.

  2. In the Masters row of the Hosts table, hover the mouse over a host in the Available column.

    A right arrow appears.

  3. Click the arrow.

    The selected host moves from the Available Hosts column to the Selected Hosts column. If you make a mistake, you may hover the mouse over a selected host and then click the left arrow to move it back to the Available Hosts column. You must select an odd number of Master hosts in order to have a quorum (e.g. 3, 5, 7, etc.). Selecting three or more Master hosts provides High Availability protection for the Kubernetes cluster.

    TIP
    You can search for hosts by clicking the Search icon (magnifying glass) above any of the four cells in the Hosts table and then typing any portion of the hostname. The list of hosts automatically refreshes as you type.

    By default, a taint is placed on the Master hosts that prevents them from being able to run pods. You must untaint these hosts if you want them, to be available to run pods, as described here (link opens an external web site in a new browser tab/window).

    • Expanding from 1 Master host to 3 Master hosts adds High Availability protection to the Kubernetes cluster.
    • Shrinking from 3 Master hosts to 1 Master host removes High Availability protection from the Kubernetes cluster. Further, if the Master hosts have been untainted, attempting to shrink the number of Master hosts may fail if this would not leave sufficient resources for the pods within that cluster.
  4. Repeat Steps 4 and 5 for the Worker Hosts.

    You may add or remove as many Worker hosts as needed to this cluster. Removing Worker hosts may fail if doing so would not leave sufficient resources for the pods within that cluster.