# I want to convert this to kong ingress, what needs to be changed?

**URL:** <https://discuss.konghq.com/t/i-want-to-convert-this-to-kong-ingress-what-needs-to-be-changed/14062>\
**Category:** Questions\
**Tags:** kubernetes\
**Created:** [July 22, 2026, 1:52pm UTC](https://discuss.konghq.com/t/i-want-to-convert-this-to-kong-ingress-what-needs-to-be-changed/14062 "2026-07-22T13:52:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Efty](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/efty/32/5224_2.png) [@Efty](https://discuss.konghq.com/u/Efty)\
**Post date:** [July 22, 2026, 1:52pm UTC](https://discuss.konghq.com/t/i-want-to-convert-this-to-kong-ingress-what-needs-to-be-changed/14062/1 "2026-07-22T13:52:26Z")

</div>

```auto
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/cors-allow-headers: "*"
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
  name: test
  namespace: admin
spec:
  ingressClassName: kong-dmz
  rules:
  - host: admin-stg.europe.com
    http:
      paths:
      - backend:
          service:
            name: admin-app-service
            port:
              number: 80
        path: /login
        pathType: Prefix
      - backend:
          service:
            name: admin-app-service
            port:
              number: 80
        path: /_test/
        pathType: Prefix
      - backend:
          service:
            name: admin-app-service
            port:
              number: 80
        path: /
        pathType: Prefix
  tls:
  - hosts:
    - admin-stg.europe.com
    secretName: ssl-europe-com

```

Converted:

I added these annotations, is this correct?

```
konghq.com/preserve-host: "true"

konghq.com/strip-path: "false"

konghq.com/plugins: cors-global # i created the plugin

konghq.com/protocols: "http,https"

konghq.com/https-redirect-status-code: "308"

```

---

<div class="post-metadata">

**Author:** ![rick](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/rick/32/4446_2.png) [@rick](https://discuss.konghq.com/u/rick)\
**Post date:** [July 27, 2026, 1:51pm UTC](https://discuss.konghq.com/t/i-want-to-convert-this-to-kong-ingress-what-needs-to-be-changed/14062/2 "2026-07-27T13:51:16Z")

</div>

@Efty I passed your question through our documentation agent ([developer.konghq.com](http://developer.konghq.com)), please take a look and see if this addresses your question.

* * *

Good start! Here’s a review of your conversion from NGINX Ingress annotations to Kong Ingress Controller annotations:

## What you got right ✅

- **`konghq.com/preserve-host: "true"`** — correct replacement for NGINX’s default host preservation behavior.
- **`konghq.com/strip-path: "false"`** — valid annotation, though `"false"` is the default behavior. [[strip-path annotation](https://developer.konghq.com/kubernetes-ingress-controller/reference/annotations/#konghq-com-strip-path)]
- **`konghq.com/plugins: cors-global`** — correct way to attach a KongPlugin resource for CORS. [[plugins annotation](https://developer.konghq.com/kubernetes-ingress-controller/reference/annotations/#konghq-com-plugins)]
- **`konghq.com/https-redirect-status-code: "308"`** — valid value (acceptable values are 301, 302, 307, 308, 426). [[https-redirect-status-code](https://developer.konghq.com/kubernetes-ingress-controller/reference/annotations/#konghq-com-https-redirect-status-code)]

## What needs fixing ⚠

### 1. SSL redirect protocol

The NGINX annotation `nginx.ingress.kubernetes.io/ssl-redirect: "true"` forces HTTPS-only traffic. In Kong, this is done by setting:

```auto
konghq.com/protocols: "https"

```

Setting `konghq.com/protocols: "http,https"` allows **both** HTTP and HTTPS, which does **not** enforce a redirect. To actually redirect HTTP to HTTPS (like the NGINX annotation does), you need `"https"` only. [[configure HTTPS redirect](https://developer.konghq.com/kubernetes-ingress-controller/routing/http-to-https/#configure-an-https-redirect)]

### 2. CORS headers annotation

The NGINX annotation `nginx.ingress.kubernetes.io/cors-allow-headers: "*"` configures CORS at the ingress controller level. In Kong, CORS is handled entirely by the **CORS KongPlugin** resource you create — the plugin’s `config` (e.g., `headers`, `origins`, `methods`) is where you set those values. There is no direct annotation equivalent for CORS header configuration. Make sure your `cors-global` KongPlugin resource has the correct `config` fields set.

## Corrected annotation block

```auto
metadata:
  annotations:
    kubernetes.io/ingress.class: kong-dmz # or use ingressClassName in spec (you already have it)
    konghq.com/protocols: "https" # enforces HTTPS redirect
    konghq.com/https-redirect-status-code: "308"
    konghq.com/preserve-host: "true"
    konghq.com/strip-path: "false"
    konghq.com/plugins: cors-global

```

> **Note:** Since you’re already using `ingressClassName: kong-dmz` in the spec, the `kubernetes.io/ingress.class` annotation may be redundant, but it’s worth keeping for compatibility depending on your KIC version. [[ingress class annotation](https://developer.konghq.com/kubernetes-ingress-controller/reference/annotations/#ingress-annotations)]
