Skip to content

Instantly share code, notes, and snippets.

@ourskycode
Created November 27, 2017 08:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ourskycode/83642f9acc23f058d2879067aed23db6 to your computer and use it in GitHub Desktop.
Save ourskycode/83642f9acc23f058d2879067aed23db6 to your computer and use it in GitHub Desktop.
Discourse k8s debugging command
# Check logs of k8s pod
kubectl logs --since=1h --tail=50 -lapp=web-server
# Open an interactive terminal into the web-server / pgsql server:
kubectl exec -it **web-server** -- /bin/bash
kubectl exec -it **pg-sql** -- /bin/bash
# You might want to do the following:
# * Delete / create the pgsql database
# * Check logs under /shared/log/rails
# * Start stop unicorn by sv stop unicorn
# * Run bundle exec rake db:migrate / admin:create in case something went wrong under /var/www/discourse
# * You can also check the logs with an admin account at /admin/logs of your deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment