Create Managed EKS via dataikuapi.
Hello, I'm trying to create a managed EKS like in image left created manualy inside dss design. I'want to use api client to automate this. After reading and getting right packages to create_cluster() i'ts till
import dataikuapi import json client = dataikuapi.DSSClient(host, api_key) # Read the JSON file with open('eks.json', 'r') as file: json_data = json.load(file) # json_string = json.dumps(json_data) client.create_cluster(cluster_name='mister-cluster', params=json_string, cluster_architecture='KUBERNETES')
This create >_manual without taking data in json.
How to create managed EKS cluster via this api?
Answers
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,160 Neuron
This won't necesarily fix your problem but might help you debug it. When you create a cluster you can get a handle to it:
cluster_handle = client.create_cluster(cluster_name='mister-cluster', params=json_string, cluster_architecture='KUBERNETES')
Then you can use cluster_handle.get_settings().get_raw() to get the cluster settings and even modify them and use save() to save the changes.
-
Thanks for your answer, what kind of parameters take the cluster_type? I ve see only manual. No docs about this. Any ideas ?
-
Just in case somebody finds this issue, the answer is:
cluster_type='pycluster_eks-clusters_attach-eks-cluster',
Even if the documentation does not describe it, you can reverse engineer the type by creating the object via UI first and then reading back the raw settings. This method applies to most of the DSS objects. But it would be good to have a more complete documentation any way :-) https://doc.dataiku.com/dss/11/python-api/client.html#dataikuapi.DSSClient.create_cluster