# Kubernetes ClusterIP

**What is the clusterIP in Kubernetes?**

Cluster IP is a virtual IP that is allocated by the Kubernetes to a service. It is Kubernetes internal IP.

A Cluster IP makes it accessible from any of the Kubernetes cluster’s nodes. The use of virtual IP addresses for this purpose makes it possible to have several pods expose the same port on the same node – All of these pods will be accessible via a unique IP address.

This IP is stable and never changes in the service lifecycle(unless deleted explicitly).


![Drawing3.jpg](https://cdn.hashnode.com/res/hashnode/image/upload/v1652379680774/IkBhnyD19.jpg align="left")

How to create a Cluster IP service 

```
apiVersion: v1
kind: Service
metadata:
  name: backend
spec:
  type: ClusterIP
  ports:
    - targetPort: 80
      port: 80

``` 

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1652379398237/qUJ5D9FzO.png align="left")
 Creating the service 
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1652379433252/y88_f9Ye3.png align="left")

How to check the services in Kubernetes

```
kubectl get svc 
``` 

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1652379467278/vOF2w8e72.png align="left")

Hope you have got an idea about Kubernetes Cluster IP and why it is needed

Thank you !!!





