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 ->
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
3
Q
What is the range of ports that the NodePort service can use?
A
30.000 - 32.767
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
5
Q
Which command is used to create a service from a configuration file?
A
kubectl create -f service.yaml
6
Q
Which command is used to check the services running?
A
kubectl get services