Ritik Sharma Combined Interview Q&A
Index
Xebia Interview Questions
1. Largest and Smallest Number in List
2. Remove Duplicates from List
3. Print Running Instances
4. Terraform Module
5. Upgrade Terraform Plugins
6. RDS Meaning
7. RDS Components
8. DevOps vs DevSecOps
9. Connect to EC2
Zemoso Interview Questions
1. Statefile
2. Statefile Storage
3. Null Resource
4. CI/CD Workflow
5. Terraform EC2 Code
6. Terraform Plan with Commented Resource
7. Largest and Smallest in Array
8. Entry Point vs CMD
9. Add vs Copy
10. Kubernetes Architecture
11. Ansible Knowledge
12. Secrets vs ConfigMap
13. Docker Lifecycle
14. ReplicaSet
15. Single-Node Kubernetes
16. Git File Removal
17. Git Merge Check
18. ALB vs NLB
19. Route53
20. GCP Experience
21. Terraform Module Purpose
Pure Software Company Interview Questions
1. Single vs Multiple Pipelines
2. Pipeline Issues
3. Jenkins Version
4. Jenkins Terraform Script
5. 10 EC2 Instances
6. Terminate 9 EC2
7. On-Prem to VPC
8. Terraform Taint
9. Terraform Refresh
10. Manual Resource Change
11. Terraform Module Purpose
12. CloudTrail
13. Load Balancer and Auto Scaling
14. Databricks
Xebia Interview Questions
1. Python program to find the largest and smallest number in a given list
Part One: "In Python, I’d use max() and min() functions on the list. In Bash, I’d sort the list with sort
and pick the first and last elements."
Part Two: This tests basic programming. Python: numbers = [5, 2, 9, 1]; print(max(numbers),
min(numbers)) outputs 9 and 1. Bash: echo "5 2 9 1" | tr ' ' '\n' | sort -n | (head -1; tail
-1) outputs 1 and 9.
2. Python program to remove duplicates from a given list
Part One: "In Python, I’d convert the list to a set and back to a list. In Bash, I’d use sort and uniq to
remove duplicates."
Part Two: This checks list manipulation. Python: lst = [1, 2, 2, 3]; unique = list(set(lst))
gives [1, 2, 3]. Bash: echo "1 2 2 3" | tr ' ' '\n' | sort -n | uniq outputs 1 2 3.
3. Python program to print all running instances from all regions
Part One: "I’d use Boto3 in Python to list EC2 instances across regions. In Bash, I’d use AWS CLI with a
loop over regions."
Part Two: This tests AWS scripting. Python: import boto3; ec2 = boto3.client('ec2'); regions =
ec2.describe_regions()['Regions']; for r in regions: instances =
ec2.describe_instances(Filters=[{'Name': 'instance-state-name', 'Values': ['running']}],
Region=r['RegionName']) . Bash: for r in $(aws ec2 describe-regions --query
"Regions[].RegionName" --output text); do aws ec2 describe-instances --region $r --filters
Name=instance-state-name,Values=running --query "Reservations[].Instances[].InstanceId";
done .
4. What is a Terraform module and how do we use it in a script?
Part One: "A Terraform module is a reusable set of resources. I use it by calling it in a script with inputs,
like I did for EKS at VGS."
Part Two: This tests modularity. Example: module "eks" { source = "./modules/eks"; cluster_name
= "my-cluster" } reused an EKS setup across projects.
5. How do you upgrade Terraform plugins like providers?
Part One: "I run terraform init -upgrade to fetch the latest provider versions, as I’ve done at Sherrill
to stay current."
Part Two: This checks maintenance. Example: terraform init -upgrade updated the AWS provider
from 3.0 to 4.0 for new features.
6. What does RDS mean?
Part One: "RDS stands for Relational Database Service, an AWS managed database offering like MySQL
or PostgreSQL."
Part Two: This tests AWS basics. Example: Ritik might have used RDS at Sherrill for e-commerce data,
managed by AWS.
7. What components are seen in RDS?
Part One: "RDS includes the DB instance, engine, storage (EBS), backups, and read replicas, as I’ve
worked with at Sherrill."
Part Two: This probes RDS structure. Example: A MySQL instance with EBS and replicas ensured HA.
8. DevOps vs DevSecOps
Part One: "DevOps focuses on automation and delivery speed, while DevSecOps integrates security
throughout, like using Trivy at VGS."
Part Two: This tests philosophy. Example: DevSecOps at VGS added security scans to DevOps pipelines.
9. How do you connect an EC2 instance from your local machine?
Part One: "I use SSH with the instance’s key pair and public IP, like ssh -i key.pem ec2-user@ip , as
I’ve done for Sherrill EC2s."
Part Two: This tests connectivity. Example: ssh -i mykey.pem [email protected] accessed an
EC2 for debugging.
Zemoso Interview Questions
1. What is a statefile?
Part One: "A Terraform statefile tracks resource states in JSON, stored locally or remotely, critical for my
VGS deployments."
Part Two: This tests Terraform basics. Example: terraform.tfstate tracked EKS resources at VGS.
2. Where do you store the statefile?
Part One: "I store it in S3 with DynamoDB locking for team access, as I did for StreamHub."
Part Two: This assesses state management. Example: S3 bucket my-state with DynamoDB ensured
consistency.
3. What is a null resource in Terraform?
Part One: "A null resource runs provisioners without creating resources, useful for scripts, like I’ve tested
for cleanup."
Part Two: This tests advanced Terraform. Example: resource "null_resource" "cleanup" {
provisioner "local-exec" { command = "rm -f temp" } } ran a cleanup.
4. CI/CD workflow
Part One: "I build a workflow with Jenkins: code commit triggers build, tests, Terraform apply, and
deploys to EKS, as at Sherrill."
Part Two: This checks CI/CD process. Example: Jenkins pipeline at Sherrill deployed microservices in 12
minutes.
5. Terraform code to deploy an EC2 instance
Part One: "I’d write a resource block with AMI, instance type, and subnet, like I’ve done at VGS."
Part Two: This tests Terraform coding. Example: resource "aws_instance" "example" { ami = "ami-
12345678"; instance_type = "t2.micro"; subnet_id = "subnet-xyz" } deployed an EC2.
6. What will appear in the Terraform plan if you comment out a resource block in
the above code?
Part One: "The plan shows the resource being destroyed since it’s no longer in code, as I’ve seen at
Sherrill."
Part Two: This tests plan behavior. Example: Commenting out an EC2 resource flagged it for deletion in
terraform plan .
7. Write a script to find the largest and smallest elements of an integer array
Part One: "In Python, I’d use max() and min() . In Bash, I’d sort and grab first/last, like sort -n |
(head -1; tail -1) ."
Part Two: This tests array handling. Bash: echo "5 3 8 1" | tr ' ' '\n' | sort -n | (head -1;
tail -1) outputs 1 and 8.
8. Entry point vs CMD in a Dockerfile
Part One: "ENTRYPOINT sets the default executable, CMD provides arguments. I’ve used both in
Dockerfiles at VGS."
Part Two: This tests Docker basics. Example: ENTRYPOINT ["nginx"] with CMD ["-g", "daemon
off;"] ran Nginx.
9. Add vs Copy in Dockerfile
Part One: "COPY transfers files directly, ADD also extracts tarballs. I use COPY for simplicity in VGS
Docker images."
Part Two: This checks Dockerfile commands. Example: COPY app /app copied files without ADD’s extra
features.
10. Describe Kubernetes architecture
Part One: "It has a control plane with API server, etcd, scheduler, and nodes with kubelet and pods, as
I’ve managed at Sherrill."
Part Two: This tests K8s knowledge. Example: Sherrill’s EKS had an API server managing 10 nodes.
11. Do you know Ansible?
Part One: "Yes, I’ve used Ansible for configuration management, like setting up EKS nodes at VGS."
Part Two: This confirms tool familiarity. Example: Ansible playbook installed Prometheus on 50 nodes.
12. Difference between Secrets and ConfigMap in Kubernetes?
Part One: "Secrets store sensitive data encoded, ConfigMaps hold non-sensitive configs. I’ve used both
in SecureVDI."
Part Two: This tests K8s resources. Example: Secrets held DB passwords, ConfigMaps set app configs.
13. Docker lifecycle
Part One: "It’s build, run, stop, and remove. I’ve managed this cycle for StreamHub containers."
Part Two: This checks Docker process. Example: docker build , docker run , docker stop , docker
rm deployed a video app.
14. What is a ReplicaSet?
Part One: "A ReplicaSet ensures a set number of pod replicas run, used in Sherrill’s EKS deployments."
Part Two: This tests K8s concepts. Example: A ReplicaSet kept 3 pods running for HA.
15. Is it possible to run Kubernetes in a single-node local environment?
Part One: "Yes, with Minikube or Kind, I’ve tested single-node K8s locally for development."
Part Two: This tests K8s flexibility. Example: Minikube ran a local cluster on my laptop.
16. How can we remove a file from Git without removing the filesystem?
Part One: "I use git rm --cached file to untrack it, keeping it locally, as I’ve done at VGS."
Part Two: This tests Git control. Example: git rm --cached secrets.txt untracked a file.
17. How can we discover if a branch has already been merged in Git?
Part One: "I use git branch --merged to check, confirming merges as at Sherrill."
Part Two: This checks Git history. Example: git branch --merged showed feature-x was merged.
18. Application Load Balancer vs Network Load Balancer
Part One: "ALB handles HTTP with routing, NLB manages TCP with low latency. I’ve used ALB at Sherrill
for apps."
Part Two: This tests ELB knowledge. Example: ALB routed /api calls, unlike NLB’s raw traffic handling.
19. What is Route53?
Part One: "Route53 is AWS’s DNS service for domain routing and health checks, which I’ve explored."
Part Two: This tests DNS understanding. Example: Route53 could route app.example.com to an ALB.
20. Experience with GCP Cloud?
Part One: "I haven’t worked with GCP extensively, but I’ve used AWS and Oracle Cloud, applying similar
principles."
Part Two: This checks multi-cloud experience. Example: AWS EKS skills could translate to GKE.
21. What is a Terraform module, and what is its purpose?
Part One: "A module is a reusable Terraform config block. It simplifies code, like my EKS modules at
VGS."
Part Two: This tests modularity purpose. Example: A module reused EKS configs across projects.
Pure Software Company Interview Questions
1. What is the difference between a single Jenkins CI/CD pipeline and multiple
pipelines?
Part One: "A single pipeline runs all stages sequentially, while multiple split tasks for parallelism, as I’ve
used at Sherrill."
Part Two: This tests pipeline design. Example: Sherrill’s single pipeline built and deployed, vs. multiple
for testing and deployment.
2. What are the issues of using a single pipeline vs. multiple pipelines?
Part One: "Single pipelines can bottleneck and fail entirely, while multiple are complex but faster, seen at
VGS."
Part Two: This assesses trade-offs. Example: A single pipeline delay at VGS vs. multiple speeding up 5
projects.
3. Current Jenkins version
Part One: "As of April 2025, it’s around 2.426.x LTS, though I’d confirm with the latest release notes."
Part Two: This tests awareness. Example: Ritik likely used 2.387.x at VGS, based on 2024 norms.
4. Write a Jenkins pipeline script for Terraform deployment
Part One: "I’d write a declarative pipeline with stages for init, plan, and apply, like I’ve done at Sherrill."
Part Two: This tests scripting. Example: pipeline { agent any; stages { stage('Init') { steps {
sh 'terraform init' } } stage('Plan') { steps { sh 'terraform plan' } } stage('Apply') {
steps { sh 'terraform apply -auto-approve' } } } } .
5. How to create 10 EC2 machines with incremental values like 0,1,2, etc.
Part One: "I’d use Terraform’s count and index, naming them incrementally, as I’d adapt from VGS."
Part Two: This tests resource iteration. Example: resource "aws_instance" "ec2" { count = 10;
instance_type = "t2.micro"; tags = { Name = "ec2-${count.index}" } } .
6. How to terminate 9 EC2 instances and leave one EC2 machine running
Part One: "I’d adjust Terraform count to 1, applying to terminate 9, keeping one, as I’d do from Sherrill."
Part Two: This tests resource control. Example: Changing count = 10 to count = 1 kept one EC2.
7. How to connect on-premise to an application in a VPC cloud
Part One: "I’d use AWS Direct Connect or VPN, routing via VPC gateways, as I’d design from experience."
Part Two: This tests hybrid connectivity. Example: A Site-to-Site VPN linked on-prem to a VPC.
8. Terraform taint
Part One: "Taint marks a resource for recreation on the next apply, useful for fixes, as I’ve used at VGS."
Part Two: This tests Terraform commands. Example: terraform taint aws_instance.example rebuilt
a faulty EC2.
9. Terraform refresh
Part One: "Refresh updates the state with real-world changes without applying, as I’ve done at Sherrill."
Part Two: This checks state sync. Example: terraform refresh aligned state after a manual EC2
change.
10. What will happen if someone changes resource values on the console and you
do a Terraform apply?
Part One: "Terraform overwrites console changes to match the code, unless drifted, as I’ve seen at VGS."
Part Two: This tests drift handling. Example: A manually resized EC2 reverted to t2.micro on apply.
11. What is a Terraform module, and what is its purpose?
Part One: "A module is a reusable Terraform block to simplify and standardize configs, like my Sherrill
modules."
Part Two: This revisits modularity. Example: An EKS module standardized cluster setups.
12. What is CloudTrail?
Part One: "CloudTrail logs AWS API calls for auditing and security, which I’ve used for monitoring."
Part Two: This tests auditing knowledge. Example: CloudTrail tracked S3 access at Sherrill.
13. What is a Load Balancer and Auto Scaling?
Part One: "A Load Balancer distributes traffic, Auto Scaling adjusts instances. I’ve used both at Sherrill
for HA."
Part Two: This tests core concepts. Example: ALB and Auto Scaling handled 5K+ requests.
14. What is Databricks?
Part One: "Databricks is a data analytics platform on Spark, integrated with AWS, which I’ve explored
briefly."
Part Two: This tests broader knowledge. Example: It could process logs alongside S3 data.