# Install Ingress nginx

## Create namespace & vpc

To install Ingress on nginx first, you need to create a namespace and a vpc.

```bash
kubectl create ns ingress-nginx
```

Next, create a YAML file named **cvpc-ingress-nginx**.

```bash
nano cvpc-ingress-nginx.yaml
```

Copy and paste the following YAML contents

```yaml
apiVersion: tenants.cloudeka.ai/v1alpha2
kind: CloudekaVPC
metadata:
  name: ingress-nginx
  namespace: ingress-nginx
spec:
  isolate: false
```

After pasting the syntax, save the file by pressing Ctrl + O, then press the Enter key and exit the editor by pressing Ctrl + X. The next step is to apply this configuration.

```bash
kubectl apply -f cvpc-ingress-nginx.yaml
```

## Add the Helm Repository

Add a Helm repository by running the following command.

```bash
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx --force-update
```

Create values.yaml file from the helm repository

```bash
helm show values ingress-nginx --repo ingress-nginx/ingress-nginx > values.yaml
```

Modify values.yaml file.

```bash
nano values.yaml
```

Set resources ingress controller.

```yaml
controller:
  resources:
    limits:
      cpu: 1
      memory: 1Gi
    requests:
      cpu: 1
      memory: 1Gi
```

Set resources create secret job.

```yaml
controller:
  admissionwebhooks:
    createSecretJob:
      resources:
        limits:
          cpu: 1
          memory: 1Gi
        requests:
          cpu: 1
          memory: 1Gi
```

Set resources patch webhook job.

```yaml
controller:
  admissionwebhooks:
    patchWebhookJob:
      resources:
        limits:
          cpu: 1
          memory: 1Gi
        requests:
          cpu: 1
          memory: 1Gi
```

Deploy ingress nginx.

```bash
helm install ingress-nginx ingress-nginx/ingress-nginx --namespace ingress-nginx --values values.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.cloudeka.ai/deka-gpu/deka-gpu-service/ingress/install-ingress-nginx.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.
