Install Kubectl and Helm Clients Directly on a HostΒΆ

As an alternative to using the container-backed Remote CLIs for kubectl and helm, you can install these commands directly on your remote host.

About this task

Kubectl and helm installed directly on the remote host provide the best CLI behaviour, especially for CLI commands that reference local files or require a shell.

The following procedure shows you how to configure the kubectl and kubectl clients directly on a remote host, for an admin user with cluster-admin clusterrole. If using a non-admin user with only role privileges within a private namespace, additional configuration is required in order to use helm.

Prerequisites

You need from your StarlingX administrator: a WAD or Local LDAP username and password to get the Kubernetes authentication token, the OAM IP and, optionally, the Kubernetes CA certificate of the target StarlingX environment.

You must have the oidc-auth-apps OIDC Identity Provider (dex) configured on the target StarlingX environment to get Kubernetes authentication tokens.

Procedure

  1. On the workstation, install the kubectl client, set up the Kubernetes configuration and get a token. Follow the steps of section Kubernetes Remote Client Access using the Host Directly at Configure Kubernetes Client Access, then test the kubectl access with the command below.

    % kubectl get pods -o wide
    NAME            READY STATUS RE-    AGE IP           NODE      NOMINA- READINESS
                                    STARTS                           TED NODE GATES
    nodeinfo-648f.. 1/1  Running   0    62d 172.16.38.83  worker-4 <none> <none>
    nodeinfo-648f.. 1/1  Running   0    62d 172.16.97.207 worker-3 <none> <none>
    nodeinfo-648f.. 1/1  Running   0    62d 172.16.203.14 worker-5 <none> <none>
    tiller-deploy.. 1/1  Running   0    27d 172.16.97.219 worker-3 <none> <none>
    
  2. On the workstation, install the helm client on an Ubuntu host by performing the following actions on the remote Ubuntu system.

    1. Install helm client.

      % wget https://get.helm.sh/helm-v2.13.1-linux-amd64.tar.gz
      % tar xvf helm-v2.13.1-linux-amd64.tar.gz
      % sudo cp linux-amd64/helm /usr/local/bin
      

      In order to use helm, additional configuration is required. For more information, see Configuring Remote Helm Client.

Related information