6 - Services Flashcards

1
Q

What are the types of network services?

A
  • NodePort -> Provides a port for the application inside the pod to be accessed
  • ClusterIP -> Provide an IP so that an application distributed over several nodes within several pods can be accessed through a single IP.
  • LoadBalancer ->
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the names of the ports involved in the NodePort service?

A
  • TargetPort -> POD-related port
  • Port -> Service-related port
  • NodePort -> Node-related port
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the range of ports that the NodePort service can use?

A

30.000 - 32.767

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

What is the structure of a service’s configuration file?

A
apiVersion: v1
kind: Service
metadata:
  name: app-service
spec:
  type: NodePort
  ports:
     - targetPort: 80
       port: 80
       nodePort: 30008
  selector:
    app: myapp
     type: front-end
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which command is used to create a service from a configuration file?

A

kubectl create -f service.yaml

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

Which command is used to check the services running?

A

kubectl get services

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