add manifests
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2020-11-01 18:22:56 +01:00
parent b4458ae536
commit 4c288976f7
3 changed files with 64 additions and 0 deletions

27
k8s/deployment.yaml Normal file
View File

@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: demo-service
namespace: cloud-demo
labels:
app: demo-service
spec:
replicas: 1
selector:
matchLabels:
app: demo-service
strategy:
type: Recreate
template:
metadata:
labels:
app: demo-service
spec:
containers:
- name: flask-app
image: registry.kmlabz.com/tormakris/cloud-demo
imagePullPolicy: Always
ports:
- containerPort: 8080
imagePullSecrets:
- name: regcred

21
k8s/ingress.yml Normal file
View File

@ -0,0 +1,21 @@
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: cloud-demo
namespace: cloud-demo
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
tls:
- hosts:
- demo.k8s.kmlabz.com
secretName: demo-cert-secret
rules:
- host: demo.k8s.kmlabz.com
http:
paths:
- path: /
backend:
serviceName: demo-service
servicePort: 80

16
k8s/service.yaml Normal file
View File

@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: demo-service
namespace: cloud-demo
labels:
app: demo-service
spec:
ports:
- name: demo-service
port: 80
targetPort: 8080
protocol: TCP
selector:
app: demo-service
type: ClusterIP