Copying analyticsdb-node secrets into mstr namespace

Last Updated : Jul 08, 2022 |

About this task

Use this procedure to copy analyticsdb-node secrets into the mstr namespace.

Procedure

  1. Confirm mstruser and postgres secrets are available in the default namespace.

    kubectl get secrets | grep 'analyticsdb-pguser-mstruser\|analyticsdb-pguser-postgres'

  2. Copy secrets to tmp file

    kubectl get secrets -n default analyticsdb-pguser-postgres -o json | jq '.metadata.namespace = "mstr"' > /tmp/analyticsdb-pguser-postgres.yaml

    kubectl get secrets -n default analyticsdb-pguser-mstruser -o json | jq '.metadata.namespace = "mstr"' > /tmp/analyticsdb-pguser-mstruser.yaml

  3. Edit the yaml files.

    vi /tmp/analyticsdb-pguser-postgres.yaml

  4. Delete lines below "namespace": "mstr", to "resourceVersion": "Id Number", and save.
  5. Apply the secrets into the mstr namespace

    kubectl apply -n mstr -f /tmp/analyticsdb-pguser-postgres.yaml

    kubectl apply -n mstr -f /tmp/analyticsdb-pguser-mstruser.yaml

  6. Confirm mstruser and postgres secrets are available in the default namespace.

    kubectl get secrets -n mstr | grep 'analyticsdb-pguser-mstruser\|analyticsdb-pguser-postgres'

  7. Restart mstr-srv and mstr-web pods.