☸️ Kubernetes Fundamentals 👨🏽‍💻

💫 Navigating the Cloud: A Journey into Kubernetes 💫

☸️ Kubernetes Fundamentals 👨🏽‍💻

☸️ Synopsis:

✨In today's article, we will explore the benefits of container orchestration tools for managing and deploying containers, including automatic scaling and load balancing.


☸️Overview:

🔮 Container Orchestration platforms are created to automate the management of containers, taking care of activities such as load balancing and networking to efficiently oversee their life cycles.

📍 The industry leader for container orchestration tool called Kubernetes


☸️Benefits of container orchestration:

✅ Able to provision the new container if the tool detects that any container is unhealthy

✅ When the application/service receives more traffic, it can scale/replica any healthy container to handle the traffic and load balance the traffic accordingly

✅ Able to handle zero downtime deployment which means being able to route the newly deployed version of code to newly created containers once it passes the health check without any downtime


☸️Kubernetes (k8s):

Kubernetes (k8s), is an open source container orchestration tool that was created by Google. Platform to manage the lifecycle of the container. Engineers with Kubernetes experience in demand and it’s a widely used tool that is portable to major cloud providers like AWS, MS Azure, and GCP


☸️Kubernetes Concepts:

🎯 Two general components are Cluster Administration and Kubernetes API

📍 Cluster Administration - Kubernetes runs cluster as a leader-worker relationship. Each leader node will have one or more worker nodes. The leader node is also known as the control plane. Worker nodes run workloads via containers

📍 Kubernetes API - Three main concepts are Pods, Deployments, and services

👉 Pods - Group of one or more containers that share network and storage

👉 Deployments - Create/Update deployments by specifying the desired state, number of pods, which container image to use, and which environment variable to set.

👉 Services - Abstraction of pods and provide ingress rule for HTTP


☸️Kubernetes Configuration Files:

Deployment Configuration Files
apiVersion: apps/v1
kind: Deployment
metadata:
  name: demo
  labels:
    name: demo
spec:
  replicas: 1
  selector:
    matchLabels:
      service: demo
  template:
    metadata:
      labels:
        service: demo
    spec:
      containers:
      - name: demo
        image: DOCKER_REPOSITORY_ORG/DOCKER_IMAGE_NAME:VERSION_TAG
        imagePullPolicy: Always
        livenessProbe:
          httpGet:
            path: /health_check
            port: 5025
          initialDelaySeconds: 5
          timeoutSeconds: 2
        readinessProbe:
          httpGet:
            path: "/readiness_check"
            port: 5025
          initialDelaySeconds: 5
          timeoutSeconds: 5
        env:
        - name: VAR_KEY
          value: VAR_VAL
      restartPolicy: Always
Service Configuration Files
apiVersion: v1
kind: Service
metadata:
  name: demo
spec:
  selector:
    app.kubernetes.io/name: demo
  ports:
  - name: "5025"
    protocol: TCP
    port: 5025
    targetPort: 5025

🕵🏻I also want to express that your feedback is always welcome. As I strive to provide accurate information and insights, I acknowledge that there’s always room for improvement. If you notice any mistakes or have suggestions for enhancement, I sincerely invite you to share them with me.

🤩 Thanks for being patient and following me. Keep supporting 🙏

Clap👏 if you liked the blog.

For more exercises — please follow me below ✅!

https://vjraghavanv.hashnode.dev/

#aws #kubernetes #containerorchestration #containerization #pods #cluster #awsugmdu #awsugncr #automatewithraghavan