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.
|
|
|
|
|
|
|
|
~> Namespace commands are new in Nomad 0.7 and are only available with Nomad
|
|
|
|
Enterprise.
|
|
|
|
|
|
|
|
## 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.
|
|
|
|
|
|
|
|
## General Options
|
|
|
|
|
2020-02-06 23:45:31 +00:00
|
|
|
@include 'general_options.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
|
|
|
|
|
2017-10-13 21:36:02 +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"!
|
|
|
|
```
|