On our YouTube channel, we have released a video explaining Kubernetes by CTO @bunchan_k.
I am also studying with this video, but since the procedure for building the Kubernetes environment of Ubuntu was not described, I practiced it with reference to the official documents and summarized it.
You can either install the binaries or install them from your package manager. I decided to use the package manager (apt) to make it easier to update the version.
sudo apt-get update && sudo apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl
I haven't tried it, but it can be installed with snap.
https://kubernetes.io/ja/docs/tasks/tools/install-kubectl/
You need to install kubectl in advance.
Usually, you need a hypervisor environment that runs Kubernetes, such as KVM or VirtualBox.
Minikube also supports the --vm-driver = none option to run Kubernetes components on the host instead of the VM. You need Docker and a Linux environment to use this driver, but you don't need a hypervisor.
Since it is as above, Docker is also installed on my Ubuntu, so I will not use the hypervisor.
There are several methods, such as binary installation and package installation. In particular, it seemed easy to install from Linux Homebrew, so I will do it here.
The procedure is the same as for mac.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Leave it through the path.
echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >> /home/takaken/.bash_profile
brew install minikube
That's it!
I was able to build a Kubernetes environment for development on Ubuntu. If you are using another Linux distribution, you can build it by the same procedure if you read the package management.
From now on, I plan to study how to run Lavavel and Node apps on K8s by referring to the video.