Bug 1827486 - `oc adm create-kubeconfig -h` don't show accurate help info
Summary: `oc adm create-kubeconfig -h` don't show accurate help info
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.3.z
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 4.6.0
Assignee: Sally
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-24 03:33 UTC by zhou ying
Modified: 2020-10-27 15:58 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 15:58:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 435 0 None closed Bug 1827486: clarify usage of 'oc adm create-kubeconfig' 2021-02-12 20:12:36 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 15:58:46 UTC

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


Note You need to log in before you can comment on or make changes to this bug.