|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * serverless/knative_serving/serverless-applications.adoc |
| 4 | +// * serverless/cli_reference/kn-services-ref.adoc |
| 5 | + |
| 6 | +[id="kn-service-describe_{context}"] |
| 7 | += Describing serverless applications |
| 8 | + |
| 9 | +You can describe a Knative service by using the `kn service describe` command. |
| 10 | + |
| 11 | +.Example commands |
| 12 | + |
| 13 | +* Describe a service: |
| 14 | ++ |
| 15 | +[source,terminal] |
| 16 | +---- |
| 17 | +$ kn service describe --verbose <service_name> |
| 18 | +---- |
| 19 | ++ |
| 20 | +The `--verbose` flag is optional but can be included to provide a more detailed description. The difference between a regular and verbose output is shown in the following examples: |
| 21 | ++ |
| 22 | +.Example output without `--verbose` flag |
| 23 | +[source,terminal] |
| 24 | +---- |
| 25 | +Name: hello |
| 26 | +Namespace: default |
| 27 | +Age: 2m |
| 28 | +URL: http://hello-default.apps.ocp.example.com |
| 29 | +
|
| 30 | +Revisions: |
| 31 | + 100% @latest (hello-00001) [1] (2m) |
| 32 | + Image: docker.io/openshift/hello-openshift (pinned to aaea76) |
| 33 | +
|
| 34 | +Conditions: |
| 35 | + OK TYPE AGE REASON |
| 36 | + ++ Ready 1m |
| 37 | + ++ ConfigurationsReady 1m |
| 38 | + ++ RoutesReady 1m |
| 39 | +---- |
| 40 | ++ |
| 41 | +.Example output with `--verbose` flag |
| 42 | +[source,terminal] |
| 43 | +---- |
| 44 | +Name: hello |
| 45 | +Namespace: default |
| 46 | +Annotations: serving.knative.dev/creator=system:admin |
| 47 | + serving.knative.dev/lastModifier=system:admin |
| 48 | +Age: 3m |
| 49 | +URL: http://hello-default.apps.ocp.example.com |
| 50 | +Cluster: http://hello.default.svc.cluster.local |
| 51 | +
|
| 52 | +Revisions: |
| 53 | + 100% @latest (hello-00001) [1] (3m) |
| 54 | + Image: docker.io/openshift/hello-openshift (pinned to aaea76) |
| 55 | + Env: RESPONSE=Hello Serverless! |
| 56 | +
|
| 57 | +Conditions: |
| 58 | + OK TYPE AGE REASON |
| 59 | + ++ Ready 3m |
| 60 | + ++ ConfigurationsReady 3m |
| 61 | + ++ RoutesReady 3m |
| 62 | +---- |
| 63 | + |
| 64 | +* Describe a service in YAML format: |
| 65 | ++ |
| 66 | +[source,terminal] |
| 67 | +---- |
| 68 | +$ kn service describe <service_name> -o yaml |
| 69 | +---- |
| 70 | + |
| 71 | +* Describe a service in JSON format: |
| 72 | ++ |
| 73 | +[source,terminal] |
| 74 | +---- |
| 75 | +$ kn service describe <service_name> -o json |
| 76 | +---- |
| 77 | + |
| 78 | +* Print the service URL only: |
| 79 | ++ |
| 80 | +[source,terminal] |
| 81 | +---- |
| 82 | +$ kn service describe <service_name> -o url |
| 83 | +---- |
0 commit comments