Skip to content

Latest commit

 

History

History
142 lines (99 loc) · 3.34 KB

02-client-tools.md

File metadata and controls

142 lines (99 loc) · 3.34 KB

Installing the Client Tools

In this lab you will install the command line utilities required to complete this tutorial: cfssl, cfssljson, and kubectl.

Install CFSSL

The cfssl and cfssljson command line utilities will be used to provision a PKI Infrastructure and generate TLS certificates.

Download and install cfssl and cfssljson from the cfssl repository:

OS X

OS X users may experience problems using the pre-built binaries in which case Homebrew might be a better option:

brew install cfssl

Linux

wget -q --show-progress --https-only --timestamping \
  https://github.com/cloudflare/cfssl/releases/download/v1.6.3/cfssl_1.6.3_linux_amd64 \
  https://github.com/cloudflare/cfssl/releases/download/v1.6.3/cfssljson_1.6.3_linux_amd64
chmod +x cfssl_1.6.3_linux_amd64 cfssljson_1.6.3_linux_amd64
sudo mv cfssl_1.6.3_linux_amd64 /usr/local/bin/cfssl
sudo mv cfssljson_1.6.3_linux_amd64 /usr/local/bin/cfssljson

Windows

For windows on 64 bit use powershell, using administrative rights

PS C:\Windows\system32>Invoke-WebRequest -Uri https://github.com/cloudflare/cfssl/releases/download/v1.6.3/cfssl_1.6.3_windows_amd64.exe -OutFile cfssl.exe
PS C:\Windows\system32>Invoke-WebRequest -Uri https://github.com/cloudflare/cfssl/releases/download/v1.6.3/cfssljson_1.6.3_windows_amd64.exe -OutFile cfssljson.exe

Verification

Verify cfssl version 1.6.3 or higher is installed:

cfssl version

If this step fails with a runtime error, try installing cfssl following instructions on CloudFlare's repository

output

Version: 1.6.3
Runtime: go1.19.2
cfssljson -version

output

Version: 1.6.3
Runtime: go1.19.2

Install kubectl

The kubectl command line utility is used to interact with the Kubernetes API Server. Download and install kubectl from the official release binaries:

OS X

brew install kubectl

Linux

curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl

Windows

Note you need to have chocolately package manager installed first (https://chocolatey.org/)

PS C:\Windows\system32>choco install kubernetes-cli

Verification

Verify kubectl version 1.26.3 or higher is installed:

kubectl version -oyaml --client

output

clientVersion:
  buildDate: "2023-03-15T13:33:11Z"
  compiler: gc
  gitCommit: 9e644106593f3f4aa98f8a84b23db5fa378900bd
  gitTreeState: clean
  gitVersion: v1.26.3
  goVersion: go1.19.7
  major: "1"
  minor: "26"
  platform: darwin/arm64
kustomizeVersion: v4.5.7

To quick check kubectl version, you can also use the following command :

 kubectl version -oyaml --client|awk '/gitVersion/{print $2;}'

output

v1.26.3

Next: Provisioning Compute Resources