Skip to content

Instantly share code, notes, and snippets.

@akshayithape-devops
Created April 1, 2024 04:05
Show Gist options
  • Save akshayithape-devops/6fb0e44a63b3e45a2bf986db6a06aef0 to your computer and use it in GitHub Desktop.
Save akshayithape-devops/6fb0e44a63b3e45a2bf986db6a06aef0 to your computer and use it in GitHub Desktop.
# Author: Akshay Ithape
# This Kubernetes manifest defines a ClusterIP service.
apiVersion: v1
kind: Service
metadata:
name: my-clusterip-service # Name of the service
spec:
type: ClusterIP # Optional field (default)
selector:
app: my-app # Selects pods with the label 'app: my-app'
ports:
- protocol: TCP # Protocol used for the service
port: 80 # Port exposed by the service
targetPort: 9376 # Port to which traffic will be forwarded to in the pods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment