โšก ~/naveed Interview Prep
โšก Portfolio Home โœ๏ธ Engineering Blog Deep Dives ๐ŸŽฏ Interview Hub 1,000+ Scenarios โ˜ธ๏ธ Kubernetes Mastery Hub 24 Modules ๐ŸŽฎ DevOps Arcade & Quizzes Subnet Blitz โšก ๐Ÿ—บ๏ธ DevOps Roadmaps PDFs & Guides ๐Ÿค– Morpheus Analysis AI Quant โ†— ๐Ÿ› ๏ธ Developer Tools Utilities ๐Ÿงช Labs & Experiments ๐Ÿ“„ Interactive CV & Certs ๐Ÿ”— All Links & Socials โšก Join The Dispatch (Weekly SRE Newsletter) →
Advertisement
๐Ÿข HCLTech ๐ŸŽ‰ Offer Extended (18โ€“24 LPA Band)

HCLTech DevOps Engineer Interview Experience โ€“ 18 Production Questions & Deep Answers

๐Ÿ“ Noida / Bengaluru, India ยท Hybrid (Enterprise Client Account) โฑ๏ธ 3 Weeks (Technical Screening โ†’ Kubernetes & Cloud Architecture Deep Dive โ†’ Managerial Round) ๐Ÿ’ผ Role: DevOps Engineer (Cloud Infrastructure, Kubernetes & CI/CD) ๐Ÿ“… Updated: 2026 Edition
๐Ÿ”ฅ Trending 2026 Technical Focus Areas Tested:
devops interview questions 2026scenario based devops interviewsre incident troubleshootingsite reliability engineering interview loopNaveed Kumbhar

1. Loop Overview & Candidate Context

Complete debrief of the HCLTech DevOps Engineer interview loop for enterprise client infrastructure. The evaluation went far beyond textbook definitions into real-world production incident response, Kubernetes networking internals, CNI subnet IP exhaustion, blue-green traffic cutover connection draining, Karpenter autoscaling, Prometheus/Grafana triage, Python Boto3 S3 error handling (403 vs 404), and RDS Multi-AZ failovers.

2. Detailed Round-by-Round Breakdown

Round 1: Kubernetes Core Architecture, Networking & Autoscaling (Q1โ€“Q6)

Focus: Kubernetes control plane and worker node internals, zero-downtime deployment strategies, in-flight connection draining during cutover, Karpenter vs Cluster Autoscaler vs HPA, CNI pod IP assignment lifecycle, and subnet IP exhaustion triage.

Q1: Explain Kubernetes control-plane and worker-node components. What does each actually do?

Production Breakdown: Interviewers at enterprise consultancies like HCLTech want to hear how components collaborate during a reconciliation loop, not just bulleted definitions:

  • kube-apiserver: The central gateway of the control plane. Exposes the REST API, handles authentication (X.509, OIDC, webhooks), authorization (RBAC), and admission controllers (Mutating/Validating webhooks). It is the only component that communicates directly with etcd.
  • etcd: A strongly consistent, distributed key-value store implementing the Raft consensus algorithm. Stores the entire cluster declarative state, secret data (base64/KMS-encrypted), and resource versions for optimistic concurrency control. Quorum requires (N/2)+1 nodes.
  • kube-scheduler: Assigns unassigned pods (spec.nodeName == "") to optimal worker nodes. It executes a two-phase loop: Filtering (Predicates) to eliminate nodes lacking CPU/memory or violating taints/tolerations, and Scoring (Priorities) to pick the best fit based on image locality, pod anti-affinity, and resource distribution.
  • kube-controller-manager: A single process running continuous non-blocking control loops. Each controller (NodeLifecycleController, ReplicaSetController, EndpointsController, JobController) compares the desired state in etcd with the current observed state and issues mutations through the API server.
  • kubelet (Worker): The node agent registered with the API server. It watches for PodSpecs assigned to its node via the syncLoop, invokes the Container Runtime Interface (CRI) to spawn or terminate containers, manages volume mounts via CSI, executes liveness/readiness probes, and reports node heartbeats (NodeStatus lease).
  • kube-proxy (Worker): Maintains network rules on the host to implement Kubernetes Service abstraction. In modern clusters, it operates in iptables or ipvs mode (or is completely replaced by eBPF via Cilium). It watches Services and EndpointsSlices, configuring netfilter NAT tables so traffic to a ClusterIP VIP is load-balanced to backend Pod IPs.
  • Container Runtime (CRI - containerd / CRI-O): Pulls container images from registries, unpacks overlay filesystems, and invokes low-level OCI runtimes (e.g. runc or crun) to initialize Linux cgroups, namespaces (PID, NET, IPC, MNT, UTS), and chroot/pivot_root environments.
๐Ÿ’ก Senior Engineer Bar: Highlight that worker node components (kubelet, kube-proxy) never talk to etcd or each other directly; every interaction traverses the kube-apiserver over mutual TLS (mTLS).
Q2: Which deployment strategies have you used? Explain Rolling, Blue-Green, and Canary with project examples.

Strategy Comparison & Real Project Context:

  • 1. Rolling Update (Default Kubernetes): Incrementally replaces old pods with new ones without service outage. Controlled via maxSurge (how many extra pods can be created above desired replica count) and maxUnavailable (how many pods can be taken down during the roll).
    Project Example: Used for standard stateless backend microservices (e.g., Spring Boot APIs) with maxSurge: 25% and maxUnavailable: 0 to guarantee 100% capacity during deployments.
  • 2. Blue-Green Deployment: Provisions two identical production environments: Blue (active live traffic) and Green (new release staging). Once Green passes synthetic smoke tests and health checks, the router or Service selector flips 100% of incoming traffic from Blue to Green.
    Project Example: Used for mission-critical core banking and payment processing APIs where version co-existence (running v1 and v2 simultaneously against shared databases) would cause duplicate transaction handling or cache schema incompatibilities.
  • 3. Canary Deployment: Exposes a small percentage of real user traffic (e.g. 5% → 25% → 50% → 100%) to the new version while monitoring HTTP 5xx error rates, response latencies, and Prometheus alerts using Argo Rollouts or Istio Envoy virtual services.
    Project Example: Used for high-traffic customer portal frontends and search engines. If p99 latency spikes above 250ms or HTTP 5xx exceeds 0.5%, Argo Rollouts triggers an automated instant rollback within 15 seconds.
# Rolling Update Tuning in Deployment spec:
spec:
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 25%        # Spin up 25% additional pods first
      maxUnavailable: 0    # Never drop below 100% healthy capacity
Q3: During a Blue-Green release, what happens to old pods, ongoing requests, and live traffic when traffic switches to the new version?

The Exact Mechanics of the Cutover:

  1. Selector Mutation & EndpointSlice Update: When the Kubernetes Service selector is updated from version: blue to version: green (or ALB target group switches), the EndpointsController detaches Blue Pod IPs from the Service EndpointsSlice.
  2. Live Traffic Redirection: New incoming SYN packets and HTTP requests are immediately routed exclusively to Green pods by kube-proxy / Envoy / AWS ALB.
  3. Ongoing In-Flight Requests (Connection Draining): Existing established TCP connections to Blue pods are not instantly severed. AWS ALB enters target deregistration delay (connection draining period, e.g. 60โ€“120s). The load balancer allows in-flight HTTP requests to complete while rejecting new connections.
  4. Pod Lifecycle & Termination Grace Period: When Blue pods are subsequently scheduled for deletion:
    • Kubelet issues a preStop lifecycle hook (e.g. sleep 15) to allow IP removal propagation across all node iptables and ingress routers.
    • Kubelet transmits SIGTERM to the container processes. Web servers (Nginx, Node, Go, Spring Boot) stop accepting new requests, flush internal buffers, and finish active transactions.
    • If the container has not exited after terminationGracePeriodSeconds (default 30s), Kubelet transmits SIGKILL to forcibly terminate the PID.
  5. Cold Standby vs Immediate Tear-Down: In mature enterprise deployments, Blue pods are kept running on standby at 100% capacity for 30โ€“60 minutes post-cutover. If Green manifests a latent regression (e.g. memory leak or database lock contention), rolling back is a sub-second Service selector flip back to Blue.
# Zero-Downtime Pod Shutdown Configuration:
spec:
  terminationGracePeriodSeconds: 60
  containers:
    - name: api-service
      lifecycle:
        preStop:
          exec:
            command: ["/bin/sh", "-c", "sleep 15"] # Wait for endpoint deregistration
Q4: How does node autoscaling work when demand rises or falls? Cluster Autoscaler/Karpenter vs HPA?

Pod-Level vs Node-Level Scaling Architecture:

  • HPA (Horizontal Pod Autoscaler - Pod Level): Evaluates metrics (CPU/Memory utilization from metrics-server, or custom metrics from Prometheus via KEDA). When target thresholds are exceeded (e.g. average CPU > 70%), HPA scales the replicas field in the Deployment. It scales pods, not servers.
  • Cluster Autoscaler (CAS - Legacy Node Level): Monitors the kube-scheduler for pods in Pending state due to insufficient CPU, memory, or node affinities. CAS adjusts the desired capacity of AWS Auto Scaling Groups (ASGs). Scaling up takes 3โ€“5 minutes due to EC2 launch delays and node bootstrapping. When node utilization drops below 50% for 10 minutes, CAS drains and terminates underutilized nodes.
  • Karpenter (Modern High-Speed Node Autoscaler): Operates directly with the cloud provider EC2 Fleet APIs without relying on AWS ASGs. Karpenter monitors unschedulable pods directly. It evaluates pod resource requests, tolerations, topology spread constraints, and selects the most cost-effective instance type from hundreds of EC2 families (c6g, m6i, r6g, spot/on-demand) in under 45 seconds.
    Scale-Down / Consolidation: Karpenter continuously computes node packing efficiency. If it identifies that 3 underutilized nodes can be consolidated onto 1 smaller node, it automatically provisions the smaller replacement, cordons/drains the older nodes respecting PodDisruptionBudgets (PDBs), and terminates them to slash AWS spend.
Key Contrast: HPA creates new pods when traffic increases. If existing nodes have no free CPU/RAM requests, those pods enter Pending. Karpenter detects the pending pods and launches right-sized EC2 instances immediately.
Q5: How does a newly created pod receive its IP address? Which component handles pod networking? (CNI)

End-to-End Pod IP Assignment Sequence:

  1. The Kubelet on the target worker node detects the pod binding via its syncLoop.
  2. Kubelet calls the Container Runtime (containerd) via CRI to create a pause container which establishes the Linux network namespace (netns).
  3. Containerd invokes the configured Container Network Interface (CNI) plugin (e.g. AWS VPC CNI, Calico, or Cilium) passing the ADD command along with the network namespace path and container ID.
  4. IPAM (IP Address Management) Execution:
    • In AWS EKS (AWS VPC CNI / aws-k8s-cni): The aws-node daemon's Local IPAM daemon (L-IPAMD) allocates an available secondary private IPv4 address from the Elastic Network Interface (ENI) attached to the EC2 worker node directly from the VPC subnet CIDR.
    • In Calico / Flannel (Overlay Networks): IPAM allocates an IP from a cluster-wide pod CIDR pool (e.g. 10.244.0.0/16) stored in etcd/CRDs.
  5. veth Pair Creation: The CNI plugin creates a virtual ethernet pair (veth). One end (e.g. vethxxxx) is attached to the host root network namespace (or bridge/eBPF map), and the other end is moved into the pod's network namespace and renamed to eth0.
  6. The CNI assigns the allocated IP address and default gateway to eth0 inside the pod namespace and brings the interface up.
  7. CNI returns success to containerd, which launches the application containers inside the same network namespace. Kubelet updates the pod status with podIP: x.x.x.x to the kube-apiserver.
Q6: If a subnet runs out of IP addresses, what happens to the pod's status? How would you investigate a sandbox/network setup failure?

Symptoms, Pod Status & Triage Runbook:

  • Pod Status: The pod is scheduled to a node, but gets stuck in ContainerCreating or reports FailedCreatePodSandBox error states in kubectl get pods.
  • Event Logs in kubectl describe pod <pod-name>:
    Warning  FailedCreatePodSandBox  42s  kubelet  Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container: plugin type="aws-cni" failed (add): add cmd: failed to assign an IP address to container
  • Investigating AWS VPC CNI Daemon Logs: Inspect the CNI daemon logs on the affected worker node:
    kubectl logs -n kube-system -l k8s-app=aws-node --tail=100 | grep -iE 'error|ipamd|no ip available|address'
    You will see errors like: InsufficientFreeAddressesInSubnet: The specified subnet has no available IP addresses.
  • Verifying Subnet Available IPs in AWS CLI:
    aws ec2 describe-subnets --subnet-ids subnet-0a1b2c3d4e5f   --query "Subnets[*].[SubnetId,CidrBlock,AvailableIpAddressCount]" --output table
  • Production Remediations:
    • Short-Term: Cordon and drain the node; scale down non-essential workloads to release leaked IP allocations.
    • Medium-Term (AWS EKS Prefix Delegation): Enable ENABLE_PREFIX_DELEGATION=true on aws-node. Instead of allocating single secondary IPs, each ENI slot allocates a /28 IPv4 prefix (16 IPs), increasing pod density per node while reducing AWS API throttling.
    • Architectural Fix (Secondary VPC CIDR): Attach a secondary non-routable CIDR (e.g. 100.64.0.0/16 Carrier-Grade NAT block) to the VPC and configure EKS custom networking (AWS_VPC_K8S_CNI_CUSTOM_NETWORK_CFG=true) with dedicated pod subnets.

Round 2: Observability, Production CI/CD & Manifest Design (Q7โ€“Q9)

Focus: Prometheus PromQL queries for CPU/memory/restart triage, Grafana alerting rules, real-world DevSecOps CI/CD pipeline automation from git commit to cluster deployment, and production-ready Kubernetes YAML specs.

Q7: How do you troubleshoot CPU, memory, restarts, latency, and production issues with Prometheus and Grafana?

Metric-by-Metric Production Diagnostic Playbook:

  • 1. High CPU Usage & CFS Throttling: Measuring CPU usage alone is deceptive because containers with CPU limits get throttled by the Linux Completely Fair Scheduler (CFS).
    PromQL for Utilization: sum(rate(container_cpu_usage_seconds_total{container="api"}[5m])) by (pod)
    PromQL for Throttling: sum(rate(container_cpu_cfs_throttled_periods_total[5m])) / sum(rate(container_cpu_cfs_periods_total[5m])) * 100
    If throttling exceeds 15โ€“20% while CPU is below 80%, the CPU limit is causing synthetic latency spikes and must be increased or removed.
  • 2. Memory Leaks vs Page Cache (OOMKilled): Linux buffers filesystem I/O in page cache. container_memory_usage_bytes includes inactive file cache. The actual metric monitored by the Linux kernel OOM Killer is working set memory:
    PromQL: sum(container_memory_working_set_bytes{container="api"}) by (pod) / sum(container_spec_memory_limit_bytes) by (pod) * 100
    A steadily ascending saw-tooth trend that resets only upon pod death indicates a native heap or memory leak. Verify with kubectl get pod -o jsonpath='{.status.containerStatuses[*].lastState.terminated.reason}' → OOMKilled (Exit Code 137).
  • 3. Pod Restarts & CrashLoopBackOff:
    PromQL: increase(kube_pod_container_status_restarts_total[1h]) > 2
    Correlate with Grafana Loki / CloudWatch logs: check container logs right before termination (kubectl logs <pod> --previous) to isolate unhandled exceptions, failed DB connections, or failed health probes.
  • 4. High Latency (P95 / P99 Degradation): Calculate percentiles using Prometheus histograms:
    PromQL P99: histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{service="api"}[5m])) by (le))
    Check downstream dependency response times: database query duration, Redis cache miss ratios, and connection pool wait queues to isolate the root bottleneck.
Q8: Explain your actual CI/CD work โ€” commit โ†’ build โ†’ test โ†’ security scan โ†’ image push โ†’ Kubernetes deployment.

Enterprise DevSecOps Architecture Flow:

  1. Commit & PR Trigger: Developer pushes code to a feature branch on GitHub / GitLab. Webhook triggers an ephemeral GitHub Actions runner or Jenkins Kubernetes agent. Pre-commit hooks validate linting and prevent secret leaks via gitleaks.
  2. Build & Unit Test: The runner builds application binaries (e.g. mvn clean test or npm test) using warm dependency caches (Maven .m2 or npm cache). Unit tests and code coverage reports are published.
  3. Static Code Analysis (SAST): SonarQube quality gate executes. If code coverage < 80% or high-severity vulnerabilities/bugs are found, the pipeline halts immediately with PR status checks failed.
  4. Container Multi-Stage Build: Docker BuildKit executes a secure multi-stage Dockerfile using a distroless or Alpine minimal base image, running as non-root user (UID 10001).
  5. Container Security & CVE Scanning: Trivy scans the container image for OS package and dependency vulnerabilities:
    trivy image --exit-code 1 --severity CRITICAL,HIGH --ignore-unfixed $IMAGE_NAME:$COMMIT_SHA
  6. Image Push & Cryptographic Signing: Authenticate to AWS ECR via OIDC (no long-lived AWS keys). Push immutable image tagged with git-commit-sha (never :latest). Sign image using cosign with AWS KMS key for supply-chain security (SLSA compliance).
  7. GitOps Deployment (ArgoCD): The pipeline does not run kubectl apply from CI (push anti-pattern). Instead, CI updates the image tag in the GitOps repository (e.g. values.yaml). ArgoCD running inside the EKS cluster detects git drift and reconciles the desired state into Dev → Staging. Production promotes via automated PR approval gate.
Q9: Write a Kubernetes Deployment and Service YAML manifest and explain the main fields.

Production Manifest with Security Context, Probes & Anti-Affinity:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: order-api
  namespace: production
  labels:
    app: order-api
spec:
  replicas: 3
  revisionHistoryLimit: 5
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  selector:
    matchLabels:
      app: order-api
  template:
    metadata:
      labels:
        app: order-api
    spec:
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 100
              podAffinityTerm:
                labelSelector:
                  matchExpressions:
                    - key: app
                      operator: In
                      values: ["order-api"]
                topologyKey: "topology.kubernetes.io/zone" # Spread pods across AWS AZs
      securityContext:
        runAsNonRoot: true
        runAsUser: 10001
        fsGroup: 10001
      containers:
        - name: order-api
          image: 347166961665.dkr.ecr.us-east-1.amazonaws.com/order-api:v2.4.1
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 8080
              name: http
          resources:
            requests:
              cpu: "250m"
              memory: "512Mi"
            limits:
              cpu: "1000m"
              memory: "1024Mi"
          securityContext:
            readOnlyRootFilesystem: true
            allowPrivilegeEscalation: false
            capabilities:
              drop: ["ALL"]
          startupProbe:
            httpGet:
              path: /healthz
              port: 8080
            failureThreshold: 30
            periodSeconds: 2
          readinessProbe:
            httpGet:
              path: /ready
              port: 8080
            initialDelaySeconds: 5
            periodSeconds: 5
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8080
            initialDelaySeconds: 10
            periodSeconds: 15
---
apiVersion: v1
kind: Service
metadata:
  name: order-api-svc
  namespace: production
  labels:
    app: order-api
spec:
  type: ClusterIP
  selector:
    app: order-api
  ports:
    - name: http
      port: 80         # Port exposed on Service ClusterIP VIP
      targetPort: 8080 # Port listening inside container

Key Field Explanations: podAntiAffinity ensures high availability by scheduling replicas across different AWS Availability Zones. securityContext enforces non-root execution and read-only root filesystems for container hardening. startupProbe shields slow-booting JVM/Node apps from premature liveness kills. targetPort vs port separates internal container socket bindings from external load-balancer listeners.

Round 3: Linux Diagnostics & Python Cloud Automation (Q10โ€“Q12)

Focus: Linux disk troubleshooting (df vs du, unlinked files, inodes), Python Boto3 credential security in cloud environments, and robust S3 bucket validation with exact HTTP status code discrimination.

Q10: Which Linux commands check disk usage and available space? (df -h, du -sh)

Deep Diagnostic Commands & The Classic `df` vs `du` Discrepancy:

  • df -h (Disk Free Human-Readable): Scans the superblock of all mounted filesystems. Shows total size, used space, available space, and percentage used for each mount point. Fast (O(1)) execution.
  • du -sh /path/* (Disk Usage Summary): Recursively walks directory trees and calculates the sum of space consumed by actual files and directories. Slower (O(N)) execution.
  • The Production Ghost Discrepancy (df shows 100%, du shows 30%): When an application log file is deleted with rm /var/log/app.log while an active process still holds the file descriptor open, the directory link is removed, making it invisible to du. However, the Linux kernel cannot deallocate the disk blocks until the file descriptor is closed.
    How to detect:
    lsof +L1   # List open files with 0 link count (unlinked/deleted)
    lsof | grep -i deleted
    How to safely free space without restarting the service: Truncate the file descriptor directly via /proc:
    : > /proc/<PID>/fd/<FD_NUM>
  • Inode Exhaustion: df -i checks inode usage. A filesystem with millions of 0-byte temporary files can run out of inodes (100% inode usage) and block new file creation even when df -h shows 80GB of free space.
Q11: How do you access AWS from Python using Boto3 and manage credentials securely?

Enterprise Credential Architecture:

  • Golden Rule: Never hardcode aws_access_key_id or aws_secret_access_key in Python scripts, environment files, or git repositories.
  • Boto3 Default Credential Provider Chain: When initialized with boto3.client('s3') without parameters, Boto3 automatically searches credentials in this specific order:
    1. Passed parameters in Session(aws_access_key_id=...)
    2. Environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN)
    3. Shared credential file (~/.aws/credentials) and config file (~/.aws/config)
    4. Assume role with web identity (used by EKS IRSA & GitHub Actions OIDC)
    5. EC2 / ECS / Lambda metadata service (IMDSv2 at http://169.254.169.254/latest/meta-data/iam/security-credentials/)
  • In Production Kubernetes (EKS IRSA): Use IAM Roles for Service Accounts. Annotate the Kubernetes ServiceAccount with the IAM Role ARN. AWS EKS injects a temporary OIDC web identity token into the pod at /var/run/secrets/eks.amazonaws.com/serviceaccount/token. Boto3 automatically exchanges this token with AWS STS for temporary credentials with 1-hour expiration.
Q12: Write Python code to check if an S3 bucket exists, then print the result. How do you distinguish 403 from 404 errors?

Production Python Script with `botocore.exceptions.ClientError`:

import sys
import boto3
from botocore.exceptions import ClientError, NoCredentialsError

def verify_s3_bucket(bucket_name: str, region: str = "us-east-1"):
    # Checks S3 bucket existence using head_bucket().
    # Distinguishes:
    #   - 200 OK: Bucket exists and caller has read permissions
    #   - 403 Forbidden: Bucket exists globally, but caller lacks permissions
    #   - 404 Not Found: Bucket does NOT exist globally
    s3_client = boto3.client("s3", region_name=region)

    try:
        s3_client.head_bucket(Bucket=bucket_name)
        print(f"โœ… Success [200]: Bucket '{bucket_name}' exists and you have access permissions.")
        return True
    except ClientError as e:
        error_code = e.response.get("Error", {}).get("Code")
        http_status = int(e.response.get("ResponseMetadata", {}).get("HTTPStatusCode", 0))

        if error_code == "403" or http_status == 403:
            print(f"๐Ÿ”’ Forbidden [403]: Bucket '{bucket_name}' EXISTS globally, but your IAM credentials lack permissions to access it.")
            return True
        elif error_code == "404" or http_status == 404 or error_code == "NoSuchBucket":
            print(f"โŒ Not Found [404]: Bucket '{bucket_name}' does NOT exist.")
            return False
        else:
            print(f"โš ๏ธ AWS API Error [{error_code} / HTTP {http_status}]: {e}")
            return False
    except NoCredentialsError:
        print("๐Ÿšจ Error: No AWS credentials found in environment or IAM role chain.")
        sys.exit(1)

if __name__ == "__main__":
    test_bucket = "my-enterprise-data-lake-prod"
    verify_s3_bucket(test_bucket)
๐Ÿ’ก Senior Engineer Bar: Never use s3.list_buckets()! If an AWS account owns 200 buckets or if the bucket belongs to another AWS account, list_buckets() fails or wastes bandwidth. head_bucket() issues a fast HTTP HEAD request directly against the bucket endpoint.

Round 4: AWS Cloud Architecture, RDS & S3 (Q13โ€“Q17)

Focus: Route 53 global routing policies, secure VPC private networking between EC2 and RDS, relational database engine administration, Multi-AZ failover mechanics, and S3 lifecycle/Terraform state governance.

Q13: What are the Route 53 routing policies? Give practical use cases.

Route 53 Routing Policies & Enterprise Use Cases:

  • 1. Simple Routing: Standard 1-to-1 DNS mapping. Single record returning one or more IP addresses selected randomly.
    Use Case: Static single-server websites or internal DNS names.
  • 2. Weighted Routing: Routes traffic across multiple resources based on assigned relative integer weights (e.g. 90% to legacy cluster, 10% to new cluster).
    Use Case: Canary deployments and safe blue-green infrastructure cutovers at the DNS layer.
  • 3. Latency-Based Routing (LBR): Resolves queries using the AWS region that delivers the lowest network latency to the user based on AWS edge network measurements.
    Use Case: Global web applications deployed across us-east-1, eu-west-1, and ap-southeast-1.
  • 4. Failover Routing (Active-Passive DR): Associates Route 53 health checks with primary records. If health checks fail (3 consecutive failed probes), Route 53 automatically routes traffic to the standby secondary disaster recovery site.
    Use Case: Pilot light disaster recovery where secondary is a static maintenance S3 site or warm replica cluster.
  • 5. Geolocation Routing: Routes DNS queries based on the geographic location of the DNS resolver (continent, country, or US state).
    Use Case: Data sovereignty, European GDPR compliance, and localized currency/language pages.
  • 6. Geoproximity Routing (Traffic Flow): Routes traffic based on the geographic distance of users and resources, with an optional bias to shrink or expand the geographic boundary served by a region.
  • 7. Multivalue Answer: Returns up to 8 healthy IP records selected randomly with individual Route 53 health check validation. Poor man's DNS load balancing.
Q14: How do you connect EC2 to RDS? Cover VPC, security groups, endpoint, port, and connection command.

Production VPC Architecture & Security Group Chaining:

  1. Subnet Placement: EC2 instances sit in Private App Subnets (or Public Subnets behind an ALB). The RDS DB Subnet Group consists of at least two Private DB Subnets in different Availability Zones (with PubliclyAccessible: No).
  2. Security Group Chaining (Zero Hardcoded IPs):
    • Create sg-app-ec2: Egress rule allows TCP traffic on DB port to sg-rds-db.
    • Create sg-rds-db: Ingress rule allows TCP 5432 (Postgres) or 3306 (MySQL) only from source Security Group ID sg-app-ec2. Never use CIDR 0.0.0.0/0 or VPC CIDR.
  3. DNS Endpoint: Use the RDS cluster or instance endpoint CNAME provided by AWS (e.g. db-prod.c3a9jdf.us-east-1.rds.amazonaws.com), never an underlying IP address.
  4. Verification Commands:
    # 1. Test TCP 3-way handshake without client libraries:
    nc -zv db-prod.c3a9jdf.us-east-1.rds.amazonaws.com 5432
    
    # 2. Connect via PostgreSQL CLI:
    PGPASSWORD="secure_pass" psql -h db-prod.c3a9jdf.us-east-1.rds.amazonaws.com -U app_user -d production_db -p 5432
    
    # 3. Connect via MySQL CLI:
    mysql -h db-prod.c3a9jdf.us-east-1.rds.amazonaws.com -P 3306 -u app_user -p production_db
Q15: Which RDS engine did you work with (MySQL/PostgreSQL), and what are your daily database tasks?

Real DevOps / SRE Database Responsibilities (PostgreSQL & Aurora):

  • Automated Backups & Point-in-Time Recovery (PITR): Managing automated snapshot retention windows (30 days) and verifying that transaction logs (WAL files) allow restoring the database to any specific second during an outage drill.
  • Parameter Group Tuning: Tuning memory and concurrency parameters via custom DB Parameter Groups: max_connections, shared_buffers (25% of RAM), work_mem, maintenance_work_mem, and enabling pg_stat_statements for query profiling.
  • Maintenance Windows & Zero-Downtime Patching: Scheduling OS and minor engine security patches during off-peak weekend windows (e.g. Sunday 03:00 AM UTC). For Multi-AZ, AWS patches the standby instance first, executes a failover, and patches the former primary.
  • Performance Tuning with AWS Performance Insights: Investigating Average Active Sessions (AAS) exceeding Max vCPU lines. Diagnosing lock contention, missing indexes, and un-vacuumed table bloat (VACUUM ANALYZE).
  • Storage Autoscaling & Connection Pooling: Setting up AWS RDS Storage Auto-scaling to avoid disk full emergencies. Provisioning AWS RDS Proxy or PgBouncer to manage connection spikes and eliminate connection churn during Kubernetes pod scaling.
Q16: How do you make RDS highly available? Explain Multi-AZ, automatic failover, backup, and monitoring.

High Availability & Automatic Failover Architecture:

  • Multi-AZ Synchronous Replication: When Multi-AZ is enabled, AWS provisions a primary database instance in AZ-a and a dedicated standby replica in AZ-b. Database writes are synchronously committed to EBS storage volumes in both AZs before the primary acknowledges transaction completion. The standby does not serve read traffic.
  • Automatic Failover Mechanics (60โ€“120 Seconds): AWS RDS monitors instance health continuously. If the primary experiences hardware failure, network outage, or storage degradation, RDS initiates automatic failover:
    1. RDS updates the DNS CNAME record of the database endpoint to point to the standby instance IP.
    2. The standby instance is promoted to primary.
    3. No application connection string reconfiguration is required. Existing TCP sockets break, and application connection pools reconnect to the new primary within 1โ€“2 minutes. (Using RDS Proxy reduces failover recovery time to < 15 seconds).
  • Read Replicas (Asynchronous Scaling): For read-heavy applications, provision up to 15 cross-AZ or cross-region Read Replicas using asynchronous replication to offload reporting, search, and analytics queries.
  • CloudWatch Monitoring & Alarms: Monitor CPUUtilization > 80%, FreeStorageSpace < 15%, FreeableMemory < 1GB, DatabaseConnections > 80% max, and ReplicaLag > 5s.
Q17: How is S3 used in your project โ€” logs, application artifacts, backups, and Terraform state?

Real Project Production Use Cases:

  • 1. Centralized Access & Audit Logs: Storing ALB access logs, CloudTrail audit trails, and VPC Flow Logs. Configured with S3 Lifecycle policies: transition to S3 Glacier Flexible Retrieval after 30 days, transition to Glacier Deep Archive after 90 days, and permanent expiration after 365 days to minimize storage costs.
  • 2. Immutable Application Artifacts: Storing compiled frontend packages, zip bundles, and Helm charts with S3 Versioning and Object Lock (WORM compliance) to prevent accidental overwrites or malicious tampering.
  • 3. Database & System Backups: Automated daily exports of RDS database dumps, Elasticsearch snapshots, and Kafka topic backups encrypted with customer-managed AWS KMS keys (SSE-KMS).
  • 4. Terraform Remote State Backend: The single source of truth for all infrastructure as code. Configured with:
    • S3 bucket with versioning { enabled = true } to permit instant state rollback if corruption occurs.
    • Server-Side Encryption with KMS (sse_algorithm = "aws:kms").
    • DynamoDB state locking table (LockID primary key) to block simultaneous concurrent terraform apply runs.
    • Enforced TLS 1.2+ via bucket policy (aws:SecureTransport: "false" Deny rule).

Round 5: Reverse Interviewing, Candidate Retrospective & The 3 Toughest Scenarios (Q18 + Takeaways)

Focus: High-signal questions to ask the interviewer about production maturity, technical debt, and on-call culture, plus detailed analysis of the three questions candidates struggle with most (#3, #6, and #12).

Q18: โ€œDo you have any questions for me?โ€ What would you ask about the team's infrastructure, deployment pipeline, and on-call responsibilities?

High-Signal Reverse Interview Questions That Impress Hiring Managers:

  • 1. Infrastructure & Architecture Maturity: โ€œHow is your infrastructure currently managed between raw Terraform, Helm charts, and GitOps operators like ArgoCD? Where is the team on the journey toward golden paths and developer self-service?โ€
  • 2. Deployment Cadence & Blast Radius: โ€œWhen a production release causes an unexpected latency regression or 5xx spike, what does your rollback flow look like? Is it automated via Canary analysis metrics, or does it require manual incident commander intervention?โ€
  • 3. On-Call Health & SRE Culture: โ€œWhat is the team's weekly on-call rotation cadence, and how do you track and eliminate toil? When a Sev-1 incident occurs, what is the follow-up process for blameless post-mortems and preventative engineering tasks?โ€
  • 4. Technical Debt & 2026 Priorities: โ€œWhat is the single biggest architectural bottleneck or technical debt challenge currently keeping your lead engineers up at night?โ€
๐Ÿ”ฅ Which Question Challenges Candidates Most โ€” #3, #6, or #12?

Based on senior interview debriefs across hundreds of candidates, here is why each of these three questions catches candidates off guard:

#3 (Blue-Green Cutover In-Flight Requests): 80% of candidates answer "the old pods are terminated immediately." In real production, that would cause widespread HTTP 502/504 errors for every active user! Interviewers look for deep knowledge of ALB connection draining, Kubernetes preStop hooks, and keeping Blue on standby.
#6 (Subnet IP Exhaustion Triage): Candidates frequently confuse pod-level status (Pending vs ContainerCreating / FailedCreatePodSandBox) and lack familiarity with CNI IPAM internals. Demonstrating knowledge of AWS VPC CNI prefix delegation (/28) and secondary non-routable CIDRs proves you have debugged real enterprise EKS clusters under load.
#12 (Python Boto3 S3 403 vs 404): Textbook candidates write s3.list_buckets(), which fails if permissions are restricted to a single bucket or the bucket is cross-account. Using head_bucket() and catching ClientError HTTP status codes (403 = bucket exists, no permission; 404 = bucket does not exist) demonstrates professional cloud automation acumen.

โšก Exact Scenarios Asked & Matching Runbooks on This Hub:

The candidate encountered variations of these scenarios. Study the step-by-step diagnostic runbooks below:

๐Ÿ› ๏ธ Deep Ecosystem Guides, Hands-On Labs & Production Tools:

Cross-link your interview study with live tutorials, architecture deep dives, and production tooling across the ecosystem:

3. Candidate Retrospective: What Worked & Advice

  • HCLTech clients are global Fortune 500 enterprises: interviewers care heavily about blast radius containment, zero-downtime rollback procedures, and cost optimization.
  • When explaining deployment strategies, clearly explain the connection draining mechanics of Blue-Green: AWS ALB target deregistration delays, Kubernetes preStop sleep hooks, and keeping the old environment on standby.
  • Master the difference between CPU limits and CFS throttling: explain how container_cpu_cfs_throttled_periods_total exposes hidden latency regressions.
  • For Python questions, always highlight secure credential management via AWS STS / IAM Roles for Service Accounts (IRSA) and proper botocore exception handling.
  • Have 3โ€“4 thoughtful reverse interview questions prepared: asking about deployment frequency, MTTR, and on-call toil demonstrates that you think like a high-ownership senior engineer.
๐Ÿ’ก

Prepare for Enterprise DevOps & SRE Technical Interviews

TL;DR โ€” If you haven't yet:

  • โŒ Explain Kubernetes CNI IPAM allocation and debug FailedCreatePodSandBox live
  • โŒ Defend Blue-Green vs Canary traffic switching without dropping active user transactions
  • โŒ Troubleshoot Linux disk leaks held open by unlinked process file descriptors
  • โŒ Write production-grade Python Boto3 scripts with robust error handling

Enterprise DevOps interviews at top consulting firms and tech enterprises test your production battle scars. Through personalized 1-on-1 coaching, we dive deep into real incident command, architecture design, and how to articulate technical decisions with authority and confidence.

๐Ÿšจ Schedule 1-on-1 DevOps Interview Coaching → Real incident command ยท Architecture defense ยท High-stakes STAR storytelling

โ“ Frequently Asked Questions (HCLTech DevOps Loop)

What is the interview format and timeline for HCLTech DevOps Engineer (Cloud Infrastructure, Kubernetes & CI/CD)?

The interview process for HCLTech typically takes 3 Weeks (Technical Screening โ†’ Kubernetes & Cloud Architecture Deep Dive โ†’ Managerial Round). It spans 5 rounds: Round 1: Kubernetes Core Architecture, Networking & Autoscaling (Q1โ€“Q6); Round 2: Observability, Production CI/CD & Manifest Design (Q7โ€“Q9); Round 3: Linux Diagnostics & Python Cloud Automation (Q10โ€“Q12); Round 4: AWS Cloud Architecture, RDS & S3 (Q13โ€“Q17); Round 5: Reverse Interviewing, Candidate Retrospective & The 3 Toughest Scenarios (Q18 + Takeaways).

What technical questions and scenarios are tested in the HCLTech DevOps loop?

Candidates are tested on real-world production incident response and architecture: Runtime Security & eBPF: AWS VPC CNI Subnet IP Exhaustion & FailedCreatePodSandBox Triage; Zero-Downtime Blue-Green & Canary Deployments: Architecture & Traffic Shifting; Zero-Downtime Deployment Strategies: Comparing Rolling, Blue-Green, Canary & Feature Flags; AWS Blue-Green Deployment Architecture & Route 53 Traffic Shifting; Kubernetes Troubleshooting: High CPU Throttling, Memory Leaks & Restarts.

How should candidates prepare for the HCLTech interview rounds?

HCLTech clients are global Fortune 500 enterprises: interviewers care heavily about blast radius containment, zero-downtime rollback procedures, and cost optimization. When explaining deployment strategies, clearly explain the connection draining mechanics of Blue-Green: AWS ALB target deregistration delays, Kubernetes preStop sleep hooks, and keeping the old environment on standby. Master the difference between CPU limits and CFS throttling: explain how container_cpu_cfs_throttled_periods_total exposes hidden latency regressions. For Python questions, always highlight secure credential management via AWS STS / IAM Roles for Service Accounts (IRSA) and proper botocore exception handling. Have 3โ€“4 thoughtful reverse interview questions prepared: asking about deployment frequency, MTTR, and on-call toil demonstrates that you think like a high-ownership senior engineer.

← Back to All Experiences ๐ŸŽฎ Practice 60s Triage in Simulator →
Advertisement