diff --git a/docs/man/man1/kubectl-apply.1 b/docs/man/man1/kubectl-apply.1 index e2b66d17715..4f868e62357 100644 --- a/docs/man/man1/kubectl-apply.1 +++ b/docs/man/man1/kubectl-apply.1 @@ -15,6 +15,7 @@ kubectl apply \- Apply a configuration to a resource by filename or stdin .PP Apply a configuration to a resource by filename or stdin. The resource will be created if it doesn't exist yet. +To use 'apply', always create the resource initially with either 'apply' or 'create \-\-save\-config'. .PP JSON and YAML formats are accepted. diff --git a/docs/user-guide/kubectl/kubectl_apply.md b/docs/user-guide/kubectl/kubectl_apply.md index 082a5da6bce..441e6a95060 100644 --- a/docs/user-guide/kubectl/kubectl_apply.md +++ b/docs/user-guide/kubectl/kubectl_apply.md @@ -41,6 +41,7 @@ Apply a configuration to a resource by filename or stdin Apply a configuration to a resource by filename or stdin. The resource will be created if it doesn't exist yet. +To use 'apply', always create the resource initially with either 'apply' or 'create --save-config'. JSON and YAML formats are accepted. @@ -102,7 +103,7 @@ cat pod.json | kubectl apply -f - * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 30-Mar-2016 +###### Auto generated by spf13/cobra on 3-May-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_apply.md?pixel)]() diff --git a/docs/yaml/kubectl/kubectl_apply.yaml b/docs/yaml/kubectl/kubectl_apply.yaml index fa0909b2a5b..9c768600c7f 100644 --- a/docs/yaml/kubectl/kubectl_apply.yaml +++ b/docs/yaml/kubectl/kubectl_apply.yaml @@ -1,7 +1,9 @@ name: apply synopsis: Apply a configuration to a resource by filename or stdin description: "Apply a configuration to a resource by filename or stdin.\nThe resource - will be created if it doesn't exist yet. \n\nJSON and YAML formats are accepted." + will be created if it doesn't exist yet. \nTo use 'apply', always create the resource + initially with either 'apply' or 'create --save-config'.\n\nJSON and YAML formats + are accepted." options: - name: filename shorthand: f diff --git a/pkg/kubectl/cmd/apply.go b/pkg/kubectl/cmd/apply.go index f673ecddb70..d63b79200c2 100644 --- a/pkg/kubectl/cmd/apply.go +++ b/pkg/kubectl/cmd/apply.go @@ -41,6 +41,7 @@ type ApplyOptions struct { const ( apply_long = `Apply a configuration to a resource by filename or stdin. The resource will be created if it doesn't exist yet. +To use 'apply', always create the resource initially with either 'apply' or 'create --save-config'. JSON and YAML formats are accepted.` apply_example = `# Apply the configuration in pod.json to a pod.