Unable to connect api server
以下エラーメッセージ。
$ kubectl get ns Unable to connect to the server: failed to refresh token: oauth2: cannot fetch token: 400 Bad Request Response: {"errorCode":"BXNIM0408E","errorMessage":"Provided refresh token is expired","context":{"requestId":"xx", "requestType":"incoming.Identity_Token","userAgent":"Go-http-client/2.0","url":"https://identity-2.ap-north.iam.cloud.ibm.com","instanceId":"xx","threadId":"xx","host":"xx","startTime":"04.11.2020 01:35:54:770 UT C","endTime":"04.11.2020 01:35:54:773 UTC","elapsedTime":"3","locale":"en_US","clusterName":"xx"}}
なぜかたまに別メッセージで返ってきたり。こっちの方が読みやすいです。
$ kubectl get ns Unable to connect to the server: failed to refresh token: oauth2: cannot fetch token: 400 Bad Request Response: { "errorCode": "BXNIM0408E", "errorMessage": "Provided refresh token is expired" }
再度更新
以下で自動的に書き換えされます。
$ ibmcloud ks cluster config --cluster testcluster OK testcluster の構成は正常にダウンロードされました。
きちんと元のTokenが消えて書き換わっているのがありがたい。