# Create Ingress with TLS

## Create certificate

Create a YAML file certificate-test-dekagpu.

```bash
nano certificate-test-dekagpu.yaml
```

Copy and paste the following YAML contents.

```yaml
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: test-dekagpu-tls
  namespace: default
spec:
  dnsNames:
    - test-dekagpu.cloudeka.id
  issuerRef:
    kind: ClusterIssuer
    name: letsencrypt-prod
  secretName: test-dekagpu-tls
```

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 configuration

```bash
kubectl apply -f certificate-test-dekagpu.yaml
```

## Create ingress

Create a YAML file ingress-test-dekagpu.

```bash
nano ingress-test-dekagpu.yaml
```

Copy and paste the following YAML contents.

```yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-test-dekagpu
  namespace: default
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  ingressClassName: nginx
  rules:
    - host: test-dekagpu.cloudeka.id
      http:
        paths:
          - path: /
            pathType: ImplementationSpecific
            backend:
              service:
                name: svc-test-dekagpu
                port:
                  number: 80
  tls:
    - hosts:
        - test-dekagpu.cloudeka.id
      secretName: test-dekagpu-tls
```

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 configuration.

```bash
kubectl apply -f ingress-test-dekagpu.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/create-ingress-with-tls.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.
