Skip to content

Instantly share code, notes, and snippets.

@chukaofili
Last active November 1, 2019 00:00
Show Gist options
  • Save chukaofili/01f3d9f61239a58a30e5088f2d156932 to your computer and use it in GitHub Desktop.
Save chukaofili/01f3d9f61239a58a30e5088f2d156932 to your computer and use it in GitHub Desktop.
echo-server-tls.yaml
apiVersion: v1
kind: Namespace
metadata:
name: echoserver
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: echoserver
namespace: echoserver
spec:
replicas: 3
template:
metadata:
labels:
app: echoserver
spec:
containers:
- image: gcr.io/google_containers/echoserver:1.0
imagePullPolicy: Always
name: echoserver
ports:
- containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: echoserver
namespace: echoserver
spec:
ports:
- port: 80
targetPort: 8080
protocol: TCP
selector:
app: echoserver
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: echoserver
namespace: echoserver
annotations:
kubernetes.io/ingress.class: "nginx"
certmanager.k8s.io/cluster-issuer: "letsencrypt-prod"
spec:
tls:
- hosts:
- echo.[your-domain-goes-here]
secretName: echoserver-tls-prod
rules:
- host: echo.[your-domain-goes-here]
http:
paths:
- path: /
backend:
serviceName: echoserver
servicePort: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment