ref: https://matthewpalmer.net/kubernetes-app-developer/articles/install-kubernetes-ubuntu-tutorial.html
NOTE: Make sure ‘virtualbox’ already installed!!!
Install kubectl
|
1 2 3 4 5 6 7 8 9 10 11 12 |
teddy@teddy:~$ curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - [sudo] password for teddy: OK teddy@teddy:~$ sudo touch /etc/apt/sources.list.d/kubernetes.list teddy@teddy:~$ echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list deb http://apt.kubernetes.io/ kubernetes-xenial main teddy@teddy:~$ sudo apt-get update teddy@teddy:~$ sudo apt-get install -y kubectl |
Install minikube (the newest 1.2.0) –> replace below ‘v0.28.2’ with ‘v1.2.0’!
|
1 2 3 4 |
teddy@teddy:~$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.28.2/minikube-linux-amd64 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 38.5M 100 38.5M 0 0 2308k 0 0:00:17 0:00:17 --:--:-- 2372k |
|
1 |
teddy@teddy:~$ sudo chmod +x minikube && sudo mv minikube /usr/local/bin/ |
We’re Done!
Now start up Minikube and use kubectl to find what version of Kubernetes you’re running on Ubuntu.
Minikube is a Kubernetes-specific package that runs a local development Kubernetes cluster on VirtualBox.
kubectl is the command line tool that lets you interact with your Minikube Kubernetes cluster.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
teddy@teddy:~$ minikube start There is a newer version of minikube available (v1.2.0). Download it here: https://github.com/kubernetes/minikube/releases/tag/v1.2.0 To disable this notification, run the following: minikube config set WantUpdateNotification false Starting local Kubernetes v1.10.0 cluster... Starting VM... Downloading Minikube ISO 160.27 MB / 160.27 MB [============================================] 100.00% 0s Getting VM IP address... Moving files into cluster... Downloading kubeadm v1.10.0 Downloading kubelet v1.10.0 Finished Downloading kubelet v1.10.0 Finished Downloading kubeadm v1.10.0 Setting up certs... Connecting to cluster... Setting up kubeconfig... Starting cluster components... Kubectl is now configured to use the cluster. Loading cached images from config file. |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
teddy@teddy:~$ kubectl api-versions admissionregistration.k8s.io/v1beta1 apiextensions.k8s.io/v1beta1 apiregistration.k8s.io/v1 apiregistration.k8s.io/v1beta1 apps/v1 apps/v1beta1 apps/v1beta2 authentication.k8s.io/v1 authentication.k8s.io/v1beta1 authorization.k8s.io/v1 authorization.k8s.io/v1beta1 autoscaling/v1 autoscaling/v2beta1 batch/v1 batch/v1beta1 certificates.k8s.io/v1beta1 events.k8s.io/v1beta1 extensions/v1beta1 networking.k8s.io/v1 policy/v1beta1 rbac.authorization.k8s.io/v1 rbac.authorization.k8s.io/v1beta1 storage.k8s.io/v1 storage.k8s.io/v1beta1 v1 |