Interview questions

Kubernetes Interview Questions and Answers – Set 4

This page represents practice test consisting of objective questions and answers on Kubernetes. This practice test covers the topic such as Pod Lifecycle. The practice test can prove to be very helpful if you are preparing to take Certified Kubernetes Administrator (CKA) certification examination in near future. It covers the Core Concepts from CKA certification exam syllabus.

Those preparing for interviews in relation with Kubernetes or cloud-native apps would also find these questions to be useful enough. These questions can as well prove to be useful for interns / freshers / beginners.


Revision Notes – Kubernetes Concepts (Pod Lifecycle)

  • A Pod status field is a PodStatus object which has got phase field.
  • The phase of the pod is a simple, high-level summary of where the Pod is in its lifecycle
  • Kubelet invokes following probe handlers to check some of the following:
    • ExecAction to execute a command within a container
    • TCPSocketAction to check if a port is open at a containeer’s IP address
    • HttpGetAction to perform an HTTP Get request against the Container’s IP address on a specified port and path.
  • In case a diagnostic probe failed to execute, the status returned is Unknown and not Failure
  • Liveness probe is used to indicate whether a container is running.
  • Readiness probe needs to be specified if the requirement is to send traffic to a Pod only when a probe succeeds.
  • Liveness probe needs to be specified if the requirement is kill and restart the container if a probe fails
  • Probes are executed by Kubelet
  • The possible values of restartPolicy are Always, OnFailure, Never.
  • restartPolicy refers to restart of the container by the kubelet on same node.
  • Pods with succeeded and failed for more than some duration will expire and be automatically destroyed
  • Controller, DaemonSet, can be used to create/manage Pods which need to run one per machine.
  • Controller, Job, can be used to create/manage Pods with restartPolicy as OnFailure or Never
  • Controller, ReplicationController, can be used to create/manage Pods that are not expected to terminate, for example, web servers, e.g., ReplicationController are appropriate for Pods with restartPolicy of Always.


Practice Test – Kubernetes Concepts (Pod Lifecycle)

A Pod _________ field is an object which has got _______ field

Correct! Wrong!

Which of the following is true for the phase of the Pod

Correct! Wrong!

Which of the following handler is invoked by Kubelet to check if a container's IP address is open

Correct! Wrong!

Which of the following probe handler is invoked by Kubelet to perform diagnostics on a container

Correct! Wrong!

Which of the following outcomes of invoking a diagnostic probe represents the fact that diagnostic failed to execute

Correct! Wrong!

Which of the following probe is used to indicate whether a container is running

Correct! Wrong!

If the requirement is to send traffic to a Pod only when a probe succeeds, _______ probe needs to be specified

Correct! Wrong!

LivenessProbe is executed by which of the following

Correct! Wrong!

If the requirement is kill and restart the container if a probe fails, _________ probe needs to be specified

Correct! Wrong!

Which of the following is not a possible value of restartPolicy of a container?

Correct! Wrong!

restartPolicy refers to restart of the container by the kubelet on _______ node.

Correct! Wrong!

It is possible to rebind a Pod to another node once it got bound to a node.

Correct! Wrong!

Pods can never be automatically destroyed

Correct! Wrong!

A Pod has a _______, which has an array of _________

Correct! Wrong!

Which of the following probe handler is invoked by kubelet to execute a command within a container

Correct! Wrong!

Pods with which of the following phase for more than some duration will expire and automatically destroyed?

Correct! Wrong!

Which of the following controller can be used to create/manage Pods which need to run one per machine

Correct! Wrong!

Which of the following controller can be used to create/manage Pods with restartPolicy as OnFailure or Never

Correct! Wrong!

Which of the following controller can be used to create/manage Pods with restartPolicy as Always

Correct! Wrong!

ReadinessProbe is executed by which of the following

Correct! Wrong!

Kubernetes Interview Questions and Answers - Set 4
You did extremely well!!
You did reasonably well!!
Better luck next time!!

Share your Results:

Additional Practice Tests

These are additional practice tests which relates to core concepts part of CKA certification test. Note that as per syllabus, core concepts will cover 19% questions in CKA certification test.


References

Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking.

Recent Posts

Recommender Systems in Machine Learning: Examples

Last updated: 16th Sep, 2024 Recommender systems are widely used in applications such as personalized…

8 hours ago

Difference: Binary vs Multiclass vs Multilabel Classification

Last updated: 13th Sep, 2024 There are three main types of classification algorithms when dealing…

3 days ago

Sklearn LabelEncoder Example – Single & Multiple Columns

Last updated: 13 Sept, 2024 In this post, you will learn about the concept of…

4 days ago

ROC Curve & AUC Explained with Python Examples

Last updated: 8th Sep, 2024 Confusion among data scientists regarding whether to use ROC Curve…

1 week ago

Accuracy, Precision, Recall & F1-Score – Python Examples

Last updated: 27th Aug, 2024 Classification models are used in classification problems to predict the…

3 weeks ago

Logistic Regression in Machine Learning: Python Example

Last updated: 26th August, 2024 In this blog post, we will discuss the concepts of…

3 weeks ago