Skip to main content
Version: Next

ApisixClusterConfig

ApisixClusterConfig is a Kubernetes CRD resource that can be used to describe an APISIX cluster and manage it.

Monitoring#

By default, monitoring is not enabled in an APISIX cluster. You can enable it by creating an ApisixClusterConfig resource.

The example below enabled Prometheus and SkyWalking for the "default" APISIX cluster (in multi-cluster deployments).

apiVersion: apisix.apache.org/v2
kind: ApisixClusterConfig
metadata:
name: default
spec:
monitoring:
prometheus:
enable: true
skywalking:
enable: true
sampleRatio: 0.5

Admin configuration#

Instead of changing the deployment or pod definition files, you can use the ApisixClusterConfig resource to change the admin configurations.

The example below configures the base URL and admin key for the APISIX cluster "default":

apiVersion: apisix.apache.org/v2
kind: ApisixClusterConfig
metadata:
name: default
spec:
admin:
baseURL: http://apisix-gw.default.svc.cluster.local:9180/apisix/admin
adminKey: "123456"

Once configured, other resources (Route, Upstream, etc) will be forwarded to the new address with the new admin key.

Multi-cluster management#

The ApisixClusterConfig resource can also be used to manage multiple APISIX clusters. This function is not enabled currently and it can only manage the cluster configured through --default-apisix-cluster-name attribute.

note

Deleting an ApisixClusterConfig resource will only reset the configurations of an APISIX cluster and will not affect its running.