# Kubectl

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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opstreelabs.in/logging-operator/installation/kubectl.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
