Skip to content

Instantly share code, notes, and snippets.

@ams0
Created December 17, 2020 22:00
Show Gist options
  • Save ams0/69e9ac0aa2952e31a0949971bfcc427c to your computer and use it in GitHub Desktop.
Save ams0/69e9ac0aa2952e31a0949971bfcc427c to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Pod
metadata:
labels:
run: nginx
name: nginx
namespace: default
spec:
containers:
- image: nginx
imagePullPolicy: Always
name: nginx
ports:
- containerPort: 80
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: nginx
namespace: default
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
run: nginx
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: nginx-ingress
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- http:
paths:
- backend:
serviceName: nginx
servicePort: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment