Skip to content
$ lynuxpro

INTERVIEW PREP

Interview questions

570 questions from real DevOps, SRE, platform engineering and MLOps interviews, with the answer an interviewer wants to hear. Try answering out loud first, then open the model answer.

Showing 31–45 of 84 questions

31.How does RBAC work in Kubernetes?SeniorKubernetes

A Role (or ClusterRole) lists allowed verbs on resources; a RoleBinding (or ClusterRoleBinding) gives it to users, groups or ServiceAccounts. Give least privilege, avoid cluster-admin, and test with kubectl auth can-i.

32.What happens when you run kubectl apply -f deployment.yaml?SeniorKubernetes

kubectl sends the object to the API server, which authenticates, authorizes, runs admission controllers and stores it in etcd. The Deployment controller creates a ReplicaSet, which creates Pods; the scheduler picks nodes; kubelet on each node starts the containers through the runtime.

33.How do NetworkPolicies work, and what is a good default?SeniorKubernetes

They are firewall rules for Pods, chosen by labels, enforced by the CNI (Calico, Cilium...). Start each namespace with a default deny for ingress (and ideally egress), then allow only the traffic each app needs, including DNS.

34.How do you handle a Lambda that fails on some messages?SeniorAWS

Set a dead-letter queue or an on-failure destination, make the code safe to run twice, use partial batch responses with SQS, and set retries and timeouts so failures do not repeat forever.

35.Why use CloudFormation or CDK instead of the console?SeniorAWS

Templates are repeatable, reviewed and versioned. Stacks know what they own, so updates and deletes are clean, and drift detection shows manual changes. CDK lets you write the templates in a normal programming language.

36.How do you keep secrets out of code on AWS?SeniorAWS

Store them in Secrets Manager or Parameter Store, encrypted with KMS, and give the app role permission to read only its own secrets. Rotate them, and never place them in templates or images.

37.What are SCPs?SeniorAWS

Service control policies in AWS Organizations set the maximum permissions for accounts. They never grant access, they only limit it, so even an admin in a member account cannot do what the SCP denies.

38.Name the four disaster recovery strategies.SeniorAWS

Backup and restore (cheapest, slowest), pilot light (core pieces always running), warm standby (a scaled-down copy running), and multi-site active-active (fastest, most costly). Choose by the RPO and RTO the business needs.

39.How do you cut an AWS bill?SeniorAWS

Turn off unused things, right-size, use Savings Plans or Reserved Instances for steady load, Spot for flexible jobs, move cold data to cheaper storage classes, and set budgets and alerts with cost allocation tags.

40.What is the Well-Architected Framework?SeniorAWS

A set of design pillars with questions to review a workload: operational excellence, security, reliability, performance efficiency, cost optimization and sustainability.

41.When do you use Transit Gateway or PrivateLink?SeniorAWS

Transit Gateway connects many VPCs and networks through one hub, so everything can route to everything. PrivateLink exposes one service privately to other VPCs or accounts without opening the whole network.

42.How do you design for an AZ failure?SeniorAWS

Run in at least two zones behind a load balancer, use Multi-AZ databases, keep no state on single servers, avoid single NAT gateways per VPC, and test failover regularly.

43.How would you respond to a leaked access key?SeniorAWS

Disable the key at once, review CloudTrail for what it did, rotate anything it could reach, look for new users or roles, then fix the cause, for example by moving to roles. GuardDuty and Security Hub help find it quickly.

44.How would you design a data lake on AWS?SeniorAWS

Land raw data in S3 with a clear folder layout, store curated data as Parquet partitioned by date, catalog it with Glue, query with Athena, control access with Lake Formation, and use lifecycle rules to keep cost down.

45.Why can an app still get AccessDenied on a secret even with GetSecretValue allowed?SeniorAWS

If the secret uses a customer managed KMS key, the caller also needs kms:Decrypt, and the key policy must allow it.