Created
April 1, 2024 04:05
-
-
Save akshayithape-devops/6fb0e44a63b3e45a2bf986db6a06aef0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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