Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sadeghmohebbi/k8s-node-starter-with-kosko
Kubenetes Node js app sample with kosko
https://github.com/sadeghmohebbi/k8s-node-starter-with-kosko
Last synced: 14 days ago
JSON representation
Kubenetes Node js app sample with kosko
- Host: GitHub
- URL: https://github.com/sadeghmohebbi/k8s-node-starter-with-kosko
- Owner: sadeghmohebbi
- License: apache-2.0
- Created: 2024-04-25T23:19:40.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-04-30T23:11:22.000Z (9 months ago)
- Last Synced: 2024-11-12T04:37:27.027Z (2 months ago)
- Language: TypeScript
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is a [Kosko] project bootstrapped with `create-kosko` command.
## Getting Started
Before you start, install minikube (or whatever else to provide k8s environment) and docker. then run command below:
```sh
docker buildx build -t backend-node-app:figleter ./app
# in case you install minikube
docker save backend-node-app > backend-node-app.tar
minikube image load backend-node-app.tar
```Generate Kubernetes manifests with the following command.
```sh
npm run generate
```The result will be printed in the console. You can pipe the output to `kubectl` to apply generated manifests on Kubernetes.
```sh
npm run --silent generate | kubectl apply -f -
# in case when you minikube
minikube tunnel
kubectl get services # to access edge loadbalancer ip
```When `--env` option is set, Kosko will read variables from environment files. Then you can fetch variables with `@kosko/env` package.
```sh
npm run generate -- --env dev
```You can try editing files in `components` and `environments` folder and re-run `npm run generate` to see changes.
## Learn More
Check [Kosko docs](https://kosko.dev/docs/) for more information about Kosko.
[kosko]: https://kosko.dev/