Skip to content

Create Kubernetes deployment for backend #11

@ben8622

Description

@ben8622

We need to be able to deploy the backend to our GKE cluster, if we can do this locally (using docker desktop's built in kubernetes cluster) transferring it to the cloud should be relatively easy.

This relies on having a usable docker container first. I.E. you can ping the REST endpoints on your docker container.

You can see the frontend's example deployment.yml and service.yml in ./frontend/K8s/. It is important to note that whatever port's you are exposing through the container will have to reflect in the service.yml:

apiVersion: "v1"
kind: "Service"
metadata:
  name: "react-docker-service"
  namespace: "default"
spec:
  ports:
  - protocol: "TCP"
    port: 80
    targetPort: 80 ## THIS IS THE CONTAINER PORT I AM EXPOSING FOR FRONTEND ##
  selector:
    app: "react-docker"
  type: "LoadBalancer"
  loadBalancerIP: ""

I'm assuming this will be more complex than the frontend so please add any tutorials/comments you think may be relevant. For evidence attach screenshot of successful API requests to your cluster's external IP.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions