Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There are several ways how to set up a Kubernetes clusterCluster. Find an example for the basic steps to install a Kubernetes cluster Cluster on CentOS  7 from the following chapters.

...

kubelet is the first core module to be installed on every Kubernetes cluster Cluster node. Use the following command:

...

  1. kubeadm is the next core module that has to be installed. Use the following command:

    Code Block
    sudo yum install -y kubeadm

    Note that kubeadm automatically installs kubectl as a dependency.



  2. Disable swap by use of the below commands:

    Code Block
    sudo swapoff -a
    sudo sed -i '/ swap / s/^/#/' /etc/fstab

Initialize kubeadm and start the Kubernetes

...

Cluster

  1. When initializing kubeadm directly then kubeadm might raise the error:

    Code Block
    Some fatal errors occurred: [ERROR CRI]: container runtime is not running Status from runtime service failed” err=”rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService”



  2. To resolve the above problem users should delete the config.tomal file and restart containerd using the following commands:

    Code Block
    sudo rm /etc/containerd/config.toml
    systemctl restart containerd



  3. Initialize kubeadm, create required directories and manage Kubernetes cluster Cluster configuration:

    Code Block
    sudo kubeadm init
    mkdir $HOME/.kube
    sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
    sudo chown $(id -u):$(id -g) $HOME/.kube/config
    export KUBECONFIG=/etc/kubernetes/admin.conf



  4. Enable and restart Docker and Kubernetes services from systemd.

    Code Block
    sudo systemctl enable docker.service
    sudo service kubelet restart
    sudo chown -R centos:centos kubernetes/
    



  5. Set up pod Pod network for the Kubernetes clusterCluster.

    Code Block
    kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/2140ac876ef134e0ed5af15c65e414cf26827915/Documentation/kube-flannel.yml
    kubectl get nodes



With the above steps the setup of the Kubernetes cluster Cluster is completed. In a next step users can create the Kubernetes YAML deployment files to deploy JS7 components to the Kubernetes clusterCluster.

Further Resources

...