mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 09:55:44 +03:00
* sectionless files plus acl section * alloc section * config, deployment sections * job section * licence, namespace * node, node-pool * operator * plugin, quota, recommendation * scaling, sentinel, server, service, system, var, volume * Add "ENT" label to left nav for enterprise commands * job tag break into separate folder and files; update options header
55 lines
1.2 KiB
Plaintext
55 lines
1.2 KiB
Plaintext
---
|
|
layout: docs
|
|
page_title: 'nomad service list command reference'
|
|
description: |
|
|
The `nomad service list` command displays a list of registered Nomad services.
|
|
---
|
|
|
|
# `nomad service list` command reference
|
|
|
|
The `service list` command is used to list the registered Nomad services.
|
|
|
|
## Usage
|
|
|
|
```plaintext
|
|
nomad service list [options]
|
|
```
|
|
|
|
The `service list` command requires no arguments.
|
|
|
|
When ACLs are enabled, this command requires a token with the `read-job`
|
|
capability for the namespace being queried.
|
|
|
|
The command supports the wildcard namespace identifier. Any namespaces that
|
|
the token does not have access to will have its services filtered from the
|
|
results.
|
|
|
|
## Options
|
|
|
|
- `-json`: Output the services in its JSON format.
|
|
|
|
- `-t`: Format and display the services using a Go template.
|
|
|
|
## Examples
|
|
|
|
List all services in the `default` namespace:
|
|
|
|
```shell-session
|
|
$ nomad service list
|
|
Service Name Tags
|
|
example-cache-redis [cache,db]
|
|
```
|
|
|
|
List all services in all namespaces:
|
|
|
|
```shell-session
|
|
$ nomad service list -namespace="*"
|
|
Service Name Namespace Tags
|
|
example-cache-redis default [cache,db]
|
|
platform-example-cache-redis platform []
|
|
```
|
|
|
|
## General options
|
|
|
|
@include 'general_options.mdx'
|