1 year ago

#300009

test-img

Tarun Bharti

Volume Mount not working with Telepresence intercept

I am new to telepresence and trying to use personal interception in telepresence. I have access to running kubernetes env, where i am trying to use it learn it as well but I am unable to do telepresence interception to volume mount issue.

Things Which i am able to do

  1. Able to connect telepresence using telepresence connect
  2. Able to list all namespace in my EKS including namespace telepresence and ambassador (to verify if I don't have access level issues)
  3. Able to list all interceptor using telepresence list -n <namespace_name>
  4. Able to create telepresence intercept for workflow type deployment using command telepresence intercept cards-presentation-service-cards-presentation-service --port 8080 --env-file /Users/tarun/telepresence/cards-presentation-service.env
  5. Able to start my service with important warning docker run -p 8080:8080 -v /var/folders/by/dc0f23dn28b91nwg4tmbgclm0000gq/T/telfs-3008985902/var/run/secrets/kubernetes.io/serviceaccount/:/var/run/secrets/kubernetes.io/serviceaccount/ --env-file /Users/tarun/telepresence/cards-presentation-service.env 54cc4e78aa68
  6. The interception itself is working i.e. I am receiving the request at my local service when passing specific header.

Problem :

  1. When running step 4, the output didn't return telepresence volume mount(however I can see that when I do telepresence list). When I checked the telepresence logs I see an error.
2022-03-15 16:27:02.2848 info    connector/session/CreateIntercept-0 : Agent found or created for Deployment cards-presentation-service-cards-presentation-service.backbase
2022-03-15 16:27:03.0567 info    connector/session/intercept-port-forward/10.0.23.237:46451 : Mounting file system for intercept "cards-presentation-service-cards-presentation-service-backbase" at "/var/folders/by/dc0f23dn28b91nwg4tmbgclm0000gq/T/telfs-3008985902"
2022-03-15 16:27:03.0658 info    connector/session/intercept-port-forward/10.0.23.237:46451 : started command /usr/local/bin/sshfs sshfs -F none -f -C -oConnectTimeout=10 -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -o slave -o follow_symlinks -o allow_root localhost:/tel_app_mounts /var/folders/by/dc0f23dn28b91nwg4tmbgclm0000gq/T/telfs-3008985902 : exec.pid="83584"
2022-03-15 16:27:03.3388 error   connector/session/intercept-port-forward/10.0.23.237:46451 : remote host has disconnected
2022-03-15 16:27:03.3428 info    connector/session/intercept-port-forward/10.0.23.237:46451 : ended command sshfs : exec.pid="83584"
2022-03-15 16:27:07.3519 info    connector/session/intercept-port-forward/10.0.23.237:46451 : started command /usr/local/bin/sshfs sshfs -F none -f -C -oConnectTimeout=10 -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -o slave -o follow_symlinks -o allow_root localhost:/tel_app_mounts /var/folders/by/dc0f23dn28b91nwg4tmbgclm0000gq/T/telfs-3008985902 : exec.pid="83606"
2022-03-15 16:27:07.3759 error   connector/session/intercept-port-forward/10.0.23.237:46451 : mount_macfuse: mount point /private/var/folders/by/dc0f23dn28b91nwg4tmbgclm0000gq/T/telfs-3008985902 is itself on a macFUSE volume
  1. Due to above problem, the telepresence volume mount folder contain anything where I was expecting it to have folder structure of /var/run/secrets/kubernetes.io/serviceaccount which should contain token and namespace inside it

  2. Due to this when I start my service I do get this warning, meaning my local service not able to discover services using k8 discovery.

2022-03-15 14:17:01.196  WARN [cards-presentation-service,,] 76483 --- [           main] io.fabric8.kubernetes.client.Config      : Error reading service account token from: [/var/run/secrets/kubernetes.io/serviceaccount/token]. Ignoring.
2022-03-15 14:17:01.199  WARN [cards-presentation-service,,] 76483 --- [           main] io.fabric8.kubernetes.client.Config      : Error reading service account token from: [/var/run/secrets/kubernetes.io/serviceaccount/token]. Ignoring.
 
2022-03-15 14:20:06.145  WARN [cards-presentation-service,9a66783110c8a2fe8b6a172dfb16cb2e,51cd5acd5d2f31d9] 76483 --- [nio-8080-exec-2] o.s.c.l.core.RoundRobinLoadBalancer      : No servers available for service: token-converter
2022-03-15 14:20:06.146  WARN [cards-presentation-service,9a66783110c8a2fe8b6a172dfb16cb2e,ee2b1ad1e0ee8e26] 76483 --- [nio-8080-exec-2] c.b.b.b.a.e.AbstractApiExceptionHandler  : Unexpected exception from API

java.lang.IllegalArgumentException: Service Instance cannot be null.
  1. When I do ls inside the telepresence volume mount folder it says ls: device not configured

To me, whole problem is due to telepresence volume mount issue where folder should have contains serviceaccount details where it is failing. Any help is appreciated on this

spring-boot

docker

kubernetes

telepresence

0 Answers

Your Answer

Accepted video resources