问题

Karbon,Kubeconfig和API

  • 2020年9月2日
  • 1回复
  • 346意见

大家好,

我试图通过使用Karbon API来获得Ansible的Kubeconfig续订。除了kubeconfig文件的格式外,一切都很好。我有很多\ n字符和一些添加信息。

是否可以在没有所有这些的情况下获得正确的kubeconfig文件,或者我们必须清洁文件才能使其工作?

例如,这是文件的内容:

{“ kube_config”:“# - * - 模式:yaml; - * - * - \ n#vim:syntax = yaml \ n#\ napiversion:v1 \ nkind:config \ nclusers:\ n-nclusers:\ n-名称:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxx-\ n群集:\ n服务器:https://xx.xx.xx.xx:443 \ n证书-Authority-data:LS0tLS1CRUdS0tCk1JSURyVENDQXBXZ0F3SUJBZ0lVWkJuMkxpWG13aURvbWVxQU5wWmY3emxoaEpjd0RRWUpLb1pJaHZjTkFRRUwKQlFBd2JURUxNQWtHQTFVRUJoTUNQ2tOaGJHbG1iM0p1YVdFeEVUQVBCZ05WQkFjVApDRk5oYmlCS2IzTmxNUkF3RGdZRFZRUUtFd2RPZFhSaGJtbDRNUlV3RXdZRFZRUUxFd3hKYm1aeVlTQkxZWEppCmIyNHhEVEFMQmdOVkJBTVRCSEp2YjNRd0hoY05NakF3TmpJeU1Ea3dNVEF3V2hjTk16QXdOakl3TURrd01UQXcKV2pCdE1Rc3dDUVlEVlFRR0V3SlZVekVUTUJFR0ExVUVDQk1LUTJGc2FXWnZjbTVwWVRFUk1BOEdBMVVFQnhNSQpVMkZ1SUVwdmMyVXhFREFPQmdOVkJBb1RCMDUxZEdGdWFYZ3hGVEFUQmdOVkJBc1RERWx1Wm5KaElFdGhjbUp2CmJqRU5NQXNHQTFVRUF4TUVjbTl2ZERDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUIKQVByVi9DcEs5dkFhZklmczNwam102M3SmhyQzNNa2M0YU9lQlIyVUVyNzZ1MlFkUG1mTwpwc0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SIsImlzcyI6IkF0aGVuYSIsImlhdCI6MTU5OTAzMzc3NCwiZXhwIjoxNTk5MTIwMTc0fQNfFt2rZ8lHFy1-nng77nKxj0QTcOuNWUm6QMTpnRx78CrdhV9evoxhWjZzxPO-hLyfKkgr2wMsq1NUjcAzJJjdIqg94p_o1fvgpJQL-FmAq7IkDJKTNXFTntFVNTBx2GPcR7vD2deB9PlYR5_Uc8wKq6CwbwYtDJrpWcHXir8uy-9-UVH6PzXnfyapRm9fxyniDTfdgaeArmeKCIFC7U0J159n9O25WcMPhpN2qF39ZzsJmmj_-pL8C5NhivwjIPpP3E6yqJtkMSaaU18F0NG5p2YK2cdauS1szHjjG5OqsyMok9OksePBjEEnAwZAbllREA\ncontexts:\n- context:\n cluster: xxxx-xxxx-xxx\n user: default-user-xxx-xxx\n name: xxxx-xxx-xxx--context\ncurrent-context: xxx-xxxx-xxx-context\n\n"}


1回复

UserLevel 2
徽章 +3

我们将需要他发送的API电话。

URL,方法,播放和其他标题(如果有)。看来该文件未发送在JSON中,建议将注意事项打开。我们不想揭露客户详细信息。

回复


Learn more about our cookies.<\/a>","cookiepolicy.button":"Accept cookies","cookiepolicy.button.deny":"Deny all","cookiepolicy.link":"Cookie settings","cookiepolicy.modal.title":"Cookie settings","cookiepolicy.modal.content":"We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.<\/a>","cookiepolicy.modal.level1":"Basic
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">
Baidu