Hi all,
I tried to get the kubeconfig renewal made by Ansible with the use of the Karbon API. All is fine except for the format of the kubeconfig file. I have a lot of \n characters and some additionnal information.
Is there a way of getting a correct kubeconfig file without all these or we have to clean the file in order to get it work ?
For example, this is the content of the file :
{"kube_config":"# -*- mode: yaml; -*-\n# vim: syntax=yaml\n#\napiVersion: v1\nkind: Config\nclusters:\n- name: xxxx-xxxx-xxxx-\n cluster:\n server: https://xx.xx.xx.xx:443\n certificate-authority-data: LS0tLS1CRUdS0tCk1JSURyVENDQXBXZ0F3SUJBZ0lVWkJuMkxpWG13aURvbWVxQU5wWmY3emxoaEpjd0RRWUpLb1pJaHZjTkFRRUwKQlFBd2JURUxNQWtHQTFVRUJoTUNQ2tOaGJHbG1iM0p1YVdFeEVUQVBCZ05WQkFjVApDRk5oYmlCS2IzTmxNUkF3RGdZRFZRUUtFd2RPZFhSaGJtbDRNUlV3RXdZRFZRUUxFd3hKYm1aeVlTQkxZWEppCmIyNHhEVEFMQmdOVkJBTVRCSEp2YjNRd0hoY05NakF3TmpJeU1Ea3dNVEF3V2hjTk16QXdOakl3TURrd01UQXcKV2pCdE1Rc3dDUVlEVlFRR0V3SlZVekVUTUJFR0ExVUVDQk1LUTJGc2FXWnZjbTVwWVRFUk1BOEdBMVVFQnhNSQpVMkZ1SUVwdmMyVXhFREFPQmdOVkJBb1RCMDUxZEdGdWFYZ3hGVEFUQmdOVkJBc1RERWx1Wm5KaElFdGhjbUp2CmJqRU5NQXNHQTFVRUF4TUVjbTl2ZERDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUIKQVByVi9DcEs5dkFhZklmczNwam102M3SmhyQzNNa2M0YU9lQlIyVUVyNzZ1MlFkUG1mTwpwc0ZqZ09vQ0JjV3JTampoZ0FDTHdzTnZQRnhKQVpIcXJLSTRtYVc3L2FKcmhobFYrTzVZcHZSSzNxc2VYS0RzClUvTG5VMldETUs1UGs0WlhSOXJPTkVhZ3dQUGhVTzln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