Skip to content

K8S General

← Back to all decks

43 cards — 🟢 7 easy | 🟡 15 medium | 🔴 6 hard

🟢 Easy (7)

1. What is Kubernetes (K8s) and what problems does container orchestration solve?

Show answer K8s is another term for Kubernetes. The "8" represents the eight letters between the "K" and the "s" in the word Kubernetes.

Name origin: Kubernetes (K8s) is Greek for 'helmsman'. Created at Google based on their internal Borg system, donated to CNCF in 2015.

Fun fact: Borg, its predecessor, managed Google's production workloads since 2003. The lessons learned shaped K8s design.

Fun fact: Kubernetes (K8s) is Greek for "helmsman." The 8 = letters between K and s.

Remember: K8s promise: declarative desired state + reconciliation loops = self-healing.

2. What is orchestration when it comes to software and DevOps?

Show answer Orchestration refers to the integration of multiple services that allows them to automate processes or synchronize information in a timely fashion. Say, for example, you have six or seven microservices for an application to run. If you place them in separate containers, this would inevitably create obstacles for communication. Orchestration would help in such a situation by enabling all services in individual containers to work seamlessly to accomplish a single goal.

Remember: K8s design: declare desired state, controllers reconcile. "Desired vs Actual → Action."

3. What is Kubernetes and what problems does container orchestration solve?

Show answer Kubernetes (K8s) is an open-source container orchestration system that automates the deployment, scaling, and management of containerized applications across a cluster of machines.

Name origin: Kubernetes (K8s) is Greek for 'helmsman'. Created at Google based on their internal Borg system, donated to CNCF in 2015.

Fun fact: Borg, its predecessor, managed Google's production workloads since 2003. The lessons learned shaped K8s design.

Fun fact: Kubernetes (K8s) is Greek for "helmsman." The 8 = letters between K and s.

Remember: K8s promise: declarative desired state + reconciliation loops = self-healing.

4. What is the Google Container Engine?

Show answer The Google Container Engine (GKE - Google Kubernetes Engine) is an open-source management platform tailor-made for Docker containers and clusters to provide support for the clusters that run in Google public cloud services.

Remember: K8s design: declare desired state, controllers reconcile. "Desired vs Actual → Action."

5. What is the difference between deploying applications on hosts and containers?

Show answer Deploying Applications on hosts consist of an architecture that has an operating system. The operating system will have a kernel that holds various libraries installed on the operating system needed for an application.

Whereas container host refers to the system that runs the containerized processes. This kind is isolated from the other applications; therefore, the applications must have the necessary libraries. The binaries are separated from the rest of the system and cannot infringe any other application.

Remember: K8s design: declare desired state, controllers reconcile. "Desired vs Actual → Action."

6. What is Minikube and when would you use it?

Show answer With the help of Minikube, users can run Kubernetes locally. This process lets the user run a single-node Kubernetes cluster on your personal computer, including Windows, macOS, and Linux PCs. With this, users can try out Kubernetes and also use it for daily development work.

Remember: K8s design: declare desired state, controllers reconcile. "Desired vs Actual → Action."

7. What does being cloud-native mean?

Show answer The term cloud native refers to the concept of building and running applications to take advantage of the distributed computing offered by the cloud delivery model.

Remember: K8s design: declare desired state, controllers reconcile. "Desired vs Actual → Action."

🟡 Medium (15)

1. What are federated clusters?

Show answer The aggregation of multiple clusters that treat them as a single logical cluster refers to cluster federation. In this, multiple clusters may be managed as a single cluster. They stay with the assistance of federated groups. Also, users can create various clusters within the data center or cloud and use the federation to control or manage them in one place.

You can perform cluster federation by doing the following:
* Cross cluster that provides the ability to have DNS and Load Balancer with backend from the participating clusters
* Users can sync resources across different clusters in order to deploy the same deployment set across the various clusters

2. Tell me about your Kubernetes experience.

Show answer I've supported Kubernetes clusters from an operations standpoint — troubleshooting pods, reviewing logs, debugging failed deployments, managing YAML manifests, and handling upgrades. I'm strong with kubectl workflows and understanding how workloads behave at the node and container level. I haven't acted as a cluster architect, but I'm very effective on the operations and reliability side.

Remember: K8s design: declare desired state, controllers reconcile. "Desired vs Actual → Action."

3. You have a microservices-based application. How would you deploy and manage it in Kubernetes?

Show answer **Microservices Deployment in Kubernetes:**
* Containerize Services: Package each microservice into a container.
* Define Kubernetes Resources: Create Deployment or StatefulSet for each microservice.
* Service Discovery: Use Kubernetes Services for inter-microservice communication.
* Configurations: Utilize ConfigMaps and Secrets for configuration management.
* Horizontal Scaling: Leverage Kubernetes autoscaling for dynamic workload adjustments.
* Health Checks: Implement readiness and liveness probes for robust application health monitoring.
* Kubernetes simplifies the deployment and management of microservices by providing abstractions for containers, services, and dynamic scaling, along with features like ConfigMaps and Secrets for configuration management.

4. What are the features of Kubernetes?

Show answer Key features of Kubernetes include:

* Kubernetes places control for the user where the server will host the container. It will control how to launch. So, Kubernetes automates various manual processes.
* Kubernetes manages various clusters at the same time.
* It provides various additional services like management of containers, security, networking, and storage.
* Kubernetes self-monitors the health of nodes and containers.
* With Kubernetes, users can scale resources not only vertically but also horizontally that too easily and quickly.

Fun fact: Kubernetes (K8s) is Greek for "helmsman." The 8 = letters between K and s.

Remember: K8s promise: declarative desired state + reconciliation loops = self-healing.

5. What is Istio? What is it used for?

Show answer Istio is an open source service mesh that helps organizations run distributed, microservices-based apps anywhere. Istio enables organizations to secure, connect, and monitor microservices, so they can modernize their enterprise apps more swiftly and securely.

Remember: K8s design: declare desired state, controllers reconcile. "Desired vs Actual → Action."

6. What problems does Kubernetes actually solve?

Show answer Kubernetes solves operational problems, not application problems:

**Scheduling**: Places containers on nodes based on resources, constraints, affinity rules.

**Self-healing**: Restarts failed containers, replaces unhealthy pods, reschedules when nodes die.

**Service discovery**: Internal DNS, load balancing, service endpoints - apps find each other.

**Declarative state**: You describe desired state; Kubernetes converges to it.

**Rollouts**: Controlled deployments with rollback capability.

**What it does NOT fix**:
* Bad application architecture
* Poor observability
* Security vulnerabilities in code
* Stateful application complexity

Kubernetes is powerful infrastructure, not a magic wand for bad apps.

Fun fact: Kubernetes (K8s) is Greek for "helmsman." The 8 = letters between K and s.

Remember: K8s promise: declarative desired state + reconciliation loops = self-healing.

7. What are the main differences between Docker Swarm and Kubernetes?

Show answer Docker Swarm is Docker's native, open-source container orchestration platform that is used to cluster and schedule Docker containers. Swarm differs from Kubernetes in the following ways:

* Docker Swarm is more convenient to set up but doesn't have a robust cluster, while Kubernetes is more complicated to set up but the benefit of having the assurance of a robust cluster
* Docker Swarm can't do auto-scaling (as can Kubernetes); however, Docker scaling is five times faster than Kubernetes

Fun fact: Kubernetes (K8s) is Greek for "helmsman." The 8 = letters between K and s.

Remember: K8s promise: declarative desired state + reconciliation loops = self-healing.

8. When or why NOT to use Kubernetes?

Show answer - If you manage low level infrastructure or baremetals, Kubernetes is probably not what you need or want
- If you are a small team (like less than 20 engineers) running less than a dozen of containers, Kubernetes might be an overkill (even if you need scale, rolling out updates, etc.). You might still enjoy the benefits of using managed Kubernetes, but you definitely want to think about it carefully before making a decision on whether to adopt it.

Remember: K8s design: declare desired state, controllers reconcile. "Desired vs Actual → Action."

9. What fields are mandatory with any Kubernetes object?

Show answer metadata, kind and apiVersion

Fun fact: Kubernetes (K8s) is Greek for "helmsman." The 8 = letters between K and s.

Remember: K8s promise: declarative desired state + reconciliation loops = self-healing.

Remember: Every K8s manifest needs at least: apiVersion, kind, metadata. These three fields are mandatory.

Gotcha: apiVersion changes between K8s versions. Use `kubectl api-resources` to find the current group/version for each resource.

10. What Kubernetes objects do you usually use when deploying applications in Kubernetes?

Show answer * Deployment - creates the Pods () and watches them
* Service: route traffic to Pods internally
* Ingress: route traffic from outside the cluster

Fun fact: Kubernetes (K8s) is Greek for "helmsman." The 8 = letters between K and s.

Remember: K8s promise: declarative desired state + reconciliation loops = self-healing.

11. Discuss the differences between OpenShift and vanilla Kubernetes.

Show answer * OpenShift vs. Vanilla Kubernetes: OpenShift is a Kubernetes distribution with additional features, including developer and operations tools.
* OpenShift has built-in security features, integrated CI/CD pipelines, and a developer-friendly web console.
* Vanilla Kubernetes is the upstream project, while OpenShift is a product built on top of Kubernetes.

Remember: K8s design: declare desired state, controllers reconcile. "Desired vs Actual → Action."

12. How does Kubernetes integrate with cloud providers like AWS, Azure, and GCP?

Show answer * Kubernetes and Cloud Providers: Cloud providers offer managed Kubernetes services (EKS for AWS, AKS for Azure, GKE for GCP).
* These services simplify cluster management, scaling, and integration with other cloud services.
* Kubernetes itself is cloud-agnostic, running on any infrastructure.

Remember: K8s design: declare desired state, controllers reconcile. "Desired vs Actual → Action."

13. How are Kubernetes and Docker related?

Show answer Docker is an open-source platform used to handle software development. Its main benefit is that it packages the settings and dependencies that the software/application needs to run into a container, which allows for portability and several other advantages. Kubernetes allows for the manual linking and orchestration of several containers, running on multiple hosts that have been created using Docker.

Remember: K8s design: declare desired state, controllers reconcile. "Desired vs Actual → Action."

14. What are some of Kubernetes features?

Show answer - Self-Healing: Kubernetes uses health checks to monitor containers and run certain actions upon failure or other type of events, like restarting the container
- Load Balancing: Kubernetes can split and/or balance requests to applications running in the cluster, based on the state of the Pods running the application
- Operators: Kubernetes packaged applications that can use the API of the cluster to update its state and trigger actions based on events and application state changes
- Automated Rollout: Gradual updates roll out to

15. What is Kubernetes? Why organizations are using it?

Show answer Kubernetes is an open-source system that provides users with the ability to manage, scale and deploy containerized applications.

To understand what Kubernetes is good for, let's look at some examples:

* You would like to run a certain application in a container on multiple different locations and sync changes across all of them, no matter where they run
* Performing updates and changes across hundreds of containers
* Handle cases where the current load requires to scale up (or down)

Fun fact: Kubernetes (K8s) is Greek for "helmsman." The 8 = letters between K and s.

Remember: K8s promise: declarative desired state + reconciliation loops = self-healing.

🔴 Hard (6)

1. What challenges do you anticipate when managing large-scale Kubernetes clusters, and how would you address them?

Show answer * Challenges in Large-Scale Clusters: Resource Scaling: Ensuring adequate resources for a growing number of pods.
* Network Complexity: Handling increased network traffic and potential bottlenecks.
* Cluster Monitoring: Implementing effective monitoring and logging at scale.
* Configuration Management: Managing configurations consistently across a large number of nodes.

Fun fact: Kubernetes (K8s) is Greek for "helmsman." The 8 = letters between K and s.

Remember: K8s promise: declarative desired state + reconciliation loops = self-healing.

2. Why does Kubernetes stress Linux more than VMs?

Show answer Kubernetes uses Linux primitives heavily, creating unique pressure points:

**cgroups**: Every container has resource limits enforced by cgroups. Hundreds of containers = hundreds of cgroup hierarchies.

**Namespaces**: Network, PID, mount namespaces per container. Context switching overhead.

**iptables/nftables**: Service networking creates massive rule chains. Every service adds rules. Conntrack tables fill up.

**Overlay networking**: CNI plugins add network overhead. VXLAN/GENEVE encapsulation, bridge networking.

Remember: K8s design: declare desired state, controllers reconcile. "Desired vs Actual → Action."

3. How does Kubernetes manage containerized applications?

Show answer Kubernetes manages containerized applications through a declarative configuration model and a set of controllers. Users describe the desired state of their applications using YAML or JSON files, and Kubernetes controllers continuously work to maintain that desired state. Key components include Deployments, Services, and other abstractions that define and control the application's behavior.
* Declarative Configuration: Users define the desired state of their applications and infrastructure using configuration files.

Remember: K8s design: declare desired state, controllers reconcile. "Desired vs Actual → Action."

4. Discuss the considerations for migrating an application from a monolithic architecture to Kubernetes.

Show answer **Considerations for Migration:**
* Containerization: Break the monolith into smaller, containerized services.
* Data Migration: Plan for migrating and managing data in a microservices environment.
* Service Dependencies: Understand and manage dependencies between services.
* Networking: Design and implement a robust network architecture.
* Scalability: Leverage Kubernetes scaling features for individual services.
* Monitoring and Logging: Implement effective monitoring and logging for improved observability.

Remember: K8s design: declare desired state, controllers reconcile. "Desired vs Actual → Action."

5. Why do Kubernetes clusters fail at scale?

Show answer Scale exposes design assumptions:

**Poor resource requests**: Without proper requests/limits, scheduler makes bad decisions. Nodes get overcommitted.

**etcd overload**: etcd is the bottleneck. Too many objects, frequent updates, large secrets overwhelm it.

**Bad networking assumptions**: CNI plugins have limits. Service mesh overhead. Network policies complexity.

**Logging storms**: Container logs to stdout without limits fills disks, kills kubelet.

**Control plane sizing**: Default control plane can't handle thousands of nodes/pods.

**API server rate limiting**: Too many controllers/operators hammering API.

**Fix**: Right-size resources, monitor etcd, limit log retention, use appropriate CNI, scale control plane.

6. What actions or operations you consider as best practices when it comes to Kubernetes?

Show answer - Always make sure Kubernetes YAML files are valid. Applying automated checks and pipelines is recommended.
- Always specify requests and limits to prevent situation where containers are using the entire cluster memory which may lead to OOM issue
- Specify labels to logically group Pods, Deployments, etc. Use labels to identify the type of the application for example, among other things

Fun fact: Kubernetes (K8s) is Greek for "helmsman." The 8 = letters between K and s.

Remember: K8s promise: declarative desired state + reconciliation loops = self-healing.