Checking the synchronization status of the CRDs
APISIX CRDs are applied to a Kubernetes cluster using the
kubectl apply command. Behind the scenes, Kubernetes verifies the configuration using the Open API V3 schema and its validation webhooks (if any).
But this does not mean that the configuration is synchronized and validated by APISIX. APISIX will convert the declared configuration to APISIX-specific resources and verify it. If the verification fails, the Ingress controller will log an error message and will retry until the desired state is successfully synchronized to APISIX.
This guide will show how you can check the synchronization status of the CRDs.
#Example with ApisixRoute
This example uses ApisixRoute resources. But this also applies to other APISIX CRDs like ApisixUpstream, ApisixTls, and ApisixClusterConfig.
We can deploy a sample ApisixRoute resource:
kubectl apply -f - <<EOF
- name: rule1
- serviceName: httpbin-service-e2e-test
Once this resource is applied, you can check its synchronization status with its name as shown below:
kubectl describe ar httpbin-route
This will give the status as shown below:
Message: Sync Successfully
Observed Generation: 1
Type Reason Age From Message
---- ------ ---- ---- -------
Normal ResourcesSynced 50s (x2 over 50s) ApisixIngress ApisixIngress synced successfully
If you are not able to see the status, please check if you are using:
- An APISIX Ingress controller version
- The latest CRD definition file.
- The latest RBAC configuration.