github.com/wmuizelaar/kpt@v0.0.0-20221018115725-bd564717b2ed/site/reference/cli/alpha/live/plan/README.md (about) 1 --- 2 title: "`plan`" 3 linkTitle: "plan" 4 type: docs 5 description: > 6 Output a plan for the changes that will happen when applying a package. 7 --- 8 9 <!--mdtogo:Short 10 Output a plan for the changes that will happen when applying a package. 11 --> 12 13 ?> This feature is still in alpha, so the UX and the output format is subject to change. 14 15 `plan` does a dry-run of applying a package to the cluster. It outputs the results 16 in combination with a diff for every resource that will be updated, which gives an 17 overview of the impact of applying a package. 18 19 Note that `plan` does only works reliably with server-side apply. 20 21 ### Synopsis 22 23 <!--mdtogo:Long--> 24 25 ``` 26 kpt alpha live plan [PKG_PATH | -] [flags] 27 ``` 28 29 #### Args 30 31 ``` 32 PKG_PATH | -: 33 Path to the local package which should be applied to the cluster. It must 34 contain a Kptfile with inventory information. Defaults to the current working 35 directory. 36 Using '-' as the package path will cause kpt to read resources from stdin. 37 ``` 38 39 #### Flags 40 41 ``` 42 --field-manager: 43 Identifier for the **owner** of the fields being applied. Only usable 44 when --server-side flag is specified. Default value is kubectl. 45 46 --force-conflicts: 47 Force overwrite of field conflicts during apply due to different field 48 managers. Only usable when --server-side flag is specified. 49 Default value is false (error and failure when field managers conflict). 50 51 --inventory-policy: 52 Determines how to handle overlaps between the package being currently applied 53 and existing resources in the cluster. The available options are: 54 55 * strict: If any of the resources already exist in the cluster, but doesn't 56 belong to the current package, it is considered an error. 57 * adopt: If a resource already exist in the cluster, but belongs to a 58 different package, it is considered an error. Resources that doesn't belong 59 to other packages are adopted into the current package. 60 61 The default value is `strict`. 62 63 --output: 64 Determines the output format for the plan. Must be one of the following: 65 66 * text: The plan will be printed as text to stdout. 67 * krm: The plan will be printed as a Plan KRM resource to stdout. This 68 can be used as input to kpt functions for automatic validation. 69 70 The default value is ‘text’. 71 ``` 72 73 <!--mdtogo--> 74 75 ### Examples 76 77 <!--mdtogo:Examples--> 78 79 ```shell 80 # create a plan for the package in the current directory and output in KRM format. 81 $ kpt alpha live plan --output=krm 82 ``` 83 <!--mdtogo-->