github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/commands/job/scale.mdx (about) 1 --- 2 layout: docs 3 page_title: 'Commands: job scale' 4 description: | 5 The job scale command is used to change the count of a Nomad job group. 6 --- 7 8 # Command: job scale 9 10 The `job scale` command is used to alter the number of running allocations within 11 a Nomad task group. 12 13 ## Usage 14 15 ```plaintext 16 nomad job scale [options] <job> <group> <count> 17 ``` 18 19 The `job scale` commands requires at least two arguments and potentially three 20 depending on the job specification. The first argument will be the job ID of the 21 job you wish to scale. If the job contains a single task group, you can omit 22 including the task group name as the second argument and the command will perform 23 the required lookup. The final argument is the count that you wish the job task 24 group to be changed to. The count is the absolute value that will be reflected in 25 the job specification. 26 27 Scale will issue a request to update the matched job and then invoke an interactive 28 monitor that exits automatically once the scheduler has processed the request. 29 It is safe to exit the monitor early using ctrl+c. 30 31 When ACLs are enabled, this command requires a token with the `scale-job` 32 capability for the job's namespace. 33 34 ## General Options 35 36 @include 'general_options.mdx' 37 38 ## Scale Options 39 40 - `-detach`: Return immediately instead of entering monitor mode. After the 41 scale command is submitted, a new evaluation ID is printed to the screen, 42 which can be used to examine the evaluation using the [eval status] command. 43 44 - `-verbose`: Show full information. 45 46 ## Examples 47 48 Scale the job with ID "job1" which contains a single task group to a count of 8: 49 50 ```shell-session 51 $ nomad job scale job1 8 52 ==> Monitoring evaluation "529cc88e" 53 Evaluation triggered by job "job1" 54 Evaluation within deployment: "28a3378f" 55 Allocation "2a4df8ca" created: node "2f0a2f93", group "group1" 56 Allocation "b7eefe49" created: node "2f0a2f93", group "group1" 57 Allocation "bd54a83d" created: node "2f0a2f93", group "group1" 58 Allocation "fadeaea8" created: node "2f0a2f93", group "group1" 59 Allocation "4bd1397b" modified: node "2f0a2f93", group "group1" 60 Allocation "93684511" modified: node "2f0a2f93", group "group1" 61 Allocation "b409f0a2" modified: node "2f0a2f93", group "group1" 62 Allocation "18f50054" created: node "2f0a2f93", group "group1" 63 Evaluation status changed: "pending" -> "complete" 64 ==> Evaluation "529cc88e" finished with status "complete" 65 ``` 66 67 Scale the job with ID "job1" which contains a single task group to a count of 8 68 and return immediately: 69 70 ```shell-session 71 $ nomad job scale -detach job1 8 72 Evaluation ID: b754d6b3-8960-5652-60d8-d47df6eaed13 73 ``` 74 75 Scale the job with ID "job1" and the task group "group1" to a count of 8: 76 77 ```shell-session 78 $ nomad job scale job1 group1 8 79 ==> Monitoring evaluation "529cc88e" 80 Evaluation triggered by job "job1" 81 Evaluation within deployment: "28a3378f" 82 Allocation "2a4df8ca" created: node "2f0a2f93", group "group1" 83 Allocation "b7eefe49" created: node "2f0a2f93", group "group1" 84 Allocation "bd54a83d" created: node "2f0a2f93", group "group1" 85 Allocation "fadeaea8" created: node "2f0a2f93", group "group1" 86 Allocation "4bd1397b" modified: node "2f0a2f93", group "group1" 87 Allocation "93684511" modified: node "2f0a2f93", group "group1" 88 Allocation "b409f0a2" modified: node "2f0a2f93", group "group1" 89 Allocation "18f50054" created: node "2f0a2f93", group "group1" 90 Evaluation status changed: "pending" -> "complete" 91 ==> Evaluation "529cc88e" finished with status "complete" 92 ``` 93 94 [eval status]: /docs/commands/eval/status