Skip to content

Instantly share code, notes, and snippets.

@clsung
Created August 15, 2017 06:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clsung/e8770544049d921b247cfeb7059c3584 to your computer and use it in GitHub Desktop.
Save clsung/e8770544049d921b247cfeb7059c3584 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind : Service
metadata:
name: nginx
labels:
name: nginx-svc
kubernetes.io/name: "Nginx"
spec:
selector:
app: nginx
tier: frontend
type: LoadBalancer
loadBalancerIP: "REPLACEME"
ports:
- port: 8443
protocol: TCP
targetPort: 8443
name: meta
- port: 443
protocol: TCP
targetPort: 443
name: https
- port: 1443
protocol: TCP
targetPort: 1443
name: https2
- port: 80
protocol: TCP
targetPort: 80
name: http
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 1
template:
metadata:
labels:
app: nginx
tier: frontend
spec:
containers:
- name: nginx
image: nginx:stable-alpine
#image: ployst/letsencrypt
ports:
- containerPort: 8443
protocol: TCP
- containerPort: 443
protocol: TCP
- containerPort: 1443
protocol: TCP
- containerPort: 80
protocol: TCP
volumeMounts:
- mountPath: /etc/nginx/ssl
name: nginx-secret-volume
- mountPath: /etc/nginx/conf.d
name: nginx-config-volume
readOnly: true
volumes:
- name: nginx-secret-volume
secret:
secretName: letsencrypt
- configMap:
name: nginx-config
name: nginx-config-volume
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment