Monitoring your Resources

Getting information on your resources

You can use kubectl to get information on your resources.

Listing all resources

You can list your resources managed by Config Connector with kubectl get gcp.

kubectl get gcp

Describing a resource

Use kubectl describe to get details on a resource.

For example, to view the Cloud Spanner instance, run the following command, replacing [PROJECT_ID] with your project ID:

kubectl --namespace [PROJECT_ID] describe spannerinstance spannerinstance-sample

Waiting for resources to be ready

You can determine if you resource is ready by looking at its status.condition. Config Connector will always update the status to reflect the current state of your resource.

For example, to check if your Cloud Spanner instance is ready, run the following command, replacing [PROJECT_ID] with your project ID:

kubectl --namespace [PROJECT_ID] wait --for=condition=READY spannerinstance spannerinstance-sample

Viewing Events for a single resource

You can view the Events for a single resource by examining the Events field in the output of the following command, replacing [NAMESPACE_NAME] with your namespace, [KIND] with your resource's Kind, and [NAME] with your resource's name.

kubectl --namespace [NAMESPACE_NAME] describe [KIND] [NAME]

For example, if you had a Config Connector SpannerInstance resource named spannerinstance-sample in a project named myproject, use the following command to view its Events:

kubectl --namespace myproject describe spannerinstance spannerinstance-sample

View Events for a Namespace

To see the events for all Kubernetes resources in a given Namespace, including your Config Connector resources, run the following command replacing [NAMESPACE_NAME] with your Namespace:

kubectl --namespace [NAMESPACE_NAME] get events

Config Connector-specific Events

In addition to regular Kubernetes Events, Config Connector can create the following Event types.

DependencyNotReady
Occurs when a referenced resource is not in a Ready state.
DependencyNotFound
Occurs when a referenced resource or Secret object is not found.
DependencyInvalid
Occurs when the dependency exists, but is not valid. For example, the Config Connector controller creates a DependencyInvalid Event if a Secret exists, but the secretKeyRef is not found.

What's next

Learn more about Kubernetes application introspection.