Mid questions
CI/CD 9 questions
- #1Automated GitOps Promotion
You are setting up a GitOps pipeline.
repo-acontains the application source code, andrepo-bcontains the Kubernetes configuration (values.yaml).When code is pushed to
repo-a, the pipeline must:- Build a Docker image tagged with the Short Git SHA.
- Automatically update
repo-bto use this new image tag.
- #2Automated Rollback on Deployment Failure with Values File Restoration
A repository at
/home/interview/deploy-repocontains avalues.yamlfile tracking the current Docker image tag and adeploy.shscript that simulates production deployment. When deployments fail, the team must manually revertvalues.yamlto the previous working tag. An automated rollback mechanism is needed to detect failures and restore the last known-good tag with a commit by CI Bot. A starter workflow file has been created at.github/workflows/deploy.ymlwith the basic structure. - #3Docker Image Tagging with Commit SHA
A repository at
/home/interview/repocontains a Dockerfile but no automated build process. Developers manually build Docker images without consistent tagging, making it difficult to track which image corresponds to which code version. A starter workflow file has been created at.github/workflows/build.ymlwith the basic structure. - #4GitHub Actions Matrix Build Strategy
A repository at
/home/interview/repocontains a Node.js application with a test suite at./run-tests.sh. The application needs to be tested across multiple Node.js versions (18, 20, and 22) to ensure compatibility, but currently has no automated testing configured. A starter workflow file has been created at.github/workflows/pr-tests.ymlwith the basic structure. The repository has the upload-artifact action available locally at.github/actions/upload-artifactfor artifact management. - #5Job Dependency Enforcement
A repository at
/home/interview/repocontains a workflow file.github/workflows/pipeline.yml. The workflow currently defines three jobs:lint,test, andbuild. These jobs are configured to run in parallel without any dependencies. - #6Multi-Job Workflow with Artifact Handoff
A repository at
/home/interview/repocontains a Node.js application with a test suite at./run-tests.sh. The development team needs a two-stage CI/CD pipeline where the first job runs tests and generates test results, and a second job downloads those results to create a summary report. The repository has upload-artifact and download-artifact actions available locally at.github/actions/for artifact management. A starter workflow file has been created at.github/workflows/artifact-handoff.ymlwith the basic structure. - #7Path-Based Workflow Execution
A repository at
/home/interview/repocontains a multi-component application with infrastructure code in the/infradirectory and documentation in the/docsdirectory. Currently, the repository has no automated workflow configured with path-based filtering to run workflows only when specific files change. A starter workflow file has been created at.github/workflows/infra-check.ymlwith the basic structure. The repository has the upload-artifact action available locally at.github/actions/upload-artifactfor artifact management. - #8PR Test Gate
A repository at
/home/interview/repohas a test suite located at./run-tests.shbut no automated testing on pull requests. Developers must manually run tests before merging, leading to inconsistent test coverage and occasional bugs in the main branch. A starter workflow file has been created at.github/workflows/pr-tests.ymlwith the basic structure. The repository already has the upload-artifact action available locally at.github/actions/upload-artifactfor artifact management. - #9Reusable Workflow with Input Parameters
A repository at
/home/interview/repocontains multiple applications that share common build and test steps. The development team wants to eliminate code duplication across workflows by creating a centralized reusable workflow that can be called from different workflows with different parameters.
Cloud 1 question
- #10Design Egress Only VPC with NAT
We need to prepare infrastructure for
ECStasks andEC2instances. It has to span across at least two Availability Zones. These workloads require outbound internet access to download updates and call external APIs. However, inbound access is not allowed. Additionally application should send data toS3in cost effective way and so we have to deploy necessary infrastructure for that traffic too.Note: You are required to design the VPC networking architecture only. Creation of ECS clusters, services, or EC2 instances is not part of this task.
Containers 5 questions
- #11Graceful Shutdown with SIGTERM Handling
You have a container image
myapp:gracebuilt from/home/interview/Dockerfilethat runs an application requiring cleanup on shutdown. When you rundocker stop, the container is killed after the 10-second timeout instead of shutting down gracefully because the application doesn't properly handle the SIGTERM signal. - #12Insecure Container Root User
A Dockerfile at
/home/interview/Dockerfilebuilds a Python web application tagged asmyapp:secure. The container runs as the root user (UID 0) with extensive Linux capabilities, violating the principle of least privilege. - #13Memory Limit and OOM Killer
A container named
mem_testrunning from imagemyapp:memcontains a memory stress script at/app/stress_memory.sh. Currently, the container runs with unbounded memory and can consume as much RAM as available on the host, preventing the OOM (Out of Memory) killer from terminating it even when it allocates excessive memory. - #14Optimize Dockerfile
A Dockerfile at
/home/interview/Dockerfilesuccessfully builds a Go application, but the resulting Docker image is over 800MB in size due to including the full Go toolchain, build dependencies, and source code. Production images must be under 200MB. - #15Storage Driver Performance Fuse Overlayfs
You have a container image
myapp:fsbuilt from/home/interview/Dockerfilethat performs intensive filesystem write operations. Docker is currently using the overlayfs storage driver and write performance is a bottleneck.
Git 9 questions
- #16Create an Annotated Tag
You have a Git repository at
/home/interview/repowhere you've just completed version 3.1.0 of your application. You need to create an annotated tag to mark this release with a proper message and metadata. - #17Fix Repository with Unrelated Histories
The repository at
/home/interview/repois in a broken state. Local and remote branches have diverged with no common ancestor. Consequently,git push origin mainfails with a non-fast-forward error, andgit pull origin mainfails because the histories are unrelated. - #18Merge Repositories Preserving Both Histories
You have two separate Git repositories at
/home/interview/repo-a(5 commits) and/home/interview/repo-b(4 commits) developed independently. Create a new monorepo at/home/interview/monorepothat combines both repositories into separate subdirectories using subtree (project-a/andproject-b/) while preserving the full commit history from both repositories. - #19Recover Lost Commits from Detached Head
You have a Git repository at
/home/interview/repowhere you were in a detached HEAD state, made 3 commits, then switched back to themainbranch. Those 3 commits are now unreachable and appear to be lost since no branch references them. - #20Remove File from Entire Git History
A file named
secrets.envcontaining sensitive credentials exists in the repository's commit history. You need to purge this file from the entire history. - #21Restore File to Previous Version
You have a Git repository at
/home/interview/repowhere theconfig.jsfile has been modified in the last two commits, but those changes introduced bugs. You need to restore onlyconfig.jsto the version it had 2 commits ago without affecting any other files - #22Stash Work Fix Bug Restore and Update
Uncommitted changes on
feature-uiprevent you from switching branches to fix a critical bug onmain. - #23Stash Work Fix Bug Resume
You have a Git repository at
/home/interview/repowhere you are working on a new feature on thefeature-loginbranch with uncommitted changes inlogin.js. A fix is needed on thedevbranch:app.jscontains a JavaScript syntax error that can be identified by runningnode app.js. - #24Update Submodule to Latest Commit
You have a Git repository at
/home/interview/repothat contains a submodule in thevendor/utilsdirectory. The submodule is pointing to an old commit, but newer commits exist on the submodule's remote repository.
Kubernetes 13 questions
- #25ConfigMap Reload With Sidecar
Your application needs to react to configuration changes without requiring a pod restart.
- #26Crashing Misconfigured Pod
You have a Kubernetes cluster where the deployment webapp in namespace prod is stuck in
CrashLoopBackOff.The application exposes a health check endpoint at
/healthzon port8080. The container image already includes a config directory with the required files, but the deployment configuration has issues preventing the pod from starting correctly.Because the config directory already exists and is used by the application, mounting a
ConfigMapover the entire directory would overwrite it and cause the app to fail. The deployment needs to be fixed so configuration is injected without replacing the existing directory. - #27CronJob Schedule Misconfiguration
A CronJob named
cleanupin theopsnamespace is failing to trigger as expected. It has an incorrect schedule, relies on the default timezone (which may not match the server), and retains too many completed jobs, cluttering the history. - #28Custom Resource Definition Setup
You need to extend the Kubernetes API to support a proprietary resource type called "Widget".
- #29DNS Based Service Discovery
In namespace
disco, the applicationdiscovery-apprelies on DNS-based discovery of peer pods. The servicediscovery-svcis supposed to return all backend pod IPs, but currently:kubectl exec deploy/testpod -n disco -- nslookup discovery-svc.disco.svc.cluster.localreturns only one IP instead of individual pod IPs. The application cannot discover its peers and fails to form a cluster.
- #30Fix Job With ServiceAccount and RBAC Permission Issues
You have a Kubernetes cluster where a job named
data-loaderin namespaceopsfails with permission denied when calling the Kubernetes API. The job manifest file is located at/home/interview/data-loader-job.yaml. - #31Image Pull Backoff Secrets
A Deployment named
backendin thedevnamespace is failing to start. Pods are stuck inImagePullBackOffdue to configuration issues. - #32Implement StatefulSet With Stable DNS
You are deploying a distributed database named
dns-appin thedevnamespace. This application requires that each Pod be addressable by a predictable, unchanging hostname (e.g.,dns-app-0.dns-app) so the nodes can find each other for data replication. - #33Multi Tenant Namespace Isolation
Two teams share a cluster and require strict isolation with specific exceptions for inter-team communication.
- #34OOMKilled Pod Analysis Fix
A memory-intensive application named
oom-demois repeatedly crashing. The pod status showsCrashLoopBackOff, but you need to confirm the underlying cause is an "Out Of Memory" (OOM) error and fix it by increasing the memory limit. - #35Secure Internal Service Communication
An application requires TLS certificates for internal service communication.
- #36StorageClass and PVC Expansion
The cluster has no StorageClass configured for dynamic volume expansion.
- #37Traffic Splitting With Native Kubernetes
Your team has a stable deployment
app-v1running in namespacecanary. They want to test a new version (v2) with approximately 1/3 of traffic going to v2 and 2/3 remaining on v1.
Linux 10 questions
- #38Analyzing Log Partition Usage
Log rotation has stopped working correctly, and you suspect that
/var/logmight be mounted on a different filesystem with limited space or incorrect mount options. - #39Debug SSH Lockout
The developer account dev has been locked out of the server. Security logs indicate the SSH daemon's authentication failure limit was triggered.
- #40Detect Memory Leak by Monitoring RSS
One of your long-running Node.Js services (process name
node) has been slowing down over several hours of uptime. CPU usage is normal, disk I/O is normal, but the server is gradually running out of memory. - #41Discover Unexpected Background Jobs
You have noticed an unexpected spike in system load. You suspect a batch of recently spawned jobs is responsible and need to isolate processes that started within the last few minutes.
- #42Fix Inode Exhaustion Issue
Your server cannot create new files. Commands like
touchfail with "No space left on device" errors, butdf -hshows plenty of free disk space. The filesystem has exhausted available inodes. - #43Monitoring Process Ownership
The server is consuming excessive resources. This server is used by multiple teams with their own credentials (e.g. each team has a username
dev-team,qa-team,ops-teametc). - #44Real-Time Log Timestamping
You're troubleshooting a service that produces untagged log output when run manually, making it difficult to analyze timing and sequence of events.
- #45Update AWS Configs
Each application environment (staging, dev, prod) has its own configuration file stored under
/etc/app/envs/, and each file currently hasmulti_az = falseandavailability_zone = "us-east-1a". Manually editing each file is error-prone and inefficient, so the change must be automated. - #46Upload Safe File Partitioning
Your application uploads files from
/tmp/app/, but the maximum allowed file size is 1 MB, and some files exceed this limit. - #47Using Unmounted Partitions
The server has unmounted partitions that are not being used and could be utilized for additional storage.
Networking 4 questions
- #48Fix Port Exhaustion for High Speed Scraper
A
web-scrapersystemd service is running on this system, making continuous HTTP requests. The service has started experiencing connection failures - logs show HTTP status 000 errors, indicating connections cannot be established even though the network is functional and remote servers are accessible. - #49Forward Traffic Between Ports
A service on your server is running on port 8080, but you now need it to also be reachable on port 8081. The application cannot be restarted and its configuration cannot be changed.
- #50Inspecting HTTP Traffic Flow
You suspect the web service isn't receiving HTTP requests, and you need to confirm network traffic to port 80.
- #51Validating Network Routes
Your server uses multiple network interfaces and may have incorrect routing for a specific subnet. You need to verify and fix it to ensure proper traffic flow.
Security 1 question
- #52Fix HTTPS Certificate Error
A minimal HTTPS webserver script (
webserver.sh) listening on port 8443 fails to establish secure connections. The bundled SSL certificate (old_server.crt) lacks a Subject Alternative Name (SAN) for the local IP127.0.0.1, causing hostname verification failures.