1.4 - Lab 1 - Setting Up a Bootstrap Machine¶
Verify the Installation of Docker¶
sudo systemctl status docker- Output should beActive (running)- Run a docker command e.g.
docker ps
Install Kubectl CLI¶
- Donwload kubectl from the appropriate source
- Unzip:
gunzip <kubectl zip file> - Install to
/bindirectory:sudo install kubectl-linux-v1.20.5-vmware.1 /usr/local/bin/kubectl - Verify installation:
kubectl version --short --client=true
Enable Kubernetes AutoComplete¶
-
Run the following command to insert the Kubernetes CLI autocompletion data into the .bash_profile file.
echo 'source <(kubectl completion bash)' >> ~/.bash_profileAutocompletion will be enabled when a new terminal is opened.
-
Close the terminal window.
- Reopen the terminal window.
-
Enter the
kubectlcommand and press the Tab key twice.kubectlThe autocompletion displays the available kubectl options.
Use the Tab Tab keystroke sequence, in future labs, to reduce the amount of commands that you need to enter.
Install the Tanzu CLI¶
-
Using the terminal, navigate to the
Downloadsdirectory.cd ~/Downloads -
Unzip the tanzu CLI.
tar -xvf tanzu-cli-bundle-v1.3.1-linux-amd64.tar -
Install the Tanzu CLI to the
Bindirectory.sudo install cli/core/v1.3.1/tanzu-core-linux_amd64 /usr/local/bin/tanzu -
Display the Tanzu CLI version to ensure that the installation was successful.
tanzu versionThe output displays the version number.
Install the Tanzu CLI Plugins¶
-
Using the terminal, navigate to the
Downloadsdirectory.cd ~/Downloads -
Display the installed plug-ins.
tanzu plugin listThe STATUS column displays
not installed. -
Install the Tanzu CLI plug-in from a local
CLIsubdirectory.tanzu plugin install all --local cli -
Display the installed plug-ins.
tanzu plugin listThe STATUS column for each plug-in, except for alpha, displays
installed. -
Run the Tanzu CLI to view the new options.
tanzu --helpThe cluster, kubernetes-release, management-cluster, and login commands display.
Enable Tanzu CLI Autocomplete¶
-
Run the following command to insert the Tanzu CLI autocompletion data into the .bash_profile file.
echo 'source <(tanzu completion bash)' >> ~/.bash_profileAutocompletion will be enabled when a new terminal is opened.
-
Close the terminal window.
- Reopen the terminal window.
-
Enter the
tanzucommand and then press the Tab key twice.tanzuAutocompletion displays the available
tanzuoptions.Use the Tab Tab keystroke sequence in future labs to reduce the amount of commands that you need to enter.
Install the Carvel Tools¶
-
Using the terminal, navigate to the
Downloadsdirectory.cd ~/Downloads -
List the tools.
ls -l cli/*.gzTools imgpkg, kapp, kbld, vendir, and ytt display.
-
Run the following script to unzip and install the tools.
./install-carvel.shThe version of each tool displays.
-
Using the terminal, navigate to the
Downloadsdirectory.cd ~/Downloads -
List the tools.
ls -l cli/*.gzTools imgpkg, kapp, kbld, vendir, and ytt display.
-
Run the following script to unzip and install the tools.
./install-carvel.shThe version of each tool displays.