Last modified November 27, 2024
'kubectl gs get apps' command reference
Like with all get
commands in kubectl
, this command can be used to get details on one item, an App
custom resource in this case, or list several of them.
Usage
Get a list of apps
Simply execute
kubectl gs get apps -n NAMESPACE
to list some information on all apps available to you in the specified namespace.
Here is some example output:
NAME VERSION LAST DEPLOYED STATUS NOTES
cert-exporter 1.6.1 11m deployed
Here is an example output when the deployment of a new version failed.
NAME VERSION LAST DEPLOYED STATUS NOTES
cert-exporter 1.6.1 11m deployed Deployment failed for `1.7.0` with `not-installed`: `pulling chart <TARBALL-URL> failed`
See below for details on the output columns.
Get a specific app
When used with an app name as additional argument, the command will show details for a single app.
kubectl gs get apps -n NAMESPACE APP_NAME
Note: As an alternative to get apps
, get app
will also work.
Output
The standard tabular output format features these columns:
NAME
: Name of the app.VERSION
: Version of the app.LAST DEPLOYED
: When the current version of the app was deployed.STATUS
: Status of the app.NOTES
: Notes on the last attempted deployment in case there was an error, empty otherwise.
The VERSION
, LAST DEPLOYED
, and STATUS
columns always contain the actual, current status of the deployment. The NOTES
column contains information on the status of the last attempted deployment. Taking the above example output version 1.6.1
of cert-exporter
was successfully deployed. At some point App was updated to use version 1.7.0
which is the current desired state. However, the deployment for version 1.7.0
failed to deploy because the chart tarball failed to pull. Therefore the actual status of our App is that version 1.6.1
is still deployed and the status of the last attempted deployment is visible in the NOTES
column. If all is well, the NOTES
column is empty for the given App.
Flags
Here we document the flags that have a particular meaning for the get apps
command. Use kubectl gs get apps --help
for a full list.
--output/-o
kubectl
commonly allows to specify the output format for all get
subcommands. kubectl gs get apps
is no different.
YAML output
To inspect a cluster’s main custom resource in YAML notation, add the --output yaml
flag (or -o yaml
in short) to the command.
The following example command would print the main resource for app coredns
. It would return the App resource.
kubectl gs get apps -n ab12c coredns --output yaml
When applied without an app name, the output will be a list of resources. Example:
$ kubectl gs get apps -n ab12c --output yaml
apiVersion: v1
kind: List
items:
- apiVersion: app.application.giantswarm.io/v1alpha1
kind: App
...
Related
kubectl gs login
- Ensure an authenticated kubectl context.
Need help, got feedback?
We listen to your Slack support channel. You can also reach us at support@giantswarm.io. And of course, we welcome your pull requests!