All Projects → sguyennet → Terraform Vsphere Kubespray

sguyennet / Terraform Vsphere Kubespray

Licence: apache-2.0
Deploy a Kubernetes HA cluster on VMware vSphere

Projects that are alternatives of or similar to Terraform Vsphere Kubespray

Hybrid multicloud overlay
MutiCloud_Overlay demonstrates a use case of overlay over one or more clouds such as AWS, Azure, GCP, OCI, Alibaba and a vSphere private infrastructure in Hub and spoke topology, point to point topology and in a Single cloud. Overlay protocols IPv6 and IPv4 are independent of underlying infrastructure. This solution can be integrated with encryption and additional security features.
Stars: ✭ 127 (-9.93%)
Mutual labels:  vsphere, terraform, hcl
Kubernetes Digitalocean Terraform
📋 🌊 🌎 Setup a simple Kubernetes cluster in Digital Ocean using Terraform
Stars: ✭ 324 (+129.79%)
Mutual labels:  terraform, hcl, deployment
Terraform With Circleci Example
This is an example of automatic deployments of your infrastructure using terraform and CircleCI 2.0 workflows
Stars: ✭ 142 (+0.71%)
Mutual labels:  terraform, hcl, deployment
Lambda Deployment Example
Automated Lambda Deployments with Terraform & CodePipeline
Stars: ✭ 25 (-82.27%)
Mutual labels:  terraform, hcl, deployment
Azure arc
Automated Azure Arc environments
Stars: ✭ 224 (+58.87%)
Mutual labels:  vmware, terraform, hcl
Cloud Portal
Self service web portal for different Cloud platforms like Azure, AWS and VMWare vSphere.
Stars: ✭ 60 (-57.45%)
Mutual labels:  vsphere, vmware, terraform
Terraform Aws Key Pair
Terraform Module to Automatically Generate SSH Key Pairs (Public/Private Keys)
Stars: ✭ 121 (-14.18%)
Mutual labels:  terraform, hcl
Terraform Aws Eks
Deploy a full EKS cluster with Terraform
Stars: ✭ 125 (-11.35%)
Mutual labels:  terraform, hcl
Reference Architectures
[WIP] Get up and running quickly with one of our reference architecture using our fully automated cold-start process.
Stars: ✭ 127 (-9.93%)
Mutual labels:  terraform, hcl
Terragrunt Atlantis Config
Generate Atlantis config for Terragrunt projects.
Stars: ✭ 131 (-7.09%)
Mutual labels:  terraform, hcl
Config Lint
Command line tool to validate configuration files
Stars: ✭ 118 (-16.31%)
Mutual labels:  terraform, hcl
Vishwakarma
Terraform modules to create a self-hosting Kubernetes cluster on opinionated Cloud Platform.
Stars: ✭ 127 (-9.93%)
Mutual labels:  terraform, hcl
Terraform Aws Cicd
Terraform Module for CI/CD with AWS Code Pipeline and Code Build
Stars: ✭ 138 (-2.13%)
Mutual labels:  terraform, hcl
Terraform
Terraform automation for Cloud
Stars: ✭ 121 (-14.18%)
Mutual labels:  terraform, hcl
Cloud Provider Vsphere
Kubernetes Cloud Provider for vSphere https://cloud-provider-vsphere.sigs.k8s.io
Stars: ✭ 120 (-14.89%)
Mutual labels:  vsphere, vmware
Terraform Aws Kubernetes
Install a Kubernetes cluster the CoreOS Tectonic Way: HA, self-hosted, RBAC, etcd Operator, and more
Stars: ✭ 118 (-16.31%)
Mutual labels:  terraform, hcl
Terraform Aws Spotgpu
Fully automated provisioning of AWS EC2 Spot Instances for Deep Learning workloads using Terraform.
Stars: ✭ 127 (-9.93%)
Mutual labels:  terraform, hcl
Terraform Google Gke Cluster
A Terraform module to create a best-practise Google Kubernetes Engine (GKE) cluster.
Stars: ✭ 133 (-5.67%)
Mutual labels:  terraform, hcl
Multi Env Deploy
Complete example of deploying complex web apps to AWS using Terraform, Ansible, and Packer
Stars: ✭ 132 (-6.38%)
Mutual labels:  terraform, hcl
Terraform Aws Airship Ecs Service
Terraform module which creates an ECS Service, IAM roles, Scaling, ALB listener rules.. Fargate & AWSVPC compatible
Stars: ✭ 139 (-1.42%)
Mutual labels:  terraform, hcl

terraform-vsphere-kubespray

Requirements

  • Git
  • Ansible v2.6 or v2.7
  • Jinja >= 2.9.6
  • Python netaddr
  • Terraform v0.12
  • Internet connection on the client machine to download Kubespray.
  • Internet connection on the Kubernetes nodes to download the Kubernetes binaries.
  • vSphere environment with a vCenter. An enterprise plus license is needed if you would like to configure anti-affinity between the Kubernetes master nodes.
  • A Linux vSphere template. If linked clone is used, the template needs to have one and only one snapshot(due to a current bug in the provider, the template also need to be just a power off VM and not an actual vSphere template).

Tested Linux distribution

  • Ubuntu LTS 16.04 (requirements: open-vm-tools package)
  • Ubuntu LTS 18.04 (requirements: VMware tools)
  • CentOS 7 (requirements: open-vm-tools package, perl package)
  • Debian 9 (requirements: VMware tools, vSphere VM OS configuration set to "Ubuntu Linux (64-bit)", net-tools package)
  • RHEL 7 (requirements: open-vm-tools package, perl package)

Tested Kubernetes network plugins

RHEL 7 CentOS 7 Ubuntu LTS 18.04 Ubuntu LTS 16.04 Debian 9
Flannel ✔️ ✔️ ✔️ ✔️ ✔️
Weave ✔️ ✔️ ✔️ ✔️ ✔️
Calico ✔️ ✔️ ✔️ ✔️ ✔️
Cilium ✔️ ✔️
Canal ✔️ ✔️ ✔️ ✔️ ✔️

Usage

All the steps to use this Terraform script are described in details here: https://blog.inkubate.io/install-and-manage-automatically-a-kubernetes-cluster-on-vmware-vsphere-with-terraform-and-kubespray/

Create a Kubernetes cluster

$ cd terraform-vsphere-kubespray

$ vim terraform.tfvars

$ terraform init

$ terraform plan

$ terraform apply

Add a worker node

Add one or several worker nodes to the k8s_worker_ips list:

$ vim terraform.tfvars

Execute the terraform script to add the worker nodes:

$ terraform apply -var 'action=add_worker'

Delete a worker node

Remove one or several worker nodes to the k8s_worker_ips list:

$ vim terraform.tfvars

Execute the terraform script to remove the worker nodes:

$ terraform apply -var 'action=remove_worker'

Upgrade Kubernetes

Modify the k8s_version and the k8s_kubespray_version variables:

$ vim terraform.tfvars

Kubernetes version Kubespray version
v1.15.3 v2.11.0
v1.14.3 v2.10.3
v1.14.1 v2.10.0
v1.13.5 v2.9.0
v1.12.5 v2.8.2
v1.12.4 v2.8.1
v1.12.3 v2.8.0

Execute the terraform script to upgrade Kubernetes:

$ terraform apply -var 'action=upgrade'

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].