I have a Rails server running with both a web
and worker
Deployment. One starts Puma, the other Sidekiq. How can I connect to an interactive rails console
using my application's image running on my Kubernetes cluster?
Asked
Active
Viewed 2,367 times
2

mikeycgto
- 165
- 1
- 1
- 9
1 Answers
7
You should be able to to use kubectl exec -ti <container> -- bash
. From there bring up your rails console.
You might also need to add -li
for bash. That will give you a shell in the container.
It's possible to run various commands directly without the use of bash. You just need to make sure to use -ti
for the exec command so that you can interact with it.
For more details see
http://kubernetes.io/docs/user-guide/getting-into-containers/

opennomad
- 71
- 1
- 4