omrikiei / ktunnel

A cli that exposes your local resources to kubernetes
GNU General Public License v3.0
958 stars 75 forks source link

Why do I have 2 versions of a deployment? #94

Open guai opened 1 year ago

guai commented 1 year ago

Hi I'm launching ktunnel with my custom bat which creates non-privileged deployment/svc for ktunnel proxy server and then starts ktunnel.exe with -r Also ktunnel image is changed to point to my inner docker registry. Beside that the deployment/svc are identical to what ktunnel creates. Ktunnel server starts ok with that deployment/svc.

Something like so:

oc login --token=...
oc delete deployment,service mysvc
oc create -f mysvc-ktunnel-deployment.yml
oc wait --for=condition=Ready pod -l "app.kubernetes.io/instance=mysvc"
ktunnel.exe expose -n foo -p 9000 mysvc 8080:9000 -r

For some reason I see the second deployment version. It creates a pod that is stuck in tryin to download ktunnel image using its original url. And oc wait waits for this second pod until timeout. So even before ktunnel.exe itself is called. Why does this happen? Does ktunnel server create it? And how do I prevent that?

guai commented 1 year ago

upd: I was wrong about the second deployment being created before ktunnel.exe is called. openshift's terminating pods got me confused. definitely ktunnel.exe makes it despite of -r flag