-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathk8s-install.sh
31 lines (23 loc) · 1.1 KB
/
k8s-install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
DEVBOX_HOSTNAME=${DEVBOX_HOSTNAME:-dev.localhost}
DEVBOX_INGRESS=${DEVBOX_INGRESS:-traefik}
DEVBOX_ISSUER=${DEVBOX_ISSUER:-mkcert}
MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-ChangeIt}
# Add helm repository
helm repo add bitnami https://charts.bitnami.com/bitnami
# Update helm repositories
helm repo update
# Create namespace minio if not exists
kubectl create namespace minio --dry-run=client -o yaml | kubectl apply -f -
# Deploy minio with helm
helm -n minio upgrade --install minio bitnami/minio -f ${SCRIPT_DIR}/helm/minio/values.yaml \
--set auth.rootPassword=$MINIO_ROOT_PASSWORD \
--set ingress.hostname=minio.$DEVBOX_HOSTNAME \
--set ingress.ingressClassName=$DEVBOX_INGRESS \
--set ingress.annotations."cert-manager\.io\/cluster-issuer"=${DEVBOX_ISSUER} \
--set apiIngress.hostname=minio-s3.$DEVBOX_HOSTNAME \
--set apiIngress.ingressClassName=$DEVBOX_INGRESS \
--set apiIngress.annotations."cert-manager\.io\/cluster-issuer"=${DEVBOX_ISSUER}
# Display resources
kubectl -n minio get pods,svc,ingress