8000 GitHub - papaispicolo/pve-k8s: Provisioning LXC container based k8s cluster on proxmox
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

papaispicolo/pve-k8s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pve-k8s

Provision 3 lxc nodes k8s cluster on Proxmox using ansible.

prerequisites

  1. proxmox host

  1. NVidia GPU configured on proxmox

reference on how to install nvidia-driver on proxmox

  1. Ansible ready machine example - setting ansible

Procedures in playbook

  1. provision 3 lxc containers - provision_3_lxc_ct.yml

  2. ( Optional ) mount shared disks - mount_shared_disks.yml

For simple home lab setup : map shared directory lab into all lxc containers

root@pve:/mnt/pve/wd80/private# tree -L 2
.
└── lab          --> lxc:/lab
    ├── dataset  
    ├── k8s-n00  
    ├── k8s-n01
    ├── k8s-n02
    ├── k8s-n03    
    └── share

example - storage on proxmox

  1. fine tuning lxc configuration for k8s - `prepare_k8s_lxc.yml'

  2. install docker - install_docker_inside_lxc.yml

  3. install nvidia drivers - install_nvidia_driver_gpu_nodes.yml

    ( Note! : the same version of the driver should be installed on proxmox host )

    Install nvidia driver on proxmox host

  4. passthrough gpu - gpu_passthrough_lxc.yml

  5. install nvidia-docker - install_nvidia_docker_gpu_nodes.yml

  6. setup k8s master node - setup_k8s_master.yml

  7. setup k8s worker nodes - setup_k8s_workers.yml

  8. setup k8s plugins (flannel network, helm, nvidia gpu plugin ) - setup_k8s_plugins.yml

Run provisioning

$ cd playbooks
$ ansible-playbook -e @vars.yml -i inventory.ini ansible_build_k8s.yml

Remove provisioned resources

$ cd playbooks
$ ansible-playbook -e @vars.yml -i inventory.ini ansible_purge_k8s.yml

Check containers and k8s cluster

Check GPU

Check nvidia docker

References

proxmox pct command pct manual

docker in lxc docker in lxc

Bootstrap-kubernetes-with-LXC https://github.com/zimmertr/Bootstrap-Kubernetes-with-LXC

Kubernetes-nvidia-ansible-playbook https://github.com/mrdeanplumbley/kubernetes-nvidia-ansible-playbook

NVIDIA-docker https://github.com/NVIDIA/nvidia-docker#quickstart

About

Provisioning LXC container based k8s cluster on proxmox

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0