Skip to content

Commit 2afee28

Browse files
author
abregman
committed
Add a couple of Kubernetes questions
1 parent d156460 commit 2afee28

File tree

1 file changed

+152
-0
lines changed

1 file changed

+152
-0
lines changed

README.md

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2370,6 +2370,10 @@ tail -f <file_name>
23702370
<summary>What kind of information one can find in /proc?</summary><br><b>
23712371
</b></details>
23722372

2373+
<details>
2374+
<summary>Can you create files in /proc?</summary><br><b>
2375+
</b></details>
2376+
23732377
<details>
23742378
<summary>What is the difference between CPU load and utilization?</summary><br><b>
23752379
</b></details>
@@ -2504,6 +2508,10 @@ Another way to ask this: what happens from the moment you turned on the server u
25042508
<summary>What is Secure Boot?</summary><br><b>
25052509
</b></details>
25062510

2511+
<details>
2512+
<summary>What can you find in /boot?</summary><br><b>
2513+
</b></details>
2514+
25072515
##### Linux Disk & Filesystem
25082516

25092517
<details>
@@ -3450,6 +3458,12 @@ MemAvailable - The amount of available memory for new workloads (without pushing
34503458
<summary>Wildcards are implemented on user or kernel space?</summary><br><b>
34513459
</b></details>
34523460

3461+
<details>
3462+
<summary>If I plug a new device into a Linux machine, where on the system, a new device entry/file will be created?</summary><br><b>
3463+
3464+
/dev
3465+
</b></details>
3466+
34533467
<details>
34543468
<summary>Why there are different sections in man? What is the difference between the sections?</summary><br><b>
34553469
</b></details>
@@ -4329,6 +4343,64 @@ False. A Kubernetes cluster consists of at least 1 master and 0 or more workers.
43294343
<summary>What is kubectl?</summary><br><b>
43304344
</b></details>
43314345

4346+
<details>
4347+
<summary>What are namespaces? Why would someone use namespaces?</summary><br><b>
4348+
</b></details>
4349+
4350+
<details>
4351+
<summary>True or False? When a namespace is deleted all resources in that namespace are not deleted but moved to another default namespace</summary><br><b>
4352+
4353+
False. When a namespace is deleted, the resources in that namespace are deleted as well.
4354+
</b></details>
4355+
4356+
<details>
4357+
<summary>What special namespaces are there?</summary><br><b>
4358+
4359+
* Default
4360+
* Kube-system
4361+
* Kube-public
4362+
</b></details>
4363+
4364+
<details>
4365+
<summary>What "Resources Quotas" are used for and how?</summary><br><b>
4366+
</b></details>
4367+
4368+
<details>
4369+
<summary>Explain ConfigMaps</summary><br><b>
4370+
4371+
Separate configuration from pods.
4372+
</b></details>
4373+
4374+
<details>
4375+
<summary>How to use ConfigMaps?</summary><br><b>
4376+
4377+
1. Create it (from key&value, a file or an env file)
4378+
2. Attach it. Mount a configmap as a volume
4379+
</b></details>
4380+
4381+
<details>
4382+
<summary>Explain "Horizontal Pod Autoscaler"</summary><br><b>
4383+
4384+
Scale the number of pods automatically on observed CPU utilization.
4385+
</b></details>
4386+
4387+
<details>
4388+
<summary>Explain the "Service" concept</summary><br><b>
4389+
4390+
"An abstract way to expose an application running on a set of Pods as a network service." - more [here](https://kubernetes.io/docs/concepts/services-networking/service)
4391+
</b></details>
4392+
4393+
<details>
4394+
<summary>What services types are there?</summary><br><b>
4395+
4396+
* ClusterIP
4397+
* NodePort
4398+
* LoadBalancer
4399+
* ExternalName
4400+
4401+
More on this topic [here](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)
4402+
</b></details>
4403+
43324404
#### Basic Commands
43334405

43344406
<details>
@@ -4349,6 +4421,24 @@ False. A Kubernetes cluster consists of at least 1 master and 0 or more workers.
43494421
`kubectl get namespaces`
43504422
</b></details>
43514423

4424+
<details>
4425+
<summary>How to view the current namespace?</code></summary><br><b>
4426+
4427+
kubectl config view | grep namespace
4428+
</b></details>
4429+
4430+
<details>
4431+
<summary>How to switch to another namespace?</code></summary><br><b>
4432+
4433+
kubectl config set-context --current --namespace=some-namespace
4434+
</b></details>
4435+
4436+
<details>
4437+
<summary>How to create a resource quota?</code></summary><br><b>
4438+
4439+
kubectl create quota some-quota --hard-cpu=2,pods=2
4440+
</b></details>
4441+
43524442
<details>
43534443
<summary>How to create a deployment?</code></summary><br><b>
43544444

@@ -4378,10 +4468,46 @@ cat << EOF | kubectl create -f -
43784468
`kubectl delete pod pod_name`
43794469
</b></details>
43804470

4471+
<details>
4472+
<summary>How to execute the command "ls" in an existing pod?</code></summary><br><b>
4473+
4474+
kubectl exec some-pod -it -- ls
4475+
</b></details>
4476+
4477+
<details>
4478+
<summary>How to create a service that exposes a deployment?</code></summary><br><b>
4479+
4480+
kubectl expose deploy some-deployment --port=80 --target-port=8080
4481+
</b></details>
4482+
4483+
<details>
4484+
<summary>How to create a pod and a service with one command?</code></summary><br><b>
4485+
4486+
kubectl run nginx --image=nginx --restart=Never --port 80 --expose
4487+
</b></details>
4488+
43814489
<details>
43824490
<summary>Describe in detail what the following command does <code>kubectl create deployment kubernetes-httpd --image=httpd</code></summary><br><b>
43834491
</b></details>
43844492

4493+
<details>
4494+
<summary>How to scale a deployment to 8 replicas?</code></summary><br><b>
4495+
4496+
kubectl scale deploy some-deployment --replicas=8
4497+
</b></details>
4498+
4499+
<details>
4500+
<summary>How to get list of resources which are not in a namespace?</code></summary><br><b>
4501+
4502+
kubectl api-resources --namespaced=false
4503+
</b></details>
4504+
4505+
<details>
4506+
<summary>How to delete all pods whose status is not "Running"?</code></summary><br><b>
4507+
4508+
kubectl delete pods --field-selector=status.phase!='Running'
4509+
</b></details>
4510+
43854511
<details>
43864512
<summary>What is Minikube?</summary><br><b>
43874513

@@ -4478,6 +4604,32 @@ It includes:
44784604
<summary>What is kubconfig? What do you use it for?</summary><br><b>
44794605
</b></details>
44804606

4607+
#### Kubernetes Secrets
4608+
4609+
<details>
4610+
<summary>Explain Kubernetes Secrets</summary><br><b>
4611+
4612+
Secrets let you store and manage sensitive information (passwords, ssh keys, etc.)
4613+
</b></details>
4614+
4615+
<details>
4616+
<summary>How to create a secret from a key and value?</summary><br><b>
4617+
4618+
kubectl create secret generic some-secret --from-literal=password='donttellmypassword'
4619+
</b></details>
4620+
4621+
<details>
4622+
<summary>How to create a secret from a file?</summary><br><b>
4623+
4624+
kubectl create secret generic some-secret --from-file=/some/file.txt
4625+
</b></details>
4626+
4627+
#### Kubernetes Misc
4628+
4629+
<details>
4630+
<summary>Explain what is CronJob and what is it used for</summary><br><b>
4631+
</b></details>
4632+
44814633
#### Submariner
44824634

44834635
<details>

0 commit comments

Comments
 (0)