Deploy to a microk8s ubuntu node
microk8s.kubectl create ns jetbrains
microk8s.kubectl -n jetbrains create deployment jetbrains --image=haphan/jb:latest
microk8s.kubectl -n jetbrains scale deployment jetbrains --replicas=1
microk8s.kubectl -n jetbrains get pods
microk8s.kubectl -n jetbrains expose deployment jetbrains --type=NodePort --port=1212 --target-port=1212 --name=jetbrains-svcAdd ingress.yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: jetbrains-ingress
spec:
rules:
- host: jetbrains.haphan.me
http:
paths:
- path: /
backend:
serviceName: jetbrains-svc
servicePort: 1212
# test from the same server
curl jetbrains.haphan.me
404 page not found --> it works
# test from remote-server with public IP
curl jetbrains.haphan.me
404 page not found --> it works