<p>I am creating a inferenceservice instance using the given yaml file-</p>
<pre><code>apiVersion: &quot;serving.kubeflow.org/v1alpha2&quot;
kind: &quot;InferenceService&quot;
metadata:
  minReplicas: 1
  name: &quot;sklearn-iris&quot;
spec:
  default:
    predictor:
      sklearn:
        storageUri: &quot;gs://kfserving-samples/models/sklearn/iris&quot;

</code></pre>
<p>Now this will create a deployment, and since I am working from behind the proxy I am injecting the env variables for proxies as:</p>
<pre><code>kubectl set env deployment/sklearn-iris-predictor-default-dclkq-deployment -n kfserving-test http_proxy={http_proxy value}
kubectl set env deployment/sklearn-iris-predictor-default-dclkq-deployment -n kfserving-test https_proxy={https_proxy value}

kubectl set env deployment/sklearn-iris-predictor-default-dclkq-deployment -n kfserving-test no_proxy={no_proxy value}
</code></pre>
<p>Since I have fixed minimum replicas as 1 so it make sure that one pod is there even without the traffic, now when this pod is being made it runs 1 init-container and 2 containers, so doing the kubectl set env thing, the proxies are being set in the container variables but not in the init-container and it is failing, so overall things are failing.
So in crux is there any way to set proxy/env details in init-container, without having the availibility of whole deployment yaml file to configure the env?</p>
<p>Edit:
<code>kubectl edit deploy/deployment_name -o yaml -n namespace</code> gives</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    autoscaling.knative.dev/class: kpa.autoscaling.knative.dev
    autoscaling.knative.dev/minScale: &quot;1&quot;
    deployment.kubernetes.io/revision: &quot;1&quot;
    internal.serving.kubeflow.org/storage-initializer-sourceuri: gs://kfserving-samples/models/sklearn/iris
    serving.knative.dev/creator: system:serviceaccount:kfserving-system:default
  creationTimestamp: &quot;2021-02-03T06:51:29Z&quot;
  generation: 3
  labels:
    app: sklearn-iris-predictor-default-6xcgj
    component: predictor
    service.istio.io/canonical-name: sklearn-iris-predictor-default
    service.istio.io/canonical-revision: sklearn-iris-predictor-default-6xcgj
    serving.knative.dev/configuration: sklearn-iris-predictor-default
    serving.knative.dev/configurationGeneration: &quot;1&quot;
    serving.knative.dev/revision: sklearn-iris-predictor-default-6xcgj
    serving.knative.dev/revisionUID: 470195f7-db41-4e9c-ac6b-c96c79a1218f
    serving.knative.dev/service: sklearn-iris-predictor-default
    serving.kubeflow.org/inferenceservice: sklearn-iris
  name: sklearn-iris-predictor-default-6xcgj-deployment
  namespace: kfserving-test
  ownerReferences:
  - apiVersion: serving.knative.dev/v1
    blockOwnerDeletion: true
    controller: true
    kind: Revision
    name: sklearn-iris-predictor-default-6xcgj
    uid: 470195f7-db41-4e9c-ac6b-c96c79a1218f
  resourceVersion: &quot;633491&quot;
  selfLink: /apis/apps/v1/namespaces/kfserving-test/deployments/sklearn-iris-predictor-default-6xcgj-deployment
  uid: 2fc10485-ba59-4eaf-b62a-480ecf4ab078
spec:
  progressDeadlineSeconds: 120
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      serving.knative.dev/revisionUID: 470195f7-db41-4e9c-ac6b-c96c79a1218f
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      annotations:
        autoscaling.knative.dev/class: kpa.autoscaling.knative.dev
        autoscaling.knative.dev/minScale: &quot;1&quot;
        internal.serving.kubeflow.org/storage-initializer-sourceuri: gs://kfserving-samples/models/sklearn/iris
        serving.knative.dev/creator: system:serviceaccount:kfserving-system:default
      creationTimestamp: null
      labels:
        app: sklearn-iris-predictor-default-6xcgj
        component: predictor
        service.istio.io/canonical-name: sklearn-iris-predictor-default
        service.istio.io/canonical-revision: sklearn-iris-predictor-default-6xcgj
        serving.knative.dev/configuration: sklearn-iris-predictor-default
        serving.knative.dev/configurationGeneration: &quot;1&quot;
        serving.knative.dev/revision: sklearn-iris-predictor-default-6xcgj
        serving.knative.dev/revisionUID: 470195f7-db41-4e9c-ac6b-c96c79a1218f
        serving.knative.dev/service: sklearn-iris-predictor-default
        serving.kubeflow.org/inferenceservice: sklearn-iris
    spec:
      containers:
      - args:
        - --model_name=sklearn-iris
        - --model_dir=/mnt/models
        - --http_port=8080
        - --workers=0
        env:
        - name: http_proxy
          value: {proxy data}
        - name: https_proxy
          value: {proxy data}
        - name: no_proxy
          value: {no proxy data}
        - name: PORT
          value: &quot;8080&quot;
        - name: K_REVISION
          value: sklearn-iris-predictor-default-6xcgj
        - name: K_CONFIGURATION
          value: sklearn-iris-predictor-default
        - name: K_SERVICE
          value: sklearn-iris-predictor-default
        - name: K_INTERNAL_POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: K_INTERNAL_POD_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        image: gcr.io/kfserving/sklearnserver@sha256:fd87e984a6092aae6efd28a2d596aac16d83d207a0269a503a221cb24cfd2f39
        imagePullPolicy: IfNotPresent
        lifecycle:
          preStop:
            httpGet:
              path: /wait-for-drain
              port: 8022
              scheme: HTTP
        name: kfserving-container
        ports:
        - containerPort: 8080
          name: user-port
          protocol: TCP
        resources:
          limits:
            cpu: &quot;1&quot;
            memory: 2Gi
          requests:
            cpu: &quot;1&quot;
            memory: 2Gi
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: FallbackToLogsOnError
        volumeMounts:
        - mountPath: /var/log
          name: knative-var-log
          subPathExpr: $(K_INTERNAL_POD_NAMESPACE)_$(K_INTERNAL_POD_NAME)_kfserving-container
      - env:
        - name: SERVING_NAMESPACE
          value: kfserving-test
        - name: SERVING_SERVICE
          value: sklearn-iris-predictor-default
        - name: SERVING_CONFIGURATION
          value: sklearn-iris-predictor-default
        - name: SERVING_REVISION
          value: sklearn-iris-predictor-default-6xcgj
        - name: QUEUE_SERVING_PORT
          value: &quot;8012&quot;
        - name: CONTAINER_CONCURRENCY
          value: &quot;0&quot;
        - name: REVISION_TIMEOUT_SECONDS
          value: &quot;300&quot;
        - name: SERVING_POD
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: SERVING_POD_IP
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: status.podIP
        - name: SERVING_LOGGING_CONFIG
          value: |-
            {
              &quot;level&quot;: &quot;info&quot;,
              &quot;development&quot;: false,
              &quot;outputPaths&quot;: [&quot;stdout&quot;],
              &quot;errorOutputPaths&quot;: [&quot;stderr&quot;],
              &quot;encoding&quot;: &quot;json&quot;,
              &quot;encoderConfig&quot;: {
                &quot;timeKey&quot;: &quot;ts&quot;,
                &quot;levelKey&quot;: &quot;level&quot;,
                &quot;nameKey&quot;: &quot;logger&quot;,
                &quot;callerKey&quot;: &quot;caller&quot;,
                &quot;messageKey&quot;: &quot;msg&quot;,
                &quot;stacktraceKey&quot;: &quot;stacktrace&quot;,
                &quot;lineEnding&quot;: &quot;&quot;,
                &quot;levelEncoder&quot;: &quot;&quot;,
                &quot;timeEncoder&quot;: &quot;iso8601&quot;,
                &quot;durationEncoder&quot;: &quot;&quot;,
                &quot;callerEncoder&quot;: &quot;&quot;
              }
            }
        - name: SERVING_LOGGING_LEVEL
        - name: SERVING_REQUEST_LOG_TEMPLATE
          value: '{&quot;httpRequest&quot;: {&quot;requestMethod&quot;: &quot;{{.Request.Method}}&quot;, &quot;requestUrl&quot;:
            &quot;{{js .Request.RequestURI}}&quot;, &quot;requestSize&quot;: &quot;{{.Request.ContentLength}}&quot;,
            &quot;status&quot;: {{.Response.Code}}, &quot;responseSize&quot;: &quot;{{.Response.Size}}&quot;, &quot;userAgent&quot;:
            &quot;{{js .Request.UserAgent}}&quot;, &quot;remoteIp&quot;: &quot;{{js .Request.RemoteAddr}}&quot;,
            &quot;serverIp&quot;: &quot;{{.Revision.PodIP}}&quot;, &quot;referer&quot;: &quot;{{js .Request.Referer}}&quot;,
            &quot;latency&quot;: &quot;{{.Response.Latency}}s&quot;, &quot;protocol&quot;: &quot;{{.Request.Proto}}&quot;},
            &quot;traceId&quot;: &quot;{{index .Request.Header &quot;X-B3-Traceid&quot;}}&quot;}'
        - name: SERVING_ENABLE_REQUEST_LOG
          value: &quot;false&quot;
        - name: SERVING_REQUEST_METRICS_BACKEND
          value: prometheus
        - name: TRACING_CONFIG_BACKEND
          value: none
        - name: TRACING_CONFIG_ZIPKIN_ENDPOINT
        - name: TRACING_CONFIG_STACKDRIVER_PROJECT_ID
        - name: TRACING_CONFIG_DEBUG
          value: &quot;false&quot;
        - name: TRACING_CONFIG_SAMPLE_RATE
          value: &quot;0.1&quot;
        - name: USER_PORT
          value: &quot;8080&quot;
        - name: SYSTEM_NAMESPACE
          value: knative-serving
        - name: METRICS_DOMAIN
          value: knative.dev/internal/serving
        - name: SERVING_READINESS_PROBE
          value: '{&quot;tcpSocket&quot;:{&quot;port&quot;:8080,&quot;host&quot;:&quot;127.0.0.1&quot;},&quot;successThreshold&quot;:1}'
        - name: ENABLE_PROFILING
          value: &quot;false&quot;
        - name: SERVING_ENABLE_PROBE_REQUEST_LOG
          value: &quot;false&quot;
        - name: METRICS_COLLECTOR_ADDRESS
        image: gcr.io/knative-releases/knative.dev/serving/cmd/queue@sha256:0db974f58b48b219ab8047e11b481c2bbda52b7a2d54db5ed58e8659748ec125
        imagePullPolicy: IfNotPresent
        name: queue-proxy
        ports:
        - containerPort: 8022
          name: http-queueadm
          protocol: TCP
        - containerPort: 9090
          name: http-autometric
          protocol: TCP
        - containerPort: 9091
          name: http-usermetric
          protocol: TCP
        - containerPort: 8012
          name: queue-port
          protocol: TCP
        readinessProbe:
          exec:
            command:
            - /ko-app/queue
            - -probe-period
            - &quot;0&quot;
          failureThreshold: 3
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 10
        resources:
          requests:
            cpu: 25m
        securityContext:
          allowPrivilegeEscalation: false
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 300
      volumes:
      - emptyDir: {}
        name: knative-var-log
status:
  conditions:
  - lastTransitionTime: &quot;2021-02-03T06:51:29Z&quot;
    lastUpdateTime: &quot;2021-02-03T06:51:29Z&quot;
    message: Deployment does not have minimum availability.
    reason: MinimumReplicasUnavailable
    status: &quot;False&quot;
    type: Available
  - lastTransitionTime: &quot;2021-02-03T07:38:08Z&quot;
    lastUpdateTime: &quot;2021-02-03T07:38:08Z&quot;
    message: ReplicaSet &quot;sklearn-iris-predictor-default-6xcgj-deployment-7c97895d96&quot;
      has timed out progressing.
    reason: ProgressDeadlineExceeded
    status: &quot;False&quot;
    type: Progressing
  observedGeneration: 2
  replicas: 1
  unavailableReplicas: 1
  updatedReplicas: 1
</code></pre>
<p><code>kubectl describe pod podname -n namespace</code> gives</p>
<pre><code>Name:           sklearn-iris-predictor-default-6xcgj-deployment-7c97895d96vqbgr
Namespace:      kfserving-test
Priority:       0
Node:           minikube/192.168.99.109
Start Time:     Wed, 03 Feb 2021 13:50:33 +0530
Labels:         app=sklearn-iris-predictor-default-6xcgj
                component=predictor
                pod-template-hash=7c97895d96
                service.istio.io/canonical-name=sklearn-iris-predictor-default
                service.istio.io/canonical-revision=sklearn-iris-predictor-default-6xcgj
                serving.knative.dev/configuration=sklearn-iris-predictor-default
                serving.knative.dev/configurationGeneration=1
                serving.knative.dev/revision=sklearn-iris-predictor-default-6xcgj
                serving.knative.dev/revisionUID=470195f7-db41-4e9c-ac6b-c96c79a1218f
                serving.knative.dev/service=sklearn-iris-predictor-default
                serving.kubeflow.org/inferenceservice=sklearn-iris
Annotations:    autoscaling.knative.dev/class: kpa.autoscaling.knative.dev
                autoscaling.knative.dev/minScale: 1
                internal.serving.kubeflow.org/storage-initializer-sourceuri: gs://kfserving-samples/models/sklearn/iris
                serving.knative.dev/creator: system:serviceaccount:kfserving-system:default
Status:         Pending
IP:             172.17.0.22
Controlled By:  ReplicaSet/sklearn-iris-predictor-default-6xcgj-deployment-7c97895d96
Init Containers:
  storage-initializer:
    Container ID:  docker://262a195f39fad7dfc62b494d9c9bbda8c7cdeee2f4b903b2948b809c5e00fb0c
    Image:         gcr.io/kfserving/storage-initializer:v0.5.0-rc2
    Image ID:      docker-pullable://gcr.io/kfserving/storage-initializer@sha256:9a16e6af385412bb62fd7e09f6d749e107e3ad92c488039acd20361fb5dd68cc
    Port:          &lt;none&gt;
    Host Port:     &lt;none&gt;
    Args:
      gs://kfserving-samples/models/sklearn/iris
      /mnt/models
    State:       Running
      Started:   Wed, 03 Feb 2021 13:58:00 +0530
    Last State:  Terminated
      Reason:    Error
      Message:   ownload(src_uri, dest_path)
  File &quot;/usr/local/lib/python3.7/site-packages/kfserving/storage.py&quot;, line 58, in download
    Storage._download_gcs(uri, out_dir)
  File &quot;/usr/local/lib/python3.7/site-packages/kfserving/storage.py&quot;, line 116, in _download_gcs
    for blob in blobs:
  File &quot;/usr/local/lib/python3.7/site-packages/google/api_core/page_iterator.py&quot;, line 212, in _items_iter
    for page in self._page_iter(increment=False):
  File &quot;/usr/local/lib/python3.7/site-packages/google/api_core/page_iterator.py&quot;, line 243, in _page_iter
    page = self._next_page()
  File &quot;/usr/local/lib/python3.7/site-packages/google/api_core/page_iterator.py&quot;, line 369, in _next_page
    response = self._get_next_page_response()
  File &quot;/usr/local/lib/python3.7/site-packages/google/api_core/page_iterator.py&quot;, line 419, in _get_next_page_response
    method=self._HTTP_METHOD, path=self.path, query_params=params
  File &quot;/usr/local/lib/python3.7/site-packages/google/cloud/storage/_http.py&quot;, line 63, in api_request
    return call()
  File &quot;/usr/local/lib/python3.7/site-packages/google/api_core/retry.py&quot;, line 286, in retry_wrapped_func
    on_error=on_error,
  File &quot;/usr/local/lib/python3.7/site-packages/google/api_core/retry.py&quot;, line 206, in retry_target
    last_exc,
  File &quot;&lt;string&gt;&quot;, line 3, in raise_from
google.api_core.exceptions.RetryError: Deadline of 120.0s exceeded while calling functools.partial(functools.partial(&lt;bound method JSONConnection.api_request of &lt;google.cloud.storage._http.Connection object at 0x7fd57c954c50&gt;&gt;, timeout=60, method='GET', path='/b/kfserving-samples/o', query_params={'projection': 'noAcl', 'prefix': 'models/sklearn/iris/'})), last exception: HTTPSConnectionPool(host='storage.googleapis.com', port=443): Max retries exceeded with url: /storage/v1/b/kfserving-samples/o?projection=noAcl&amp;prefix=models%2Fsklearn%2Firis%2F&amp;prettyPrint=false (Caused by NewConnectionError('&lt;urllib3.connection.HTTPSConnection object at 0x7fd57c91bb90&gt;: Failed to establish a new connection: [Errno 113] No route to host'))

      Exit Code:    1
      Started:      Wed, 03 Feb 2021 13:53:53 +0530
      Finished:     Wed, 03 Feb 2021 13:57:45 +0530
    Ready:          False
    Restart Count:  2
    Limits:
      cpu:     1
      memory:  1Gi
    Requests:
      cpu:        100m
      memory:     100Mi
    Environment:  &lt;none&gt;
    Mounts:
      /mnt/models from kfserving-provision-location (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-hw2rw (ro)
Containers:
  kfserving-container:
    Container ID:
    Image:         gcr.io/kfserving/sklearnserver@sha256:fd87e984a6092aae6efd28a2d596aac16d83d207a0269a503a221cb24cfd2f39
    Image ID:
    Port:          8080/TCP
    Host Port:     0/TCP
    Args:
      --model_name=sklearn-iris
      --model_dir=/mnt/models
      --http_port=8080
      --workers=0
    State:          Waiting
      Reason:       PodInitializing
    Ready:          False
    Restart Count:  0
    Limits:
      cpu:     1
      memory:  2Gi
    Requests:
      cpu:     1
      memory:  2Gi
    Environment:
      PORT:                      8080
      K_REVISION:                sklearn-iris-predictor-default-6xcgj
      K_CONFIGURATION:           sklearn-iris-predictor-default
      K_SERVICE:                 sklearn-iris-predictor-default
      K_INTERNAL_POD_NAME:       sklearn-iris-predictor-default-6xcgj-deployment-7c97895d96vqbgr (v1:metadata.name)
      K_INTERNAL_POD_NAMESPACE:  kfserving-test (v1:metadata.namespace)
    Mounts:
      /mnt/models from kfserving-provision-location (ro)
      /var/log from knative-var-log (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-hw2rw (ro)
  queue-proxy:
    Container ID:
    Image:          gcr.io/knative-releases/knative.dev/serving/cmd/queue@sha256:0db974f58b48b219ab8047e11b481c2bbda52b7a2d54db5ed58e8659748ec125
    Image ID:
    Ports:          8022/TCP, 9090/TCP, 9091/TCP, 8012/TCP
    Host Ports:     0/TCP, 0/TCP, 0/TCP, 0/TCP
    State:          Waiting
      Reason:       PodInitializing
    Ready:          False
    Restart Count:  0
    Requests:
      cpu:      25m
    Readiness:  exec [/ko-app/queue -probe-period 0] delay=0s timeout=10s period=10s #success=1 #failure=3
    Environment:
      SERVING_NAMESPACE:                      kfserving-test
      SERVING_SERVICE:                        sklearn-iris-predictor-default
      SERVING_CONFIGURATION:                  sklearn-iris-predictor-default
      SERVING_REVISION:                       sklearn-iris-predictor-default-6xcgj
      QUEUE_SERVING_PORT:                     8012
      CONTAINER_CONCURRENCY:                  0
      REVISION_TIMEOUT_SECONDS:               300
      SERVING_POD:                            sklearn-iris-predictor-default-6xcgj-deployment-7c97895d96vqbgr (v1:metadata.name)
      SERVING_POD_IP:                          (v1:status.podIP)
      SERVING_LOGGING_CONFIG:                 {
                                                &quot;level&quot;: &quot;info&quot;,
                                                &quot;development&quot;: false,
                                                &quot;outputPaths&quot;: [&quot;stdout&quot;],
                                                &quot;errorOutputPaths&quot;: [&quot;stderr&quot;],
                                                &quot;encoding&quot;: &quot;json&quot;,
                                                &quot;encoderConfig&quot;: {
                                                  &quot;timeKey&quot;: &quot;ts&quot;,
                                                  &quot;levelKey&quot;: &quot;level&quot;,
                                                  &quot;nameKey&quot;: &quot;logger&quot;,
                                                  &quot;callerKey&quot;: &quot;caller&quot;,
                                                  &quot;messageKey&quot;: &quot;msg&quot;,
                                                  &quot;stacktraceKey&quot;: &quot;stacktrace&quot;,
                                                  &quot;lineEnding&quot;: &quot;&quot;,
                                                  &quot;levelEncoder&quot;: &quot;&quot;,
                                                  &quot;timeEncoder&quot;: &quot;iso8601&quot;,
                                                  &quot;durationEncoder&quot;: &quot;&quot;,
                                                  &quot;callerEncoder&quot;: &quot;&quot;
                                                }
                                              }
      SERVING_LOGGING_LEVEL:
      SERVING_REQUEST_LOG_TEMPLATE:           {&quot;httpRequest&quot;: {&quot;requestMethod&quot;: &quot;{{.Request.Method}}&quot;, &quot;requestUrl&quot;: &quot;{{js .Request.RequestURI}}&quot;, &quot;requestSize&quot;: &quot;{{.Request.ContentLength}}&quot;, &quot;status&quot;: {{.Response.Code}}, &quot;responseSize&quot;: &quot;{{.Response.Size}}&quot;, &quot;userAgent&quot;: &quot;{{js .Request.UserAgent}}&quot;, &quot;remoteIp&quot;: &quot;{{js .Request.RemoteAddr}}&quot;, &quot;serverIp&quot;: &quot;{{.Revision.PodIP}}&quot;, &quot;referer&quot;: &quot;{{js .Request.Referer}}&quot;, &quot;latency&quot;: &quot;{{.Response.Latency}}s&quot;, &quot;protocol&quot;: &quot;{{.Request.Proto}}&quot;}, &quot;traceId&quot;: &quot;{{index .Request.Header &quot;X-B3-Traceid&quot;}}&quot;}
      SERVING_ENABLE_REQUEST_LOG:             false
      SERVING_REQUEST_METRICS_BACKEND:        prometheus
      TRACING_CONFIG_BACKEND:                 none
      TRACING_CONFIG_ZIPKIN_ENDPOINT:
      TRACING_CONFIG_STACKDRIVER_PROJECT_ID:
      TRACING_CONFIG_DEBUG:                   false
      TRACING_CONFIG_SAMPLE_RATE:             0.1
      USER_PORT:                              8080
      SYSTEM_NAMESPACE:                       knative-serving
      METRICS_DOMAIN:                         knative.dev/internal/serving
      SERVING_READINESS_PROBE:                {&quot;tcpSocket&quot;:{&quot;port&quot;:8080,&quot;host&quot;:&quot;127.0.0.1&quot;},&quot;successThreshold&quot;:1}
      ENABLE_PROFILING:                       false
      SERVING_ENABLE_PROBE_REQUEST_LOG:       false
      METRICS_COLLECTOR_ADDRESS:
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-hw2rw (ro)
Conditions:
  Type              Status
  Initialized       False
  Ready             False
  ContainersReady   False
  PodScheduled      True
Volumes:
  knative-var-log:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:
    SizeLimit:  &lt;unset&gt;
  default-token-hw2rw:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-hw2rw
    Optional:    false
  kfserving-provision-location:
    Type:        EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:
    SizeLimit:   &lt;unset&gt;
QoS Class:       Burstable
Node-Selectors:  &lt;none&gt;
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason     Age                  From               Message
  ----     ------     ----                 ----               -------
  Normal   Scheduled  7m50s                default-scheduler  Successfully assigned kfserving-test/sklearn-iris-predictor-default-6xcgj-deployment-7c97895d96vqbgr to minikube
  Warning  BackOff    36s                  kubelet, minikube  Back-off restarting failed container
  Normal   Pulled     24s (x3 over 7m47s)  kubelet, minikube  Container image &quot;gcr.io/kfserving/storage-initializer:v0.5.0-rc2&quot; already present on machine
  Normal   Created    23s (x3 over 7m47s)  kubelet, minikube  Created container storage-initializer
  Normal   Started    23s (x3 over 7m46s)  kubelet, minikube  Started container storage-initializer
</code></pre>

Chinmay Singh
<p>I don't think it is possible to do the same via <code>kubectl set env</code> command.</p>
<p>When I tried to run the updated command on my local setup passing the <code>initcontainer</code> name, it returns with the message:</p>
<pre><code>warning: Deployment/dummy does not have any containers matching &quot;dummy-init&quot;
</code></pre>
<p>Command used:</p>
<pre><code>kubectl set env -n dummy-ns deploy/dummy -c &quot;dummy-init&quot; dummy_env=&quot;true&quot;
</code></pre>
<p>You can however use the <code>kubectl edit</code> command which will open the full <code>yaml</code> in edit mode and you can add the required environment variable to whichever container you need and save the spec. This will create a new pod with the new spec.</p>
<pre><code>kubectl edit -n dummy-ns deploy/dummy -o yaml
</code></pre>
