title: How to deploy frontends on kubernetes and how this can work with AWS Cloudfront?
body: <p>I have two frontends in which one is VueJS based and another is traditional server side rendered frontend. Both these frontends use cookies to identify users and user data is stored on MongoDB. I want to deploy 2 or more instances of one frontend (used by the public) and one instance of other frontend (used only by employees).</p>
  <p>I also want to deploy public facing frontend static assets via AWS Cloudfront.</p>
  <p>How do I deploy to Kubernetes above scenario? Do I deploy frontends to multiple Pods in Kubernetes?</p>
  <p>Do I deploy Cloudfront to Pods on Kubernetes?</p>
  <p>If I use AWS managed Kubernetes, EKS, does anything change in above scenario?</p>
  <p>How do I deploy dynamic assets ( pulled from MongoDB database) on AWS Cloufront?</p>
  <p>The Java Spring Boot APIs backend uses OAuth 2 to athenticate users (on VueJS frontend login form). VueJS frontend uses JWT access/refresh tokens whereas Spring Boot frontend uses a fixed API user on its backend to make API requests to API backend to get content to show to customers.</p>