I deployed istio/bookinfo on kubernetes, and I want to install stress on the microservice container to inject fault. However, When I use
kubectl exec -it reviews-v1-f55d74d54-kpxr2 -c reviews --username=root -- /bin/bash
to log in the container, it show that the user is still default. and the command 'apt-get' got
default@reviews-v2-6f4995984d-4752v:/$ apt-get update
Reading package lists... Done
E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)
I tried to use 'su root' but I don't know the answer. I searched some answer say that I can use 'docker exec', it works but it is not convenient, so I want to know how to log in the container by use the command kubectl exec.