Skip to content

This depo is for create a Kubernetes cluster on a Proxmox server.

License

Notifications You must be signed in to change notification settings

GannonTdW/Proxmox-K8S-Terraform-Ansible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proxmox K8S Terraform Ansible

Lire ce readme en français.

Introduction

This depo is for create a Kubernetes cluster on a Proxmox server. For this, is used:

  • Direnv for work environment
  • Terraform to create VM
  • Minio to store tfstate
  • Ansible for automating the creation of the cluster
  • Kubeadm to create the Kubernetes cluster.
  • Calico for the network
  • Metallb for having external ip on our own networks

Only Almalinux 8 is supported and tested. There is a problem with the k8s and helm modules ( [ see this issue ] ( ansible-collections/kubernetes.core#507) ), but a circumvention method was used. The playbook should work with other RedHat family distributions.

There are problems with the gpg key of kubernetes apt repo [ see this issue ] ( kubernetes/release#1982)

Installation of the environment

To install the insensitive, terraform ( prerequisites,... ) execute the following command:

make env

With the MakeFile this will create a dedicated python vitualenv with all the python packages and install terraform in the .direnv folder. Environmental variables will help configure the environment. These will be automatically loaded as soon as the current directory is in the project tree.

More information here (fr).

How to use

The project use terraform and ansible for create vms and configure the k8s cluster. It will therefore be necessary to execute terraform to create the vms and then use ansible to configure the kubenetes cluster.¬

Terraform

# Initialize Terraform
terraform -chdir=terraform init
# Create vms
terraform -chdir=terraform apply --auto-approve
# Destroy vms
terraform -chdir=terraform destroy --auto-approve

Ansible

ansible-playbook -b ansible/k8s-proxmox.yml

Sources et Inspirations

About

This depo is for create a Kubernetes cluster on a Proxmox server.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published