All Projects → rnaveiras → kubeadm-tf

rnaveiras / kubeadm-tf

Licence: MIT license
PoC; terraform + kubeadm

Programming Languages

HCL
1544 projects
go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to kubeadm-tf

kubernetes-cluster
Vagrant As Automation Script
Stars: ✭ 34 (+36%)
Mutual labels:  kubernetes-cluster, poc, kubeadm
GPU-Kubernetes-Guide
How to setup a production-grade Kubernetes GPU cluster on Paperspace in 10 minutes for $10
Stars: ✭ 34 (+36%)
Mutual labels:  kubernetes-cluster, kubeadm
Kontainerd
Creating a kubernetes kubeadm cluster using Vagrant machines as nodes and Containerd as a container runtime
Stars: ✭ 16 (-36%)
Mutual labels:  kubernetes-cluster, kubeadm
Kubenow
Deploy Kubernetes. Now!
Stars: ✭ 285 (+1040%)
Mutual labels:  kubernetes-cluster, kubeadm
kainstall-offline
kainstall tools offline file
Stars: ✭ 31 (+24%)
Mutual labels:  kubernetes-cluster, kubeadm
aws-kubernetes
Kubernetes cluster setup in AWS using Terraform and kubeadm
Stars: ✭ 32 (+28%)
Mutual labels:  kubernetes-cluster, kubeadm
terraform-provider-kubeadm
A Terraform provider/provisioner for deploying Kubernetes with kubeadm
Stars: ✭ 60 (+140%)
Mutual labels:  kubernetes-cluster, kubeadm
kubeadm-vagrant
Setup Kubernetes Cluster with Kubeadm and Vagrant
Stars: ✭ 49 (+96%)
Mutual labels:  kubernetes-cluster, kubeadm
Rak8s
Stand up a Raspberry Pi based Kubernetes cluster with Ansible
Stars: ✭ 354 (+1316%)
Mutual labels:  kubernetes-cluster, kubeadm
Kurl
Production-grade, airgapped Kubernetes installer combining upstream k8s with overlays and popular components
Stars: ✭ 391 (+1464%)
Mutual labels:  kubernetes-cluster, kubeadm
Kubeadm Ansible
Build a Kubernetes cluster using kubeadm via Ansible.
Stars: ✭ 479 (+1816%)
Mutual labels:  kubernetes-cluster, kubeadm
rak8s
Stand up a Raspberry Pi based Kubernetes cluster with Ansible
Stars: ✭ 362 (+1348%)
Mutual labels:  kubernetes-cluster, kubeadm
Terraform Aws Kubernetes
Terraform module for Kubernetes setup on AWS
Stars: ✭ 159 (+536%)
Mutual labels:  kubernetes-cluster, kubeadm
Kubekey
Provides a flexible, rapid and convenient way to install Kubernetes only, both Kubernetes and KubeSphere, and related cloud-native add-ons. It is also an efficient tool to scale and upgrade your cluster.
Stars: ✭ 288 (+1052%)
Mutual labels:  kubernetes-cluster, kubeadm
K8s Digitalocean Terraform
Deploy latest Kubernetes cluster on DigitalOcean using Terraform
Stars: ✭ 33 (+32%)
Mutual labels:  kubernetes-cluster, kubeadm
Kainstall
Use shell scripts to install kubernetes(k8s) high availability clusters and addon components based on kubeadmin with one click.使用shell脚本基于kubeadmin一键安装kubernetes 高可用集群和addon组件。
Stars: ✭ 198 (+692%)
Mutual labels:  kubernetes-cluster, kubeadm
dheater
D(HE)ater is a proof of concept implementation of the D(HE)at attack (CVE-2002-20001) through which denial-of-service can be performed by enforcing the Diffie-Hellman key exchange.
Stars: ✭ 142 (+468%)
Mutual labels:  poc
k0s-ansible
Create a Kubernetes Cluster using Ansible and the vanilla upstream Kubernetes distro k0s.
Stars: ✭ 56 (+124%)
Mutual labels:  kubernetes-cluster
azure-k3s-cluster
An Azure template to deploy a lightweight Kubernetes cluster using k3s.io
Stars: ✭ 46 (+84%)
Mutual labels:  kubernetes-cluster
Openshift Examples
Openshift Examples - This repo does not provide end to end example but rather act as a rough draft for my work. use with caution. Buzzme at @twitter
Stars: ✭ 247 (+888%)
Mutual labels:  kubernetes-cluster

PoC terraform + kubeadm

A small proof of concept for automate the bootstrap of a kubernetes cluster with Terraform and kubeadm

Getting Started

# Generate the token required by kubeadm
$ KUBEADM_TOKEN=$(go run token.go)

# Check what operations are going to be run on AWS
$ terraform plan -var k8s_token=$KUBEADM_TOKEN

# Apply the terraform configuration
$ terraform apply -var k8s_token=$KUBEADM_TOKEN

For tear down:

$ terraform destroy -var k8s_token=$KUBEADM_TOKEN

After the terraform plan has been executed successful, you can ssh to the control plane node:

ssh $(terraform output control_plane.public_ip) -lubuntu

Then inside the control plane, you can see how the rest of the nodes join the Kubernets cluster. If the command fails or is missing, don't worry, just wait a bit, probably means that the control plane is still provisioning.

sudo kubectl get nodes -w

You should see something like this, after a few minutes, where the node as join the control plane.

sudo kubectl get nodes
NAME            STATUS    AGE
ip-10-1-1-37    Ready     2m
ip-10-1-3-119   Ready     13s

After this, you can visit the http://kubernetes.io/docs/user-guide/, to learn more.

What do you need

  • Terraform v0.7 or higher
  • AWS API credentials thought the AWS_PROFILE environment variable. See here environment variables and shared credentials file sections
  • Go 1.5 or higher

Mac OS, you can install all the dependencies as follow:

brew install terraform awscli go

GNU/Linux, you can find help to install all the dependencies in the following links:

Description

This will create:

  • a new VPC at AWS eu-west-1 using with 3 public subnets, one for each availability zone.
  • an instance to hold the Kubernetes control plane.
  • an autoscaler group to hold the nodes (by default just 1 node).

All instances are setup with docker and kubeadm using cloud init.

Configuration

  • key_name: Needs the name of a SSH public/private key inside your ~/.ssh. This public key will be uploaded to AWS during the terraform execution. By default id_rsa
  • stage: Name that is attached to may of the resources created at AWS. By default staging. You can uses this name to setup different AWS VPC
  • k8s_token: Kubeadm token needs for the nodes to join the Kubernetes cluster. The token needs to generated ahead and provide as a seed to the control plane and nodes inside the autoscaler group.
  • nodes_num: Number of nodes inside the AWS autoscaler group, by default 1. You can provide the number of nodes wanted. e.g. terraform apply -var 'nodes_num="3"'
  • aws_region: Name of the AWS region where you want to deploy the Kubernetes cluster. By default eu-west-1. You can provide any other e.g. terraform apply -var aws_region=us-east-1

Notes

  • The Kubernetes cluster is bootstrap without a specify cloud provider, even kubeadm allow the option, there is a open issue where the control-manager cannot connect to the AWS API because the container doesn't have TLS certificates. kubernetes/kubernetes#33681

  • Do not provide access to the control plane outside the AWS VPC.

Acknowledgements

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].