k8s part 5 (Services and Networking) Flashcards

1
Q

what is a service in k8s?

A

an object that makes sure your application is easily reachable and scalable within the Kubernetes environment. It provides a single ip address and DNs through which pods can be accessed.

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

what are some of the tasks that can be performed with a service?

A

load balancing
scaling of pods

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

what is an endpoint?

A

these are the underlying pods to which the traffic will be routed to.

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

what is front end and back end in k8s?

A

In k8s the term frontend typically refers to the part of an application or service that directly interacts with end users or clients.

backend in K8s refers to the part of an application that handles the “behind-the-scenes” work. It’s where data processing, business logic, and storage management happen.

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

what is a port in k8s?

A

a port in K8s is like a door or entry point through which data can go in and out of a container or a pod. It’s a way for applications to communicate with each other or the outside world.

In case of service, the port is where the service is listening, and the target port is where the endpoint is listening.

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

what are the different types of services?

A
  • cluster ip: ClusterIP in Kubernetes is like a phone number for a group of pods inside the cluster. It gives them a stable, internal IP address that other pods within the same cluster can use to communicate with them. This IP address is only accessible within the Kubernetes cluster, not from the outside world. This is the DEFAULT service type.

-Node port: It makes the service accessible outside the Kubernetes cluster by opening a specific port on all the nodes (servers) in the cluster. When you use a NodePort, you can reach the service by connecting to the IP address of any node in the cluster on the specified port.

  • load balancer: It helps distribute incoming requests evenly across multiple servers or pods to ensure no single server gets overwhelmed
  • ExternalName
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what does it mean to integrate a service with selectors ?

A

integrating a service with selectors in Kubernetes is like setting up a filter to connect the service to specific pods.

Selectors: These are labels or tags you put on your pods.
Service: The service uses selectors to find and connect to the pods with matching labels

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

what is nodeport?

A

a NodePort in Kubernetes is like a special door number that allows external users to access your application.

It opens a specific port on every node (computer) in your Kubernetes cluster so that people outside the cluster can reach your application by using any node’s IP address and this specific port number

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

if a service has cluster ip, the outside world will be able to connect to it T or F?

A

F

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

what is stateful set?

A

a StatefulSet in K8s is a way to manage a set of pods where each pod has a unique identity and stable storage. This means that each pod in a StatefulSet gets a unique name, and if it is restarted or replaced, it keeps the same name and any data stored on it is preserved. This is useful for applications that need to keep track of their state, like databases.

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

what is stateless in k8s?

A

stateless in k8s means that an application or service does not save data locally between sessions or requests. Each request is independent, and the application can be restarted, scaled up, or moved to different nodes without losing any data because the data is stored elsewhere (like in a database or storage service) rather than within the application itself. This makes it easier to manage and scale the application.

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

what is ingress in k8s?

A
  • An Ingress is a set of rules that manage external access to services within a cluster. It helps route traffic from the internet to the right service inside your cluster.
  • depending on the domain name, ingress will forward traffic to the right service.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what is gateway in k8s?

A

in k8s, a gateway is a component that manages traffic into your cluster. It acts as a bridge between the outside world and the services running inside your cluster, routing requests from users to the correct services

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