K8s Python interface issue
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'
Please take a look at the examples on how to use this client
下面这个例子中 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)
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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: 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/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closedYou 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.