2017-09-19 14:47:10 +00:00
|
|
|
---
|
2020-02-06 23:45:31 +00:00
|
|
|
layout: docs
|
|
|
|
page_title: 'Commands: namespace apply'
|
|
|
|
sidebar_title: apply
|
|
|
|
description: |
|
2017-09-19 14:47:10 +00:00
|
|
|
The namespace apply command is used create or update a namespace.
|
|
|
|
---
|
|
|
|
|
|
|
|
# Command: namespace apply
|
|
|
|
|
|
|
|
The `namespace apply` command is used create or update a namespace.
|
|
|
|
|
2020-10-22 21:59:40 +00:00
|
|
|
~> Namespaces are open source in Nomad 1.0. Namespaces were Enterprise-only
|
|
|
|
when introduced in Nomad 0.7.
|
2017-09-19 14:47:10 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
```plaintext
|
2017-09-19 14:47:10 +00:00
|
|
|
nomad namespace apply [options] <namespace>
|
|
|
|
```
|
|
|
|
|
|
|
|
The `namespace apply` command requires the name of the namespace to be created
|
|
|
|
or updated.
|
|
|
|
|
2020-11-19 21:38:08 +00:00
|
|
|
If ACLs are enabled, this command requires a management ACL token.
|
|
|
|
|
2017-09-19 14:47:10 +00:00
|
|
|
## General Options
|
|
|
|
|
2020-11-19 18:02:48 +00:00
|
|
|
@include 'general_options_no_namespace.mdx'
|
2017-09-19 14:47:10 +00:00
|
|
|
|
|
|
|
## Apply Options
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
- `-quota` : An optional quota to apply to the namespace.
|
2017-10-13 21:36:02 +00:00
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
- `-description` : An optional human readable description for the namespace.
|
2017-09-19 14:47:10 +00:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
2020-12-18 18:55:31 +00:00
|
|
|
Create a namespace with a quota:
|
2017-09-19 14:47:10 +00:00
|
|
|
|
2020-05-18 20:53:06 +00:00
|
|
|
```shell-session
|
|
|
|
$ nomad namespace apply -description "Prod API servers" -quota prod api-prod
|
2017-09-19 14:47:10 +00:00
|
|
|
Successfully applied namespace "api-prod"!
|
|
|
|
```
|
2020-12-18 18:55:31 +00:00
|
|
|
|
|
|
|
Remove a quota from a namespace:
|
|
|
|
|
|
|
|
```shell-session
|
|
|
|
$ nomad namespace apply -quota= api-prod
|
|
|
|
```
|