Kubernetes

Kubernetes


25969

Note

Fixed in the MCP 2019.2.2 update, see: MCP 2019.2.2 addressed issues.

The OpenStack cloud provider redefines the internal IP of the Kubernetes nodes with an IP of every NIC and can assign a wrong IP address as a primary address of a node. This can lead to failures in the output of the kubectl exec and kubectl logs commands.

Workaround:

  1. Log in to any Kubernetes node.

  2. Choose from the following options:

    • If the Kubernetes VMs have two network interfaces:

      1. In /etc/kubernetes/cloud-config, set the public-network-name cfg option for OpenStack cloud provider to the name of the OpenStack environment public network:

        [Networking]
        public-network-name=public
        
      2. Apply the changes:

        • On the Kubernetes Master node, run:

          systemctl restart openstack-cloud-controller-manager
          
        • On the Kubernetes Node, run:

          systemctl restart kubelet
          
      3. Repeat the steps 1-2 on the remaining Kubernetes Master nodes and Kubernetes nodes.

    • If the Kubernetes VMs have more than two network interfaces:

      1. In /etc/default/kubelet, set the kubelet --address parameter to 0.0.0.0 for kubelet to listen to all interfaces.

        Warning

        This setting may have a security impact on a Kubernetes cloud.

      2. Apply the changes:

        systemctl restart kubelet
        
      3. Repeat the steps 1-2 on the remaining Kubernetes Master nodes and Kubernetes nodes.