I'm extremely new to Kubernetes (besides it's not my field) but I got required to be able to execute this practice.
Question is that I need a Handbrake Converter in a containerized pod with a Persistent Volume mounted on a GKE cluster:
Everything is fine until this point but now I'm not able to upload a folder to that PV from my local machine.
What I have tried is a ssh connection to the node and then a sudo docker exec -ti containerId bash
but I just got rpc error: code = 13 desc = invalid header field value "oci runtime error: exec failed: container_linux.go:247: starting container process caused \"exec: \\\"bash\\\": executable file not found in $PATH\"\n"
.
Thanks in advance.
To transfer local files to a kubernetes pod, use kubectl cp
:
kubectl cp my-namepace/my-pod:/root/my-local-file -c my-container ./my-remote-location
For SSH'ing you need to go through kubectl as well:
kubectl exec -it <podname> -- /bin/sh