GithubHelp home page GithubHelp logo

Comments (8)

busunkim96 avatar busunkim96 commented on June 18, 2024

Hi @venomwaqar,

It looks like you can use the set_master_auth method.

https://googleapis.dev/python/container/latest/gapic/v1/api.html?highlight=set_master_auth#google.cloud.container_v1.ClusterManagerClient.set_master_auth

from python-container.

venomwaqar avatar venomwaqar commented on June 18, 2024

@busunkim96 I need to view the credentials that are already set, please review my comment.

I don't know why you are hasting so much to close this issue :-)

from python-container.

busunkim96 avatar busunkim96 commented on June 18, 2024

Apologies, I misread your question. 😄

Those fields should be available on the cluster object. cluster.master_auth.password and cluster.master_auth.username

Unless you're saying you can access those fields, but they appear to be empty?

from python-container.

venomwaqar avatar venomwaqar commented on June 18, 2024

@busunkim96 thanks for re-opening this issue.

Those fields doesn't exists in the cluster.master_auth object. Although, when I use gcloud cli to cross-check, I can see that username and password do exists.

from python-container.

busunkim96 avatar busunkim96 commented on June 18, 2024

I was able to successfully get both the password and username. Can you try running this code in a clean virtual environment with the latest version of the library?

python3 -m venv env
source env/bin/activate
python3 -m pip install google-cloud-container
from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

PROJECT_ID="my-project"
ZONE="us-central1-a"

response = client.list_clusters(project_id=PROJECT_ID, zone=ZONE)
cluster = response.clusters[0]

# Get master auth password and username
print("password: ", cluster.master_auth.password)
print("username: ", cluster.master_auth.username)

If you open any issues on our repositories in the future, a code snippet showing the problem is much appreciated - it shortens the time for repository maintainers to understand and reproduce the issue you're experiencing.

from python-container.

venomwaqar avatar venomwaqar commented on June 18, 2024

@busunkim96 sorry my bad, I have updated my ticket. Please can you review :-)

I have tried again still I am getting everything but the username and password fields.

image

from python-container.

 avatar commented on June 18, 2024

@busunkim96 continuing the discussion here as #47 was closed as a duplicate.
We have been in touch with GCP Support to seek to expedite the update the the client libraries, however they have advised that it will take some time to implement and there is no ETA for a fix for the client libraries and that the Google Client Libraries Team is working on this issue.

Can you advise when you expect the client libraries will be updated? And what the on going cadence will be for updates to client libraries for the release level of services?

from python-container.

busunkim96 avatar busunkim96 commented on June 18, 2024

The v1 surface has been updated (see https://github.com/googleapis/python-container/blob/master/CHANGELOG.md#220-2020-11-17 for a full list of changes).

A similar update is coming for v1beta1.

from python-container.

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.