Jump to content

Kubernetes: Difference between revisions

6 bytes removed ,  9 February 2023
Line 332: Line 332:


Services handle networking.   
Services handle networking.   
For self-hosted/bare metal deployments, there are two types of services.
For self-hosted/bare metal clusters, there are two types of services.
* ClusterIP - This creates an IP address on the internal cluster which nodes and pods on the cluster can access. (Default)
* ClusterIP - This creates an IP address on the internal cluster which nodes and pods on the cluster can access. (Default)
* NodePort - This exposes the port on every node. It implicitly creates a ClusterIP and every node will route to that. This allows access from outside the cluster.
* NodePort - This exposes the port on every node. It implicitly creates a ClusterIP and every node will route to that. This allows access from outside the cluster.
* ExternalName - uses a CNAME record. Primarily for accessing other services from within the cluster.
* ExternalName - uses a CNAME record. Primarily for accessing other services from within the cluster.
* LoadBalancer - Creates a clusterip+nodeport and tells the loadbalancer to create an IP and route it to the nodeport.
* LoadBalancer - Creates a clusterip+nodeport and tells the loadbalancer to create an IP and route it to the nodeport.
** On bare-metal deployments you will need to install a loadbalancer such as metallb.
** On bare-metal clusters you will need to install a loadbalancer such as metallb.


By default, ClusterIP is provided by <code>kube-proxy</code> and performs round-robin load-balancing to pods.<br>
By default, ClusterIP is provided by <code>kube-proxy</code> and performs round-robin load-balancing to pods.<br>