Copying analyticsdb-node secrets into mstr namespace

Last Updated : Jul 08, 2022 |
Prolog information
Use this procedure to copy analyticsdb-node secrets into the mstr namespace.
  1. Confirm mstruser and postgres secrets are available in the default namespace.
    ADDITIONAL INFORMATION:
    kubectl get secrets | grep 'analyticsdb-pguser-mstruser\|analyticsdb-pguser-postgres'
  2. Copy secrets to tmp file
    ADDITIONAL INFORMATION:
    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.
    ADDITIONAL INFORMATION:
    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
    ADDITIONAL INFORMATION:
    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.
    ADDITIONAL INFORMATION:
    kubectl get secrets -n mstr | grep 'analyticsdb-pguser-mstruser\|analyticsdb-pguser-postgres'
  7. Restart mstr-srv and mstr-web pods.