diff --git a/modules/kubeconfig/kubeconfig.tftpl b/modules/kubeconfig/kubeconfig.tftpl index 7766bc8..1505a2e 100644 --- a/modules/kubeconfig/kubeconfig.tftpl +++ b/modules/kubeconfig/kubeconfig.tftpl @@ -1,7 +1,7 @@ apiVersion: v1 clusters: - cluster: - certificate-authority-data: ${base64encode(ca_file)} + certificate-authority-data: ${ca_file} server: ${cluster_url} name: ${cluster_name} contexts: @@ -15,5 +15,5 @@ preferences: {} users: - name: ${user_name} user: - client-certificate-data: ${base64encode(client_cert_file)} - client-key-data: ${base64encode(client_key_file)} \ No newline at end of file + client-certificate-data: ${client_cert_file} + client-key-data: ${client_key_file} \ No newline at end of file diff --git a/modules/kubeconfig/kubeconfig_commands.tftpl b/modules/kubeconfig/kubeconfig_commands.tftpl index ca7107a..b08de6c 100644 --- a/modules/kubeconfig/kubeconfig_commands.tftpl +++ b/modules/kubeconfig/kubeconfig_commands.tftpl @@ -1,6 +1,6 @@ kubectl config set-cluster ${cluster_name} --server=${cluster_url} -kubectl config set clusters.${cluster_name}.certificate-authority-data ${base64encode(ca_file)} -kubectl config set users.${user_name}.client-certificate-data ${base64encode(client_cert_file)} -kubectl config set users.${user_name}.client-key-data ${base64encode(client_key_file)} +kubectl config set clusters.${cluster_name}.certificate-authority-data ${ca_file} +kubectl config set users.${user_name}.client-certificate-data ${client_cert_file} +kubectl config set users.${user_name}.client-key-data ${client_key_file} kubectl config set-context ${context_name} --cluster=${cluster_name} --user=${user_name} kubectl config use-context ${context_name} \ No newline at end of file