How to install Kubernetes

On Ubuntu 20.04 ? I have the tar.gz file downloaded. use this command ?

tar -xvzf kubernetes.tar.gz ?

The tar command will just unzip the files, it won’t do any kind of install.

What are you trying to achieve?
Setup Kubernetes locally for learning?
Setup a production cluster?
Something in between?

Kind regards,
Stephen

What do I run after I untar the file ?

I Have since installed it with apt.

And I installed kubectl and minikube.

Mainly wanted to know how to install it without apt

I’m guessing kubernetes.tar.gz was downloaded from the Github release page?
I’ve never used that method so I really can’t give specific details.
But it seems like the most manual method you can do and even allows you to compile the binaries yourself if you want.
I haven’t even found any tutorials for that method.

I was asking what you are trying to achieve so I could give better advice.

  • If you’re new to Kubernetes and want to try out the basics then minikube is great.
  • If you want to deploy a fully working cluster then installing using the apt repos is probably recommended.
  • If you want to compile or run very specific versions then maybe download direct from GitHub might be a good fit.

Kind regards,
Stephen

The only real tutorial that I know that covers it without any other tooling is Kubernetes the Hard Way from Kelsey Hightower.

In general though, as @stephendotcarter said its very dependent on what your goal is. If you want to use sort of the default upstream way of installing it, check out the docs on using kubeadm. It’s distribution neutral.