Last active
September 28, 2024 11:37
-
-
Save chandradeoarya/0172016f85113cd61b99bff3e3405615 to your computer and use it in GitHub Desktop.
Kubernetes manifest file to create nginx resources like deployments and service.
This file contains hidden or 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment-dojo | |
labels: | |
app: ng-dep-dojo | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: ng-pod | |
template: | |
metadata: | |
labels: | |
app: ng-pod | |
spec: | |
containers: | |
- name: nginx | |
image: nginx | |
ports: | |
- containerPort: 80 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nginx-service-dojo | |
spec: | |
type: NodePort | |
selector: | |
app: ng-pod | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: 80 | |
nodePort: 30001 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment