diff --git a/k8s/README.md b/k8s/README.md index bdccfce..c4cb607 100644 --- a/k8s/README.md +++ b/k8s/README.md @@ -109,4 +109,5 @@ done ```sh kubectl apply -f datalab/mopbot.yaml +kubectl apply -f datalab/corona-api.yaml ``` \ No newline at end of file diff --git a/k8s/datalab/corona.yaml b/k8s/datalab/corona.yaml new file mode 100644 index 0000000..19e5cf0 --- /dev/null +++ b/k8s/datalab/corona.yaml @@ -0,0 +1,64 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: corona + labels: + app: corona + namespace: datalab +spec: + selector: + matchLabels: + app: corona + replicas: 1 + template: + metadata: + labels: + app: corona + spec: + imagePullSecrets: + - name: "hub-moritzgraf-de" + containers: + - image: hub.moritzgraf.de:5000/corona:latest + imagePullPolicy: Always + name: corona + ports: + - containerPort: 3838 + +--- +apiVersion: v1 +kind: Service +metadata: + name: corona + namespace: datalab +spec: + ports: + - port: 3838 + targetPort: 3838 + protocol: TCP + selector: + app: corona +--- +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: corona + namespace: datalab + annotations: + kubernetes.io/ingress.class: "nginx" + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + cert-manager.io/cluster-issuer: "letsencrypt-prod" + +spec: + tls: + - hosts: + - "corona.haumdaucher.de" + secretName: corona-haumdaucher-de + rules: + - host: corona.haumdaucher.de + http: + paths: + - path: / + backend: + serviceName: corona + servicePort: 3838 \ No newline at end of file