LATEST VERSION: v1.1 - RELEASE NOTES
Pivotal Container Service v1.0

Installing the PKS CLI

Page last updated:

This topic describes how to install the Pivotal Container Service Command Line Interface (PKS CLI).

To install the PKS CLI, follow the procedures for your operating system to download the PKS CLI from Pivotal Network. Binaries are only provided for 64-bit architectures.

Mac OS X

  1. Navigate to Pivotal Network and log in.
  2. Click Pivotal Container Service (PKS).
  3. Click PKS CLI.
  4. Click PKS CLI - Mac to download the Mac OS X binary.
  5. Rename the downloaded binary to pks.
  6. On the command line, run the following command to make the PKS binary executable:
    $ chmod +x pks
  7. Move the binary into your PATH.

    For example:
    $ mv pks /usr/local/bin/pks

Linux

  1. Navigate to Pivotal Network and log in.
  2. Click Pivotal Container Service (PKS).
  3. Click PKS CLI.
  4. Click PKS CLI - Linux to download the Linux binary.
  5. Rename the downloaded binary to pks.
  6. On the command line, run the following command to make the PKS binary executable:
    $ chmod +x pks
  7. Move the binary into your PATH.

    For example:
    $ mv pks /usr/local/bin/pks

Windows

  1. Navigate to Pivotal Network and log in.
  2. Click Pivotal Container Service (PKS).
  3. Click PKS CLI.
  4. Click PKS CLI - Windows to download the Windows executable file.
  5. Rename the downloaded binary to pks.exe.
  6. Move the binary into your PATH.

Log in to PKS CLI

On the command line, run the following command to log in to the PKS CLI:

pks login -a PKS_API -u USERNAME -p PASSWORD --ca-cert CERT-PATH

Replace the placeholder values in the command as follows:

  • PKS_API is the domain name you entered in Ops Manager > Pivotal Container Service > UAA > UAA URL. For example, api.pks.example.com.
  • USERNAME and PASSWORD belong to the account you created in the Grant Cluster Access to a User step in Manage Users in UAA.
  • CERT-PATH is the path to your root CA certificate. Provide the certificate to validate the PKS API certificate with SSL.

    For example:

    $ pks login -a api.pks.example.com -u alana \
    --ca-cert /var/tempest/workspaces/default/root_ca_certificate
    

    If you are logging in to a trusted environment, you can use -k to skip SSL verification instead of --ca-cert CERT-PATH.

    For example:

    $ pks login -a api.pks.example.com -u alana -k
    

Upon successful login, the PKS CLI generates a creds.yml file containing the API endpoint, CA certificate (if applicable), refresh token, and access token.

By default, creds.yml is saved in the ~/.pks directory. You can use the PKS_HOME environment variable to override this location and use creds.yml from any directory.


Please send any feedback you have to pks-feedback@pivotal.io.

Create a pull request or raise an issue on the source for this page in GitHub