Skip to content

Instantly share code, notes, and snippets.

@berinle
Created November 18, 2021 15:17
Show Gist options
  • Save berinle/48b766602cf6ab9422dedc8dd34dcf3b to your computer and use it in GitHub Desktop.
Save berinle/48b766602cf6ab9422dedc8dd34dcf3b to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nginx
name: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: IMAGE_URL
name: nginx
---
apiVersion: v1
kind: Service
metadata:
labels:
app: nginx
name: nginx
spec:
ports:
- port: 80
protocol: TCP
targetPort: 8080
selector:
app: nginx
sessionAffinity: None
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nginx
labels:
app: nginx
spec:
defaultBackend:
service:
name: nginx
port:
number: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment