Kubernetes
General 64 questions
- #1Run a command to view all the pods in the current namespace
- #2Run a pod called "nginx-test" using the "nginx" image
- #3Assuming that you have a Pod called "nginx-test", how to remove it?
- #4In what namespace the etcd pod is running? list the pods in that namespace
- #5List pods from all namespaces
- #6Write a YAML of a Pod with two containers and use the YAML file to create the Pod (use whatever images you prefer)
- #7Create a YAML of a Pod without actually running the Pod with the kubectl command (use whatever image you prefer)
- #8How to test a manifest is valid?
- #9How to check which image a certain Pod is using?
- #10How to check how many containers run in single Pod?
- #11Run a Pod called "remo" with the the latest redis image and the label 'year=2017'
- #12List pods and their labels
- #13Delete a Pod called "nm"
- #14List all the pods with the label "env=prod"
- #15Create a static pod with the image python that runs the command sleep 2017
- #16Describe how would you delete a static Pod
- #17List all the namespaces
- #18Create a namespace called 'alle'
- #19Check how many namespaces are there
- #20Check how many pods exist in the "dev" namespace
- #21Create a pod called "kartos" in the namespace dev. The pod should be using the "redis" image.
- #22You are looking for a Pod called "atreus". How to check in which namespace it runs?
- #23Run a command to view all nodes of the cluster
- #24Create a list of all nodes in JSON format and store it in a file called "some_nodes.json"
- #25Check what labels one of your nodes in the cluster has
- #26Check how many services are running in the current namespace
- #27Create an internal service called "sevi" to expose the app 'web' on port 1991
- #28How to reference by name a service called "app-service" within the same namespace?
- #29How to check the TargetPort of a service?
- #30How to check what endpoints the svc has?
- #31How to reference by name a service called "app-service" within a different namespace, called "dev"?
- #32Assume you have a deployment running and you need to create a Service for exposing the pods. This is what is required/known:
- Deployment name: jabulik
- Target port: 8080
- Service type: NodePort
- Selector: jabulik-app
- Port: 8080
- #33How to check how many replicasets defined in the current namespace?
- #34You have a replica set defined to run 3 Pods. You removed one of these 3 pods. What will happen next? how many Pods will there be?
- #35How to check which container image was used as part of replica set called "repli"?
- #36How to check how many Pods are ready as part of a replica set called "repli"?
- #37How to delete a replica set called "rori"?
- #38How to modify a replica set called "rori" to use a different image?
- #39Scale up a replica set called "rori" to run 5 Pods instead of 2
- #40Scale down a replica set called "rori" to run 1 Pod instead of 5
- #41How to list all the deployments in the current namespace?
- #42How to check which image a certain Deployment is using?
- #43Create a file definition/manifest of a deployment called "dep", with 3 replicas that uses the image 'redis'
- #44Remove the deployment
depdep - #45Create a deployment called "pluck" using the image "redis" and make sure it runs 5 replicas
- #46Create a deployment with the following properties:
- called "blufer"
- using the image "python"
- runs 3 replicas
- all pods will be placed on a node that has the label "blufer"
- #47How to schedule a pod on a node called "node1"?
- #48How to list all the Pods with the label "app=web"?
- #49How to list all objects labeled as "env=staging"?
- #50How to list all deployments from "env=prod" and "type=web"?
- #51Check if there are taints on node "master"
- #52Create a taint on one of the nodes in your cluster with key of "app" and value of "web" and effect of "NoSchedule". Verify it was applied
- #53You applied a taint with k taint node minikube app=web:NoSchedule on the only node in your cluster and then executed kubectl run some-pod --image=redis. What will happen?
- #54You applied a taint with k taint node minikube app=web:NoSchedule on the only node in your cluster and then executed kubectl run some-pod --image=redis but the Pod is in pending state. How to fix it?
- #55Remove an existing taint from one of the nodes in your cluster
- #56Check if there are any limits on one of the pods in your cluster
- #57Run a pod called "yay" with the image "python" and resources request of 64Mi memory and 250m CPU
- #58Run a pod called "yay2" with the image "python". Make sure it has resources request of 64Mi memory and 250m CPU and the limits are 128Mi memory and 500m CPU
- #59Deploy metrics-server
- #60Using metrics-server, view the following:
- top performing nodes in the cluster
- top performing Pods
- #61Can you deploy multiple schedulers?
- #62Assuming you have multiple schedulers, how to know which scheduler was used for a given Pod?
- #63You want to run a new Pod and you would like it to be scheduled by a custom scheduler. How to achieve it?
- #64"Killing" Containers
- Run Pod with a web service (e.g. httpd)
- Verify the web service is running with the
pscommand - Check how many restarts the pod has performed
- Kill the web service process
- Check how many restarts the pod has performed
- Verify again the web service is running
After you complete the exercise
- Why did the "RESTARTS" count raised?
Troubleshooting Pods 7 questions
- #65You try to run a Pod but see the status "CrashLoopBackOff". What does it means? How to identify the issue?
- #66What the error ImagePullBackOff means?
- #67How to check on which node a certain Pod is running?
- #68Run the following command: kubectl run ohno --image=sheris. Did it work? why not? fix it without removing the Pod and using any image you would like
- #69You try to run a Pod but it's in "Pending" state. What might be the reason?
- #70How to view the logs of a container running in a Pod?
- #71There are two containers inside a Pod called "some-pod". What will happen if you run kubectl logs some-pod
Troubleshooting ReplicaSets 2 questions
- #72Fix the following ReplicaSet definition
apiVersion: apps/v1 kind: ReplicaCet metadata: name: redis labels: app: redis tier: cache spec: selector: matchLabels: tier: cache template: metadata: labels: tier: cachy spec: containers: - name: redis image: redis - #73Fix the following ReplicaSet definition
apiVersion: apps/v1 kind: ReplicaSet metadata: name: redis labels: app: redis tier: cache spec: selector: matchLabels: tier: cache template: metadata: labels: tier: cachy spec: containers: - name: redis image: redis
Troubleshooting Deployments 2 questions
- #74Fix the following deployment manifest
apiVersion: apps/v1 kind: Deploy metadata: creationTimestamp: null labels: app: dep name: dep spec: replicas: 3 selector: matchLabels: app: dep strategy: {} template: metadata: creationTimestamp: null labels: app: dep spec: containers: - image: redis name: redis resources: {} status: {} - #75Fix the following deployment manifest
apiVersion: apps/v1 kind: Deployment metadata: creationTimestamp: null labels: app: dep name: dep spec: replicas: 3 selector: matchLabels: app: depdep strategy: {} template: metadata: creationTimestamp: null labels: app: dep spec: containers: - image: redis name: redis resources: {} status: {}
Node Affinity 2 questions
- #76Using node affinity, set a Pod to schedule on a node where the key is "region" and value is either "asia" or "emea"
- #77Using node affinity, set a Pod to never schedule on a node where the key is "region" and value is "neverland"
Node Selector 3 questions
- #78Apply the label "hw=max" on one of the nodes in your cluster
- #79Create and run a Pod called
some-podwith the imageredisand configure it to use the selectorhw=max - #80Explain why node selectors might be limited
Kubernetes 101 9 questions
- #81What is Kubernetes? Why organizations are using it?
- #82When or why NOT to use Kubernetes?
- #83What are some of Kubernetes features?
- #84What Kubernetes objects are there?
- #85What fields are mandatory with any Kubernetes object?
- #86What is kubectl?
- #87What Kubernetes objects do you usually use when deploying applications in Kubernetes?
- #88Why there is no such command in Kubernetes? kubectl get containers
- #89What actions or operations you consider as best practices when it comes to Kubernetes?
Cluster and Architecture 16 questions
- #90What is a Kubernetes Cluster?
- #91What is a Node?
- #92What the master node is responsible for?
- #93Describe shortly and in high-level, what happens when you run kubectl get nodes
- #94True or False? Every cluster must have 0 or more master nodes and at least 1 worker
- #95What are the components of the master node (aka control plane)?
- #96What are the components of a worker node (aka data plane)?
- #97You are managing multiple Kubernetes clusters. How do you quickly change between the clusters using kubectl?
- #98How do you prevent high memory usage in your Kubernetes cluster and possibly issues like memory leak and OOM?
- #99Do you have experience with deploying a Kubernetes cluster? If so, can you describe the process in high-level?
- #100Which command will list all the object types in a cluster?
- #101What kubectl get componentstatus does?
- #102What happens to running pods if if you stop Kubelet on the worker nodes?
- #103Run a command to view all nodes of the cluster
- #104Create a list of all nodes in JSON format and store it in a file called "some_nodes.json"
- #105Check what labels one of your nodes in the cluster has
Pods 40 questions
- #106Explain what is a Pod
- #107Deploy a pod called "my-pod" using the nginx:alpine image
- #108What are your thoughts on "Pods are not meant to be created directly"?
- #109How many containers can a pod contain?
- #110What use cases exist for running multiple containers in a single pod?
- #111What are the possible Pod phases?
- #112True or False? By default, pods are isolated. This means they are unable to receive traffic from any source
- #113True or False? The "Pending" phase means the Pod was not yet accepted by the Kubernetes cluster so the scheduler can't run it unless it's accepted
- #114True or False? A single Pod can be split across multiple nodes
- #115You run a pod and you see the status ContainerCreating
- #116True or False? A volume defined in Pod can be accessed by all the containers of that Pod
- #117What happens when you run a Pod with kubectl?
- #118How to confirm a container is running after running the command kubectl run web --image nginxinc/nginx-unprivileged
- #119After running kubectl run database --image mongo you see the status is "CrashLoopBackOff". What could possibly went wrong and what do you do to confirm?
- #120Explain the purpose of the following lines
livenessProbe: exec: command: - cat - /appStatus initialDelaySeconds: 10 periodSeconds: 5 - #121Explain the purpose of the following lines
readinessProbe: tcpSocket: port: 2017 initialDelaySeconds: 15 periodSeconds: 20 - #122What does the "ErrImagePull" status of a Pod means?
- #123What happens when you delete a Pod?
- #124Explain liveness probes
- #125Explain readiness probes
- #126How readiness probe status affect Services when they are combined?
- #127Why it's common to have only one container per Pod in most cases?
- #128True or False? Once a Pod is assisgned to a worker node, it will only run on that node, even if it fails at some point and spins up a new Pod
- #129True or False? Each Pod, when created, gets its own public IP address
- #130What are Static Pods?
- #131True or False? The same as there are "Static Pods" there are other static resources like "deployments" and "replicasets"
- #132What are some use cases for using Static Pods?
- #133How to identify which Pods are Static Pods?
- #134Which of the following is not a static pod?:
- kube-scheduler
- kube-proxy
- kube-apiserver
- #135Where static Pods manifests are located?
- #136Describe how would you delete a static Pod
- #137How to check to which worker node the pods were scheduled to? In other words, how to check on which node a certain Pod is running?
- #138How to delete a pod?
- #139List all the pods with the label "env=prod"
- #140How to list the pods in the current namespace?
- #141How view all the pods running in all the namespaces?
- #142You try to run a Pod but it's in "Pending" state. What might be the reason?
- #143What kubectl logs [pod-name] command does?
- #144What kubectl describe pod [pod name] does? command does?
- #145Create a static pod with the image python that runs the command sleep 2017
Labels and Selectors 7 questions
- #146Explain Labels
- #147Explain selectors
- #148Provide some actual examples of how labels are used
- #149What are Annotations?
- #150How annotations different from labels?
- #151How to view the logs of a container running in a Pod?
- #152There are two containers inside a Pod called "some-pod". What will happen if you run kubectl logs some-pod
Deployments 16 questions
- #153What is a "Deployment" in Kubernetes?
- #154How to create a deployment with the image "nginx:alpine"?
- #155How to verify a deployment was created?
- #156How to edit a deployment?
- #157What happens after you edit a deployment and change the image?
- #158How to delete a deployment?
- #159What happens when you delete a deployment?
- #160What happens behind the scenes when you create a Deployment object?
- #161How make an app accessible on private or external network?
- #162Can you use a Deployment for stateful applications?
- #163Fix the following deployment manifest
apiVersion: apps/v1 kind: Deploy metadata: creationTimestamp: null labels: app: dep name: dep spec: replicas: 3 selector: matchLabels: app: dep strategy: {} template: metadata: creationTimestamp: null labels: app: dep spec: containers: - image: redis name: redis resources: {} status: {} - #164Fix the following deployment manifest
apiVersion: apps/v1 kind: Deployment metadata: creationTimestamp: null labels: app: dep name: dep spec: replicas: 3 selector: matchLabels: app: depdep strategy: {} template: metadata: creationTimestamp: null labels: app: dep spec: containers: - image: redis name: redis resources: {} status: {} - #165Create a file definition/manifest of a deployment called "dep", with 3 replicas that uses the image 'redis'
- #166Delete the deployment
depdep - #167Create a deployment called "pluck" using the image "redis" and make sure it runs 5 replicas
- #168Create a deployment with the following properties:
- called "blufer"
- using the image "python"
- runs 3 replicas
- all pods will be placed on a node that has the label "blufer"
Services 26 questions
- #169What is a Service in Kubernetes?
- #170How to create a service for an existing deployment called "alle" on port 8080 so the Pod(s) accessible via a Load Balancer?
- #171True or False? The lifecycle of Pods and Services isn't connected so when a Pod dies, the Service still stays
- #172After creating a service, how to check it was created?
- #173What's the default Service type?
- #174What Service types are there?
- #175How Service and Deployment are connected?
- #176What are important steps in defining/adding a Service?
- #177What is the default service type in Kubernetes and what is it used for?
- #178How to get information on a certain service?
- #179What the following command does?
kubectl expose rs some-replicaset --name=replicaset-svc --target-port=2017 --type=NodePort - #180True or False? the target port, in the case of running the following command, will be exposed only on one of the Kubernetes cluster nodes but it will routed to all the pods
kubectl expose rs some-replicaset --name=replicaset-svc --target-port=2017 --type=NodePort - #181How to verify that a certain service configured to forward the requests to a given pod
- #182Explain what will happen when running apply on the following block
apiVersion: v1 kind: Service metadata: name: some-app spec: type: NodePort ports: - port: 8080 nodePort: 2017 protocol: TCP selector: type: backend service: some-app - #183How to turn the following service into an external one?
spec: selector: app: some-app ports: - protocol: TCP port: 8081 targetPort: 8081 - #184What would you use to route traffic from outside the Kubernetes cluster to services within a cluster?
- #185True or False? When "NodePort" is used, "ClusterIP" will be created automatically?
- #186When would you use the "LoadBalancer" type
- #187How would you map a service to an external address?
- #188Describe in detail what happens when you create a service
- #189How to list the endpoints of a certain app?
- #190How can you find out information on a Service related to a certain Pod if all you can use is kubectl exec --
- #191Describe what happens when a container tries to connect with its corresponding Service for the first time. Explain who added each of the components you include in your description
- #192Describe in high level what happens when you run kubctl expose deployment remo --type=LoadBalancer --port 8080
- #193After creating a service that forwards incoming external traffic to the containerized application, how to make sure it works?
- #194An internal load balancer in Kubernetes is called ____ and an external load balancer is called ____
Ingress 13 questions
- #195What is Ingress?
- #196Complete the following configuration file to make it Ingress
metadata: name: someapp-ingress spec: - #197Explain the meaning of "http", "host" and "backend" directives
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: someapp-ingress spec: rules: - host: my.host http: paths: - backend: serviceName: someapp-internal-service servicePort: 8080 - #198Why using a wildcard in ingress host may lead to issues?
- #199What is Ingress Controller?
- #200What are some use cases for using Ingress?
- #201How to list Ingress in your namespace?
- #202What is Ingress Default Backend?
- #203How to configure a default backend?
- #204How to configure TLS with Ingress?
- #205True or False? When configuring Ingress with TLS, the Secret component must be in the same namespace as the Ingress component
- #206Which Kubernetes concept would you use to control traffic flow at the IP address or port level?
- #207How to scale an application (deplyoment) so it runs more than one instance of the application?
ReplicaSets 26 questions
- #208What is the purpose of ReplicaSet?
- #209What the following block of lines does?
spec: replicas: 2 selector: matchLabels: type: backend template: metadata: labels: type: backend spec: containers: - name: httpd-yup image: httpd - #210What will happen when a Pod, created by ReplicaSet, is deleted directly with kubectl delete po ...?
- #211True or False? If a ReplicaSet defines 2 replicas but there 3 Pods running matching the ReplicaSet selector, it will do nothing
- #212Describe the sequence of events in case of creating a ReplicaSet
- #213How to list ReplicaSets in the current namespace?
- #214Is it possible to delete ReplicaSet without deleting the Pods it created?
- #215What is the default number of replicas if not explicitly specified?
- #216What the following output of kubectl get rs means?
NAME DESIRED CURRENT READY AGE web 2 2 0 2m23s
- #217True or False? Pods specified by the selector field of ReplicaSet must be created by the ReplicaSet itself
- #218True or False? In case of a ReplicaSet, if Pods specified in the selector field don't exists, the ReplicaSet will wait for them to run before doing anything
- #219In case of a ReplicaSet, Which field is mandatory in the spec section?
- #220You've created a ReplicaSet, how to check whether the ReplicaSet found matching Pods or it created new Pods?
- #221True or False? Deleting a ReplicaSet will delete the Pods it created
- #222True or False? Removing the label from a Pod that is tracked by a ReplicaSet, will cause the ReplicaSet to create a new Pod
- #223How to scale a deployment to 8 replicas?
- #224ReplicaSets are running the moment the user executed the command to create them (like kubectl create -f rs.yaml)
- #225How to expose a ReplicaSet as a new service?
- #226Fix the following ReplicaSet definition
apiVersion: apps/v1 kind: ReplicaCet metadata: name: redis labels: app: redis tier: cache spec: selector: matchLabels: tier: cache template: metadata: labels: tier: cachy spec: containers: - name: redis image: redis - #227Fix the following ReplicaSet definition
apiVersion: apps/v1 kind: ReplicaSet metadata: name: redis labels: app: redis tier: cache spec: selector: matchLabels: tier: cache template: metadata: labels: tier: cachy spec: containers: - name: redis image: redis - #228How to check which container image was used as part of replica set called "repli"?
- #229How to check how many Pods are ready as part of a replica set called "repli"?
- #230How to delete a replica set called "rori"?
- #231How to modify a replica set called "rori" to use a different image?
- #232Scale up a replica set called "rori" to run 5 Pods instead of 2
- #233Scale down a replica set called "rori" to run 1 Pod instead of 5
DaemonSet 5 questions
- #234What's a DaemonSet?
- #235What's the difference between a ReplicaSet and DaemonSet?
- #236What are some use cases for using a DaemonSet?
- #237How DaemonSet works?
- #238How to list all daemonsets in the current namespace?
StatefulSet 1 question
- #239Explain StatefulSet
Storage 5 questions
- #240What is a volume in regards to Kubernetes?
- #241What volume types are you familiar with?
- #242Which problems, volumes in Kubernetes solve?
- #243Explain ephemeral volume types vs. persistent volumes in regards to Pods
- #244Provide at least one use-case for each of the following volume types:
- emptyDir
- hostPath
Networking 1 question
- #245True or False? By default there is no communication between two Pods in two different namespaces
Network Policies 5 questions
- #246Explain Network Policies
- #247What are some use cases for using Network Policies?
- #248True or False? If no network policies are applied to a pod, then no connections to or from it are allowed
- #249In case of two pods, if there is an egress policy on the source denining traffic and ingress policy on the destination that allows traffic then, traffic will be allowed or denied?
- #250Where Kubernetes cluster stores the cluster state?
etcd 5 questions
- #251What is etcd?
- #252True or False? Etcd holds the current status of any kubernetes component
- #253True or False? The API server is the only component which communicates directly with etcd
- #254True or False? application data is not stored in etcd
- #255Why etcd? Why not some SQL or NoSQL database?
Namespaces 36 questions
- #256What are namespaces?
- #257Why to use namespaces? What is the problem with using one default namespace?
- #258True or False? When a namespace is deleted all resources in that namespace are not deleted but moved to another default namespace
- #259What special namespaces are there by default when creating a Kubernetes cluster?
- #260What can you find in kube-system namespace?
- #261While namespaces do provide scope for resources, they are not isolating them
- #262How to list all namespaces?
- #263Create a namespace called 'alle'
- #264Check how many namespaces are there
- #265Check how many pods exist in the "dev" namespace
- #266Create a pod called "kartos" in the namespace dev. The pod should be using the "redis" image.
- #267You are looking for a Pod called "atreus". How to check in which namespace it runs?
- #268What kube-public contains?
- #269How to get the name of the current namespace?
- #270What kube-node-lease contains?
- #271True or False? With namespaces you can limit the resources consumed by the users/teams
- #272How to switch to another namespace? In other words how to change active namespace?
- #273What is Resource Quota?
- #274How to create a Resource Quota?
- #275Which resources are accessible from different namespaces?
- #276Which service and in which namespace the following file is referencing?
apiVersion: v1 kind: ConfigMap metadata: name: some-configmap data: some_url: samurai.jack - #277Which components can't be created within a namespace?
- #278How to list all the components that bound to a namespace?
- #279How to create components in a namespace?
- #280How to execute the command "ls" in an existing pod?
- #281How to create a service that exposes a deployment?
- #282How to create a pod and a service with one command?
- #283Describe in detail what the following command does kubectl create deployment kubernetes-httpd --image=httpd
- #284Why to create kind deployment, if pods can be launched with replicaset?
- #285How to get list of resources which are not bound to a specific namespace?
- #286How to delete all pods whose status is not "Running"?
- #287How to display the resources usages of pods?
- #288Perhaps a general question but, you suspect one of the pods is having issues, you don't know what exactly. What do you do?
- #289What happens what pods are using too much memory? (more than its limit)
- #290Describe how roll-back works
- #291True or False? Memory is a compressible resource, meaning that when a container reach the memory limit, it will keep running
Operators 14 questions
- #292What is an Operator?
- #293Why do we need Operators?
- #294What components the Operator consists of?
- #295Explain CRD
- #296How Operator works?
- #297True or False? Kubernetes Operator used for stateful applications
- #298Explain what is the OLM (Operator Lifecycle Manager) and what is it used for
- #299What is the Operator Framework?
- #300What components the Operator Framework consists of?
- #301Describe in detail what is the Operator Lifecycle Manager
- #302What openshift-operator-lifecycle-manager namespace includes?
- #303What is kubconfig? What do you use it for?
- #304Would you use Helm, Go or something else for creating an Operator?
- #305Are there any tools, projects you are using for building Operators?
Secrets 8 questions
- #306Explain Kubernetes Secrets
- #307How to create a Secret from a key and value?
- #308How to create a Secret from a file?
- #309What type: Opaque in a secret file means? What other types are there?
- #310True or False? storing data in a Secret component makes it automatically secured
- #311What is the problem with the following Secret file:
apiVersion: v1 kind: Secret metadata: name: some-secret type: Opaque data: password: mySecretPassword - #312What the following in a Deployment configuration file means?
spec: containers: - name: USER_PASSWORD valueFrom: secretKeyRef: name: some-secret key: password - #313How to commit secrets to Git and in general how to use encrypted secrets?
Volumes 15 questions
- #314True or False? Kubernetes provides data persistence out of the box, so when you restart a pod, data is saved
- #315Explain "Persistent Volumes". Why do we need it?
- #316True or False? Persistent Volume must be available to all nodes because the pod can restart on any of them
- #317What types of persistent volumes are there?
- #318What is PersistentVolumeClaim?
- #319Explain Volume Snapshots
- #320True or False? Kubernetes manages data persistence
- #321Explain Storage Classes
- #322Explain "Dynamic Provisioning" and "Static Provisioning"
- #323Explain Access Modes
- #324What is CSI Volume Cloning?
- #325Explain "Ephemeral Volumes"
- #326What types of ephemeral volumes Kubernetes supports?
- #327What is Reclaim Policy?
- #328What reclaim policies are there?
Access Control 8 questions
- #329What is RBAC?
- #330Explain the Role and RoleBinding" objects
- #331What is the difference between Role and ClusterRole objects?
- #332Explain what are "Service Accounts" and in which scenario would use create/use one
- #333What happens you create a pod and you DON'T specify a service account?
- #334Explain how Service Accounts are different from User Accounts
- #335How to list Service Accounts?
- #336Explain "Security Context"
CronJob 3 questions
- #337Explain what is CronJob and what is it used for
- #338What possible issue can arise from using the following spec and how to fix it?
apiVersion: batch/v1beta1 kind: CronJob metadata: name: some-cron-job spec: schedule: '*/1 * * * *' startingDeadlineSeconds: 10 concurrencyPolicy: Allow - #339What issue might arise from using the following CronJob and how to fix it?
apiVersion: batch/v1beta1 kind: CronJob metadata: name: "some-cron-job" spec: schedule: '*/1 * * * *' jobTemplate: spec: template: spec: restartPolicy: Never concurrencyPolicy: Forbid successfulJobsHistoryLimit: 1 failedJobsHistoryLimit: 1
Misc 21 questions
- #340Explain Imperative Management vs. Declarative Management
- #341Explain what Kubernetes Service Discovery means
- #342You have one Kubernetes cluster and multiple teams that would like to use it. You would like to limit the resources each team consumes in the cluster. Which Kubernetes concept would you use for that?
- #343What Kube Proxy does?
- #344What "Resources Quotas" are used for and how?
- #345Explain ConfigMap
- #346How to use ConfigMaps?
- #347True or False? Sensitive data, like credentials, should be stored in a ConfigMap
- #348Explain "Horizontal Pod Autoscaler"
- #349When you delete a pod, is it deleted instantly? (a moment after running the command)
- #350What does being cloud-native mean?
- #351Explain the pet and cattle approach of infrastructure with respect to kubernetes
- #352Describe how you one proceeds to run a containerized web app in K8s, which should be reachable from a public URL.
- #353How would you troubleshoot your cluster if some applications are not reachable any more?
- #354Describe what CustomResourceDefinitions there are in the Kubernetes world? What they can be used for?
- #355How does scheduling work in kubernetes?
- #356How are labels and selectors used?
- #357What QoS classes are there?
- #358Explain Labels. What are they and why would one use them?
- #359Explain Selectors
- #360What is Kubeconfig?
Gatekeeper 2 questions
- #361What is Gatekeeper?
- #362Explain how Gatekeeper works
Policy Testing 2 questions
- #363What is Conftest?
- #364What is Datree? How is it different from Conftest?
Helm 13 questions
- #365What is Helm?
- #366Why do we need Helm? What would be the use case for using it?
- #367Explain "Helm Charts"
- #368It is said that Helm is also Templating Engine. What does it mean?
- #369What are some use cases for using Helm template file?
- #370Explain the Helm Chart Directory Structure
- #371How Helm supports release management?
- #372How do you search for charts?
- #373Is it possible to override values in values.yaml file when installing a chart?
- #374How do you list deployed releases?
- #375How to execute a rollback?
- #376How to view revision history for a certain release?
- #377How to upgrade a release?
Security 1 question
- #378What security best practices do you follow in regards to the Kubernetes cluster?
Troubleshooting Scenarios 2 questions
- #379Running kubectl get pods you see Pods in "Pending" status. What would you do?
- #380Users unable to reach an application running on a Pod on Kubernetes. What might be the issue and how to check?
Istio 1 question
- #381What is Istio? What is it used for?
Controllers 5 questions
- #382What are controllers?
- #383Name two controllers you are familiar with
- #384What process is responsible for running and installing the different controllers?
- #385What is the control loop? How it works?
- #386What are all the phases/steps of a control loop?
Scheduler 9 questions
- #387True of False? The scheduler is responsible for both deciding where a Pod will run and actually running it
- #388How to schedule a pod on a node called "node1"?
- #389Using node affinity, set a Pod to schedule on a node where the key is "region" and value is either "asia" or "emea"
- #390Using node affinity, set a Pod to never schedule on a node where the key is "region" and value is "neverland"
- #391True of False? Using the node affinity type "requiredDuringSchedlingIgnoredDuringExecution" means the scheduler can't schedule unless the rule is met
- #392True of False? Using the node affinity type "preferredDuringSchedlingIgnoredDuringExecution" means the scheduler can't schedule unless the rule is met
- #393Can you deploy multiple schedulers?
- #394Assuming you have multiple schedulers, how to know which scheduler was used for a given Pod?
- #395You want to run a new Pod and you would like it to be scheduled by a custom scheduler. How to achieve it?
Taints 6 questions
- #396Check if there are taints on node "master"
- #397Create a taint on one of the nodes in your cluster with key of "app" and value of "web" and effect of "NoSchedule". Verify it was applied
- #398You applied a taint with k taint node minikube app=web:NoSchedule on the only node in your cluster and then executed kubectl run some-pod --image=redis. What will happen?
- #399You applied a taint with k taint node minikube app=web:NoSchedule on the only node in your cluster and then executed kubectl run some-pod --image=redis but the Pod is in pending state. How to fix it?
- #400Remove an existing taint from one of the nodes in your cluster
- #401What taint effects are there? Explain each one of them
Resource Limits 5 questions
- #402Explain why one would specify resource limits in regards to Pods
- #403True or False? Resource limits applied on a Pod level meaning, if limits is 2gb RAM and there are two container in a Pod that it's 1gb RAM each
- #404Check if there are any limits on one of the pods in your cluster
- #405Run a pod called "yay" with the image "python" and resources request of 64Mi memory and 250m CPU
- #406Run a pod called "yay2" with the image "python". Make sure it has resources request of 64Mi memory and 250m CPU and the limits are 128Mi memory and 500m CPU
Monitoring 2 questions
- #407What monitoring solutions are you familiar with in regards to Kubernetes?
- #408Describe how the monitoring solution you are working with monitors Kubernetes and
Kustomize 3 questions
- #409What is Kustomize?
- #410Explain the need for Kustomize by describing actual use cases
- #411Describe in high-level how Kustomize works
Deployment Strategies 4 questions
- #412What rollout/deployment strategies are you familiar with?
- #413Explain Blue/Green deployments/rollouts in detail
- #414Explain Canary deployments/rollouts in detail
- #415What ways are you familiar with to implement deployment strategies (like canary, blue/green) in Kubernetes?
Scenarios 4 questions
- #416An engineer form your organization told you he is interested only in seeing his team resources in Kubernetes. Instead, in reality, he sees resources of the whole organization, from multiple different teams. What Kubernetes concept can you use in order to deal with it?
- #417An engineer in your team runs a Pod but the status he sees is "CrashLoopBackOff". What does it means? How to identify the issue?
- #418An engineer form your organization asked whether there is a way to prevent from Pods (with cretain label) to be scheduled on one of the nodes in the cluster. Your reply is:
- #419You would like to limit the number of resources being used in your cluster. For example no more than 4 replicasets, 2 services, etc. How would you achieve that?