Kuberentes ns, deploy & service files

This commit is contained in:
2023-11-04 23:24:51 +01:00
parent 114a715285
commit d4cb81397f
4 changed files with 63 additions and 1 deletions

View File

@@ -55,7 +55,7 @@ steps:
commands:
- mkdir -p /root/.kube
- echo $KUBE_CONFIG | base64 -di > /root/.kube/config
- kubectl --kubeconfig=/root/.kube/config get pods
- kubectl --kubeconfig=/root/.kube/config apply -f .kubernetes
environment:
KUBE_CONFIG:
from_secret: KUBE_CONFIG

View File

@@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: k9e

View File

@@ -0,0 +1,39 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: '1'
labels:
app: k9e
name: k9e
namespace: k9e
spec:
progressDeadlineSeconds: 600
replicas: 2
revisionHistoryLimit: 10
selector:
matchLabels:
app: k9e
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
app: k9e
spec:
containers:
- image: ghcr.io/kevinmidboe/k9e.no:latest
imagePullPolicy: IfNotPresent
name: k9e
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30

18
.kubernetes/service.yml Normal file
View File

@@ -0,0 +1,18 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: k9e
name: k9e-service
namespace: k9e
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
app: k9e
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}