Skip to content

Instantly share code, notes, and snippets.

@johananl
Created January 11, 2019 00:10
Show Gist options
  • Save johananl/850be5021f008f38e43ae5d81978338d to your computer and use it in GitHub Desktop.
Save johananl/850be5021f008f38e43ae5d81978338d to your computer and use it in GitHub Desktop.
k8s ingress test (httpbin)
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: httpbin
labels:
app: httpbin
spec:
replicas: 3
selector:
matchLabels:
app: httpbin
template:
metadata:
labels:
app: httpbin
spec:
containers:
- name: httpbin
image: kennethreitz/httpbin
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: httpbin
spec:
selector:
app: httpbin
ports:
- protocol: TCP
port: 80
targetPort: 80
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: httpbin
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: \"false\"
spec:
rules:
- http:
paths:
- path: /httpbin
backend:
serviceName: httpbin
servicePort: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment