Changing the Control Plane Ingress IPΒΆ

This procedure describes how to change the Control Plane Ingress IP, and to enable (or disable) MetalLB management of this IP.

Note

Disabling MetalLB using this procedure does not remove MetalLB, it simply disables its use for managing the LoadBalancer Service for MetalK8s Control Plane Ingress.

  1. On the Bootstrap node, update the ip field from networks.controlPlane.ingress in the Bootstrap configuration file. (refer to Bootstrap Configuration)

  2. Refresh the pillar.

    $ salt-call saltutil.refresh_pillar wait=True
    
  3. Check that the change is taken into account.

    $ salt-call metalk8s_network.get_control_plane_ingress_ip
    local:
        <my-new-ip>
    $ salt-call pillar.get networks:control_plane
    local:
      ----------
      cidr:
        - <control-plane-cidr>
      ingress:
        ip:
          <my-new-ip>
      metalLB:
        enabled: <true | false>
    
  4. On the Bootstrap node, reconfigure apiServer:

    $ salt-call state.sls \
        metalk8s.kubernetes.apiserver \
        saltenv=metalk8s-2.10.0-beta3
  5. Reconfigure Control Plane components:

    $ kubectl exec -n kube-system -c salt-master \
        --kubeconfig=/etc/kubernetes/admin.conf \
        $(kubectl --kubeconfig=/etc/kubernetes/admin.conf get pod \
        -l "app.kubernetes.io/name=salt-master" \
        --namespace=kube-system -o jsonpath='{.items[0].metadata.name}')  \
        -- salt-run state.orchestrate \
        metalk8s.orchestrate.update-control-plane-ingress-ip \
        saltenv=metalk8s-2.10.0-beta3
  6. You can access the MetalK8s GUI using this new IP.