Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

AKS cluster secret missing kubeconfig #112

Closed
vfarcic opened this issue Dec 10, 2021 · 1 comment · Fixed by #113
Closed

AKS cluster secret missing kubeconfig #112

vfarcic opened this issue Dec 10, 2021 · 1 comment · Fixed by #113
Assignees
Labels
bug Something isn't working

Comments

@vfarcic
Copy link

vfarcic commented Dec 10, 2021

What happened?

Providers like Kubernetes and Helm expect a secret with kubeconfig value. Such secrets are created when using AWS, Azure, or GCP providers. However, Terrajet Azure is not adding kubeconfig entry into the secret, thus preventing us to combine it with other providers.

Here's the output of the secret created by the KubernetesCluster resource:

apiVersion: v1
data:
  attribute.kube_admin_config_raw: ""
  attribute.kube_config.0.client_certificate: ...
  attribute.kube_config.0.client_key: ...
  attribute.kube_config.0.cluster_ca_certificate: ...
  attribute.kube_config.0.password: ...
  attribute.kube_config_raw: ...
kind: Secret
metadata:
  creationTimestamp: "2021-12-10T23:18:51Z"
  name: ateamaks-akscluster
  namespace: crossplane-system
  ownerReferences:
  - apiVersion: containerservice.azure.jet.crossplane.io/v1alpha1
    controller: true
    kind: KubernetesCluster
    name: ateamaks
    uid: 96dcbc34-1b4d-4d64-ad9d-3168209d47a3
  resourceVersion: "13565"
  uid: 6b1a8c0f-bbc5-4319-9308-fa72423cb0a4
type: connection.crossplane.io/v1alpha1

How can we reproduce it?

Create an EKS cluster through KubernetesCluster.

kubectl -n crossplane-system get secret THE_NAME_OF_THE_SECRET -o yaml

Config that data entry kubeconfig does not exist.

@vfarcic vfarcic added the bug Something isn't working label Dec 10, 2021
turkenh added a commit to turkenh/provider-jet-azure that referenced this issue Dec 11, 2021
@turkenh turkenh self-assigned this Dec 11, 2021
@turkenh
Copy link
Collaborator

turkenh commented Dec 11, 2021

@vfarcic attribute.kube_config_raw key already contains the kubeconfig for the cluster and you should be able to pass this as a key to provider helm/kubernetes providerconfig.

Still, it makes sense to add a kubeconfig to be consistent with others, opened #113

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants