Deploy a Kubernetes Cluster under 5 mins!
- Worker Node EC2 [WrokerNode]
- Master Node EC2 [MasterNode]
- Master Security Group [KuberentesSGMasterNode]
- Worker Secuirty Group [KuberentesSGWorkerNode]
- Cloudformation Creates 2 Secuirty Groups for each of the nodes
- After the Security Groups have been created, 2 EC2 Instances are initiated with 1 being Master and the other being Worker
- As soon as the EC2 Instances run, it downloads this github repo and changes the permissions of the bash script files to executable
.
├── README.md
├── docs
│ ├── Kubernetes - AWS.pdf
│ └── Kubernetes_aws.png
├── install_components.sh
├── kube_init.sh
├── kubernetes_dashboard.sh
├── parameters.txt
└── template.yaml
1 directory, 8 files
All resources are built and tested using AWS CloudFormation and stored in Github.
- AWS Account
- Basic AWS Knowledge
- Kubernetes Knowledge
- Familiar with AWS Cloudformation
Download this repo to your local machine or clone the repo
- Go to AWS, and search for Cloudformation
- In Cloudformation, click on "Create Stack" on the top right corner of the screen
- Select "With new resources (standard)
- Under the "Create Stack", select "Upload a template file"
- Click on "Choose file" button and select the template.yaml from the downloaded code, then click on "Next"
- Provide a valid "Stack Name". NOTE: CAN BE ANYTHING AS LONG AS IT MEETS THE CRITERIA
- Enter a valid ImageAMIId
- Select the InstanceType. DEFAULT: t3.medium
- Enter the desired volume size for the EC2s. DEFAULT 20 GB
- Click on "Next"
- Click on "Next" under "Configure stack options"
- Click on "Next" under "Review [TEMPLATE_NAME]"
Build a serverless application and prepare if for cloudformation
sam build
cd kubernetes-ubuntu/
ls -ltr
./install_components.sh
./kube_init.sh
kubeadm join IP-ADDRESS:PORT --token
--discovery-token-ca-cert-hash sha256:
cd kubernetes-ubuntu/
ls -ltr
./install_components.sh
sudo kubeadm join IP-ADDRESS:PORT --token
--discovery-token-ca-cert-hash sha256:
watch kubectl get nodes
./kubernetes_dashboard.sh
kubectl get pods -n kubernetes-dashboard
copy the token from 4/5 Get the Token step
kubectl get svc -n kubernetes-dashboard
Copy the Port for kube-dash before /TCP
Enter the Node Ip along with the kube-dash port
Once you see a screen, enter the Toke that we just took from previous step