Adding kubernetest deployment stuff for private registry
This commit is contained in:
parent
574eed4dd1
commit
ebbfb4f169
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
NAMESPACE="haumdaucher"
|
NAMESPACE="haumdaucher"
|
||||||
IMAGE_NAME="haumdaucher-website"
|
REGISTRY="registry.moritzgraf.de"
|
||||||
|
IMAGE_BASE_NAME="haumdaucher-website"
|
||||||
|
IMAGE_NAME="$REGISTRY/$IMAGE_BASE_NAME"
|
||||||
TAG="latest"
|
TAG="latest"
|
||||||
|
|
||||||
echo "🚀 Starting deployment for Haumdaucher..."
|
echo "🚀 Starting deployment for Haumdaucher..."
|
||||||
|
|
@ -14,6 +16,10 @@ kubectl create namespace $NAMESPACE --dry-run=client -o yaml | kubectl apply -f
|
||||||
echo "📦 Building Docker image..."
|
echo "📦 Building Docker image..."
|
||||||
docker build -t $IMAGE_NAME:$TAG .
|
docker build -t $IMAGE_NAME:$TAG .
|
||||||
|
|
||||||
|
# Push the docker image
|
||||||
|
echo "📤 Pushing Docker image to $REGISTRY..."
|
||||||
|
docker push $IMAGE_NAME:$TAG
|
||||||
|
|
||||||
# Apply manifests
|
# Apply manifests
|
||||||
echo "🎡 Applying Kubernetes manifests..."
|
echo "🎡 Applying Kubernetes manifests..."
|
||||||
kubectl apply -f k8s-manifests.yaml
|
kubectl apply -f k8s-manifests.yaml
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,12 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
app: haumdaucher
|
app: haumdaucher
|
||||||
spec:
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: registry-haumdaucher-de
|
||||||
containers:
|
containers:
|
||||||
- name: haumdaucher
|
- name: haumdaucher
|
||||||
image: haumdaucher-website:latest
|
image: registry.moritzgraf.de/haumdaucher-website:latest
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
---
|
---
|
||||||
|
|
@ -42,8 +44,16 @@ metadata:
|
||||||
name: haumdaucher-ingress
|
name: haumdaucher-ingress
|
||||||
namespace: haumdaucher
|
namespace: haumdaucher
|
||||||
annotations:
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||||
kubernetes.io/ingress.class: nginx
|
kubernetes.io/ingress.class: nginx
|
||||||
|
kubernetes.io/tls-acme: "true"
|
||||||
|
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
||||||
|
nginx.ingress.kubernetes.io/proxy-body-size: "0"
|
||||||
|
nginx.ingress.kubernetes.io/proxy-buffering: "off"
|
||||||
|
nginx.ingress.kubernetes.io/proxy-request-buffering: "off"
|
||||||
|
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||||
spec:
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
rules:
|
rules:
|
||||||
- host: haumdaucher.de
|
- host: haumdaucher.de
|
||||||
http:
|
http:
|
||||||
|
|
@ -55,3 +65,7 @@ spec:
|
||||||
name: haumdaucher-service
|
name: haumdaucher-service
|
||||||
port:
|
port:
|
||||||
number: 80
|
number: 80
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- haumdaucher.de
|
||||||
|
secretName: haumdaucher-de-tls
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue