MySQL Operator for Kubernetes Manual  /  Private Registries  /  Install InnoDB Cluster from Private Registry using Helm

6.2 Install InnoDB Cluster from Private Registry using Helm

For example:

export REGISTRY="..."   # like 192.168.20.199:5000
export REPOSITORY="..." # like "mysql"
export NAMESPACE="mynamespace"
export DOCKER_SECRET_NAME="priv-reg-secret"

$> kubectl create namespace $NAMESPACE

$> kubectl -n $NAMESPACE create secret docker-registry $DOCKER_SECRET_NAME \
           --docker-server="https://$REGISTRY/v2/" \
           --docker-username=user --docker-password=pass \
           --docker-email=user@example.com

$> helm install mycluster mysql-operator/mysql-innodbcluster \
           --namespace $NAMESPACE \
           --set credentials.root.user='root' \
           --set credentials.root.password='sakila' \
           --set credentials.root.host='%' \
           --set serverInstances=3 \
           --set routerInstances=1 \
           --set image.registry=$REGISTRY \
           --set image.repository=$REPOSITORY \
           --set image.pullSecrets.enabled=true \
           --set image.pullSecrets.secretName=$DOCKER_SECRET_NAME \