Posts

Showing posts with the label kubernetes-pod

Kubernetes tries to start Rails twice on the same pod

Kubernetes tries to start Rails twice on the same pod I'm trying to get my dokerized Rails app to run on Kubernetes hosted at GCP. kubectl apply -f k8s/webshop.yml kubectl get pods NAME READY STATUS RESTARTS AGE shop-lcvxc 2/3 CrashLoopBackOff 23 1h So far so good, but the app will not start. Investigating further reveals that it has tried to start Rails (Puma) twice. Any idea why this happens? Logs $ kubectl logs shop-lcvxc -c webshop => Booting Puma => Rails 5.2.0 application starting in development => Run `rails server -h` for more startup options initialize PushNotifications Puma starting in single mode... * Version 3.11.4 (ruby 2.4.4-p296), codename: Love Song * Min threads: 5, max threads: 5 * Environment: development * Listening on tcp://0.0.0.0:3001 Exiting /usr/local/bundle/gems/puma-3.11.4/lib/puma/binder.rb:270:in `initialize': Address already in use - bind(2) for "0.0.0.0" port 3001 (Errno:...