I created a service account for a specific role by going through the steps mentioned here.
https://cloud.google.com/iam/docs/creating-managing-service-accounts
https://cloud.google.com/iam/docs/creating-managing-service-account-keys
after generating the keys in json file when i am trying to authenticate with credentials using gcloud using
gcloud auth activate-service-account ACCOUNT --key-file=KEY-FILE
ERROR: (gcloud.auth.activate-service-account) Unable to read file [#path of file#]: [Errno 2] No such file or directory: 'filename.json'
dir
in the same directory where you execute the gcloud command. – Daniel Stoyanoff