K8s-training: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
domainCluster=c2.mi.infocepo.com | domainCluster=c2.mi.infocepo.com | ||
echo "== INIT | echo "== INIT ENV ==" | ||
mkdir -p ~/old | mkdir -p ~/old | ||
localPassword=localPassword | localPassword=localPassword |
Revision as of 12:08, 15 February 2023
#==TRAINING K8S/HELM==
#URL https://nameSpace.domainCluster
nameSpace=infra-$USER
domainCluster=c2.mi.infocepo.com
echo "== INIT ENV =="
mkdir -p ~/old
localPassword=localPassword
hostName=${nameSpace}.${domainCluster}
helm repo add bitnami https://charts.bitnami.com/bitnami
echo "== GITOPS =="
clear
helm template --create-namespace --namespace ${nameSpace} ${nameSpace} bitnami/mediawiki \
--set ingress.enabled=true,ingress.hostname=${hostName} \
--set mediawikiHost=${hostName},mediawikiPassword=${localPassword} \
--set mariadb.auth.rootPassword=${localPassword},mariadb.auth.password=${localPassword} |tee ~/old/infra-$USER
echo "== DEPLOY =="
kubectl apply -f ~/old/infra-$USER
echo "== DELETE =="
kubectl delete -f ~/old/infra-$USER
echo "== DELETE REMAINING DB =="
kubectl delete pvc/data-infra-$USER-mariadb-0 -n infra-$USER