This commit is contained in:
Muhammad Ridwan Hakim, S.T., CPITA, ITPMCP 2025-04-10 11:52:47 +07:00 committed by GitHub
commit c9a4b73158
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 88 additions and 0 deletions

View file

@ -97,6 +97,37 @@ yarn add react react-dom @excalidraw/excalidraw
Check out our [documentation](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/installation) for more details!
## Deploy on Minikube
- 1. ```git clone git@github.com:rescenic/excalidraw.git```
- 2. ```cd excalidraw```
- 3. ```docker build -t excalidraw:v1.0.0 .```
- 4. ```minikube image load excalidraw:v1.0.0```
- 5. ```minikube image ls```
- 6. ```minikube addons enable ingress```
- 7. Add rescenic.com to system hosts:
```host
127.0.0.1 rescenic.com
::1 rescenic.com
```
- 8. ```kubectl apply -f deployment.yaml```
- 9. Check service in the pod:
```zsh
 kubectl get pod
NAME READY STATUS RESTARTS AGE
excalidraw-7f4cbc69b4-dqkbt 1/1 Running 0 17m
 kubectl exec -it excalidraw-7f4cbc69b4-dqkbt -- /bin/sh
/ # curl localhost
/ # exit
```
- 10. ```kubectl port-forward svc/excalidraw-service 9991:80```
- 11. ```minikube tunnel```
- 12. Check in host browser: http://rescenic.com
## Contributing
- Missing something or found a bug? [Report here](https://github.com/excalidraw/excalidraw/issues).

57
deployment.yaml Normal file
View file

@ -0,0 +1,57 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: excalidraw
spec:
selector:
matchLabels:
app: excalidraw
template:
metadata:
labels:
app: excalidraw
spec:
containers:
- name: excalidraw
image: excalidraw:v1.0.0
resources:
limits:
memory: "128Mi"
cpu: "500m"
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: excalidraw-service
spec:
selector:
app: excalidraw
ports:
- port: 80
targetPort: 80
# https://kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: excalidraw-ingress
labels:
name: excalidraw-ingress
spec:
rules:
- host: rescenic.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: excalidraw-service
port:
number: 80