# Configure Ingress to the Admin Console on an Existing Cluster

**URL:** <https://community.replicated.com/t/configure-ingress-to-the-admin-console-on-an-existing-cluster/1273>\
**Category:** How do I?\
**Tags:** kots\
**Created:** [August 8, 2023, 2:50pm UTC](https://community.replicated.com/t/configure-ingress-to-the-admin-console-on-an-existing-cluster/1273 "2023-08-08T14:50:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![craig](https://avatars.discourse-cdn.com/v4/letter/c/ed8c4c/32.png) [@craig](https://community.replicated.com/u/craig)\
**Post date:** [August 8, 2023, 2:50pm UTC](https://community.replicated.com/t/configure-ingress-to-the-admin-console-on-an-existing-cluster/1273/1 "2023-08-08T14:50:37Z")

</div>

I’ve installed the admin console to an existing Kubernetes cluster, and can access it via the port-forward that is created by the `kubectl kots admin-console` cli command. This works for the initial setup, but I would like to provide more permanent access to the admin console so that I don’t have to start a port-forward each time. How should I go about this?

---

<div class="post-metadata">

**Author:** ![craig](https://avatars.discourse-cdn.com/v4/letter/c/ed8c4c/32.png) [@craig](https://community.replicated.com/u/craig)\
**Post date:** [August 8, 2023, 2:58pm UTC](https://community.replicated.com/t/configure-ingress-to-the-admin-console-on-an-existing-cluster/1273/2 "2023-08-08T14:58:11Z")

</div>

You can leverage Kubernetes [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress) to route traffic from outside of the cluster to services within the cluster.

Here’s an example of how you might do that for the admin console:

```auto
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: kotsadm
spec:
  rules:
  - host: 'admin.example.com'
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: kotsadm
            port:
              number: 3000

```

This configuration uses [name based virtual hosting](https://kubernetes.io/docs/concepts/services-networking/ingress/#name-based-virtual-hosting) to route HTTP traffic bound for `admin.example.com` to the `kotsadm` service that is running within the cluster.

_Note, `admin.example.com` must resolve to the load balancer IP address for users accessing the admin console._

If you need to test the ingress configuration prior to setting up DNS, you can run:

```auto
curl --resolve admin.example.com:80:<load-balancer-ip> http://admin.example.com/

```
