I'm pretty green with Kubernetes but have some experience with Google Container Engine. I'm struggling to find a good solution for serving media content from applications.
I've currently got media stored in a public bucket on Google Cloud Platform, and i'm running an NGINX proxy on local to take any path /images
to the bucket for example:
location /videos {
proxy_pass https://storage.googleapis.com/bucket-name/videos;
proxy_intercept_errors on;
error_page 500 502 503 504 404 = @localmedia;
}
What way would you recommend to serve media content on applications running on k8s?
If you need to serve static files form Google Cloud Storage the best way is to use directly the custom domain bucket feature no use K8S.
https://cloud.google.com/storage/docs/hosting-static-website
Basically you need to create your bucket as public with the name of the domain or subdomain you want to use and pint it as a CNAME to the special domain c.storage.googleapis.com
With that said, what is the main reason to use k8s?