Services & Networking Flashcards

(15 cards)

1
Q

What is a ClusterIP Service?

A

The default Service type that provides an internal IP for use within the cluster.

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

What is a NodePort Service?

A

A service that exposes the app on a specific port on every Node’s IP.

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

What is an Ingress?

A

An API object that manages external access to services (usually HTTP) via a Load Balancer.

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

What is a NetworkPolicy?

A

A set of rules that control the traffic flow between pods (L3/L4).

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

What is the default behavior of NetworkPolicies?

A

If no policy exists; all traffic is allowed. Once one is applied; all other traffic is denied (Isolating).

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

How do you label a pod to be targeted by a Service?

A

Use ‘selectors’ in the Service YAML that match the ‘labels’ on the Pod.

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

What is a ‘Headless’ service and how is it created?

A

A service that returns the IPs of individual pods instead of a single ClusterIP; created by setting ‘clusterIP: None’.

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

In a NetworkPolicy; how do you allow traffic only from a specific Namespace?

A

Use a ‘namespaceSelector’ that matches the labels of the target namespace.

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

How do you configure an Ingress to use a TLS certificate?

A

Reference a Secret containing ‘tls.crt’ and ‘tls.key’ in the ‘spec.tls’ section of the Ingress.

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

What is the ‘ExternalName’ service type used for?

A

To map a service to a DNS name (e.g. an external database) instead of a selector-based set of pods.

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

How do you allow a pod to communicate with the outside world while blocking all other ingress traffic?

A

Apply a NetworkPolicy with an empty ‘ingress’ rule (deny all) but a specific ‘egress’ rule.

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

Which component is responsible for updating the IPTables or IPVS rules on every node?

A

Kube-Proxy.

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

If a service is reachable by IP but not by its DNS name, which pod/deployment is likely failing?

A

CoreDNS (in the kube-system namespace).

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

What is the fully qualified domain name (FQDN) format for a service named ‘web’ in namespace ‘dev’?

A

web.dev.svc.cluster.local

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

How do you check if the Kube-Proxy is running in IPTables mode or IPVS mode?

A

Check the Kube-Proxy pod logs or the configmap for ‘mode’.

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