You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cluster Ip Service: kubernetes object for pod communication with each other
cluster ip services are written on the same file as the deployment file for better engineering. one can create a different file for it if they want.
apiVersion: apps/v1kind: Deploymentmetadata:
name: posts-deplspec:
replicas: 1selector:
matchLabels:
app: poststemplate:
metadata:
labels:
app: posts # This is the podspec:
containers:
- name: postsimage: jsiqbal/posts
---
apiVersion: v1kind: Servicemetadata:
name: posts-clusterip-srvspec:
selector:
app: posts # The pod that is selected to use the cluster Ip serviceports:
- name: postsprotocol: TCPport: 4000targetPort: 4000