python icon indicating copy to clipboard operation
python copied to clipboard

K8s Python interface issue

Open Jicming opened this issue 1 year ago • 3 comments

When I was experimenting with the Python client, I found a configuration that I didn't know what to fill in as follows:

configuration.api_key['authorization'] = 'YOUR_API_KEY'

Jicming avatar Apr 29 '24 10:04 Jicming

Please take a look at the examples on how to use this client

roycaihw avatar May 08 '24 20:05 roycaihw

下面这个例子中 configuration.api_key['authorization'] = 'YOUR_API_KEY' 这块填啥呢?

from future import print_function import time import kubernetes.client from kubernetes.client.rest import ApiException from pprint import pprint

configuration = kubernetes.client.Configuration()

Configure API key authorization: BearerToken

configuration.api_key['authorization'] = 'YOUR_API_KEY'

Uncomment below to setup prefix (e.g. Bearer) for API key, if needed

configuration.api_key_prefix['authorization'] = 'Bearer'

Defining host is optional and default to http://localhost

configuration.host = "http://localhost"

Defining host is optional and default to http://localhost

configuration.host = "http://localhost"

Enter a context with an instance of the API kubernetes.client

with kubernetes.client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = kubernetes.client.WellKnownApi(api_client)

try:
    api_response = api_instance.get_service_account_issuer_open_id_configuration()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WellKnownApi->get_service_account_issuer_open_id_configuration: %s\n" % e)

Jicming avatar May 14 '24 10:05 Jicming

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Aug 12 '24 11:08 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Sep 11 '24 11:09 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Oct 11 '24 12:10 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar Oct 11 '24 12:10 k8s-ci-robot