# Configuration Examples

Both API7 and APISIX Ingress Controller support [Ingress resources and Gateway API](https://docs.api7.ai/ingress-controller/reference/ingress-and-gateway-api-support.md) for traffic management in Kubernetes. While both are supported, the Gateway API provides greater flexibility and extensibility. New users are encouraged to adopt Gateway API for future deployments.

In addition to these standard Kubernetes APIs, the Ingress Controller also supports a set of [CRDs (Custom Resource Definitions)](https://docs.api7.ai/ingress-controller/reference/crd-reference.md) designed specifically for APISIX-native functionality.

This document provides examples of common configurations covering how and when to use these resources. You should adjust custom values such as namespaces, route URIs, and credentials to match your environment.

## Configure CP Endpoint and Admin Key[​](#configure-cp-endpoint-and-admin-key "Direct link to Configure CP Endpoint and Admin Key")

To update the Control Plane endpoint and admin key for connectivity between the Ingress Controller and Control Plane at runtime:

```
apiVersion: apisix.apache.org/v1alpha1

kind: GatewayProxy

metadata:

  namespace: aic

  name: apisix-config

spec:

  provider:

    type: ControlPlane

    controlPlane:

      endpoints:

      - http://127.0.0.1:9180

      auth:

        type: AdminKey

        adminKey:

          value: replace-with-your-admin-key
```

## Trust a Private Control Plane CA[​](#trust-a-private-control-plane-ca "Direct link to Trust a Private Control Plane CA")

API7 Ingress Controller 2.2.1 can verify a control-plane certificate issued by a private or self-signed certificate authority. APISIX Ingress Controller 2.2.0 does not include the `caCert` field.

Set `tlsVerify` to `true` and provide the PEM-encoded certificate authority bundle in the `GatewayProxy`:

```
apiVersion: apisix.apache.org/v1alpha1

kind: GatewayProxy

metadata:

  namespace: aic

  name: api7-config

spec:

  provider:

    type: ControlPlane

    controlPlane:

      endpoints:

      - https://api7-control-plane.example.com

      tlsVerify: true

      caCert:

        value: |

          -----BEGIN CERTIFICATE-----

          REPLACE_WITH_BASE64_ENCODED_CA_CERTIFICATE

          -----END CERTIFICATE-----

      auth:

        type: AdminKey

        adminKey:

          valueFrom:

            secretKeyRef:

              name: api7-admin-key

              key: token
```

The example references an existing `api7-admin-key` Secret in the same namespace with the Admin API key stored under `token`. The custom CA bundle replaces the system trust store for this connection. The controller rejects invalid PEM certificate data. When `tlsVerify` is `false`, `caCert` has no effect.

## Define Controller and Gateway[​](#define-controller-and-gateway "Direct link to Define Controller and Gateway")

To specify the controller responsible for handling resources before applying further configurations:

* Gateway API
* Ingress
* APISIX CRD

```
apiVersion: gateway.networking.k8s.io/v1

kind: GatewayClass

metadata:

  name: apisix

spec:

  controllerName: "apisix.apache.org/apisix-ingress-controller"

---

apiVersion: gateway.networking.k8s.io/v1

kind: Gateway

metadata:

  namespace: aic

  name: apisix

spec:

  gatewayClassName: apisix

  listeners:

  - name: http

    protocol: HTTP

    port: 80

  infrastructure:

    parametersRef:

      group: apisix.apache.org

      kind: GatewayProxy

      name: apisix-config
```

❶ The controller name should be customized if you are running multiple distinct instances of the Controller in the same cluster (not a single instance with multiple replicas). Each ingress controller instance must use a unique controller name in its [configuration file](https://docs.api7.ai/ingress-controller/reference/configuration-file.md), and the corresponding GatewayClass should reference that value.

❷ API group of the referenced resource.

❸ Kind of the referenced resource.

❹ Name of the referenced resource. Should match the `metadata.name` of the GatewayProxy resource.

The `port` selects the Gateway listener but does not open a data-plane port. See [Configuration File](https://docs.api7.ai/ingress-controller/reference/configuration-file.md) for optional physical-port matching.

```
apiVersion: networking.k8s.io/v1

kind: IngressClass

metadata:

  name: apisix

spec:

  controller: apisix.apache.org/apisix-ingress-controller

  parameters:

    apiGroup: apisix.apache.org

    kind: GatewayProxy

    name: apisix-config

    namespace: aic

    scope: Namespace
```

❶ The controller name should be customized if you are running multiple distinct instances of the Controller in the same cluster (not a single instance with multiple replicas). Each ingress controller instance must use a unique controller name in its [configuration file](https://docs.api7.ai/ingress-controller/reference/configuration-file.md), and the corresponding IngressClass should reference that value.

❷ API group of the referenced resource.

❸ Kind of the referenced resource.

❹ Name of the referenced resource. Should match the `metadata.name` of the GatewayProxy resource.

❺ Namespace where the referenced resource is defined.

❻ Scope of the referenced resource.

```
apiVersion: networking.k8s.io/v1

kind: IngressClass

metadata:

  name: apisix

spec:

  controller: apisix.apache.org/apisix-ingress-controller

  parameters:

    apiGroup: apisix.apache.org

    kind: GatewayProxy

    name: apisix-config

    namespace: aic

    scope: Namespace
```

❶ The controller name should be customized if you are running multiple distinct instances of the Controller in the same cluster (not a single instance with multiple replicas). Each ingress controller instance must use a unique controller name in its [configuration file](https://docs.api7.ai/ingress-controller/reference/configuration-file.md), and the corresponding IngressClass should reference that value.

❷ API group of the referenced resource.

❸ Kind of the referenced resource.

❹ Name of the referenced resource. Should match the `metadata.name` of the GatewayProxy resource.

❺ Namespace where the referenced resource is defined.

❻ Scope of the referenced resource.

## Route to K8s Services[​](#route-to-k8s-services "Direct link to Route to K8s Services")

To create a route that proxies requests to a service on K8s:

* Gateway API
* Ingress
* APISIX CRD

```
apiVersion: gateway.networking.k8s.io/v1

kind: HTTPRoute

metadata:

  namespace: aic

  name: httpbin

spec:

  parentRefs:

  - name: apisix

  rules:

  - matches:

    - path:

        type: Exact

        value: /ip

    backendRefs:

    - name: httpbin

      port: 80
```

```
apiVersion: networking.k8s.io/v1

kind: Ingress

metadata:

  namespace: aic

  name: httpbin

spec:

  ingressClassName: apisix

  rules:

  - http:

      paths:

      - path: /ip

        pathType: Exact

        backend:

          service:

            name: httpbin

            port:

              number: 80
```

```
apiVersion: apisix.apache.org/v2

kind: ApisixRoute

metadata:

  namespace: aic

  name: httpbin

spec:

  ingressClassName: apisix

  http:

  - name: httpbin

    match:

      paths:

      - /ip

    backends:

    - serviceName: httpbin

      servicePort: 80
```

## Route to External Services[​](#route-to-external-services "Direct link to Route to External Services")

To create a route that proxies requests to a service publicly hosted:

* Gateway API
* Ingress
* APISIX CRD

```
apiVersion: v1

kind: Service

metadata:

  namespace: aic

  name: httpbin-external-domain

spec:

  type: ExternalName

  externalName: httpbin.org

---

apiVersion: gateway.networking.k8s.io/v1

kind: HTTPRoute

metadata:

  namespace: aic

  name: get-ip

spec:

  parentRefs:

  - name: apisix

  rules:

  - matches:

    - path:

        type: Exact

        value: /ip

    backendRefs:

    - name: httpbin-external-domain

      port: 80
```

```
apiVersion: v1

kind: Service

metadata:

  namespace: aic

  name: httpbin-external-domain

spec:

  type: ExternalName

  externalName: httpbin.org

---

apiVersion: networking.k8s.io/v1

kind: Ingress

metadata:

  namespace: aic

  name: get-ip

spec:

  ingressClassName: apisix

  rules:

  - http:

      paths:

      - path: /ip

        pathType: Exact

        backend:

          service:

            name: httpbin-external-domain

            port:

              number: 80
```

```
apiVersion: apisix.apache.org/v2

kind: ApisixUpstream

metadata:

  namespace: aic

  name: httpbin-external-domain

spec:

  ingressClassName: apisix

  externalNodes:

  - type: Domain

    name: httpbin.org

---

apiVersion: apisix.apache.org/v2

kind: ApisixRoute

metadata:

  namespace: aic

  name: get-ip

spec:

  ingressClassName: apisix

  http:

    - name: get-ip

      match:

        paths:

          - /ip

      upstreams:

      - name: httpbin-external-domain
```

## Configure Weighted Services[​](#configure-weighted-services "Direct link to Configure Weighted Services")

To create a route that proxies traffic to upstream services by weight:

* Gateway API
* APISIX CRD

```
apiVersion: gateway.networking.k8s.io/v1

kind: HTTPRoute

metadata:

  namespace: aic

  name: httpbin

spec:

  parentRefs:

  - name: apisix

  rules:

  - matches:

    - path:

        type: Exact

        value: /ip

    backendRefs:

    - name: httpbin-1

      port: 80

      weight: 3

    - name: httpbin-2

      port: 80

      weight: 7
```

```
apiVersion: apisix.apache.org/v2

kind: ApisixRoute

metadata:

  namespace: aic

  name: httpbin

spec:

  ingressClassName: apisix

  http:

  - name: httpbin

    match:

      paths:

      - /ip

    backends:

    - serviceName: httpbin-1

      servicePort: 80

      weight: 3

    - serviceName: httpbin-2

      servicePort: 80

      weight: 7
```

This configuration is not supported by the Ingress resource.

## Configure Upstream[​](#configure-upstream "Direct link to Configure Upstream")

To configure upstream related configurations, including load balancing algorithm, how the host header is passed to upstream, service timeout, and more:

* Gateway API
* APISIX CRD

```
apiVersion: apisix.apache.org/v1alpha1

kind: BackendTrafficPolicy

metadata:

  namespace: aic

  name: httpbin

spec:

  targetRefs:

  - name: httpbin

    kind: Service

    group: ""

  timeout:

    send: 10s

    read: 10s

    connect: 10s

  scheme: http

  retries: 10

  healthCheck:

    active:

      type: http

      httpPath: /status/200

      healthy:

        interval: 2s

        successes: 1

        httpCodes:

        - 200

      unhealthy:

        interval: 1s

        timeouts: 3

        httpFailures: 3

        httpCodes:

        - 500

  loadbalancer:

    type: roundrobin

  passHost: rewrite

  upstreamHost: httpbin.example.com
```

```
apiVersion: apisix.apache.org/v2

kind: ApisixUpstream

metadata:

  namespace: aic

  name: httpbin

spec:

  ingressClassName: apisix

  timeout:

    send: 10s

    read: 10s

    connect: 10s

  scheme: http

  retries: 10

  loadbalancer:

    type: roundrobin

  passHost: rewrite

  upstreamHost: httpbin.example.com
```

## Configure Port Level Upstream Settings[​](#configure-port-level-upstream-settings "Direct link to Configure Port Level Upstream Settings")

`PortLevelSettings` in `ApisixUpstream` lets you define protocol-specific configuration per port. This is useful for services that expose multiple protocols on different ports or require port-level customization such as timeouts, load balancing, or TLS settings.

info

`PortLevelSettings` is supported only in APISIX CRDs. When using the Gateway API, configure upstream behavior with `BackendTrafficPolicy`. The controller can target a named Service port with `targetRefs[].sectionName`. `BackendTrafficPolicy` does not provide the `PortLevelSettings` structure used by `ApisixUpstream`.

Suppose you have a Service with multiple ports, where `8443` serves as the custom HTTPS port:

```
apiVersion: v1

kind: Service

metadata:

  namespace: aic

  name: httpbin

spec:

  selector:

    app: httpbin

  ports:

    - name: http

      port: 80

      targetPort: 80

    - name: https-custom

      port: 8443

      targetPort: 8443
```

To configure port-specific settings, create an `ApisixUpstream` with `PortLevelSettings` as such:

```
apiVersion: apisix.apache.org/v2

kind: ApisixUpstream

metadata:

  namespace: aic

  name: httpbin

spec:

  ingressClassName: apisix

  loadbalancer:        # Upstream default settings

    type: roundrobin

  timeout:

    connect: 6s

    send: 6s

    read: 6s

  retries: 3

  portLevelSettings:

    - port: 8443       # Match the Service HTTPS port

      scheme: https    # Enforce HTTPS scheme for this port

      timeout:         # Configure port-specific timeout

        connect: 10s

        send: 10s

        read: 10s

    - port: 80         # Match the Service HTTP port

      scheme: http     # Enforce HTTP scheme for this port

                       # Use other upstream default settings
```

Finally, create an `ApisixRoute` that references the Service:

```
apiVersion: apisix.apache.org/v2

kind: ApisixRoute

metadata:

  namespace: aic

  name: httpbin

spec:

  ingressClassName: apisix

  http:

  - name: httpbin

    match:

      paths:

      - /anything

    backends:

    - serviceName: httpbin

      servicePort: 8443    # This will enforce HTTPS scheme and other associated upstream settings
```

## Configure Consumer and Credentials[​](#configure-consumer-and-credentials "Direct link to Configure Consumer and Credentials")

* Gateway API
* APISIX CRD

To create a consumer and configure the authentication credentials directly on the consumer:

```
apiVersion: apisix.apache.org/v1alpha1

kind: Consumer

metadata:

  namespace: aic

  name: alice

spec:

  gatewayRef:

    name: apisix

  credentials:

    - type: key-auth

      name: primary-key

      config:

        key: alice-primary-key
```

You can also use a Secret resource, where the credential should be base64 encoded:

```
apiVersion: v1

kind: Secret

metadata:

  namespace: aic

  name: key-auth-primary

data:

  key: YWxpY2UtcHJpbWFyeS1rZXk=

---

apiVersion: apisix.apache.org/v1alpha1

kind: Consumer

metadata:

  namespace: aic

  name: alice

spec:

  gatewayRef:

    name: apisix

  credentials:

    - type: key-auth

      name: key-auth-primary

      secretRef:

        name: key-auth-primary
```

To create a consumer and configure the authentication credentials directly on the consumer:

```
apiVersion: apisix.apache.org/v2

kind: ApisixConsumer

metadata:

  namespace: aic

  name: alice

spec:

  ingressClassName: apisix

  authParameter:

    keyAuth:

      value:

        key: alice-primary-key
```

You can also use a Secret resource, where the credential should be base64 encoded:

```
apiVersion: v1

kind: Secret

metadata:

  namespace: aic

  name: key-auth-primary

data:

  key: YWxpY2UtcHJpbWFyeS1rZXk=

---

apiVersion: apisix.apache.org/v2

kind: ApisixConsumer

metadata:

  namespace: aic

  name: alice

spec:

  ingressClassName: apisix

  authParameter:

    keyAuth:

      secretRef:

        name: key-auth-primary
```

## Configure Plugin on Consumer[​](#configure-plugin-on-consumer "Direct link to Configure Plugin on Consumer")

### Authentication Plugins[​](#authentication-plugins "Direct link to Authentication Plugins")

* Gateway API
* APISIX CRD

The `credentials` field supports four authentication plugins, including `key-auth`, `basic-auth`, `jwt-auth`, and `hmac-auth`. For instance:

```
apiVersion: apisix.apache.org/v1alpha1

kind: Consumer

metadata:

  namespace: aic

  name: alice

spec:

  gatewayRef:

    name: apisix

  credentials:

    - type: key-auth

      name: alice-key

      config:

        key: alice-key
```

The `authParameter` field supports six authentication types, including `keyAuth`, `basicAuth`, `jwtAuth`, `hmacAuth`, `ldapAuth`, and `wolfRBAC`. For instance:

consumer.yaml

```
apiVersion: apisix.apache.org/v2

kind: ApisixConsumer

metadata:

  namespace: aic

  name: alice

spec:

  ingressClassName: apisix

  authParameter:

    keyAuth:

      value:

        key: alice-key
```

### Other Plugins[​](#other-plugins "Direct link to Other Plugins")

* Gateway API
* APISIX CRD

The following example applies the `limit-count` plugin to a consumer:

```
apiVersion: apisix.apache.org/v1alpha1

kind: Consumer

metadata:

  namespace: aic

  name: alice

spec:

  gatewayRef:

    name: apisix

  credentials:

    - type: key-auth

      name: alice-key

      config:

        key: alice-key

  plugins:

    - name: limit-count

      config:

        count: 3

        time_window: 60

        key: remote_addr

        key_type: var

        policy: local

        rejected_code: 429

        rejected_msg: Too many requests

        show_limit_quota_header: true

        allow_degradation: false
```

The following example applies the `limit-count` plugin to an `ApisixConsumer`:

```
apiVersion: apisix.apache.org/v2

kind: ApisixConsumer

metadata:

  namespace: aic

  name: alice

spec:

  ingressClassName: apisix

  authParameter:

    keyAuth:

      value:

        key: alice-key

  plugins:

    - name: limit-count

      config:

        count: 3

        time_window: 60

        key: remote_addr

        key_type: var

        policy: local

        rejected_code: 429

        rejected_msg: Too many requests

        show_limit_quota_header: true

        allow_degradation: false
```

## Configure Route Priority and Matching Conditions[​](#configure-route-priority-and-matching-conditions "Direct link to Configure Route Priority and Matching Conditions")

To configure route priority and request matching conditions on a targeted route:

* Gateway API
* APISIX CRD

```
apiVersion: apisix.apache.org/v1alpha1

kind: HTTPRoutePolicy

metadata:

  namespace: aic

  name: http-route-policy

spec:

  targetRefs:

  - group: gateway.networking.k8s.io

    kind: HTTPRoute

    name: httpbin

  priority: 10

  vars:

  - - http_x_test_name

    - ==

    - new_name

  - - arg_test

    - ==

    - test_name
```

```
apiVersion: apisix.apache.org/v2

kind: ApisixRoute

metadata:

  namespace: aic

  name: httpbin

spec:

  ingressClassName: apisix

  http:

  - name: httpbin

    match:

      paths:

      - /*

      exprs:

      - subject:

          scope: Header

          name: X-Test-Name

        op: Equal

        value: new_name

      - subject:

          scope: Query

          name: test

        op: Equal

        value: test_name

    priority: 10

    backends:

    - serviceName: httpbin

      servicePort: 80
```

## Configure Plugin on Route[​](#configure-plugin-on-route "Direct link to Configure Plugin on Route")

To configure plugins on a route:

* Gateway API
* APISIX CRD

```
apiVersion: apisix.apache.org/v1alpha1

kind: PluginConfig

metadata:

  namespace: aic

  name: auth-plugin-config

spec:

  plugins:

    - name: key-auth

      config:

        _meta:

          disable: false

---

apiVersion: gateway.networking.k8s.io/v1

kind: HTTPRoute

metadata:

  namespace: aic

  name: get-ip

spec:

  parentRefs:

  - name: apisix

  rules:

  - matches: 

    - path:

        type: Exact

        value: /ip

    filters:

    - type: ExtensionRef

      extensionRef:

        group: apisix.apache.org

        kind: PluginConfig

        name: auth-plugin-config

    backendRefs:

    - name: httpbin

      port: 80
```

```
apiVersion: apisix.apache.org/v2

kind: ApisixRoute

metadata:

  namespace: aic

  name: get-ip

spec:

  ingressClassName: apisix

  http:

    - name: get-ip

      match:

        paths:

          - /ip

      plugins:

      - name: limit-count

        enable: true

        config:

          count: 2

          time_window: 10

          rejected_code: 429

      backends:

      - serviceName: httpbin

        servicePort: 80
```

## Configure Global Plugin[​](#configure-global-plugin "Direct link to Configure Global Plugin")

To configure a global plugin:

* Gateway API
* APISIX CRD

```
apiVersion: apisix.apache.org/v1alpha1

kind: GatewayProxy

metadata:

  namespace: aic

  name: apisix-config

spec:

  provider:

    type: ControlPlane

    controlPlane:

      # add your control plane connection configuration here

      # ....

  plugins:

  - name: clickhouse-logger

    config:

      endpoint_addr: http://clickhouse-clickhouse-installation.apisix.svc.cluster.local:8123

      user: quickstart-user

      password: quickstart-pass

      logtable: test

      database: quickstart_db
```

```
apiVersion: apisix.apache.org/v2

kind: ApisixGlobalRule

metadata:

  namespace: aic

  name: apisix-global-rule-logging

spec:

  ingressClassName: apisix

  plugins:

  - name: clickhouse-logger

    enable: true

    config:

      endpoint_addr: http://clickhouse-clickhouse-installation.apisix.svc.cluster.local:8123

      user: quickstart-user

      password: quickstart-pass

      logtable: test

      database: quickstart_db
```

## Configure Plugin Metadata[​](#configure-plugin-metadata "Direct link to Configure Plugin Metadata")

[Plugin metadata](https://docs.api7.ai/apisix/key-concepts/plugin-metadata.md) is used to configure the shared metadata fields for all plugin instances with the same plugin name. It is useful when a plugin is enabled across multiple objects and requires a universal update to its metadata fields.

To configure plugin metadata:

* Gateway API
* APISIX CRD

```
apiVersion: apisix.apache.org/v1alpha1

kind: GatewayProxy

metadata:

  namespace: aic

  name: apisix-config

spec:

  provider:

    type: ControlPlane

    controlPlane:

      # add your control plane connection configuration here

      # ....

  pluginMetadata:

    opentelemetry: {

      "trace_id_source": "x-request-id",

      "resource": {

        "service.name": "APISIX"

      },

      "collector": {

        "address": "simplest-collector:4318",

        "request_timeout": 3,

        "request_headers": {

          "Authorization": "token"

        }

      },

      "batch_span_processor": {

        "drop_on_queue_full": false,

        "max_queue_size": 1024,

        "batch_timeout": 2,

        "inactive_timeout": 1,

        "max_export_batch_size": 16

      },

      "set_ngx_var": true

    }
```

## Configure Plugin Config[​](#configure-plugin-config "Direct link to Configure Plugin Config")

[PluginConfig](https://docs.api7.ai/apisix/key-concepts/plugin-configs.md) allows you to extract and reuse common plugin configurations, reducing repetitive plugin definitions across routes and making API management more efficient.

To create a plugin config and reference it in a route:

* Gateway API
* APISIX CRD

```
apiVersion: apisix.apache.org/v1alpha1

kind: PluginConfig

metadata:

  namespace: aic

  name: example-plugin-config

spec:

  plugins:

  - name: response-rewrite

    enable: true

    config:

      headers:

        X-Plugin-Config: "example-response-rewrite"

        X-Plugin-Test: "enabled"

---

apiVersion: gateway.networking.k8s.io/v1

kind: HTTPRoute

metadata:

  namespace: aic

  name: httpbin

spec:

  parentRefs:

  - name: apisix

  rules:

  - matches: 

    - path:

        type: Exact

        value: /ip

    filters:

    - type: ExtensionRef

      extensionRef:

        group: apisix.apache.org

        kind: PluginConfig

        name: example-plugin-config

    backendRefs:

    - name: httpbin

      port: 80
```

```
apiVersion: apisix.apache.org/v2

kind: ApisixPluginConfig

metadata:

  namespace: aic

  name: example-plugin-config

spec:

  ingressClassName: apisix

  plugins:

  - name: response-rewrite

    enable: true

    config:

      headers:

        X-Plugin-Config: "example-response-rewrite"

        X-Plugin-Test: "enabled"

---

apiVersion: apisix.apache.org/v2

kind: ApisixRoute

metadata:

  namespace: aic

  name: httpbin

spec:

  ingressClassName: apisix

  http:

  - name: get-ip

    match:

      paths:

      - /ip

    backends:

    - serviceName: httpbin

      servicePort: 80

    plugin_config_name: example-plugin-config
```

## Store Plugin Configuration in a Secret[​](#store-plugin-configuration-in-a-secret "Direct link to Store Plugin Configuration in a Secret")

API7 Ingress Controller 2.2.1 can merge sensitive plugin fields from a same-namespace Secret into a v1alpha1 `PluginConfig`, `Consumer`, or `L4RoutePolicy`. APISIX Ingress Controller 2.2.0 does not include this `secretRef` field.

Each Secret key is a dot-separated path into the plugin configuration. Secret values are strings and override the same paths in `config`, so keep numeric and boolean fields inline.

```
apiVersion: v1

kind: Secret

metadata:

  namespace: aic

  name: oidc-credentials

stringData:

  client_id: replace-with-your-client-id

  client_secret: replace-with-your-client-secret

  session.secret: replace-with-a-random-session-secret

---

apiVersion: apisix.apache.org/v1alpha1

kind: PluginConfig

metadata:

  namespace: aic

  name: oidc

spec:

  plugins:

  - name: openid-connect

    secretRef:

      name: oidc-credentials

    config:

      discovery: https://idp.example.com/.well-known/openid-configuration

      scope: openid profile
```

Reference the `PluginConfig` from an HTTPRoute `ExtensionRef` as shown in [Configure Plugin Config](#configure-plugin-config). Updating the Secret causes the controller to reconcile the resources that use it. If the Secret is missing, the controller does not program that plugin with a partial configuration.

## Configure Gateway Access Information[​](#configure-gateway-access-information "Direct link to Configure Gateway Access Information")

These configurations allow Ingress Controller users to access the gateway.

* Gateway API
* Ingress
* APISIX CRD

To configure the `statusAddress`:

```
apiVersion: apisix.apache.org/v1alpha1

kind: GatewayProxy

metadata:

  namespace: aic

  name: apisix-config

spec:

  provider:

    type: ControlPlane

    controlPlane:

      # add your control plane connection configuration here

      # ....

  statusAddress:

    - 10.24.87.13
```

If you are using Ingress resources, you can configure either `statusAddress` or `publishService`.

To configure the `statusAddress`:

```
apiVersion: apisix.apache.org/v1alpha1

kind: GatewayProxy

metadata:

  namespace: aic

  name: apisix-config

spec:

  provider:

    type: ControlPlane

    controlPlane:

      # add your control plane connection configuration here

      # ....

  statusAddress:

    - 10.24.87.13
```

To configure the `publishService`:

```
apiVersion: apisix.apache.org/v1alpha1

kind: GatewayProxy

metadata:

  namespace: aic

  name: apisix-config

spec:

  provider:

    type: ControlPlane

    controlPlane:

      # add your control plane connection configuration here

      # ....

  publishService: apisix-gateway
```

API7 Ingress Controller 2.2.1 populates the Ingress status only when `publishService` references a `LoadBalancer` Service. APISIX Ingress Controller 2.2.0 also supports a `ClusterIP` Service when another Ingress fronts that Service; it copies the fronting Ingress addresses. Both controllers copy the external IP addresses and host names of a referenced `LoadBalancer` Service. Use `namespace/svc-name`, or use `svc-name` to resolve the Service in the namespace of each Ingress being updated.

Not supported.
