25 cards · Public · Shuffle

Kubernetes - Container Orchestration & Microservices

Master Kubernetes fundamentals with this high-yield flashcard deck, covering essential concepts like Pods, Deployments, Services, and advanced orchestration patterns. Accelerate your understanding of modern microservices architectures and `kubectl` operations.

Cards in this deck

(25 cards)

Preview terms and definitions before starting your study session.

#1
Term
What is Kubernetes?
Definition
An open-source container orchestration platform designed to automate the deployment, scaling, and management of containerized applications. It groups containers into logical units for easy management and discovery, ensuring high availability and efficient resource utilization.
#2
Term
What is a Kubernetes Pod?
Definition
The smallest deployable unit in Kubernetes, representing a single instance of a running process in your cluster. A Pod encapsulates one or more containers (e.g., Docker containers), storage resources, a unique network IP, and options that govern how the containers run.
yaml10 lines
apiVersion: v1
kind: Pod
metadata:
  name: my-nginx-pod
spec:
  containers:
  - name: nginx
    image: nginx:latest
    ports:
    - containerPort: 80
#3
Term
What is a Kubernetes ReplicaSet?
Definition
A controller that ensures a specified number of Pod replicas are running at any given time. It maintains the desired state of Pods by creating or deleting them as needed. ReplicaSets are typically managed by Deployments, which provide higher-level declarative updates.
yaml17 lines
apiVersion: apps/v1
kind: ReplicaSet
metadata:
  name: my-app-replicaset
spec:
  replicas: 3
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
      - name: my-container
        image: my-image:latest
#4
Term
What is a Kubernetes Deployment?
Definition
A higher-level abstraction that manages ReplicaSets and provides declarative updates to Pods and ReplicaSets. Deployments enable rolling updates, rollbacks, and scaling of applications. It's the recommended way to manage stateless applications.
yaml19 lines
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-app-deployment
spec:
  replicas: 3
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
      - name: my-container
        image: my-image:v1.0
        ports:
        - containerPort: 80
#5
Term
What is a Kubernetes Service and why is it needed?
Definition
An abstract way to expose an application running on a set of Pods as a network service. Services provide a stable IP address and DNS name for Pods, which are ephemeral and can be created/destroyed dynamically. This allows other applications to reliably communicate with your Pods, abstracting away their changing IPs.
#6
Term
Explain the Kubernetes ClusterIP Service type.
Definition
Exposes the Service on an internal IP address within the cluster. This type makes the Service only reachable from within the cluster. It's the default Service type and is ideal for internal communication between microservices.
yaml12 lines
apiVersion: v1
kind: Service
metadata:
  name: my-internal-service
spec:
  selector:
    app: my-app
  ports:
    - protocol: TCP
      port: 80
      targetPort: 8080
  type: ClusterIP
#7
Term
Explain the Kubernetes NodePort Service type.
Definition
Exposes the Service on each Node's IP at a static port (the NodePort). A ClusterIP Service is automatically created, and the NodePort routes to it. This makes the Service accessible from outside the cluster using <NodeIP>:<NodePort>. Useful for development or when an external load balancer isn't available.
yaml13 lines
apiVersion: v1
kind: Service
metadata:
  name: my-nodeport-service
spec:
  selector:
    app: my-app
  ports:
    - protocol: TCP
      port: 80
      targetPort: 8080
      nodePort: 30000 # Optional, Kubernetes assigns if omitted
  type: NodePort
#8
Term
Explain the Kubernetes LoadBalancer Service type.
Definition
Exposes the Service externally using a cloud provider's load balancer. This type automatically provisions an external load balancer (e.g., AWS ELB, GCP Load Balancer) that routes traffic to your Nodes and Pods. It's suitable for exposing public-facing applications and requires a cloud provider integration.
yaml12 lines
apiVersion: v1
kind: Service
metadata:
  name: my-public-service
spec:
  selector:
    app: my-app
  ports:
    - protocol: TCP
      port: 80
      targetPort: 8080
  type: LoadBalancer
Showing 8 of 25 cards in this deck.
Study All Now