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. If you are logging in to a trusted environment, you can use -k to skip SSL verification instead of --ca-cert CERT-PATH.

The following example command uses SSL validation:

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

The following example command skips SSL validation:

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