Skip to content

Typical workflow examples

Some examples of daily workflows for guiding unfamiliar Nais members

Note

A caveat right of the bat, is that it should be completely unproblematic to switch tenants in naisdevice and access some resource outside of k8s clusters, before switching back and continuing work with kubectl without touching narc or gcloud.

Critical

Read through privileges and ensure to understand both what user identity you are logging with, as well as what you might want to avoid doing with it or can do in another/better way.

Daily switching between tenants

Start the day off with:

  1. Log in w/naisdevice on the tenant who's cluster you intend to connect to (or NAV tenant if you e.g. wanna check email/calendar)
  2. Set your google project account to your @nais.io user: gcloud config set account <account email>
  3. Log in w/your @nais.io user to gcloud: gcloud auth login --update-adc <account email>
    1. If not done so before, this is the time to install cluster configs w/narc, see narc kubeconfig
  4. Most likely, at this point, you'd want to execute narc jita grant admin to allow your @nais.io user useful access to a tenants' k8s cluster
  5. Ét voila! You should be able to kubectx to the cluster(s) of your (naisdevice) connected tenant, and kubectl away

!!!! Note At any point during tho workday you need to access another cluster, switch tenants in naisdevice, and repeat last step of above list.

Testing out some new feature as a tenant's user

Typically this is often done in dev-nais.io tenant.

  1. Get a user for said tenant
  2. Repeat the steps mentioned in this linked workflow example, but replace the references to narc with the equivalent nais cli's commands.

Todo