Services Flashcards
What types of Kubernetes Services are available?
Kubernetes supports four types of Services:
- ClusterIP
- NodePort
- LoadBalancer
- ExternalName
What is a ClusterIP Service in Kubernetes?
A ClusterIP Service exposes the Service on a cluster-internal IP address, which is accessible only from within the cluster.
What is a NodePort Service in Kubernetes?
A NodePort Service exposes the Service on a static port on each Node’s IP address, making the Service accessible from outside the cluster.
What is a LoadBalancer Service in Kubernetes?
A LoadBalancer Service provisions an external load balancer in cloud environments to distribute incoming traffic across the Pods in the Service.
What is an ExternalName Service in Kubernetes?
An ExternalName Service maps a Service to an external DNS name, allowing Pods to access external services by name.
What is the purpose of a Kubernetes Endpoint?
Kubernetes Endpoints are dynamically generated resources associated with Services, representing the network addresses of the Pods that belong to the Service.
How does Kubernetes perform Service discovery within the cluster?
Kubernetes performs Service discovery by creating DNS records for each Service, allowing other Pods within the cluster to discover and connect to Services using DNS names.
What is the difference between a Kubernetes Service and an Ingress?
A Kubernetes Service provides internal network access to Pods within the cluster, while an Ingress manages external access to Services from outside the cluster, typically for HTTP/HTTPS traffic.
How does Kubernetes handle load balancing for Services?
Kubernetes uses iptables or IPVS-based load balancing to distribute incoming traffic across the Pods belonging to a Service, ensuring high availability and scalability.
What is a headless Service in Kubernetes?
A headless Service is a Service without a cluster-internal IP address, used to expose individual Pods directly, typically for stateful applications that require unique network identities.