<p>I've made my cluster using minukube.</p>
<p>as I know, Indexed-Job feature is added at kubernetes version <a href="https://sysdig.com/blog/kubernetes-1-21-whats-new/" rel="nofollow noreferrer">1.21</a>.</p>
<p>but when I made my job, it looks like there is no $JOB_COMPLETION_INDEX environ variable.</p>
<p>here is my yaml</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: batch/v1
kind: Job
metadata:
  name: my-job
spec:
  parallelism: 2
  completions: 2
  completionMode: Indexed
  template:
    spec:
      restartPolicy: Never
      containers:
      - name: 'my-container'
        image: 'busybox'
        command: [
          &quot;sh&quot;,
          &quot;-c&quot;,
          &quot;echo My Index is $JOB_COMPLETION_INDEX &amp;&amp; sleep 3600&quot;,
        ]
</code></pre>
<pre class="lang-sh prettyprint-override"><code>$ job.batch/my-job created
</code></pre>
<p>but as I mentioned before, it looks like the job is <strong>NOT Indexed-Job</strong></p>
<p>below is logs of my pods(controlled by my-job)</p>
<pre><code>$ kubectl logs pod/my-job-wxhh6
My Index is
$ kubectl logs pod/my-job-nbxkr
My Index is
</code></pre>
<p>It seems that the <strong>$JOB_COMPLETION_INDEX</strong> environ variable is empty.</p>
<p>I'll skip it to make it brief, but when I directly accessed the container, there is also no $JOB_COMPLETION_INDEX.</p>
<p>and below is result of <code>kubectl describe job.batch/my-job</code>  command</p>
<pre><code>Name:           my-job
Namespace:      default
Selector:       controller-uid=6e8bda0c-f1ee-47b9-95ec-87419b3dfaaf
Labels:         controller-uid=6e8bda0c-f1ee-47b9-95ec-87419b3dfaaf
                job-name=my-job
Annotations:    &lt;none&gt;
Parallelism:    2
Completions:    2
Start Time:     Sat, 28 Aug 2021 03:56:46 +0900
Pods Statuses:  2 Running / 0 Succeeded / 0 Failed
Pod Template:
  Labels:  controller-uid=6e8bda0c-f1ee-47b9-95ec-87419b3dfaaf
           job-name=my-job
  Containers:
   my-container:
    Image:      busybox
    Port:       &lt;none&gt;
    Host Port:  &lt;none&gt;
    Command:
      sh
      -c
      echo My Index is $JOB_COMPLETION_INDEX &amp;&amp; sleep 3600
    Environment:  &lt;none&gt;
    Mounts:       &lt;none&gt;
  Volumes:        &lt;none&gt;
Events:
  Type    Reason            Age   From            Message
  ----    ------            ----  ----            -------
  Normal  SuccessfulCreate  100s  job-controller  Created pod: my-job-wxhh6
  Normal  SuccessfulCreate  100s  job-controller  Created pod: my-job-nbxkr
</code></pre>
<p>there is no annotation. <a href="https://kubernetes.io/blog/2021/04/19/introducing-indexed-jobs/" rel="nofollow noreferrer">as document</a>, <code>batch.kubernetes.io/job-completion-index</code> annotation must be there.</p>
<p>My version is upper than kubernetes <a href="https://sysdig.com/blog/kubernetes-1-21-whats-new/" rel="nofollow noreferrer">1.21</a>, where the Indexed-Job feature is introduced.</p>
<pre class="lang-sh prettyprint-override"><code>$ kubectl version
Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;21&quot;, GitVersion:&quot;v1.21.3&quot;, GitCommit:&quot;ca643a4d1f7bfe34773c74f79527be4afd95bf39&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2021-07-15T21:04:39Z&quot;, GoVersion:&quot;go1.16.6&quot;, Compiler:&quot;gc&quot;, Platform:&quot;darwin/amd64&quot;}
Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;21&quot;, GitVersion:&quot;v1.21.2&quot;, GitCommit:&quot;092fbfbf53427de67cac1e9fa54aaa09a28371d7&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2021-06-16T12:53:14Z&quot;, GoVersion:&quot;go1.16.5&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
$ minukube kubectl version
Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;21&quot;, GitVersion:&quot;v1.21.2&quot;, GitCommit:&quot;092fbfbf53427de67cac1e9fa54aaa09a28371d7&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2021-06-16T12:59:11Z&quot;, GoVersion:&quot;go1.16.5&quot;, Compiler:&quot;gc&quot;, Platform:&quot;darwin/amd64&quot;}
Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;21&quot;, GitVersion:&quot;v1.21.2&quot;, GitCommit:&quot;092fbfbf53427de67cac1e9fa54aaa09a28371d7&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2021-06-16T12:53:14Z&quot;, GoVersion:&quot;go1.16.5&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
</code></pre>
<p>What should I do?</p>

Seyoon
<p>as of now(2021.08.29), the <strong>IndexedJob</strong> is an alpha feature, so I started minikube with feature-gates flag</p>
<pre><code>minikube start --feature-gates=IndexedJob=true
</code></pre>
<p>and It works well</p>
