diff --git a/kube/beer-deployment.yaml b/kube/beer-deployment.yaml new file mode 100644 index 0000000..f3aad88 --- /dev/null +++ b/kube/beer-deployment.yaml @@ -0,0 +1,21 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: beer-deployment +spec: + selector: + matchLabels: + app: beer + replicas: 1 + template: + metadata: + labels: + app: beer + spec: + containers: + - name: beer + image: kleph/beer + imagePullPolicy: Always + ports: + - containerPort: 5000 + diff --git a/kube/beer-ingress.yaml b/kube/beer-ingress.yaml new file mode 100644 index 0000000..c0c769c --- /dev/null +++ b/kube/beer-ingress.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.k8s.io/v1beta1 +kind: Ingress +metadata: + name: beer-ingress + annotations: + nginx.ingress.kubernetes.io/rewrite-target: / +spec: + rules: + - host: beer.k3s.kleph.eu + http: + paths: + - path: / + backend: + serviceName: beer + servicePort: 80 + diff --git a/kube/beer-service.yaml b/kube/beer-service.yaml new file mode 100644 index 0000000..5a2de90 --- /dev/null +++ b/kube/beer-service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: beer +spec: + selector: + app: beer + ports: + - protocol: TCP + port: 80 + targetPort: 5000 +