Created
September 9, 2019 19:01
-
-
Save JWDobken/6080deb95e4daf7bc25b6013496d0cf0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" | |
rm -rf $SCRIPTPATH/manifests | |
mkdir -p $SCRIPTPATH/manifests | |
# RENDER | |
echo 'RENDER MANIFESTS' | |
## CERT-MANAGER | |
cp -r $SCRIPTPATH/charts/00-crds.yaml $SCRIPTPATH/manifests/ # cert-manager CRDs | |
helm template \ | |
--name cert-manager \ | |
--namespace nginx-ingress \ | |
--values $SCRIPTPATH/values/cert-manager.yaml \ | |
--output-dir $SCRIPTPATH/manifests \ | |
$SCRIPTPATH/charts/cert-manager | |
## NGINX-INGRESS | |
helm template \ | |
--name nginx-ingress \ | |
--namespace nginx-ingress \ | |
--values $SCRIPTPATH/values/nginx-ingress.yaml \ | |
--output-dir $SCRIPTPATH/manifests \ | |
$SCRIPTPATH/charts/nginx-ingress | |
# APPLY | |
echo 'APPLY MANIFESTS' | |
## NAMESPACE | |
kubectl apply -f $SCRIPTPATH/nginx-ingress-ns.yaml | |
## CERT-MANAGER | |
kubectl label namespace nginx-ingress --overwrite certmanager.k8s.io/disable-validation=true | |
kubectl apply -f $SCRIPTPATH/00-crds.yaml # cert-manager CRDs | |
kubectl apply -R -f $SCRIPTPATH/manifests/cert-manager | |
## CLUSTER ISSUERS | |
kubectl apply -n nginx-ingress -R -f $SCRIPTPATH/cluster-issuers | |
## NGINX-INGRESS | |
kubectl apply -n nginx-ingress -R -f $SCRIPTPATH/manifests/nginx-ingress | |
echo '' | |
echo '' | |
echo 'Now watch the status and the external IP by running:' | |
echo ' kubectl --namespace nginx-ingress get services -o wide -w nginx-ingress-controller' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment