K8s-training: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | == DEPLOY == | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
echo "== INIT ENV ==" | echo "== INIT ENV ==" | ||
Line 30: | Line 30: | ||
#kubectl get ingress -n ${nameSpace} | #kubectl get ingress -n ${nameSpace} | ||
echo https://${hostName} | echo https://${hostName} | ||
</syntaxhighlight> | |||
== DELETE == | |||
<syntaxhighlight lang="bash"> | |||
kubectl delete -f ~/old/${hostName} | kubectl delete -f ~/old/${hostName} | ||
Revision as of 23:29, 23 March 2023
YOURS VARS
export domainCluster=
DEPLOY
echo "== INIT ENV =="
export appName=wiki
export nameSpace=home-$USER
hostName=${appName}-${nameSpace}.${domainCluster}
appInternalPassword=${hostName}
helm repo add bitnami https://charts.bitnami.com/bitnami
mkdir -p ~/old
echo "== INFRA =="
clear
helm template ${appName} bitnami/mediawiki \
--namespace ${nameSpace} --create-namespace \
--set ingress.enabled=true,ingress.hostname=${hostName} \
--set mediawikiHost=${hostName},mediawikiPassword=${appInternalPassword} \
--set mariadb.auth.rootPassword=${appInternalPassword},mariadb.auth.password=${appInternalPassword} |tee ~/old/${hostName}
echo "== DEPLOY =="
kubectl create namespace ${nameSpace}
kubectl apply -f ~/old/${hostName}
echo "== YOURS URL =="
#kubectl get ingress -n ${nameSpace}
echo https://${hostName}
DELETE
kubectl delete -f ~/old/${hostName}
echo "== DELETE REMAINING DB =="
#kubectl get pvc -n ${nameSpace}
kubectl delete pvc/data-${appName}-mariadb-0 -n ${nameSpace}