> For the complete documentation index, see [llms.txt](https://kdongs.gitbook.io/kdocs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kdongs.gitbook.io/kdocs/kubernetes/basics-and-installation.md).

# Basics & Installation

## About

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

### [kubectl](https://kubernetes.io/docs/reference/kubectl/)

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](https://kubernetes.io/docs/reference/kubectl/kubectl/).

### [kubeadm](https://kubernetes.io/docs/reference/setup-tools/kubeadm/)

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.

### [Main components](https://kubernetes.io/docs/reference/kubernetes-api/)

## Installing

### [In Linux](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/)

#### Install Kubectl

Download the latest release binaries with `curl`:

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

Install it:

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

Test it:

```bash
kubectl version --client
```

#### Verify Kubectl configuration

In order for kubectl to find and access a Kubernetes cluster, it needs a [kubeconfig file](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/), which is created automatically when you create a cluster using [kube-up.sh](https://github.com/kubernetes/kubernetes/blob/master/cluster/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:

```bash
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`](https://kind.sigs.k8s.io/docs/user/quick-start/) or [`minikube`](https://minikube.sigs.k8s.io/docs/start/?arch=%2Fwindows%2Fx86-64%2Fstable%2F.exe+download).

#### [Install kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/)

Check the docs to install it.

## Access Kubernetes

### [Without kubectl](https://kubernetes.io/docs/reference/using-api/api-concepts/)

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

```bash
kubectl proxy --port 9000
```

Then you can hit those endpoints with `localhost:9000`.
