Skip to main content

Posts

Showing posts from May, 2021

Kubernetes Deployment and Services

  what is a deployment? A  Kubernetes Deployment  is used to tell  Kubernetes  how to create or modify instances of the pods that hold a containerized application.  Deployments  can scale the number of replica pods, enable the rollout of updated code in a controlled manner, or roll back to an earlier  deployment  version if necessary. How to create a deployment? using Command Prompt: kubectl create deployment my-webdep --image=nginx --replicas=1 --port=80 using yml file: For that create a folder and inside that create a yml file as  deployment.yml  and paste the following command in that apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment spec: selector: matchLabels: app: nginx replicas: 1 # tells deployment to run 2 pods matching the template template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.14.2 ports: ...

Architechture of Kubernetes

  Kubernetes Architecture and Components: It follows the client-server architecture, from a high level, a Kubernetes environment consists of a  control plane (master) , a  distributed storage system  for keeping the cluster state consistent ( etcd ), and a number of  cluster nodes (Kubelets). We will now explore the individual components of a standard Kubernetes cluster to understand the process in greater detail. What is Master Node in Kubernetes Architecture? The Kubernetes Master (Master Node) receives input from a CLI (Command-Line Interface) or UI (User Interface) via an API. These are the commands you provide to Kubernetes. You define pods, replica sets, and services that you want Kubernetes to maintain. For example, which container image to use, which ports to expose, and how many pod replicas to run. You also provide the parameters of the desired state for the application(s) running in that cluster. API Server: The  API Server  is the front-end...

DOCKER for Beginners

 Docker is a platform for building, running and shipping applications. Docker is a tool designed to make it easier to create, deploy, and run applications by using containers.  Containers: An Isolated Environment for running an application Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and deploy it as one package.   By doing so, thanks to the container, the developer can rest assured that the application will run on any other machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code. The main objective of Containers is Consistent working of an application in all system. In a way, Docker is a bit like a virtual machine . But unlike a virtual machine, rather than creating a whole virtual operating system, Docker allows applications to use the same Linux kernel as the system that they're running...