Posts

Showing posts from October, 2021

How to create AWS EKS using eksctl

Image
How to create AWS EKS using eksctl   Refer the official document below for the prerequisites https://docs.aws.amazon.com/eks/latest/userguide/getting-started-eksctl.html   kubectl , aws cli are installed and configured in my ec2 instance , please refer the old blog below https://abushadtech.blogspot.com/2021/10/install-and-configure-aws-cli-and.html   Install eksctl ------------------------------------------------------------------------------- $ curl --silent --location " https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz " | tar xz -C /tmp   $ sudo mv /tmp/eksctl /usr/local/bin   $ eksctl version   To check if eksctl is able to communicate with AWS , use below command $ eksctl get clusters 2021-10-28 16:58:25 [ ℹ ]   eksctl version 0.70.0 2021-10-28 16:58:25 [ ℹ ]   using region us-east-1 NAME             REGION...

Demo: How to deploy a 4-tier application in Kubernetes

Demo: How to deploy a 4-tier application in Kubernetes   Use the below yaml code to create a deployment.yaml file and then execute $kubectl apply -f deployment.yaml   To access the frontend UI, go to AWS console and select the public ipv4 DNS of the node in EKS and then type in browser http:// ec2-18-212-27-8.compute-1.amazonaws.com:30001   To create a Load Balancer instead of NodePort then edit the type highlighted in yellow to LoadBalancer , Once the loadbalancer Is created in AWS use the loadbalancer DNS name to access the Frontend UI   -------------------------------------------------------- apiVersion: v1 kind: Service metadata:   name: redis-server   labels:     app: redis-server     tier: cache   namespace: yelb spec:   type: ClusterIP   ports:   - port: 6379   selector:      app: redis-server     tier: cache ---...

Deploying the custom docker image as POD/container in kubernetes and creating LB to access the services

Image
  Deploying the custom docker image as POD/container in kubernetes and creating LB to access the services   $kubectl run nginx-webapp --image=abushad/nginx-webapp --dry-run -o yaml > webapp.yaml $kubectl apply -f webapp.yaml $kubectl get pods -o wide $kubectl run ubuntu --image=ubuntu -- sleep 600 $kubectl exec -it ubuntu /bin/bash #apt-get update #apt-get install curl #curl http://ip $kubectl expose pod nginx-webapp --port=80 --target-port=80 --dry-run -o yaml > webapp-service.yaml $cat webapp-service.yaml apiVersion: v1 kind: Service metadata:   creationTimestamp: null   labels:     run: nginx-webapp   name: nginx-services          ###This is optional spec:   type: LoadBalancer   ports:   - port: 80     protocol: TCP     targetPort: 80   selector:     run: nginx status:   lo...