> For the complete documentation index, see [llms.txt](https://docs.opstreelabs.in/logging-operator/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.opstreelabs.in/logging-operator/installation/kubectl.md).

# Kubectl

A installation guide for "Logging Operator" inside Kubernetes cluster using kubectl command line tool.

If you are a beginner with Kubernetes and don't want to go in the complexity of Helm, you can use the beloved tool of Kubernetes client like`kubectl`.

#### Namespace Creation

Since we are going to use pre-baked manifests of Kubernetes in that case we need to setup the namespace with a specific name called "logging-operator".

```bash
kubectl create ns logging-operator
```

#### CRD Setup

So we have already pre-configured CRD in [config/crd](https://github.com/OT-CONTAINER-KIT/logging-operator/blob/master/config/crd) directory. We just have to run a magical `kubectl` commands.

```bash
kubectl apply -f config/crd/bases
```

#### RBAC Setup

Similar like CRD, we have pre-baked RBAC config files as well inside [config/rbac](https://github.com/OT-CONTAINER-KIT/logging-operator/blob/master/config/rbac) which can be installed and configured by `kubectl.`

```bash
kubectl apply -f config/rbac/
```

#### Operator Deployment

Once all the initial steps are done, we can create the deployment for "Logging Operator". The deployment manifests for the operator are present inside [config/manager/manager.yaml](https://github.com/OT-CONTAINER-KIT/logging-operator/blob/master/config/manager/manager.yaml) file.

```bash
kubectl apply -f config/manager/manager.yaml
```
