<p>I want to understand how the following commands works and what kind of expressions are supported:</p>
<pre><code>kubectl label pod foo{1..3} fizz=buzz
</code></pre>
<p>The <code>foo{1..3}</code> selects:</p>
<pre><code>foo1
foo2
foo3
</code></pre>
<p>I couldn't have found any documentation so far.</p>

Sebastian Aburto
<p>That syntax is the GNU Bash <a href="https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html#Brace-Expansion" rel="nofollow noreferrer">brace expansion</a> extension syntax.  Some other shells like zsh support it too, but it is not one of the <a href="https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06" rel="nofollow noreferrer">Word Expansions</a> in the POSIX shell spec; it won't work with some minimalist shells like the default dash shell in Debian GNU/Linux or the Busybox shell in an Alpine Docker image.</p>
<p>That means this is expanded by your local shell, to construct the arguments to <code>kubectl</code>.  Most of the expansion possibilities focus on filenames or environment variables.  (<code>foo*</code> would match local files whose names begin with <code>foo</code>, not Kubernetes pods.)  Potentially you could find <code>$(command)</code> substitution or <code>$(( 1 + 2 ))</code> arithmetic substitution useful.  There's not any broader Kubernetes name-matching syntax that gets used here, this is exclusively local-shell processing.</p>
