简体   繁体   中英

How to inject sidecar via deployment that points to new istiod rather than pointing to old istio

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

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM