Embracing DevOps Interview Mock Practices for DEVOPS. This article aims to provide a comprehensive understanding of essential concepts related to DevOps, Docker, Jenkins, SonarQube, Kubernetes, and Terraform. π Practice it and level up your DevOps knowledge!
IAAS and PAAS: Infrastructure as a Service (IAAS) offers virtualized computing resources, while Platform as a Service (PAAS) provides a platform for developing, running, and managing applications without dealing with underlying infrastructure complexities. π»
AZ and Regions: Availability Zones (AZ) are unique physical locations within a region, housing data centers. Regions are geographical areas containing one or more AZs, each with its own set of services. π
Docker Run and CMD Commands:
docker run
: Used to run a container from an image.CMD
: Instruction in a Dockerfile to provide default commands for the container. π³
Docker Network Types:
Bridge network
Host network
Overlay network
Macvlan network π
Default Network in Docker: The default network in Docker is the bridge network. π
Bridge Network in Docker: A bridge network is the default network in Docker, facilitating communication between containers on the same network. It allows outbound connectivity and isolates containers on different networks by default. π
Docker Container Creation Process:
Write a Dockerfile.
Build an image using docker build.
Run a container using docker run. ποΈ
Static vs. Declarative Pipeline in Jenkins:
Static Pipeline: Defined with imperative steps in a Jenkinsfile.
Declarative Pipeline: Uses a simplified, structured syntax for the Jenkinsfile. π
Best Practices for Jenkins Integration:
Use version control for Jenkinsfiles.
Securely manage credentials and secrets.
Regularly update plugins.
Implement security best practices. π
Docker Command for Expose:
docker run -p 80:80 my-container
π³οΈController Manager in Kubernetes: The Controller Manager in Kubernetes manages controller processes that regulate the state of the cluster, such as node controller and replication controller. π€
Use of API-Server in Kubernetes: The API server is a component of the Kubernetes control plane that exposes the Kubernetes API, serving as the front end for the control plane. π
Argument vs. Attribute in Terraform:
Argument: Parameters passed to a resource or module.
Attribute: Values returned by a resource or module. Example:
resource "example" { name = "example-instance" }
π οΈ
Docker 'FROM' Keyword: The FROM keyword in Docker specifies the base image for a Dockerfile. ποΈ
Base Image in Docker: A base image is the foundation of a Docker image upon which other images can be built. π
COPY vs. ADD Command in Docker:
COPY: Copies files from the local host to the container.
ADD: Similar to COPY but with additional features like extracting tarballs. π¦
Use of -p in Docker Command: The -p flag in Docker commands publishes a container's port to the host. πͺ
Expose -p vs. Docker Run -p:
EXPOSE: Informs Docker that the container listens on specified network ports.
docker run -p
: Publishes a container's port to the host. π
Data Storage in Docker Image: Data in a Docker image is typically stored in volumes or bind mounts outside the container to persist beyond its lifecycle. πΎ
Four Important Pillars for DevOps:
Security
Speed
Stability
Scalability ποΈ
Connecting to a Remote Server: Use the ssh command to connect to a remote server:
ssh username@remote_server_ip
πTop 5 Used Shell Script Commands:
echo
if
for
while
grep
Edge Location and Wavelength in AWS:
Edge Location: A data center endpoint for Amazon CloudFront.
Wavelength: An AWS infrastructure offering enabling applications to run at the edge of the 5G network. π
Running a POD on a Particular Node in Kubernetes: To run a POD on a specific node in Kubernetes, use the
--node-name
option withkubectl run
.Taints and Toleration in Kubernetes:
Taints: Node affinity rules preventing pod scheduling unless tolerated.
Toleration: Pod specification allowing scheduling on nodes with specific taints. π€
Mechanics for Deployment in Kubernetes:
Rolling updates
Blue-green deployment
Canary deployment
Terraform State File: The Terraform state file maintains the state of the infrastructure, used for planning and applying changes. π
State Lock in Terraform: State lock is a mechanism in Terraform to prevent concurrent operations on the same state file, avoiding conflicts. π
Different Ways to Create Kubernetes:
kubectl apply
kubectl create
kubectl run
Kubernetes Scheduler: The Kubernetes Scheduler assigns nodes to pods based on resource requirements, constraints, and policies. π€
Checking CPU Utilization in Kubernetes: Use
kubectl top nodes
to check CPU utilization on a specific cluster in Kubernetes. πInterpolation in Terraform: Interpolation in Terraform is the process of embedding expressions within strings to produce a final string. π
Kubernetes Architecture: Kubernetes architecture includes a master node (API server, controller manager, scheduler, etcd) and worker nodes (kubelet, kube-proxy, container runtime), communicating via the Kubernetes API. ποΈ
What is Ansible: Ansible is an open-source automation tool designed to streamline various IT tasks, including configuration management, application deployment, task automation, and orchestration. π€
What is Playbook π**:** Playbooks are a central concept in Ansible, serving as a way to organize and execute automation tasks. They provide a higher-level abstraction for expressing configurations, deployments, and orchestration.
Type of S3 :- 7 types
S3 Standard: For frequently accessed data
S3 Intelligent-Tiering: For automatic cost savings for data with unknown or changing access patterns
S3 One Zone-IA
S3 Glacier
S3 Glacier Deep Archive
S3 Outposts
This guide provides a thorough overview of crucial DevOps and containerization concepts, offering valuable insights for developers and DevOps practitioners navigating the ever-evolving landscape. Happy practicing! π
πSpecial Thanks to Shubham Lodha take for Mock practice!!
#DEVOPS #2024 #interviewquestion