Open main menu

Changes

no edit summary
https://kubernetes.io/docs/concepts/services-networking/ gives a deep dive into the various capabilities around exposing services and the networking models in Kubernetes.
{{#ev:youtube|https://www.youtube.com/watch?v=T4Z7visMM4E}}
== What is a Kubernetes Service? ==
Service is a top-level resource in the Kubernetes REST API. You can find more details about the [https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#service-v1-core Service API object]
type determines how the Service is exposed. Defaults to '''ClusterIP'''. Valid options are '''ExternalName''', '''ClusterIP''', '''NodePort''', and '''LoadBalancer'''. "ClusterIP" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. "ExternalName" aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
 There is a good [https://medium.com/@badawekoo/different-ways-to-expose-services-in-kubernetes-70177e63e27b Medium article about the different types of services in Kubernetes], with the The official documentation is at https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
; <tt>type: ClusterIP</tt>