Bug 1827486

Summary: `oc adm create-kubeconfig -h` don't show accurate help info
Product: OpenShift Container Platform Reporter: zhou ying <yinzhou>
Component: ocAssignee: Sally <somalley>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: low Docs Contact:
Priority: medium    
Version: 4.3.zCC: aos-bugs, jokerman, mfojtik, wking
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 15:58:27 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 zhou ying 2020-04-24 03:33:40 UTC
Description of problem:
`oc adm create-kubeconfig -h` don't show accurate help info

Version-Release number of selected component (if applicable):
clientVersion:
  buildDate: "2020-04-18T05:57:45Z"
  compiler: gc
  gitCommit: 4fb2d4d96e6b604f7d4ee49080238a5aec04dc4f
  gitTreeState: clean
  gitVersion: 4.3.14-202004180552-4fb2d4d
  goVersion: go1.12.12
  major: ""
  minor: ""
  platform: linux/amd64

How reproducible:
Always

Steps to Reproduce:
1. `oc adm create-kubeconfig -h` to check the help information.
2. Follow the help info to use command:
    `oc adm create-kubeconfig --master='https://api.xxxx.openshift.com:6443'

Actual results:
1. Show:
Create's a .kubeconfig file at <--kubeconfig> that looks like this:

  clusters:
  - cluster:
  certificate-authority-data: <contents of --certificate-authority>
  server: <--master>
  name: <--cluster>
  - cluster:
  certificate-authority-data: <contents of --certificate-authority>
  server: <--public-master>
  name: public-<--cluster>
  contexts:
  - context:
  cluster: <--cluster>
  user: <--user>
  namespace: <--namespace>
  name: <--context>
  - context:
  cluster: public-<--cluster>
  user: <--user>
  namespace: <--namespace>
  name: public-<--context>
  current-context: <--context>
  kind: Config
  users:
  - name: <--user>
  user:
  client-certificate-data: <contents of --client-certificate>
  client-key-data: <contents of --client-key>

Usage:
  oc adm create-kubeconfig [flags]

Options:
      --master='https://localhost:8443': The API server's URL.
      --public-master='': The API public facing server's URL (if applicable).

2. Show error:
error: client-certificate must be provided

Expected results:
1. Show accurate options for the command.

Additional info:

Comment 1 Maciej Szulik 2020-04-24 09:52:52 UTC
Sally sync with Clayton, I'm not sure if we still care about this command.

Comment 2 Sally 2020-05-20 17:48:54 UTC
I’m adding UpcomingSprint, because I was occupied by fixing bugs with higher priority/severity, developing new features with higher priority, or developing new features to improve stability at a macro level. I will revisit this bug next sprint.

Comment 3 Sally 2020-06-16 14:13:57 UTC
We're moving to deprecate `oc adm create-kubeconfig` command.  We'll be pointing users to `oc config set...` equivalent in the near future. 
Moving version to 4.6 for this bug, no plans to backport.

Comment 7 zhou ying 2020-06-19 09:45:41 UTC
[root@dhcp-140-138 ~]# oc version --client
Client Version: 4.6.0-202006181224-4f753f8


[root@dhcp-140-138 ~]# oc adm create-kubeconfig --master='https://api.xxxx.openshift.com:6443' 
Command "create-kubeconfig" is deprecated, and will be removed in the future version
error: client-certificate must be provided

Comment 9 errata-xmlrpc 2020-10-27 15:58:27 UTC
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 (OpenShift Container Platform 4.6 GA Images), 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:4196