Kubernetes Objects Flashcards

1
Q

What is Replication Controller responsible for?

A

Maintaining a stable set of replica pods running at any given time.

Ensuring that the specified number of replicas is always up, ready, and healthy.

Can be used to increase or decrease the number of running pods.

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

What is Replication Controller denoted?

A

RC

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

What is a ReplicaSet

A

Next generation of Replication Controller

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

What is the desired state?

A

It is what you want your cluster’s workload to look like; it is the spec defined in the manifest file of the deployment.

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

What is the actual state and where is it held?

A

It represents the current state of any Kubernetes object.

It is held in the etcd.

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

What is a Deployment

A

A Kubernetes object that controls deploying and maintaining a set of pods.

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

Features of Deployment

A

Uses a ReplicaSet to keep the pods running.

Supports rolling updates and rollbacks; rollouts can be paused.

Keeps history of past deployments and allows the administrator to easily roll back to previous deployments.

Provides high-level abstraction.

Offers sophisticated logic for deploying, updating, and scaling a set of pods within a cluster.

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

What’s the difference between a ReplicaSet and a ReplicaController

A

A ReplicaSet uses set-based selectors which gives it more abilities. A RS is also used by deployments

A RC uses equality-based selectors

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

Are replica sets meant to be created on their own?

A

No, they are meant to be automatically created when deployments are created.

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

How many ports does a ClusterIP Service require?

A

2 ports. Port and TargetPort. It does not allow external access

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

State Available

A

Replicas that are available to users

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

State Current

A

Replicas that are current running

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

State Desired

A

The desired number of replicas of the application

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

Up-to-Date state

A

The replicas that have been updated (scaled up or down) to achieve the desired state

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

What is a Service?

A

It is a layer of abstraction on top of pods — usually based on labels and selectors — that provides network connectivity to pods in a given cluster.

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

What is a Service responsible for

A

It acts as a virtual bridge allowing a set of pods to “talk” to another set.

It enables communication within the Kubernetes cluster and outside.

It also provides a form of round-robin load-balancing between pods.

17
Q

What is a Service denoted

A

svc

18
Q

How does a service work?

A

It uses a set of port numbers IP addresses to enable internal and external communication.

19
Q

How many kinds of ports involved?

A

3.
Node port: used to expose the cluster externally

Port: The port that the service is available on internally (within the cluster).

TargetPort: The port that the pod listens on internally.

20
Q

How many IP address a service define?

A

Only 1.

Cluster IP: Virtual IP address that the service itself is internally available on. Only accessible within the cluster.

21
Q

Does all nodes share the same NodePort

A

Yes!

22
Q

How to access a service

A

Use ClusterIP:Port

23
Q

How many types of services are there?

A

3.
ClusterIP
NodePort
LoadBalancer

24
Q

How many ports does a ClusterIP require?

A

2 ports. Port and TargetPort. It does not allow external access

25
Q

What is NodePortService

A

A type of service that exposes the service on each node’s IP, making it accessible from outside the cluster at NodeIP:NodePort

26
Q

What is NodePort denoted

A

NP

27
Q

How many ports does a NP service require?

A

3.
Port
TargetPort
NodePort: Same for all nodes in a cluster.

28
Q

Which clients can reach the NodePort?

A

Clients on same LAN or clients who can ping the host nodes. Cannot reached from the Internet

29
Q

What does LoadBalancer Service do?

A

Exposes the service externally using a cloud provider’s load balancer.
It’s a standard way to expose a service to the Internet

30
Q

What is the downside of LoadBalancer

A

Have to pay for a LoadBalancer per exposed service, which can be expensive

31
Q

What is a RS responsible for

A

Same like RC, but it has SB selectors, give more abilities

32
Q

What are the 4 states for Deployment, RS, RC

A

Available
Current
Desired
Up-to-date