Skip to content

Instantly share code, notes, and snippets.

@michalpenka
Last active March 21, 2020 11:39
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 michalpenka/67ea3c8d39caa690077454d9b6072c3b to your computer and use it in GitHub Desktop.
Save michalpenka/67ea3c8d39caa690077454d9b6072c3b to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: app-helloworld
namespace: helloworld
spec:
replicas: ${APP_REPLICAS}
selector:
matchLabels:
app: app-helloworld
template:
metadata:
labels:
app: app-helloworld
spec:
containers:
- name: app-helloworld
image: ${RELEASE_ARTIFACTS__DOCKERHUB_IMAGE_DEFINITIONNAME}:${RELEASE_ARTIFACTS__DOCKERHUB_IMAGE_BUILDNUMBER}
imagePullPolicy: Always
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: svc-helloworld
namespace: helloworld
spec:
ports:
- port: 80
selector:
app: app-helloworld
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ing-helloworld
namespace: helloworld
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
tls:
- hosts:
- ${APP_URL}
secretName: letsencrypt-prod
rules:
- host: ${APP_URL}
http:
paths:
- backend:
serviceName: svc-helloworld
servicePort: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment