Level-up Your DevOps with GitHub Actions and Kubernetes - Rob Richardson - NDC Oslo 2024

Learn practical DevOps techniques using GitHub Actions and Kubernetes, from multi-stage Docker builds and secrets management to efficient container deployment and local debugging workflows.

Key takeaways
  • Multi-stage Docker builds separate build environment from runtime environment, keeping production images small and secure by excluding build tools and source code

  • Use environment variables and Kubernetes secrets for configuration instead of embedding sensitive data in application settings or Docker images

  • Leverage GitHub Actions secrets manager to store credentials and sensitive configuration, avoiding secrets in pipeline definitions

  • Reference external CDN resources for common libraries like Bootstrap/jQuery rather than bundling them, reducing image size

  • .gitignore and .dockerignore files are crucial for excluding downloaded content, build artifacts, temp files, user-specific files, and secrets

  • Tag Docker images with Git commit SHA for traceability between running containers and source code

  • Kubernetes port forwarding enables local testing and debugging without exposing services publicly

  • GitHub Actions workflows can be configured differently for main branch vs pull request builds

  • Alpine-based images provide smaller footprint compared to Debian-based alternatives

  • Use GitHub status badges to quickly visualize build status and link back to source code