Search code examples
dockerkuberneteslxcproxmox

Install and create a Kubernetes cluster on lxc proxmox


I would like to know who tried to install and create a Kubernetes cluster inside LXC proxmox.

Which steps should I follow to realize that?


Solution

  • You can use below articles to get the desired result: Run kubernetes inside LXC container or Run Kubernetes as Proxmox container

    To summarize above articles you should perform next steps:

    1) Add overlay driver for docker.

    echo overlay >> /etc/modules
    

    2) Add more privileges to container by modifying container config

    lxc.apparmor.profile: unconfined
    lxc.cap.drop: 
    lxc.cgroup.devices.allow: a
    lxc.mount.auto: proc:rw sys:rw
    

    3) Use shared filesystem to /etc/rc.local

    echo '#!/bin/sh -e
    mount --make-rshared /' > /etc/rc.local
    

    4) Init cluster using kubeadm