All Projects → graykode → aws-kubeadm-terraform

graykode / aws-kubeadm-terraform

Licence: MIT license
create kubernetes cluster on AWS only typing 'terraform apply' on 3 minutes.

Programming Languages

HCL
1544 projects
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to aws-kubeadm-terraform

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 (+1064.71%)
Mutual labels:  kubeadm
kubeadm-bootstrap
Supporting code + documentation for bootstrapping a kubeadm installation on bare-metal-ish machinery
Stars: ✭ 23 (+35.29%)
Mutual labels:  kubeadm
kubernetes-cluster
Vagrant As Automation Script
Stars: ✭ 34 (+100%)
Mutual labels:  kubeadm
Kubeadm Ha
Boot a ha kubernetes 1.11.0/1.12.1/1.13.0/1.14.0 cluster with kubeadm.
Stars: ✭ 219 (+1188.24%)
Mutual labels:  kubeadm
k8s-deploy
No description or website provided.
Stars: ✭ 77 (+352.94%)
Mutual labels:  kubeadm
kainstall-offline
kainstall tools offline file
Stars: ✭ 31 (+82.35%)
Mutual labels:  kubeadm
Terraform Aws Kubernetes
Terraform module for Kubernetes setup on AWS
Stars: ✭ 159 (+835.29%)
Mutual labels:  kubeadm
konfigadm
konfigadm is a declarative configuration management tool and image builder focused on bootstrapping nodes for container-based environments.
Stars: ✭ 26 (+52.94%)
Mutual labels:  kubeadm
halcyon-kubernetes
Ansible playbooks for a kubadm-based kubernetes deployment, on supporting any cloud and any kubeadm-enabled OS.
Stars: ✭ 37 (+117.65%)
Mutual labels:  kubeadm
terraform-aws-minikube
Terraform module for single node Kubernetes instance bootstrapped using kubeadm
Stars: ✭ 58 (+241.18%)
Mutual labels:  kubeadm
Ansible Role Kubernetes
Ansible Role - Kubernetes
Stars: ✭ 247 (+1352.94%)
Mutual labels:  kubeadm
kubeadm-tf
PoC; terraform + kubeadm
Stars: ✭ 25 (+47.06%)
Mutual labels:  kubeadm
kubash
Kubash - the K8$ shell for your kube clusters
Stars: ✭ 20 (+17.65%)
Mutual labels:  kubeadm
Pharmer
🌾 Kubernetes Cluster Manager using Kubeadm & Cluster API
Stars: ✭ 201 (+1082.35%)
Mutual labels:  kubeadm
kubeadm-vagrant
Setup Kubernetes Cluster with Kubeadm and Vagrant
Stars: ✭ 49 (+188.24%)
Mutual labels:  kubeadm
K8s Scw Baremetal
Kubernetes installer for Scaleway bare-metal AMD64 and ARMv7
Stars: ✭ 176 (+935.29%)
Mutual labels:  kubeadm
k8s-deployer
Deploy Kubernetes service and store retrieved information in the Consul K/V store
Stars: ✭ 23 (+35.29%)
Mutual labels:  kubeadm
Kontainerd
Creating a kubernetes kubeadm cluster using Vagrant machines as nodes and Containerd as a container runtime
Stars: ✭ 16 (-5.88%)
Mutual labels:  kubeadm
aws-kubernetes
Kubernetes cluster setup in AWS using Terraform and kubeadm
Stars: ✭ 32 (+88.24%)
Mutual labels:  kubeadm
k8s
kubeadm 虚拟机实践
Stars: ✭ 14 (-17.65%)
Mutual labels:  kubeadm

aws-terraform-kubeAdm

In this repository, you can create kubernetes cluster using only terraform apply in AWS.

1. Configure on your docker

$ docker run -it graykode/aws-kubeadm-terraform:0.3 /bin/bash

Export your own AWS Access / Secret keys

$ export AWS_ACCESS_KEY_ID=<Your Access Key in AWS>
$ export AWS_SECRET_ACCESS_KEY=<Your Access Key in Secret>

Generate your SSH key pair for aws_key_pair

$ ssh-keygen -t rsa -N "" -f tf-kube

Create your k8stoken

$ python -c 'import random; print "%0x.%0x" % (random.SystemRandom().getrandbits(3*8), random.SystemRandom().getrandbits(8*8))'

> ebd70e.ad84c12d14ee5dae

2. Create Kubernetes Cluster

Initialize terraform

$ terraform init 

Create all objects in AWS and put k8s token before you created! It's Done.

$ terraform apply
var.k8stoken
  Enter a value: ebd70e.ad84c12d14ee5dae

Check if k8s Cluster is created.

$ ssh -i tf-kube ubuntu@server-ip
ubuntu@ip-10-43-0-40:~$ kubectl get nodes
NAME                                            STATUS   ROLES    AGE     VERSION
ip-10-43-0-30.ap-northeast-2.compute.internal   Ready    <none>   3m40s   v1.15.0
ip-10-43-0-40.ap-northeast-2.compute.internal   Ready    master   4m4s    v1.15.0

If you want to delete all cluster, type this.

$ terraform destroy

If you want to see Kubernetes Clustering Step.

$ tail -f /home/ubuntu/master.log # in master node
$ tail -f /home/ubuntu/worker.log # in worker node
$ tail -f /home/ubuntu/etcd.log # in etcd node

3. Set variables.tf

  1. Set EC2 instance_type
variable etcd_instance_type {
  default = "t2.medium"
}
variable controller_instance_type {
  default = "t2.medium"
}
variable worker_instance_type {
  default = "t2.medium"
}
  1. Set Number of EC2 Node
variable number_of_etcd{
  description = "The number of etcd, only acts as etcd"
  default = 0
}

variable number_of_worker{
  description = "The number of worker nodes"
  default = 1
}

PS

If you meet provider.aws: error validating provider credentials Error, Please check that your IAM key is activate.

ToDo

  • Set up a High Availability etcd cluster with kubeadm
  • Add k8s master node ingress, ingress-controller with ELB

Author

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