Difference between revisions of "Kubernetes/the-hard-way"

From Christoph's Personal Wiki
Jump to: navigation, search
(External links)
Line 1: Line 1:
 
This article will show how to setup '''Kubernetes The Hard Way''', as originally developed by [https://github.com/kelseyhightower Kelsey Hightower]. I will add my own additions, changes, alterations, etc. to the process (and this will be continually expanded upon).
 
This article will show how to setup '''Kubernetes The Hard Way''', as originally developed by [https://github.com/kelseyhightower Kelsey Hightower]. I will add my own additions, changes, alterations, etc. to the process (and this will be continually expanded upon).
 +
 +
==Install the client tools==
 +
 +
In this section, we will install the command line utilities required to complete this tutorial:
 +
* [https://github.com/cloudflare/cfssl cfssl]
 +
* [https://github.com/cloudflare/cfssl cfssljson]
 +
* [https://kubernetes.io/docs/tasks/tools/install-kubectl kubectl]
 +
 +
; Install CFSSL
 +
 +
The <tt>cfssl</tt> and <tt>cfssljson</tt> command line utilities will be used to provision a [https://en.wikipedia.org/wiki/Public_key_infrastructure PKI Infrastructure] and generate TLS certificates.
 +
 +
* Download and install <tt>cfssl</tt> and <tt>cfssljson</tt> from the [https://pkg.cfssl.org cfssl repository]:
 +
<pre>
 +
$ wget -q --show-progress --https-only --timestamping \
 +
    https://pkg.cfssl.org/R1.2/cfssl_linux-amd64 \
 +
    https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64
 +
 +
$ chmod +x cfssl_linux-amd64 cfssljson_linux-amd64
 +
$ sudo mv cfssl_linux-amd64 /usr/local/bin/cfssl
 +
$ sudo mv cfssljson_linux-amd64 /usr/local/bin/cfssljson
 +
</pre>
 +
 +
* Verify <tt>cfssl</tt> version 1.2.0 or higher is installed:
 +
 +
<pre>
 +
$ cfssl version
 +
Version: 1.2.0
 +
Revision: dev
 +
Runtime: go1.6
 +
</pre>
 +
 +
Note: The <tt>cfssljson</tt> command line utility does not provide a way to print its version.
 +
 +
; Install kubectl
 +
 +
The <tt>kubectl</tt> command line utility is used to interact with the Kubernetes API Server.
 +
 +
* Download and install <tt>kubectl</tt> from the official release binaries:
 +
$ K8S_VERSION=$(curl -s <nowiki>https://storage.googleapis.com/kubernetes-release/release/stable.txt</nowiki>)
 +
$ curl -LO <nowiki>https://storage.googleapis.com/kubernetes-release/release/${K8S_VERSION}/bin/linux/amd64/kubectl</nowiki>
 +
$ chmod +x kubectl
 +
$ sudo mv kubectl /usr/local/bin/
 +
 +
* Verify <tt>kubectl</tt> version 1.12.0 or higher is installed:
 +
 +
<pre>
 +
$ kubectl version --client
 +
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:40:16Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
 +
</pre>
  
 
==See also==
 
==See also==

Revision as of 23:39, 6 August 2019

This article will show how to setup Kubernetes The Hard Way, as originally developed by Kelsey Hightower. I will add my own additions, changes, alterations, etc. to the process (and this will be continually expanded upon).

Install the client tools

In this section, we will install the command line utilities required to complete this tutorial:

Install CFSSL

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

$ wget -q --show-progress --https-only --timestamping \
    https://pkg.cfssl.org/R1.2/cfssl_linux-amd64 \
    https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64

$ chmod +x cfssl_linux-amd64 cfssljson_linux-amd64
$ sudo mv cfssl_linux-amd64 /usr/local/bin/cfssl
$ sudo mv cfssljson_linux-amd64 /usr/local/bin/cfssljson
  • Verify cfssl version 1.2.0 or higher is installed:
$ cfssl version
Version: 1.2.0
Revision: dev
Runtime: go1.6

Note: The cfssljson command line utility does not provide a way to print its version.

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:
$ K8S_VERSION=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)
$ curl -LO https://storage.googleapis.com/kubernetes-release/release/${K8S_VERSION}/bin/linux/amd64/kubectl
$ chmod +x kubectl
$ sudo mv kubectl /usr/local/bin/
  • Verify kubectl version 1.12.0 or higher is installed:
$ kubectl version --client
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:40:16Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}

See also

External links