diff --git a/README.md b/README.md index e95c344..cb9135e 100644 --- a/README.md +++ b/README.md @@ -2370,6 +2370,10 @@ tail -f What kind of information one can find in /proc?
+
+Can you create files in /proc?
+
+
What is the difference between CPU load and utilization?
@@ -2504,6 +2508,10 @@ Another way to ask this: what happens from the moment you turned on the server u What is Secure Boot?
+
+What can you find in /boot?
+
+ ##### Linux Disk & Filesystem
@@ -3450,6 +3458,12 @@ MemAvailable - The amount of available memory for new workloads (without pushing Wildcards are implemented on user or kernel space?
+
+If I plug a new device into a Linux machine, where on the system, a new device entry/file will be created?
+ +/dev +
+
Why there are different sections in man? What is the difference between the sections?
@@ -4329,6 +4343,64 @@ False. A Kubernetes cluster consists of at least 1 master and 0 or more workers. What is kubectl?
+
+What are namespaces? Why would someone use namespaces?
+
+ +
+True or False? When a namespace is deleted all resources in that namespace are not deleted but moved to another default namespace
+ +False. When a namespace is deleted, the resources in that namespace are deleted as well. +
+ +
+What special namespaces are there?
+ +* Default +* Kube-system +* Kube-public +
+ +
+What "Resources Quotas" are used for and how?
+
+ +
+Explain ConfigMaps
+ +Separate configuration from pods. +
+ +
+How to use ConfigMaps?
+ +1. Create it (from key&value, a file or an env file) +2. Attach it. Mount a configmap as a volume +
+ +
+Explain "Horizontal Pod Autoscaler"
+ +Scale the number of pods automatically on observed CPU utilization. +
+ +
+Explain the "Service" concept
+ +"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) +
+ +
+What services types are there?
+ +* ClusterIP +* NodePort +* LoadBalancer +* ExternalName + +More on this topic [here](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) +
+ #### Basic Commands
@@ -4349,6 +4421,24 @@ False. A Kubernetes cluster consists of at least 1 master and 0 or more workers. `kubectl get namespaces`
+
+How to view the current namespace?
+ +kubectl config view | grep namespace +
+ +
+How to switch to another namespace?
+ +kubectl config set-context --current --namespace=some-namespace +
+ +
+How to create a resource quota?
+ +kubectl create quota some-quota --hard-cpu=2,pods=2 +
+
How to create a deployment?
@@ -4378,10 +4468,46 @@ cat << EOF | kubectl create -f - `kubectl delete pod pod_name`
+
+How to execute the command "ls" in an existing pod?
+ +kubectl exec some-pod -it -- ls +
+ +
+How to create a service that exposes a deployment?
+ +kubectl expose deploy some-deployment --port=80 --target-port=8080 +
+ +
+How to create a pod and a service with one command?
+ +kubectl run nginx --image=nginx --restart=Never --port 80 --expose +
+
Describe in detail what the following command does kubectl create deployment kubernetes-httpd --image=httpd
+
+How to scale a deployment to 8 replicas?
+ +kubectl scale deploy some-deployment --replicas=8 +
+ +
+How to get list of resources which are not in a namespace?
+ +kubectl api-resources --namespaced=false +
+ +
+How to delete all pods whose status is not "Running"?
+ +kubectl delete pods --field-selector=status.phase!='Running' +
+
What is Minikube?
@@ -4478,6 +4604,32 @@ It includes: What is kubconfig? What do you use it for?
+#### Kubernetes Secrets + +
+Explain Kubernetes Secrets
+ +Secrets let you store and manage sensitive information (passwords, ssh keys, etc.) +
+ +
+How to create a secret from a key and value?
+ +kubectl create secret generic some-secret --from-literal=password='donttellmypassword' +
+ +
+How to create a secret from a file?
+ +kubectl create secret generic some-secret --from-file=/some/file.txt +
+ +#### Kubernetes Misc + +
+Explain what is CronJob and what is it used for
+
+ #### Submariner