Commit ab6d9014 authored by Daniel Lipovetsky's avatar Daniel Lipovetsky

Update kubectl taint usage

- Explain that the value is optional. - Add example of adding a taint with no value to kubectl taint usage.
parent f5ac2392
...@@ -64,7 +64,7 @@ var ( ...@@ -64,7 +64,7 @@ var (
* A taint consists of a key, value, and effect. As an argument here, it is expressed as key=value:effect. * A taint consists of a key, value, and effect. As an argument here, it is expressed as key=value:effect.
* The key must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to %[1]d characters. * The key must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to %[1]d characters.
* Optionally, the key can begin with a DNS subdomain prefix and a single '/', like example.com/my-app * Optionally, the key can begin with a DNS subdomain prefix and a single '/', like example.com/my-app
* The value must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to %[2]d characters. * The value is optional. If given, it must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to %[2]d characters.
* The effect must be NoSchedule, PreferNoSchedule or NoExecute. * The effect must be NoSchedule, PreferNoSchedule or NoExecute.
* Currently taint can only apply to node.`)) * Currently taint can only apply to node.`))
...@@ -80,7 +80,10 @@ var ( ...@@ -80,7 +80,10 @@ var (
kubectl taint nodes foo dedicated- kubectl taint nodes foo dedicated-
# Add a taint with key 'dedicated' on nodes having label mylabel=X # Add a taint with key 'dedicated' on nodes having label mylabel=X
kubectl taint node -l myLabel=X dedicated=foo:PreferNoSchedule`)) kubectl taint node -l myLabel=X dedicated=foo:PreferNoSchedule
# Add to node 'foo' a taint with key 'bar' and no value
kubectl taint nodes foo bar:NoSchedule`))
) )
func NewCmdTaint(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command { func NewCmdTaint(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment