which command do you run on k8s to display details about the cluster? - answerkubectl
cluster-info
which command do you use to list all nodes? - answerkubectl get nodes
kubectl version - answer
How do you feed a config file to K8s cluster - answerkubectl apply -f <name of a config
yml>
get status of all pods - answerkubectl get pods
Simplest way to use kubectl to create a nginx pod and run it - answerkubectl run nginx
--image nginx
how can you see the status of your pods - answerkubectl get pods
What is the version of Kubernetes running on the nodes ? - answerkubectl version
read out the git version
How many nodes are running on the cluster? - answerkubectl get nodes
What is the flavor and version of Operating System on which the Kubernetes nodes are
running? - answerkubectl get nodes -o wide and look at the Operating System.
which are the top 4 properties in every kubernetes yaml? - answerapiVersion, kind,
metadata, spec
which apiVersion should be used for Pods? - answerv1
which apiVersion should be used for a Service? - answerv1
which apiVersion should be used for a ReplicaSet? - answerapps/v1
which apiVersion should be used for a deployment? - answerapps/v1
what belongs in the spec of a Pod? - answercontainers: a list of objects with name and
image properties
, what is the command to display detailed pod information? - answerkubectl describe pod
<podname>
what image was used to create this pod? - answerkubectl describe pod <podname>
which node is this pod paced on? - answerkubectl describe pod <podname>
how many containers are part of this pod? - answerkubectl describe pod <podname>
How do you remove a pod from the cluster? - answerkubectl delete pod <podname>
Create a new pod with the nginx image. - answerkubectl run nginx --image=nginx
How can you create a pod from an image in a oneline command? - answerkubectl run
nginx --image=nginx
How do you extract a pod definition from an existing pod? - answerkubectl get pod
<podname> -o yaml > filename.yml
How can you edit an existing pods properties? - answerkubectl edit pod <pod-name>
in the CKAD exam, if you are asked to edit an existing pod... - answerif i am given a
yaml file, edit that and apply it
if no yaml file is given: extract the definition using k get pod <pod-name> -o yaml >
definition.yaml
then edit the file to make the necessary changes, delete and re-create the pod.
What are kubernetes controllers? - answerthe processes that monitor kubernetes
objects and respond to changes
Why do we need a replication controller even for a single pod? - answerreplication
controller will bring a new pod when the existing one fails
What is the difference between replication controller and replica set? -
answerReplication controller is an older controller that is being replaced by replicaSet.
selectors are mandatory in replicaSet
what is the version for replicaset? - answerapps/v1
What is the spec for ReplicaSet? - answertemplate, replicas, selector
what belongs on the template property of a ReplicaSet? - answerthe pod definition,
metadata and spec of the regular pod yaml as a sub structure
what belongs in the replicas section of the ReplicaSet? - answerthe number of pods to
keep alive
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Dreamer252. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $13.99. You're not tied to anything after your purchase.