1

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?

mikeycgto
  • 155
  • 1
  • 9

1 Answers1

6

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
  • 61
  • 1
  • 4