This quiz is part of the DevOpsTheHardWay course.

Please answer the quiz and click the "Test" button at the bottom right.

Kubernetes - Cluster setup and introduction - multichoice questions

Question 1

What are possible options to provide the my-configs.yaml kubeconfig to kubectl command?

Question 2

Below are two example kubeconfig YAML files:

# kubeconfig1.yaml
apiVersion: v1
kind: Config

clusters:
- name: cluster1
  cluster:
    server: https://cluster1.example.com
    certificate-authority-data: <base64-encoded-ca-cert>

users:
- name: user1
  user:
    client-certificate-data: <base64-encoded-client-cert>
    client-key-data: <base64-encoded-client-key>

contexts:
- name: overlapping-context
  context:
    cluster: cluster1
    user: user1
    namespace: namespace1

And

# kubeconfig2.yaml

apiVersion: v1
kind: Config

clusters:
- name: cluster2
  cluster:
    server: https://cluster2.example.com
    certificate-authority-data: <base64-encoded-ca-cert>

users:
- name: user2
  user:
    client-certificate-data: <base64-encoded-client-cert>
    client-key-data: <base64-encoded-client-key>

contexts:
- name: overlapping-context
  context:
    cluster: cluster2
    user: user2
    namespace: namespace2

Now, let's set the KUBECONFIG environment variable to include both kubeconfigs:

export KUBECONFIG=kubeconfig1.yaml:kubeconfig2.yaml

Given the below commands:

kubectl config set-context overlapping-context
kubectl run nginx --image=nginx --restart=Never

In which namespace the nginx would be created?

Question 3

How many Pods are running in the kube-system namespace on a fresh installation of Kubernetes version 1.25.8 using Minikube?

Question 4

Which of the following components are part of the Control Plane?

Question 5

In the kubeconfig file, what does the server: URL point to? Choose the accurate answer

Question 6

Choose the correct sentence

Question 7

What namespace does kube-scheduler Pod reside in?

Question 8

In a case where the Kubernetes control plane node is unavailable, would that impact containers running on the worker nodes?

Question 9

Assume 15 Kubernetes cluster running in different regions in AWS. You want to run a kubectl command, but before, you want to make sure your command will be executed on the right cluster. How can you ensure that?

Question 10

sshing into one of the cluster worker nodes, and executing the docker ps command would print all running containers on that node.

Here is an example of a container name:

k8s_POD_currencyservice-79b446569d-n6mtq_default_660fbffb-df77-422d-a408-8bc73e5a77d5_0

What information can we extract from the container name?

Question 11

A k8s developer wanted to review all existed pods in the cluster. She performed:

kubectl get pods

Question 12

In a Kubernetes kubeconfig file, the certificate-authority field, under cluster, is used for:

Question 13

In a Kubernetes kubeconfig file, the client-certificate and the client-key fields, under user, is used to:

license