Professional Documents
Culture Documents
Install Kubernetes
Install Kubernetes
Enter a name for the security group. Which will use later in master instance.
We will use `K8-Master-SG` as Security group name.
Step-2: Click Add rule and under ‘Inbound rules` and add the roles.
Step-3: Click Add rule and under ‘Outbound rules` and add the roles.
Step-4: Click ` Create security group` below the page & save.
Step-5: Now we have to create another security group or slave. Click on ‘Create
security group`.
Enter a name for the security group. Which will use later in master
instance. We will use `K8-Slave-SG` as Security group name.
Step-6: Click Add rule and under ‘Inbound rules` and add the roles.
Type Protocol Port range Source
Custom TCP TCP 10250 Anywhere-IPv4
Custom TCP TCP 30000 - 32767 Anywhere-IPv4
SSH TCP 22 Anywhere-IPv4
Custom UDP UDP 8472 Anywhere-IPv4
All traffic All All Anywhere-IPv4
Step-7: Click Add rule and under ‘Outbound rules` and add the roles.
Step-8: Click ` Create security group` below the page & save.
Step-9: Go to the AWS Console, EC2 Service and click on `Launch instance`.
Step-10: Name of the instance as `kube-master` and choose `Ubuntu Server
20.04 LTS (HVM), SSD Volume Type` as Amazon Machine Image
(AMI).
Step-11: Choose ` t2.medium` as Instance type.
Step-12: Create key pair.
Step-13: On Network settings choose Select existing security group and select
`K8-Master-SG`. Finally click on `launch instance`.
Step-14: Repeat the steps (Step-9 to Step-13) above to create the slave instance.
Keep the same configuration and just name it `kube-slave` and choose
the `K8-Slave-SG` security group.
Step-15: Connect the master instance. Run the following commands (master
instance).
Step-16: Install kubelet, kubeadm and kubectl. Run the following commands
(master instance).
Step-18: Now connect the slave instance. Run the following commands (slave
instance).
Step-19: Then run the same commands on Slave node (Step-16 and Step-17).
Step-20: Now come to Master instance. Run the following commands (master
instance).
$ kubectl create -f
https://raw.githubusercontent.com/projectcalico/calico/v3.25.0/manife
sts/tigera-operator.yaml
$ kubectl create -f
https://raw.githubusercontent.com/projectcalico/calico/v3.25.0/manife
sts/custom-resources.yaml
$ sudo watch kubectl get pods --all-namespaces