Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eliottwantz/k8s-svelte
Deploy a simple svelte app to local kubernetes cluster with k3d
https://github.com/eliottwantz/k8s-svelte
Last synced: 10 days ago
JSON representation
Deploy a simple svelte app to local kubernetes cluster with k3d
- Host: GitHub
- URL: https://github.com/eliottwantz/k8s-svelte
- Owner: eliottwantz
- Created: 2022-11-12T23:47:40.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-12T23:56:49.000Z (about 2 years ago)
- Last Synced: 2024-10-27T17:37:19.023Z (about 2 months ago)
- Language: CSS
- Size: 38.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple svelte app to deploy on local k8s cluster using k3d
## Create cluster
```bash
k3d cluster create --config k3d.yaml
```Creates the cluster exposing port 8080 to port 80 of the cluster's node
so that we can acces it to localhost:8080## Build docker image
```bash
docker build --pull -t k3d-myreg.localhost:12345/simplesvelte:latest .
```## Push image to local cluster registry
```bash
docker push k3d-myreg.localhost:12345/simplesvelte:latest
```## Launch app
Create the deployment, internal service (ClusterIP) and the ingress that routes
localhost:8080/ to the internal service```bash
kubectl apply -f k8s
# Open app at localhost:8080 or directly at ingress ip.
kubectl get ingress
```![IpAddress](./ipaddr.png)