faint-fish-71835
11/20/2025, 9:39 AMsparse-gold-10561
11/20/2025, 7:39 PM# create cluster via pulumi_eks provider
aws_cluster = pulumi_eks.Cluster(SETTINGS HERE)
# Create a Kubernetes provider using the generated kubeconfig
kubeconfig = aws_cluster.kubeconfig_json
k8s_provider = k8s.Provider(
f"{local_name}_k8s_provider",
kubeconfig=kubeconfig,
opts=pulumi.ResourceOptions(
depends_on=[
aws_cluster,
]
),
)
# DATADOG
datadog_agent_chart = k8s.helm.v3.Release(
f"{local_name}_datadog_agent_chart",
k8s.helm.v3.ReleaseArgs(
name="datadog-agent",
chart="datadog",
version=datadog_helm_version,
repository_opts=k8s.helm.v3.RepositoryOptsArgs(
repo="<https://helm.datadoghq.com>",
),
namespace="datadog",
create_namespace=True,
wait_for_jobs=True,
skip_await=False,
values=datadog_values,
),
opts=pulumi.ResourceOptions(provider=k8s_provider),
)sparse-gold-10561
11/20/2025, 7:43 PMsparse-gold-10561
11/20/2025, 7:43 PM# Create an EKS Cluster with AWS Provider
karmada_cluster = aws.eks.Cluster(CONFIGURATION)
# Create a Kubernetes provider using the generated kubeconfig
kubeconfig = pulumi.Output.all(
cluster_name=karmada_cluster.name,
endpoint=karmada_cluster.endpoint,
cert=karmada_cluster.certificate_authority,
).apply(
lambda args: json.dumps(
{
"apiVersion": "v1",
"clusters": [
{
"cluster": {
"server": args["endpoint"],
"certificate-authority-data": args["cert"]["data"],
},
"name": args["cluster_name"],
}
],
"contexts": [
{
"context": {
"cluster": args["cluster_name"],
"user": args["cluster_name"],
},
"name": args["cluster_name"],
}
],
"current-context": args["cluster_name"],
"kind": "Config",
"users": [
{
"name": args["cluster_name"],
"user": {
"exec": {
"apiVersion": "<http://client.authentication.k8s.io/v1beta1|client.authentication.k8s.io/v1beta1>",
"command": "aws",
"args": [
"eks",
"get-token",
"--cluster-name",
args["cluster_name"],
],
}
},
}
],
}
)
)
k8s_provider = k8s.Provider(
f"{local_name}_k8s_provider",
kubeconfig=kubeconfig,
opts=pulumi.ResourceOptions(
depends_on=[
eks_identity_provider,
karmada_workers,
]
),
)
# NVME
nvme_provisioner_chart = k8s.helm.v3.Release(
f"{local_name}_nvme_provisioner_chart",
k8s.helm.v3.ReleaseArgs(
name="nvme-provisioner",
chart="./clouds/aws/operators/eks_nvme_ssd_provisioner/helm/eks-nvme-ssd-provisioner",
namespace="kube-system",
create_namespace=True,
wait_for_jobs=True,
skip_await=False,
values=pulumi.Output.all(
repo_url=nvme_provisioner_repo.repository_url,
image_url=nvme_provisioner_image,
).apply(
lambda args: {"image": {"repository": args["repo_url"], "tag": "latest"}},
),
),
opts=pulumi.ResourceOptions(provider=k8s_provider),
)