0
0
Kubernetesdevops~20 mins

Multi-cluster management concept in Kubernetes - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Multi-cluster Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What is the primary benefit of using a multi-cluster management tool in Kubernetes?

Choose the main advantage of managing multiple Kubernetes clusters with a dedicated multi-cluster management tool.

AIt replaces the need for namespaces within a single cluster.
BIt automatically upgrades all clusters to the latest Kubernetes version without manual intervention.
CIt allows centralized control and consistent policy enforcement across all clusters.
DIt eliminates the need for kubeconfig files on client machines.
Attempts:
2 left
💡 Hint

Think about how managing many clusters can be simplified.

💻 Command Output
intermediate
2:00remaining
Output of kubectl config get-contexts with multiple clusters

What is the output of the command kubectl config get-contexts when you have two clusters named cluster1 and cluster2 configured?

Kubernetes
kubectl config get-contexts
A
CURRENT   NAME        CLUSTER     AUTHINFO    NAMESPACE
*         cluster2    cluster2    user2       default
          cluster1    cluster1    user1       default
B
NAME        CLUSTER     AUTHINFO    NAMESPACE
cluster1    cluster1    user1       default
cluster2    cluster2    user2       default
CError: no contexts found
D
CURRENT   NAME        CLUSTER     AUTHINFO    NAMESPACE
*         cluster1    cluster1    user1       default
          cluster2    cluster2    user2       default
Attempts:
2 left
💡 Hint

Look for the current context marked with an asterisk (*) and the order of contexts.

Configuration
advanced
3:00remaining
Correct YAML snippet for deploying a multi-cluster service mesh

Which YAML snippet correctly configures a service mesh control plane to manage multiple Kubernetes clusters?

A
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
  meshConfig:
    enableAutoMtls: true
  components:
    pilot:
      enabled: true
  values:
    global:
      multiCluster:
        clusterName: cluster1
B
apiVersion: v1
kind: Service
metadata:
  name: multi-cluster-mesh
spec:
  type: LoadBalancer
  ports:
  - port: 15012
    targetPort: 15012
C
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: multi-cluster-ingress
spec:
  rules:
  - host: cluster1.example.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: mesh-control-plane
            port:
              number: 80
D
apiVersion: apps/v1
kind: Deployment
metadata:
  name: multi-cluster-controller
spec:
  replicas: 1
  selector:
    matchLabels:
      app: controller
  template:
    metadata:
      labels:
        app: controller
    spec:
      containers:
      - name: controller
        image: controller:latest
Attempts:
2 left
💡 Hint

Look for a configuration that enables multi-cluster in a service mesh control plane.

Troubleshoot
advanced
2:00remaining
Troubleshooting failed multi-cluster kubeconfig context switch

You try to switch context to a remote cluster using kubectl config use-context remote-cluster but get the error error: context "remote-cluster" does not exist. What is the most likely cause?

AThe current user does not have permission to switch contexts.
BThe kubeconfig file does not have a context named "remote-cluster" defined.
CThe kubectl version is incompatible with the remote cluster version.
DThe remote cluster is down and unreachable.
Attempts:
2 left
💡 Hint

Check if the context is defined in your kubeconfig file.

🔀 Workflow
expert
3:00remaining
Correct order to deploy a multi-cluster application with centralized config

Arrange the steps in the correct order to deploy an application across multiple Kubernetes clusters using a centralized configuration management tool.

A1,2,3,4
B2,1,3,4
C3,2,1,4
D1,3,2,4
Attempts:
2 left
💡 Hint

Think about defining config first, then setting access, then deploying sync, then verifying.