Bug 1838298
| Summary: | oc serviceaccounts create-kubeconfig does not honor context correctly | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Steve Kuznetsov <skuznets> |
| Component: | oc | Assignee: | Maciej Szulik <maszulik> |
| Status: | CLOSED DUPLICATE | QA Contact: | zhou ying <yinzhou> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.4 | CC: | aos-bugs, jokerman, mfojtik |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-05-20 19:59:49 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Steve Kuznetsov
2020-05-20 19:56:30 UTC
The `cvp-trigger` ServiceAccount only exists in the `app.ci` context:
$ oc config current-context
api.ci
$ oc --as system:admin --context api.ci --namespace ci serviceaccounts create-kubeconfig cvp-trigger
Error from server (NotFound): serviceaccounts "cvp-trigger" not found
$ oc --as system:admin --context app.ci --namespace ci serviceaccounts create-kubeconfig cvp-trigger
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: ci
user: cvp-trigger
name: cvp-trigger
current-context: cvp-trigger
kind: Config
preferences: {}
users:
- name: cvp-trigger
user:
token: xxx
*** This bug has been marked as a duplicate of bug 1827463 *** |