oc version --client Client Version: 4.5.0-202004231620-ae3e321 oc config get-contexts CURRENT NAME CLUSTER AUTHINFO NAMESPACE build01 api-build01-ci-devcluster-openshift-com:6443 hongkailiu/api-build01-ci-devcluster-openshift-com:6443 hongkliu-test * default api-ci-openshift-org:443 hongkailiu/api-ci-openshift-org:443 hongkliu-test oc --context build01 sa create-kubeconfig default apiVersion: v1 clusters: - cluster: server: https://api.ci.openshift.org:443 name: api-ci-openshift-org:443 contexts: - context: cluster: api-ci-openshift-org:443 namespace: hongkliu-test user: default name: default current-context: default kind: Config preferences: {} users: - name: default user: token: bar
With `oc --context zhouy/api-pdhamdhe-vsp18-qe-devcluster-openshift-com:6443/testuser-6 sa create-kubeconfig default`, I expect the generated kubeconfig to have api-pdhamdhe-vsp18-qe-devcluster-openshift-com:6443 in the cluster name, not api-yinzhou18-qe-gcp-devcluster-openshift-com:6443. Can you please re-verify again?
*** Bug 1838298 has been marked as a duplicate of this bug. ***
oc version --client Client Version: 4.5.0-202005220507-44354e2 oc config get-contexts CURRENT NAME CLUSTER AUTHINFO NAMESPACE api.ci api-ci-openshift-org:443 hongkailiu/api-ci-openshift-org:443 hongkliu-test * app.ci api-ci-l2s4-p1-openshiftapps-com:6443 hongkailiu/api-ci-l2s4-p1-openshiftapps-com:6443 hongkliu-test build01 api-build01-ci-devcluster-openshift-com:6443 hongkailiu/api-build01-ci-devcluster-openshift-com:6443 hongkliu-test build02 api-build02-gcp-ci-openshift-org:6443 hongkailiu/api-build02-gcp-ci-openshift-org:6443 hongkliu-test oc --context build01 sa create-kubeconfig default apiVersion: v1 clusters: - cluster: server: https://api.build01.ci.devcluster.openshift.com:6443 name: api-build01-ci-devcluster-openshift-com:6443 contexts: - context: cluster: api-build01-ci-devcluster-openshift-com:6443 namespace: hongkliu-test user: default name: default current-context: default kind: Config preferences: {} users: - name: default user: token: XXX Thanks for the fix.
[root@dhcp-140-138 ~]# oc config get-contexts CURRENT NAME CLUSTER AUTHINFO NAMESPACE /api-ugdci28074134-qe-azure-devcluster-openshift-com:6443/testuser-49 api-ugdci28074134-qe-azure-devcluster-openshift-com:6443 testuser-49 /api-yinzhou27-qe-gcp-devcluster-openshift-com:6443/testuser-30 api-yinzhou27-qe-gcp-devcluster-openshift-com:6443 testuser-30 * testzy/api-ugdci28074134-qe-azure-devcluster-openshift-com:6443/testuser-49 api-ugdci28074134-qe-azure-devcluster-openshift-com:6443 testuser-49 testzy zhouy/api-yinzhou27-qe-gcp-devcluster-openshift-com:6443/testuser-30 api-yinzhou27-qe-gcp-devcluster-openshift-com:6443 testuser-30 zhouy [root@dhcp-140-138 ~]# oc --context zhouy/api-yinzhou27-qe-gcp-devcluster-openshift-com:6443/testuser-30 sa create-kubeconfig default apiVersion: v1 clusters: - cluster: insecure-skip-tls-verify: true server: https://api.yinzhou27.qe.gcp.devcluster.openshift.com:6443 name: api-yinzhou27-qe-gcp-devcluster-openshift-com:6443 contexts: - context: cluster: api-yinzhou27-qe-gcp-devcluster-openshift-com:6443 namespace: zhouy user: default name: default current-context: default kind: Config preferences: {} users: - name: default user: .....
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:2409