Kubernetes 2 - LAB/in Practice Flashcards

1
Q

What is Minikube?

A

A version of Kubernetes (That was uses in labs)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is kubectl?

A

The command line tool to interact with a kubernates cluster

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are Pods?

A

The smallest deployable unit of computing.
They hold:
- one or more containers.
- storage resources.
- a unique network IP
- options for how containers should run.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the command for viewing the running pods of a system?

A

kubectl get pods --namespace=kube-system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a deployment in Kubernates?

A

It is a High-level concept that manages Pods
- Allows for easy updates and roll-backs and ensures a certain number of pods are always running

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does services allow us to do?

A

Allows us to create a unique, presistant IP address and domain names for a deployment.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what does the command minikube kubectl get nodes do?

A

Views all the nodes in the cluster

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does the command minikube kubectl get pods do?

A

lists all the running pods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a Pod?

A

Its the smallest unit of deployment.
Its a group of one or more containers, with a shared storage and network resources

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the Purpose of -- in the command
minikube kubectl -- run nginx --image=nginx

A

-- serves as a separator between minikube kubectl and the arguments that should be passed to the kubectl command.

minikube kubectl: tells minikube to run the kubectl command in the context of the Minikube cluster
--: indicates that what follows should be passed directly to kubectl without any interpretation by Minikube
run nginx --image=nginx: this is the actual kubectl command and its arguments. It instructs kubctl to create a new deployment named nginx using the nginx image.

without the -- separator, Minikube might try to interprete the arguments as its own options, which could lead to errors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do you start minikube?

A

minikube start
This creates a Clustor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you check the status of Minikube?

A

minikube status

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How does kubectl work?

A

It comunicates with the cluster’s API server via HTTPS.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How would you ssh intoyour minikube VM?

A

minikube ssh
You are now inside the minikube node

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How would you create/run a pod on a nginx server?

A

minikube kubectl run nginx --image=nginx

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How would you get more information on a pod?

A

minikube kubectl describe pod <pod name>

17
Q

How would you delete a pod?

A

minikube kubectl delete pod <pod name>

18
Q

How would you create a deployment?

A

kubectl create deployment <app-deployment-name> --image=<image_name>

19
Q

What does kubectl expose deployment nginx-deployment --port=8085 --target-port=80 do?

A

This is a service that creates a unique ip address for a deployment.
port and target-port arguments map port 80 in the nginx pods to port 8085 on the services