SocketCluster / socketcluster

Highly scalable realtime pub/sub and RPC framework
https://socketcluster.io
MIT License
6.15k stars 314 forks source link

Minikube + Ingress #553

Open stephwildcode opened 2 years ago

stephwildcode commented 2 years ago

Hello,

I'm trying to set up minikube with socketcluster.

Everything working fine except the Ingress.

I ran the command :

kubectl apply -f scc-ingress.yaml

and i have got this issue :

error: unable to recognize "scc-ingress/scc-ingress.yaml": no matches for kind "Ingress" in version "extensions/v1beta1"

I tried to modify apiVersion with networking.k8s.io/v1beta1 but i have got the same issue.

Can you help me to solve this ?

Thanks in advance,

stephwildcode

maarteNNNN commented 2 years ago

I could start it in my minikube image Can you post the yaml?

stephwildcode commented 2 years ago

yes here's the yaml :

2021-11-10_17h57_10

maarteNNNN commented 2 years ago

Your minikube is probably 1.22+ which doesn't support v1beta1 anymore. I tried here really quick here but ultimately failed, you will need to do something with namespaces:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: scc-ingress
  annotations:
    kubernetes.io/ingress.allow-http: 'false'
spec:
  # You should upload a certificate to your Kubernetes platform and refer to it here by secretName.
  # If you do not want to serve SCC over TLS, you can remove or comment out the
  # kubernetes.io/ingress.allow-http annotation above and the tls section below.
  # Note that raw (unencrypted) WebSockets may not work if you are behind a corporate proxy so
  # it is advised that you provide a cert for production and access the SCC service via https:// and wss://
  # tls:
  #  -
  #    secretName: scc-tls-credentials
  backend:
    service:
       name: scc-worker
       port:
          number: 8000

This is the deprecation guide: https://kubernetes.io/docs/reference/using-api/deprecation-guide/ If you do find a solution it would be great to make a PR for it!

stephwildcode commented 2 years ago

Yes you're right, my minikube version is 1.22.

Maybe i'll try to downgrade my minikube version or find a configuration working with 1.22

Thanks for your reply, it was helpful.

stephwildcode commented 2 years ago

Hello,

I found a way to start the ingress :

2021-11-17_17h08_54

But, i can't reach the ingress with minikube ip :

kubectl get ingress NAME CLASS HOSTS ADDRESS PORTS AGE scc-ingress nginx * 192.168.49.2 80 3m34s

I'm trying the address 192.168.49.2 in chrome browser but not working Also, i tried with "minikube tunnel" command but not working too on 127.0.0.1

How can i get my ingress reachable in my chrome browser ? Did I miss something in my configuration ?

Thanks in advance,

stephwildcode

stephwildcode commented 2 years ago

Hello,

I found a way to tunnel my minikube connection. I used this command and i was able to reach socketcluster

minikube service ingress-nginx-controller -n ingress-nginx --url