Skip to content

Instantly share code, notes, and snippets.

@dieterrosch
Last active November 1, 2016 02:02
Show Gist options
  • Save dieterrosch/8b8192c22204635143df1eaa321e7714 to your computer and use it in GitHub Desktop.
Save dieterrosch/8b8192c22204635143df1eaa321e7714 to your computer and use it in GitHub Desktop.
LetsEncrypt Kubernetes deployment
#Once this is deployed, you need to run:
#kubectl exec -ti letsencrypt-595800129-3v7qw ./fetch_certs.sh
#and then
#kubectl exec -ti letsencrypt-595800129-3v7qw ./save_certs.sh
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: letsencrypt
labels:
app: letsencrypt
tier: platform
spec:
strategy:
type: Recreate
template:
metadata:
labels:
app: letsencrypt
tier: platform
spec:
containers:
- image: ployst/letsencrypt
name: letsencrypt
imagePullPolicy: IfNotPresent
env:
- name: EMAIL
value: <<YOUR_EMAIL>>
- name: DOMAINS
value: <<YOUR_DOMAIN>>
- name: SECRET_NAME
value: ssl-for-docker
#- name: RC_NAMES
# value: nginx-ssl-proxy-api
ports:
- containerPort: 80
name: http
---
apiVersion: v1
kind: Service
metadata:
name: letsencrypt
labels:
app: letsencrypt
tier: platform
spec:
ports:
- port: 80
name: http
selector:
app: letsencrypt
tier: platform
clusterIP: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment