-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cluster certificate and host outputs to the ske_cluster data #380
Comments
Hi @tchelovilar, we are currently checking how to provide this info. I'll get back to you soon |
Like mentioned in stackitcloud/stackit-cli#358, in the meantime, you can manually retrieve the login kubeconfig and provide it to the Kubernetes TF provider:
|
my current solution based on the short lived kubeconfig resource
|
Hi @not22day , I have found an interesting workaround, I created the
#!/bin/bash
# Workaround to generate the StackIT kubeconfig for kubernetes terraform provider
STACKIT_PROJECT_ID=$1
SERVER=$2
CLUSTER_NAME=$3
export KUBERNETES_EXEC_INFO='{"apiVersion": "client.authentication.k8s.io/v1","kind": "ExecCredential", "spec": { "cluster": { "config": { "STACKITProjectID": "'$STACKIT_PROJECT_ID'", "ClusterName": "'$CLUSTER_NAME'"}, "server": "'$SERVER'"}, "interactive": false } }'
stackit ske kubeconfig login Provider configuration: provider "kubernetes" {
host = var.cluster_endpoint
cluster_ca_certificate = base64decode(var.cluster_ca_cert)
exec {
api_version = "client.authentication.k8s.io/v1"
args = [var.stackit_project_id, var.cluster_endpoint, stackit_ske_cluster.main.name]
command = "../ske_login.sh"
}
} |
Adding the cluster certificate and host outputs to the ske_cluster data will smoothly improve Kubernetes provider setup.
The text was updated successfully, but these errors were encountered: