Working With Kubernetes Service
An abstract way to expose an application running on a set of Pods as a network service.
With Kubernetes you don’t need to modify your application to use an unfamiliar service discovery mechanism. Kubernetes gives Pods their own IP addresses and a single DNS name for a set of Pods, and can load-balance across them.
Types of Services
Working with NodePort
- You can create service using yml definition file, please refer this link:
kubectl create -f service-definition.yml
- To get list of running services:
kubectl get services
Working with ClusterIP:
- You can create service using yml definition file, please refer this link:
kubectl create -f service-definition.yml
- To get list of running services:
kubectl get services
Working with LoadBalancer:
- You can create service using yml definition file, please refer this link:
kubectl create -f service-definition.yml
- To get list of running services:
kubectl get services