0

We have installed one istio and labeled namespace(default) istio.io/rev=1-8-1 and all services under this namespace are pointed to 1-14-1 istiod. Now i tried to install new istio whose revision is istio.io/rev=1-14-1. I want to test only one deployment pods which points to new istio rather than pointing to old istio.

Activity performed:-

  1. I updated labels on pods istio.io/rev=1-14-1 and created pod, but that pod still pointing to old istio because i think namespce taking precedence over object labels.

How can i inject sidecar of new istio in pods irresptive of removing namespace lables?

I want to test for some deployments by applying labels or annotation so that it can point to new istio if it works fine then rollout all services

saurav
  • 1
  • 1

1 Answers1

1

It looks like you are trying to perform a canary upgrade on your control plane.

Try this:

  1. Create a new namespace to test the new control plane. eg. kubectl create ns test

  2. Apply labels in the namespace so that sidecar injection uses latest control plane. eg. kubectl label namespace test istio-injection- istio.io/rev=[replace with control plane revision you want to use]

  3. create the new deployment in new namespace test and verify the side car proxy version. eg. kubectl -n test apply -f deply.yaml. [depl.yaml is the yaml file used for your deployment]

See here for detailed example and description: https://istio.io/latest/docs/setup/upgrade/canary/

  • But our usecase is to deploy pod on same namespace with new istiod because our whole workload is inside only one namespace – saurav Nov 22 '22 at 19:01
  • Every namespace has 1:1 mapping with mutating webhook admission controller which is responsible for istio sidecar injection. So you can run either of the control planes in one namespace AND not both at the same time. How about you create your whole deployment in a separate namespace with new controlplane in effect [using revision labels] - test it. – zerocool443 Nov 28 '22 at 10:23