title: how to set different environment variables of Deployment replicas in kubernetes
body: <p>I have 4 k8s pods by setting the replicas of Deployment to 4 now.</p>
  
  <pre><code>apiVersion: v1
  kind: Deployment
  metadata:
    ...
  spec:
    ...
    replicas: 4
  ...
  </code></pre>
  
  <p>The POD will get items in a database and consume it, the items in database has a column <code>class_name</code>.</p>
  
  <p>now I want one pod only get one <code>class_name</code>'s item.
  for example <code>pod1</code> only get item which <code>class_name</code> equals <code>class_name_1</code>, and <code>pod2</code> only get item which <code>class_name</code> equals <code>class_name_2</code>...</p>
  
  <p>So I want to pass different <code>class_name</code> as environment variables to different Deployment PODs. Can I define it in the yaml file of Deployment?</p>
  
  <p>Or is there any other way to achieve my goal?(like something other than Deployment in k8s)</p>