Core Concepts Flashcards

1
Q

What is a Kubernetes Object

A

A data object that describes the state of a cluster

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

How do I list the available Kubernetes objects

A

kubectl api-resources -o name

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

What are the two properties of a Kubernets object

A

spec and status

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

What is the spec of a kubernetes object

A

It is the desired state of an object - usually supplied by you

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

What is the status of a kubernetes object

A

The actual status of the object

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

What does the kubectl get command do ?

A

Returns a list of objects

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

What does the kubectl describe command do ?

A

Describes the properties of an object

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

What are pods ?

A

A way of adding containers to a kubernetes cluster

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

Can a pod have more than one container ?

A

Yes but it is usually one

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

What does the kind directive specify in yml format ?

A

The type of kubernetes object that you want

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

Name two common yml metadata items ?

A

name and labels

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

In the spec containers item name three common items?

A

name image and command

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

What is the command to create a pod ?

A

kubectl create -f

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

How do you list pods ?

A

kubectl get pods

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

How do I update a pod ?

A

kubectly apply -f or kubectly edit pod

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

What are namespaces ?

A

A way of organising objects within a cluster ?

17
Q

How do you specify a namespace ?

A

Namespace directive under the meta data tag

18
Q

Whats the command for listing namespaces ?

A

kubectl get namespaces

19
Q

How do you create a namespace ?

A

kubectl create ns

20
Q

How do you list pods in a namespace ?

A

kubectl get pods -n

21
Q

What do the commands and args options do in a yaml file. ?

A

Allows you to specify a command and arguments to run

22
Q

How do you specify ports in a yaml file ?

A

container port option