This commit is contained in:
parent
b4458ae536
commit
4c288976f7
27
k8s/deployment.yaml
Normal file
27
k8s/deployment.yaml
Normal 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
21
k8s/ingress.yml
Normal 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
16
k8s/service.yaml
Normal 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
|
Loading…
Reference in New Issue
Block a user