0% found this document useful (0 votes)
4 views6 pages

Devops Interview

The document outlines a DevOps journey focusing on automation, CI/CD pipelines, and various tools like Jenkins, Terraform, and Docker. It highlights key responsibilities, including infrastructure scaling, security practices, and a successful migration to a cloud-native architecture. Additionally, it covers deployment challenges, Git vs. GitHub differences, and provides technical insights on Kubernetes, Docker, and Terraform usage.

Uploaded by

poojanandish1993
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views6 pages

Devops Interview

The document outlines a DevOps journey focusing on automation, CI/CD pipelines, and various tools like Jenkins, Terraform, and Docker. It highlights key responsibilities, including infrastructure scaling, security practices, and a successful migration to a cloud-native architecture. Additionally, it covers deployment challenges, Git vs. GitHub differences, and provides technical insights on Kubernetes, Docker, and Terraform usage.

Uploaded by

poojanandish1993
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Walk me through your DevOps journey, roles &

responsibilities:
I started my DevOps journey by working on automation using CI/CD
pipelines for efficient code delivery. My responsibilities evolved to cover
areas like Infrastructure as Code (IaC), containerization, and cloud
services. I worked with tools like Jenkins, Terraform, Docker,
Kubernetes, and AWS for orchestrating containerized applications. I was
also responsible for monitoring, logging, and incident management
using tools like Prometheus, Grafana, and CloudWatch.
As my responsibilities grew, I focused on scaling infrastructure to handle
production workloads, optimizing high-availability and disaster recovery
strategies. I also worked on security best practices including IAM roles,
network policies, and encryption.

Proud Moment in Current Organization:


One of my proud moments came when I led the migration of a legacy
application to a cloud-native microservices architecture. The transition
was challenging but ultimately allowed us to achieve faster deployment
cycles, improved scalability, and higher reliability in the production
environment.

Have You Faced Any Deployment Failures?


Yes, I have encountered deployment failures, mainly related to
configuration drift in infrastructure or misconfigured Helm charts. We
had a scenario where a Kubernetes pod failed to start due to incorrect
environment variables, and I quickly troubleshooted it by reviewing pod
logs and correcting the configuration in the Helm chart.

Difference Between Git and GitHub:


 Git: A distributed version control system that allows multiple
developers to track changes in their codebase. It is a tool used locally.

 GitHub: A platform that hosts Git repositories online and provides


features like pull requests, code reviews, and collaboration.

How to Create Branch, Create and Switch to Newly


Created Branch:
bashCopyEditgit branch <branch-name> # Create a new branch
git checkout <branch-name> # Switch to the new branch

Alternatively, you can use:


bashCopyEditgit checkout -b <branch-name> # Create and switch in one
command

How Do You Ensure Raising PR Is Mandate for Developers?


We enforce branch protection rules in GitHub to ensure that developers
can’t push directly to the master branch. They need to raise Pull Requests
(PRs) which undergo code review before being merged.

You Have Staged Changes, and I Ask You to Stop the


Work, What Will You Do?
You can unstage the changes using:
bashCopyEditgit reset # Unstages all staged changes
git checkout . # Discards changes to tracked files

Jenkins Pipeline Block Diagram & Explanation:


Here’s a basic Jenkins pipeline block diagram:
yamlCopyEditStage 1: Checkout
|
v
Stage 2: Build
|
v
Stage 3: Test
|
v
Stage 4: Deploy
|
v
Stage 5: Notify

 Checkout: Fetches the latest code from the repository.

 Build: Compiles the code and creates a deployable artifact.

 Test: Runs unit and integration tests to ensure code quality.

 Deploy: Deploys the artifact to the testing/production environment.

 Notify: Sends notifications to stakeholders.


What is a Multibranch Pipeline? What Triggers Are You
Using?
A multibranch pipeline is a Jenkins pipeline that automatically creates a
separate pipeline for each branch in the repository. It’s triggered
automatically by Git events such as:
 Push events.

 Pull request creation.

Write a Playbook to Check Connectivity to All Target


Hosts? Host File Path
yamlCopyEdit---
- name: Check connectivity to all target hosts
hosts: all
tasks:
- name: Ping the host
ping:

In the hosts file, the path could be:


iniCopyEdit[web]
192.168.1.10
192.168.1.11

What Is Default User of Dockerfile? How to Set User?


The default user is usually root. To set a different user:
DockerfileCopyEditUSER <username>

Docker: How to List Running Containers, Get Inside, and


Run Image?
 List running containers:

bashCopyEditdocker ps

 Get inside a container:

bashCopyEditdocker exec -it <container_id> /bin/bash

 Run an image:

bashCopyEditdocker run -it <image_name> /bin/bash

 -itd Flag:
o -i = Interactive.

o -t = Allocates a pseudo-TTY.

o -d = Run container in detached mode.

 Difference between CMD & ENTRYPOINT:

o CMD: Provides default arguments for the container.

o ENTRYPOINT: Specifies the command to run when the container


starts. It can be overridden by CMD or passed arguments.

How to List Processes Running Inside the Container?


bashCopyEditdocker exec -it <container_id> ps aux

How Are You Managing Different Environments in EKS?


We manage different environments (development, staging, production) in
EKS using namespaces, separate Kubernetes configurations (contexts), and
Helm for environment-specific configurations.

Explain K8s Architecture & Diagram:


Kubernetes architecture consists of:
 Master Node (Control Plane): Manages the cluster, schedules
workloads, etc.

 Worker Nodes: Run the application pods.

 ETCD: Stores the cluster’s state.

 Kubelet: Ensures containers are running in the pods.

 Kube Proxy: Maintains network rules.

Diagram:
pgsqlCopyEdit+-----------------------------------------+
| Master Node |
| |
| - API Server - Controller Manager |
| - Scheduler - ETCD |
+-----------------------------------------+
| |
| |
+-----------------------------------------+
| Worker Nodes |
| |
| - Kubelet - Kube Proxy |
| - Pods (Application) |
+-----------------------------------------+

When You Run kubectl apply, How Does the Flow Go?
1. kubectl CLI: Makes a request to the API Server.

2. API Server: Validates and processes the request.

3. The request is sent to the Controller Manager (which checks and


ensures the desired state is achieved).

4. The Scheduler places the pods on appropriate worker nodes.

5. The Kubelet on the node starts the containers.

How Does Your Application Receive Traffic from Outside?


The traffic flow typically goes from the External User to a Load Balancer
(either AWS ALB or NGINX Ingress Controller), which then routes the traffic to
the correct Kubernetes Service (NodePort/LoadBalancer/Ingress).

What Is Ingress? How Does It Know Which Traffic to


Forward?
Ingress is a set of rules that allows inbound connections to reach the
services in a Kubernetes cluster. It uses hostnames and paths to route
traffic to the correct services, often using Ingress Controllers to handle the
routing.

What Is Network Policies in Kubernetes?


Network Policies define how pods communicate with each other and other
services. Example:
yamlCopyEditapiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-all
spec:
podSelector: {}
ingress:
- from:
- podSelector: {}

 Ingress: Traffic entering the pod.


 Egress: Traffic leaving the pod.

Apache2 Tasks:
 Configuring virtual hosts, changing ports, enabling/disabling modules,
and tuning performance like caching, security headers, and SSL.

What Are You Doing in Terraform?


In Terraform, I’m primarily provisioning infrastructure, such as VPCs, EC2
instances, RDS databases, IAM roles, and managing EKS clusters.

Monitoring Tools in Your Environment?


I’ve worked with CloudWatch for AWS monitoring, Prometheus/Grafana
for Kubernetes, and Datadog for full-stack observability.

Helm & ArgoCD:


 Helm is used for templating and packaging Kubernetes applications. I
pass multiple values.yaml files like:

bashCopyEdithelm install my-release -f values1.yaml -f


values2.yaml .

 ArgoCD is a GitOps tool that helps manage Kubernetes deployments


through Git repositories.

Learning PowerShell?
Given my experience with scripting languages, I’d estimate a few weeks to
get comfortable with PowerShell, particularly for automation tasks.

Feel free to ask more details on any of these topics!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy