[CI] Add kube deployment, service and ingress
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
3082681ef2
commit
d013eb694b
3 changed files with 49 additions and 0 deletions
21
kube/beer-deployment.yaml
Normal file
21
kube/beer-deployment.yaml
Normal file
|
@ -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
|
||||
|
16
kube/beer-ingress.yaml
Normal file
16
kube/beer-ingress.yaml
Normal file
|
@ -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
|
||||
|
12
kube/beer-service.yaml
Normal file
12
kube/beer-service.yaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: beer
|
||||
spec:
|
||||
selector:
|
||||
app: beer
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 5000
|
||||
|
Loading…
Reference in a new issue