Kubernetes

About

Kubernetes is an open source container orchestration engine for automating deployment, scaling, and management of containerized applications.

The Kubernetes command-line tool, kubectl, allows you to run commands against Kubernetes clusters.

You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs. (Local or Remote clusters)

Here are some commands.

Kubeadm is a tool built to provide kubeadm init and kubeadm join as best-practice "fast paths" for creating Kubernetes clusters.

By design, it cares only about bootstrapping, not about provisioning machines.

Installing

Install Kubectl

Download the latest release binaries with curl:

curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"

Install it:

sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

Test it:

kubectl version --client

Verify Kubectl configuration

In order for kubectl to find and access a Kubernetes cluster, it needs a kubeconfig file, which is created automatically when you create a cluster using kube-up.sh or successfully deploy a Minikube cluster.

By default, kubectl configuration is located at ~/.kube/config.

Check that kubectl is properly configured by getting the cluster state:

kubectl cluster-info

If you see a URL response, kubectl is correctly configured to access your cluster.

Install Kind or minikube

To run Kubernetes locally on you computer, you may use Kind or minikube.

Check the docs to install it.

Access Kubernetes

Run a proxy to have access to Kubernetes API, and execute all the commands that you can execute with kubectl.

kubectl proxy --port 9000

Then you can hit those endpoints with localhost:9000.

Last updated