The Docker Enterprise CLI bundle 

Docker Enterprise makes it easy to manage access to your cluster. It gives you fine-grained access controls to resources in the cluster by generating a bundle (.zip file) consisting of your user certificates signed by the UCP certificate authority that was created when you installed UCP and scripts for connecting your Terminal to a remote cluster. The bundle's scripts support both Windows' PowerShell and Linux's Bash Terminal shell. Not only do these scripts connect you with the Docker Enterprise cluster daemon securely, they also give you access to the Kubernetes API running in the UCP cluster. Just make sure that you have port 6443 available to access the Kubernetes API.

The bundle can be downloaded in one of two ways. The first way is to log in to the web interface with the credentials that your system administrator has given you. Then, under your profile, you can generate a bundle and it will download the certificates and the scripts in a ZIP file to your local drive from the browser. Figure 17 shows the web interface method. Expand the admin menu and click My Profile. Then, choose Client Bundles | New Client BundleGenerate Client Bundle. Subsequently, a zip file will be downloaded through your browser. Unzip the contents of this file and move it to a directory that's easy to access from your shell:

Figure 17: Download UCP Client Bundle

Another way to get the command-line bundle without using the web interface is to use the Docker Enterprise API. The API requires that you generate a bearer token by passing your username and password to the API. The results of the call will be a token that you need to pass along with the header to subsequent API calls. So, in our case, we first generate our bearer token. Then, we use it to request our UCP CLI bundle file. This is a really handy way to access the API from either PowerShell or bash scripts: