K8s-training: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
#URL https:// | #==TRAINING K8S/HELM== | ||
#URL https://nameSpace.domainCluster | |||
nameSpace=infra-$USER | |||
domainCluster=c2.mi.infocepo.com | |||
mkdir -p ~/old | mkdir -p ~/old | ||
localPassword=localPassword | |||
hostName= | hostName=${nameSpace}.${domainCluster} | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | helm repo add bitnami https://charts.bitnami.com/bitnami | ||
clear | clear | ||
helm template ${ | echo "== GITOPS ==" | ||
helm template --create-namespace --namespace ${nameSpace} ${nameSpace} bitnami/mediawiki \ | |||
--set ingress.enabled=true,ingress.hostname=${hostName} \ | --set ingress.enabled=true,ingress.hostname=${hostName} \ | ||
--set mediawikiHost=${hostName},mediawikiPassword=${ | --set mediawikiHost=${hostName},mediawikiPassword=${localPassword} \ | ||
--set mariadb.auth.rootPassword=${ | --set mariadb.auth.rootPassword=${localPassword},mariadb.auth.password=${localPassword} |tee ~/old/infra-$USER | ||
echo "== DEPLOY ==" | echo "== DEPLOY ==" | ||
kubectl apply -f ~/old/infra-$USER | kubectl apply -f ~/old/infra-$USER | ||
echo "== DELETE ==" | echo "== DELETE ==" | ||
kubectl delete -f ~/old/infra-$USER | kubectl delete -f ~/old/infra-$USER | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 13:43, 15 February 2023
#==TRAINING K8S/HELM==
#URL https://nameSpace.domainCluster
nameSpace=infra-$USER
domainCluster=c2.mi.infocepo.com
mkdir -p ~/old
localPassword=localPassword
hostName=${nameSpace}.${domainCluster}
helm repo add bitnami https://charts.bitnami.com/bitnami
clear
echo "== GITOPS =="
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