GithubHelp home page GithubHelp logo

Comments (4)

atinylittleshell avatar atinylittleshell commented on July 25, 2024 1

I ended up doing the following:

#!/bin/bash
sudo -E env "PATH=$PATH" gcloud --quiet components update kubectl
sudo chmod 757 /home/ubuntu/.config/gcloud/logs -R

gcloud auth activate-service-account --key-file ./my/key.json
gcloud config set project $GCLOUD_PROJECTID
gcloud container clusters get-credentials my-cluster \
  --project=$GCLOUD_PROJECTID --zone=$CLOUDSDK_COMPUTE_ZONE

It's really weird that "gcloud container clusters get-credentials" couldn't read the environment variables correctly and requires us to manually specify --project and --zone. but once specified, this is working. kubectl can work fine after these commands.

from circleci-docs.

atinylittleshell avatar atinylittleshell commented on July 25, 2024

No wait.. even sudo won't work. Everything started to fail after running gcloud components update with sudo.

from circleci-docs.

felicianotech avatar felicianotech commented on July 25, 2024

Your original assertion was correct. Using sudo and the full path is the way to use it, ran into this issue myself on an upcoming guide. We'll need to update the docs you pointed out.

What is the new error you're getting with updating?

from circleci-docs.

felicianotech avatar felicianotech commented on July 25, 2024

@kunchenguid Once again, thanks for pointing this out. I was aware of the need to use sudo and the entire path but didn't realize the gcloud binary also has trouble with environment variables.

Docs has been updated to reflect using the long, unwieldy command while we investigate getting the command to work the way it should from within the image.

from circleci-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.