aks-engine icon indicating copy to clipboard operation
aks-engine copied to clipboard

kubeconfig file on jumpbox is broken

Open mfabiani-av opened this issue 7 years ago • 7 comments

Describe the bug The kubeconfig on the jumpbox is broken: it contains "\n" wherever there should be a new line, and all the ' " ' characters are escaped:

{\n \"apiVersion\": \"v1\",\n \"clusters\": [\n {\n \"cluster\": {\n \"certificate-authority-data\": ...

Steps To Reproduce Create a cluster with this configuration:

        {  
          "enabled": true,  
          "jumpboxProfile":  
          {  
            "name": "internalappsjump",  
            "vmSize": "Standard_D2_v3",  
            "publicKey": "ssh-rsa ..........",  
            "username": "xxxxxxx"  
          }  
        },  

NOTE: I'm running aks-engine in Windows Linux Subsystem (Ubuntu)

Expected behavior

     "apiVersion": "v1",
     "clusters": [
                        {"cluster": {
                              "certificate-authority-data": ...

AKS Engine version

Version: v0.36.5
GitCommit: 6b8255b54
GitTreeState: dirty

Kubernetes version 1.12.8

Additional context

mfabiani-av avatar Jul 01 '19 13:07 mfabiani-av

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.

welcome[bot] avatar Jul 01 '19 13:07 welcome[bot]

@mfabiani-av thanks for reporting, sounds like a recent regression. I've labeled this as good first issue since it should be an easy one to repro + fix. If anyone wants to pick this up and needs guidance feel free to @ me in a comment.

CecileRobertMichon avatar Jul 01 '19 16:07 CecileRobertMichon

@CecileRobertMichon I'll pick it up since I need to use jump box myself too.. I'll fork and work my way through or any tips?

Alwandy avatar Jul 03 '19 14:07 Alwandy

@Alwandy thanks! I would start by trying to repro to confirm the bug. Then, you will probably want to start by looking at https://github.com/Azure/aks-engine/blob/master/parts/k8s/kubeconfig.json and https://github.com/Azure/aks-engine/blob/master/parts/k8s/cloud-init/jumpboxcustomdata.yml#L16.

CecileRobertMichon avatar Jul 03 '19 16:07 CecileRobertMichon

I successfully reproduced the issue.

Will investigate on a fix now.

Alwandy avatar Jul 04 '19 13:07 Alwandy

Hello, has this fix made it to the latest versions? I'm running Version: v0.38.4 but still have the same problem.

mfabiani-av avatar Jul 23 '19 11:07 mfabiani-av

@mfabiani-av not yet, https://github.com/Azure/aks-engine/commit/86030eb128ac6528674f7ca69f5d083f0b99f677 isn't included in v0.38. It will be included in the upcoming v0.39.0.

CecileRobertMichon avatar Jul 24 '19 18:07 CecileRobertMichon