Kubernetes Installation for Ubuntu
    Requirements
    You can install Docker and Kubernetes on any Ubuntu platform (e.g., 18.04, 20.04).
    Prerequisites
    You need to disable the swap partition in advance for Kubernetes setup.
    1
    $ sudo vi /etc/fstab
    2
    (comment out the line for swap)
    3
    $ sudo reboot
    Copied!
    Docker Installation
    You can simply install Docker through the following command.
    1
    $ cd KubeArmor/contribution/self-managed-k8s/docker
    2
    ~/KubeArmor/contribution/self-managed-k8s/docker$ ./install_docker.sh
    3
    ~/KubeArmor/contribution/self-managed-k8s/docker$ exit
    Copied!
    Kubernetes Installation (single machine)
    If you use multiple machines to set up a single-node environment, Please run the following commands.
      Master/Worker Node
      1
      $ cd KubeArmor/contribution/self-managed-k8s/k8s
      2
      ~/KubeArmor/contribution/self-managed-k8s/k8s$ ./install_kubernetes.sh
      3
      ~/KubeArmor/contribution/self-managed-k8s/k8s$ ./initialize_kubernetes.sh cilium master
      Copied!
      You can also use other CNIs instead of Cilium.
      1
      .../self-managed-k8s/k8s$ ./initialize_kubernetes.sh [ flannel | weave | calico ] master
      Copied!
    Please make sure that you need to put "master" at the above command end if you have only a single machine.
    Kubernetes Installation (multiple machines)
    If you use multiple machines to set up a multi-node environment, Please run the following commands.
      Master Node
      1
      $ cd KubeArmor/contribution/self-managed-k8s/k8s
      2
      ~/KubeArmor/contribution/self-managed-k8s/k8s$ ./install_kubernetes.sh
      3
      .../self-managed-k8s/k8s$ ./initialize_kubernetes.sh [ flannel | weave | calico | cilium ] (master)
      Copied!
      Here, the master node will only serve Kubernetes services since you do not put "master" at the above command end. However, if you also want to use the master node to deploy containers, you can put "master" at the above command end.
      Worker Node
      1
      $ sudo kubeadm ... (the command that you get from the master node)
      Copied!
Last modified 6d ago
Export as PDF
Copy link