KubeArmor
Search…
Kubernetes Installation for Fedora
  • Requirements
    SELinux-enabled Fedora 30 or above.
  • Prerequisites
    First, install build dependencies (golang, bcc, etc.)
    1
    $ cd KubeArmor/contribution/self-managed-k8s-selinux
    2
    ~/KubeArmor/contribution/self-managed-k8s-selinux$ ./setup.sh
    Copied!
    Next, disable the swap partition for Kubernetes installation.
    1
    $ sudo vi /etc/fstab
    2
    (comment out the line for swap)
    3
    $ sudo reboot
    Copied!
  • Docker Installation
    Install Docker through the following commands.
    1
    $ cd KubeArmor/contribution/self-managed-k8s-selinux/docker
    2
    ~/KubeArmor/contribution/self-managed-k8s-selinux/docker$ ./install_docker.sh
    3
    ~/KubeArmor/contribution/self-managed-k8s-selinux/docker$ exit
    Copied!
  • Kubernetes Installation (single machine)
    If you use a machine to set up a single-node environment, Please run the following commands.
    • Master / Worker Node
      Now, you are ready to install Kubernetes. Please run the following commands.
      1
      $ cd KubeArmor/contribution/self-managed-k8s-selinux/k8s
      2
      ~/KubeArmor/contribution/self-managed-k8s-selinux/k8s$ ./install_kubernetes.sh
      3
      ~/KubeArmor/contribution/self-managed-k8s-selinux/k8s$ ./initialize_kubernetes.sh cilium master
      Copied!
      You can also use other CNIs instead of Cilium.
      1
      .../self-managed-k8s-selinux/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 only have 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-selinux/k8s
      2
      ~/KubeArmor/contribution/self-managed-k8s-selinux/k8s$ ./install_kubernetes.sh
      3
      .../self-managed-k8s-selinux/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!
  • Enable SELinux enforcing mode
    Now, you need to enable SELinux features in all nodes.
    1
    $ cd KubeArmor/contribution/self-managed-k8s-selinux
    2
    ~/KubeArmor/contribution/self-managed-k8s-selinux$ ./enable_selinux.sh
    Copied!
    Then, please wait a couple of minutes for restarting containers.
Last modified 1mo ago
Export as PDF
Copy link