LinuxAacademyK8s Flashcards

PASS CKA MOTHERFUCKER

1
Q

run a nginx deployment

A

kubectl run nginx –image=nginx

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

view deployments in cluster

A

kubectl get deployments

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

use portforwarding to access a pod directly

A

kubectl port-forward $pod_name 8081:80

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

get a response directly from pod

A

curl –head http:127.0.0.1:8081

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

view logs from pod

A

kubectl logs $pod_name

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

run a command directly from container.. like ssh..

getting the version

A

kubect. exec -it $pod_name – nginx -v

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

get a response from SERVICE

A

curl -I localhost:$node_port

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

perform tests to

A

ensure operability of cluster

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

kubeadm only cares about

A

bootstrapping NOT provisioning clusters

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

kubeadm is a built tool to provide

A

kubeadm init and kubeadm join as best-practice “fast paths” for creating Kubernetes clusters.

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

kubeadm performs the actions necessary to

A

get a minimum viable cluster up and running

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

generate new token

A

sudo kubeadm token generate

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

view the containers in the pod

A

docker ps

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

Get the services YAML output for all the services in your cluster:

A

kubectl get servers -o yaml

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

view list of endpoints

A

kubectl get endpoints

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

create a load balancer from deployment

A

kubectl expose deployment kubeserve2 –port 80 –target-port 8080 –type LoadBalancer

17
Q

edit ingress rules

A

kubectl edit ingress