I installed Kong ingress in EKS its working. Now i want to create Customer using python with Kubernetes API
Code:-
def main():
config.load_kube_config()
api = client.CustomObjectsApi()
my_resouces = {
"apiVersion": "configuration.konghq.com/v1",
"kind": "KongConsumer",
"metadata": {"name": "testuser", "annotations": {"kubernetes.io/ingress.class": "kong"}},
"username": "testuser"
}
# Create the resouce
api.create_namespaced_custom_object(
group="configuration.konghq.com",
version="v1",
namespace="default",
plural="kong",
body=my_resouces,
)
Error -:
Reason: Not Found
HTTP response headers: HTTPHeaderDict({‘Audit-Id’: ‘663afc53414-ec59-4467-aeeb-13c654baef84’, ‘Cache-Control’: ‘no-cache, private’, ‘Content-Type’: ‘text/plain; charset=utf-8’, ‘X-Content-Type-Options’: ‘nosniff’, ‘Date’: ‘Fri, 12 Mar 2021 14:37:46 GMT’, ‘Content-Length’: ‘19’})
HTTP response body: 404 page not found