open-nomad/website/pages/docs/commands/namespace/apply.mdx

51 lines
1.1 KiB
Plaintext
Raw Normal View History

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
```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.
If ACLs are enabled, this command requires a management ACL token.
2017-09-19 14:47:10 +00:00
## General Options
@include 'general_options_no_namespace.mdx'
2017-09-19 14:47:10 +00:00
## Apply Options
- `-quota` : An optional quota to apply to the namespace.
2017-10-13 21:36:02 +00:00
- `-description` : An optional human readable description for the namespace.
2017-09-19 14:47:10 +00:00
## Examples
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"!
```
Remove a quota from a namespace:
```shell-session
$ nomad namespace apply -quota= api-prod
```