gitops: deploy kubernetes up and running demo application

This commit is contained in:
Jan Novak(SRE)
2025-05-18 19:50:33 +02:00
parent 950f531658
commit 608289d7d7
5 changed files with 80 additions and 1 deletions

View File

@@ -23,4 +23,17 @@ spec:
prune: true
sourceRef:
kind: GitRepository
name: flux-system
name: flux-system
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: kuard
namespace: flux-system
spec:
interval: 10m0s
path: ./gitops/home-kubernetes/kuard
prune: true
sourceRef:
kind: GitRepository
name: flux-system

View File

@@ -0,0 +1,29 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: kuard
namespace: kuard
spec:
selector:
matchLabels:
app: kuard
replicas: 1
template:
metadata:
labels:
app: kuard
spec:
containers:
- image: gcr.io/kuar-demo/kuard-amd64:1
imagePullPolicy: Always
name: kuard
ports:
- containerPort: 8080
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 100m
memory: 100Mi

View File

@@ -0,0 +1,19 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: kuard
namespace: ingress-test
spec:
ingressClassName: nginx
rules:
- host: test.kammel.dev
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: kuard
port:
number: 80

View File

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

View File

@@ -0,0 +1,13 @@
---
apiVersion: v1
kind: Service
metadata:
name: kuard
namespace: kuard
spec:
ports:
- port: 80
targetPort: 8080
protocol: TCP
selector:
app: kuard