Skip to content

Instantly share code, notes, and snippets.

@haphan
Last active July 13, 2019 07:35
Show Gist options
  • Select an option

  • Save haphan/a69ab1355a1631e9fe067e1e192a8d2d to your computer and use it in GitHub Desktop.

Select an option

Save haphan/a69ab1355a1631e9fe067e1e192a8d2d to your computer and use it in GitHub Desktop.
Deploy jetbrains fix server

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-svc

Add 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment