> ## Documentation Index
> Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Nginx Ingress Controller

To start using the controller, you need to apply an Ingress manifest.

1\. Create a YAML file to create an Ingress object:

```yml theme={null}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: example
  namespace: foo
spec:
  ingressClassName: nginx
  rules:
    - http:
        paths:
          - pathType: Prefix
            backend:
              service:
                name: exampleService
                port:
                  number: 80
            path: /
```

Enter your custom values instead:

* hello-world-ingress: Name of the Ingress object
* nginx: Name of ingressClassResource
* /: Default URL path
* hello-world-svc: Name of the Service that will manage the requests
* 80: Port of the Service that will manage the requests

2\. Run the kubectl command.

```sh theme={null}
kubectl apply -f <name of the created YAML-file>
```

You'll get the output:

```sh theme={null}
Ingress/<name of the created ingress object> created
```

This means you've successfully created and applied an Ingress object for the nginx Ingress Controller.
