Installing OpenShift command line interface (CLI)

Procedure

  1. Create a directory on the bastion server.
    In the following example, /ocp-tools is the new directory created.
    mkdir /ocp-tools
  2. Download the OpenShift® Container Platform client and installation utilities specific for your bastion operating system.
    • Version 3.3.x
      wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable-4.6/openshift-client-linux.tar.gz -P /ocp-tools
      wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable-4.6/openshift-install-linux.tar.gz -P /ocp-tools
    • Version 3.4.x and later
      wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.14.15/openshift-client-linux.tar.gz -P /ocp-tools
      wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.14.15/openshift-install-linux.tar.gz -P /ocp-tools
  3. Issue the following commands.
    ls -la /ocp-tools
    cd /ocp-tools
    chmod 777 *
    tar xvf openshift-install-linux.tar.gz openshift-install
    tar xvf openshift-client-linux.tar.gz oc kubectl
    cp oc kubectl /usr/local/bin
    
    oc version
    kubectl version
    /ocp-tools/openshift-install version