I'm trying to deploy a sample react project that is created with create-react-app to kubernetes using garden, however, no services can be found. As in the example, I have created a project.garden.yml in the root folder. In the React project's folder, I've created the garden.yml.
kind: Project
name: react-app
environments:
name: default
providers:
name: local-kubernetes
environments: [default]
Above is project.garden.yml that is in the root folder.
kind: Module
type: container
name: reactapp
dockerfile: Dockerfile
services:
name: reactapp
args:
- yarn
- start
ingresses:
- path: /api
port: http
Above is the garden.yml which is the root folder of the react module.
When I enter the command garden deploy
or garden deploy --force-refresh
, it outputs the following:
Deploy 🚀
✔ providers → Getting status... → Done
No services to deploy. Aborting.
React's Dockerfile is like following:
FROM node:13.12.0-alpine
WORKDIR /app
COPY package.json ./
COPY yarn.lock ./
COPY . ./
EXPOSE 3000
CMD [ "yarn", "start" ]
What am I missing here so that project finds the react module and deploys it onto the local kubernetes which is running on docker.