Skip to content

Instantly share code, notes, and snippets.

@bryanl
Created September 18, 2019 22:37
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bryanl/65eff0a4759748da9d13c32edcee9d1d to your computer and use it in GitHub Desktop.
Save bryanl/65eff0a4759748da9d13c32edcee9d1d to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: httpbin
project: httpbin
name: httpbin
spec:
replicas: 1
selector:
matchLabels:
app: httpbin
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: httpbin
spec:
containers:
- image: docker.io/kennethreitz/httpbin
name: httpbin
ports:
- containerPort: 8080
name: http
command: ["gunicorn"]
args: ["-b", "0.0.0.0:8080", "httpbin:app"]
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: httpbin
annotations:
kubernetes.io/tls-acme: "true"
certmanager.k8s.io/cluster-issuer: "letsencrypt-prod"
labels:
project: httpbin
spec:
tls:
- secretName: httpbin
hosts:
- httpbin.20190918.bryanl.dev
rules:
- host: httpbin.20190918.bryanl.dev
http:
paths:
- backend:
serviceName: httpbin
servicePort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: httpbin
labels:
project: httpbin
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
app: httpbin
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: httpbin
project: httpbin
name: httpbin
spec:
replicas: 1
selector:
matchLabels:
app: httpbin
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: httpbin
spec:
containers:
- image: docker.io/kennethreitz/httpbin
name: httpbin
ports:
- containerPort: 8080
name: http
command: ["gunicorn"]
args: ["-b", "0.0.0.0:8080", "httpbin:app"]
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: httpbin
annotations:
kubernetes.io/tls-acme: "true"
certmanager.k8s.io/cluster-issuer: "letsencrypt-prod"
labels:
project: httpbin
spec:
tls:
- secretName: httpbin
hosts:
- httpbin.20190918.bryanl.dev
rules:
- host: httpbin.20190918.bryanl.dev
http:
paths:
- backend:
serviceName: httpbn
servicePort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: httpbin
labels:
project: httpbin
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
run: httpbin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment