我想在python脚本中使用以下eksctl命令:
eksctl create -f managedcluster.yaml
我想知道这个命令的python等效项,这样当python脚本运行时,托管集群就会被创建。
发布于 2020-12-24 03:33:08
我认为创建EKS集群的最好方法是使用AWS Boto3 python库https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/eks.html#EKS.Client.create_cluster。
但在您的情况下,最快的方法是使用子流程库。
例如:
import subprocess
output = subprocess.check_output("eksctl create -f managedcluster.yaml", shell=True)最好的
https://stackoverflow.com/questions/65406547
复制相似问题