Hi
In the example given below, use of 'MY_API_KEY' is mentioned.
`from __future__ import print_function
import time
import kubernetes.client
from kubernetes.client.rest import ApiException
from pprint import pprint
kubernetes.client.configuration.api_key['authorization'] = "MY_API_KEY"
api_instance = kubernetes.client.AdmissionregistrationApi()
try:
api_response = api_instance.get_api_group()
pprint(api_response)
except ApiException as e:
print("Exception when calling AdmissionregistrationApi->get_api_group: %sn" % e)`
Can anyone please guide me how to generate my API key?
Thanks in advance.
If you can connect to the cluster using kubectl you don't need to manually enter api key here. just use config.load_kube_config(). Look at the /examples folder.
Most helpful comment
If you can connect to the cluster using kubectl you don't need to manually enter api key here. just use
config.load_kube_config(). Look at the/examplesfolder.