How to change registry of sidecar container - cniackz/public GitHub Wiki

Objective:

To show how to change the registry of the sidecar container

  1. After Operator has been deployed, you can change the registry at the Deployments below:
$ kubectl get Deployments -n minio-operator
NAME             READY   UP-TO-DATE   AVAILABLE   AGE
console          1/1     1            1           78m
minio-operator   1/1     1            1           78m

You can use kubectl commands to do that:

kubectl get Deployments console -n minio-operator -o yaml > console-deployment.yaml
yq -i '.spec.template.spec.containers[0].image = "quay.io/minio/operator:v5.0.3"' console-deployment.yaml
kubectl apply -f console-deployment.yaml

kubectl get Deployments minio-operator -n minio-operator -o yaml > minio-operator-deployment.yaml
yq -i '.spec.template.spec.containers[0].image = "quay.io/minio/operator:v5.0.3"' minio-operator-deployment.yaml
kubectl apply -f minio-operator-deployment.yaml
  1. Tenant's sidecar container will reflect that same registry and image:
$ kubectl get pods myminio-pool-0-0  -n tenant-lite -o yaml | yq '.spec.containers[1].image'
quay.io/minio/operator:v5.0.3