Skip to content

Instantly share code, notes, and snippets.

@dipanjal
Created August 24, 2022 17:30
Show Gist options
  • Save dipanjal/139b190f4aeab43b3af27432be0ec016 to your computer and use it in GitHub Desktop.
Save dipanjal/139b190f4aeab43b3af27432be0ec016 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
selector:
matchLabels:
app: nginx
replicas: 1
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:alpine
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: nginx
spec:
type: NodePort
ports:
- protocol: TCP
port: 8080
targetPort: 80
nodePort: 30600
name: http
selector:
app: nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment