0% found this document useful (0 votes)
3 views

Kubernetes Setup

The document outlines the steps to set up a Kubernetes cluster on EC2 instances, including installing Docker, configuring Kubernetes, and bootstrapping the master node. It also discusses using Minikube for practice, creating and managing pods and services, and utilizing NGROK for public access to applications. Additionally, the author shares their career aspirations post-Master's program, emphasizing a focus on cloud architecture and societal challenges.

Uploaded by

piyush
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Kubernetes Setup

The document outlines the steps to set up a Kubernetes cluster on EC2 instances, including installing Docker, configuring Kubernetes, and bootstrapping the master node. It also discusses using Minikube for practice, creating and managing pods and services, and utilizing NGROK for public access to applications. Additionally, the author shares their career aspirations post-Master's program, emphasizing a focus on cloud architecture and societal challenges.

Uploaded by

piyush
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

Kubernetes cluster (Master and node 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

4. We create kubernetes.lists file


-nano /etc/apt/sources.list.d/kubernetes.list
And we input the following command inside the kubernetes.list file
-deb http://apt.kubernetes.io/ kubernetes-xenial main
-apt-get update
5.Install the required kuberbetes packages from the kubernetes.list file.
-apt-get install -y kubelet kubeadm kubectl kubernetes-cni
6. Starting the bootstrapping processs from Master node
-systemctl start kubelet
-kubeadm init

nw in output you will et 2 sets of commands one has to be run on master to


setup kube working directory and stuff and the other one is tobe used on slaves for
bootstrapping them to master

Also need to run flannel commands on master before running bootstrapping


commands on nodes

===================================================================================
===================================================================================
=================

Simple way for practice is using minikube.

Commands:-

kubectl get pods -namespace=<namespace_name> -- TO show pods in the


namespace

kubectl get pods -namespace=<namespace_name> --o wide -- TO show pods in the


namespace along with their IP address.

Kubectl get namespace

kubectl create namepsace <namespace>

kubectl apply -f pod.yaml -- to launch a pod from your pod.yaml file.

Kubectl delete -f pod.yaml -- To delete pods launched using this file.

minikube service todo-django-service -n todo-django-app --url --to


get the url of the cluster.
So we created the pod.yaml. Then as we now pod file does not provide autohealing,
so we go for Deployment.yaml file.

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.

The tool NGROK was used to generate a url for pods.


We installed NGROK on our master using url and auth token given on NGROK website.
then we find the clusters local url using url command.

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.

Now study INGRESS

https://catalog.workshops.aws/general-immersionday/en-US/00-setup/0-2

[email protected]

After completion of my Master Program, I plan to acquire a job as a solutions


architect in one of the leading organizations in the field such as Amazon web
Services. My goal would be to apply my prior experience and the knowledge gained
during the Masters program towards working on designing resilient cloud
architectures contributing towards enhancement of various AWS services that help
businesses run their workloads seamlessly. I also aim to diversify my area of
expertise by working with multiple cloud service providers such as Microsoft Azure
and Google Cloud platform.
My long-term goal after completing masters would be gaining experience as a
Principal Solutions Architect and then working on building my own consultancy firm
with which I will mainly focus on securing project work from governmental
institutions so that I can implement the initiatives that leverage cloud technology
to address societal challenges, such as optimizing public services, enhancing
disaster response systems, and promoting environmental sustainability.
I chose Ireland as my study destination for its globally recognized education
system and the country’s commitment to technological innovation. Ireland is also
known as the I.T. hub of Europe as many Multinational companies set up their
offices in Ireland. NCI’s emphasis on practical experience through internships,
projects, and placement opportunities aligns with my goal to gain hands-on
expertise. The modules taught in the course are very well designed that improves
the learning experience and provides in-depth practical knowledge. Additionally,
the vibrant extracurricular activities, well-equipped facilities like libraries and
computer labs, and the overall campus environment contribute to a holistic
educational experience. The support services provided by the college such as
travel, accommodation guidance and counselling for international students make the
experience of learning smoother. Ireland’s welcoming culture, combined with NCI’s
academic excellence, makes it the ideal destination for my Master’s in Cloud
Computing journey.

You might also like