Deploy a Kubernetes cluster on bare metal

Deploy a Kubernetes cluster on bare metal

This section provides the steps to deploy a Kubernetes cluster on bare metal nodes configured using MAAS with Calico as a Kubernetes networking plugin.


OpenContrail 4.x for Kubernetes 1.12 or later is not supported.

To automatically deploy a Kubernetes cluster on bare metal nodes:

  1. Verify that you have completed the steps described in Prerequisites.

  2. Log in to the Jenkins web UI as Administrator.


    To obtain the password for the admin user, run the salt "cid*" _param:jenkins_admin_password command from the Salt Master node.

  3. Find the k8s_ha_calico heat pipeline job in the global view.

  4. Select the Build with Parameters option from the drop-down menu of the selected job.

  5. Configure the deployment by setting the following parameters as required:

    Deployment parameters
    Parameter Defualt value Description
    ASK_ON_ERROR False If True, Jenkins will stop on any failure and ask either you want to cancel the pipeline or proceed with the execution ignoring the error.
    SALT_MASTER_CREDENTIALS <YOUR_SALT_MASTER_CREDENTIALS_ID> The Jenkins ID of credentials for logging in to the Salt API. For example, salt-credentials. See View credentials details used in Jenkins pipelines for details.
    SALT_MASTER_URL <YOUR_SALT_MASTER_URL> The URL to access the Salt Master node.
    STACK_INSTALL Select core,k8s,calico Components to install.
    STACK_TEST Empty The names of the cluster components to test. By default, nothing is tested.
    STACK_TYPE physical The type of the cluster.
  6. Click Build to launch the pipeline.

  7. Click Full stage view to track the deployment process.

    The following table contains the stages details for the deployment with Calico as a Kubernetes networking plugin:

    The deploy pipeline workflow
    # Title Details
    1 Create infrastructure Creates a base infrastructure using MAAS.
    2 Install core infrastructure
    1. Prepares and validates the Salt Master node and Salt Minion nodes. For example, refreshes pillars and synchronizes custom modules.
    2. Applies the linux,openssh,salt.minion,ntp states to all nodes.
    3 Install Kubernetes infrastructure
    1. Reads the control plane load-balancer address and applies it to the model.
    2. Generates the Kubernetes certificates.
    3. Installs the Kubernetes support packages that include Keepalived, HAProxy, containerd, and etcd.
    4 Install the Kubernetes control plane and networking plugins
    1. Installs Calico.
    2. Sets up etcd.
    3. Installs the control plane nodes.
  8. When the pipeline has successfully executed, log in to any Kubernetes ctl node and verify that all nodes have been registered successfully:

    kubectl get nodes