Kubernetes Setup
Kubernetes Setup
Run commands till point 5 on all 3 serves and then the point 6 command is used on
only master for bootstrapping.
1. Create three EC2 instances one with 2 cores and 4 GB ram (For the master node)
two instances can be with lower specs (For two nodes)
2. install docker on all three instances
-apt-get install docker.io -y
-systemctl start docker
-systemctl enable docker
-apt-get install apt-transport-https ---command to install https
3. Now we curl the link to get the apt key which will allow us bootstrap master
with nodes
-sudo curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo
apt-key add
===================================================================================
===================================================================================
=================
Commands:-
Created the deployment.yaml file and it gives auto healing ability. But Then if we
need the app accessible from internet, we need to run a service.yaml file
We create the service file and run the deployment file from the service file.
Then Use the following command to create a tunnel between internet and our local
cluster ip address:-
./ngrok http <local_cluster_ip:port>
This command will also give a public url to access our app from internet.
https://catalog.workshops.aws/general-immersionday/en-US/00-setup/0-2