diff --git a/docs/master/stacks-guide.md b/docs/master/stacks-guide.md index 6b41cb52..724d12e2 100644 --- a/docs/master/stacks-guide.md +++ b/docs/master/stacks-guide.md @@ -203,8 +203,20 @@ and try creating the Wordpress instance again. The Wordpress can take a while to spin up, because behind the scenes Crossplane is creating all of its dependendencies, which is a database -and Kubernetes cluster. To check the status, we can look at the -resources that Crossplane is creating for us: +and Kubernetes cluster. To check the status, you can use [the trace +command](https://github.com/crossplaneio/crossplane-cli/tree/master/docs/trace-command.md) +of the Crossplane CLI. + +``` +# Get the name of the Kubernetes Application resource which is the top level workload definiton for our Wordpress instance +K8S_APP_NAME=$(kubectl get -n app-project1-dev kubernetesapplication -lstack=sample-stack-wordpress -o=jsonpath='{.items[0].metadata.name}') + +# Run the trace command +kubectl crossplane trace -n app-project1-dev kubernetesapplication "${K8S_APP_NAME}" +``` + +You can also check the status of individual Crossplane resources that +Crossplane is creating for us: ``` # The claim for the database diff --git a/docs/master/troubleshoot.md b/docs/master/troubleshoot.md index 3469d28f..f2f65aec 100644 --- a/docs/master/troubleshoot.md +++ b/docs/master/troubleshoot.md @@ -6,11 +6,36 @@ indent: true --- # Troubleshooting +* [Using the trace command](#using-the-trace-command) * [Resource Status and Conditions](#resource-status-and-conditions) * [Crossplane Logs](#crossplane-logs) * [Pausing Crossplane](#pausing-crossplane) * [Deleting a Resource Hangs](#deleting-a-resource-hangs) +## Using the trace command + +The [Crossplane CLI](https://github.com/crossplaneio/crossplane-cli) trace +command provides a holistic view for a particular object and related +ones to ease debugging and troubleshooting process. It finds the +relevant Crossplane resources for a given one and provides detailed +information as well as an overview indicating what could be wrong. + +Usage: +``` +kubectl crossplane trace TYPE[.GROUP] NAME [-n| --namespace NAMESPACE] [--kubeconfig KUBECONFIG] [-o| --outputFormat dot] +``` + +Examples: +``` +# Trace a KubernetesApplication +kubectl crossplane trace KubernetesApplication wordpress-app-83f04457-0b1b-4532-9691-f55cf6c0da6e -n app-project1-dev + +# Trace a MySQLInstance +kubectl crossplane trace MySQLInstance wordpress-mysql-83f04457-0b1b-4532-9691-f55cf6c0da6e -n app-project1-dev +``` + +For more information, see [the trace command documentation](https://github.com/crossplaneio/crossplane-cli/tree/master/docs/trace-command.md). + ## Resource Status and Conditions Most Crossplane resources have a `status` section that can represent the current