Fix creating namespace for cert-manager deployment
This commit is contained in:
parent
e49bd32378
commit
23211c998a
@ -31,16 +31,6 @@ VERSION=v1.11.4
|
||||
echo "Installing cert-manager CRD resources ..."
|
||||
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/${VERSION}/cert-manager.crds.yaml
|
||||
|
||||
# Create the namespace
|
||||
kubectl get ns ${NAMESPACE}
|
||||
if [ $? == 0 ]; then
|
||||
echo "Namespace '${NAMESPACE}' already exists."
|
||||
else
|
||||
echo "Creating namespace '${NAMESPACE}' ..."
|
||||
kubectl create namespace ${NAMESPACE}
|
||||
echo "Successfully created namespace '${NAMESPACE}'."
|
||||
fi
|
||||
|
||||
# Add the Jetstack Helm repository.
|
||||
echo "Adding Jetstack Helm repository."
|
||||
helm repo add jetstack https://charts.jetstack.io
|
||||
@ -53,6 +43,7 @@ helm repo update
|
||||
echo "Installing cert-manager ${VERSION} to namespace ${NAMESPACE} as '${NAME}' ..."
|
||||
helm install \
|
||||
--namespace ${NAMESPACE} \
|
||||
--create-namespace \
|
||||
--version ${VERSION} \
|
||||
${NAME} \
|
||||
jetstack/cert-manager
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user