I. Introduction
Using kops , you can automatically deploy an EC2 virtual machine on AWS and install kubernetes on the virtual machine for you while granting kops specific AWS permissions.
Using Kubernetes ‘ support for NLB starting from version 1.9 , you can directly create a kubernetes service based on AWS NLB to obtain external IP assigned by AWS for external access.
Step: Create IAM Role as shown below
kubectl get pods
cd src
kubectl create -f 1.1-basic_pod.yaml
kubectl get pods
kubectl describe pod mypod | more
kubectl delete pod mypod
kubectl create -f 1.2-port_pod.yaml
kubectl describe pod mypod | more
curl 192.168.###.###:80
(Replace ###.###
with the IP address octets from the describe
output)kubectl describe pod mypod | more
kubectl delete pod mypod
kubectl create -f 1.4-resources_pod.yaml
kubectl describe pod mypod | more
Note: kubectl
will accept the singular or plural form of resource kinds. For example kubectl get pods
and kubectl get pod
are equivalent.
kubectl create -f 2.1-web_service.yaml
kubectl get services
kubectl describe service webserver
kubectl…
Prequesites
Already Kubernetes cluster is deployed with worker and pods
#To deploy the Metrics Server
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.3.6/components.yaml
#Verify that the metrics-server deployment is running kubectl get deployment metrics-server -n kube-system
#deploy the Kubernetes Dashboard.kubectl apply -f
https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml
#Edit the Service by replacing cluster type kubectl edit svc -n kubernetes-dashboard
#Replace ClusterIP with NodePort
# Create service accountkubectl create serviceaccount cluster-admin-dashboard-sa
# Bind ClusterAdmin role to the service account
kubectl create clusterrolebinding cluster-admin-dashboard-sa \
— clusterrole=cluster-admin \
— serviceaccount=default:cluster-admin-dashboard-sa
#Get the Nodeport id
kubectl get svc
We can think of Helm as Maven/NPM under Kubernetes. Pip under Python, yum on Linux, Helm is a package manager for kubernetes developed by Deis ( https://deis.com/ )
The package is called a Chart, and a Chart is a directory (generally, the directory is packaged and compressed to form a single file in the name version.tgz format, which is convenient for transmission and storage). For application publishers, the application can be packaged through Helm. Manage application dependencies, manage application versions and publish applications to the software warehouse. For users, after using Helm, you don’t need to understand Kubernetes’ Yaml syntax…
Install Server Updates
yum update -y
Install git package
yum install git -y
Verify git Package
which git
Check Version of git Package
git — version
Set Username Configuration
git config — global user.name “Ram”
Set Email Configuration
git config — global user.email “username@gmail.com”
Verify Username and Email Configurations
git config — list
Set the Date
date +%T -s”21:43:00"
Verify Date
date
Logged into your Ubuntu 18.04 server as a sudo non-root user, first update your default packages.
sudo apt update
sudo apt install git
You can confirm that you have installed Git correctly by running this command and receiving…
Create VPC using the following Information
Name: VPC-ASG-Demo
IPv4 CIDR block : 10.0.0.0/16
Tenancy : Default
Publicsubnet1 with CIDR 10.0.1.0/24 (US-east -1a)
Publicsubnet2 with CIDR 10.0.2.0/24 (US-east -1b)
Under VPC : Mention VPC ASG- DEMO for both subnets
This is a part of my learning Journey towards Autoscaling . This is based on the Namrata shah youtube video Here. She is Microsoft Prestigious Most Valuable Professional award (MVP) for two consecutive years and was recognized as Virtual Technology Specialist for BizTalk
Prequisistes : Create Custom VPC as based on the following link
https://medium.com/p/90810966be92
· Connect to the EC2 machine from terminal window using putty or bash and login as the root user
· Run the following commands
·yum install httpd -y·sudo systemctl enable httpd·sudo systemctl start httpd
Copy the public IP of your EC2 machine and…