Closed JCzz closed 4 months ago
👋 @JCzz
I would suggest getting the logs (kubectl logs
of the pod/replicaset) for the ingress controller, to see what is going on. Potentially you could attach them here. Alternatively, you could also kubectl get events
to see if everything is fine.
If I had to guess, it sounds like one of your secrets (API_KEY
or AUTHTOKEN
) is not configured properly. You could run something like kubectl describe secrets ngrok-ingress-controller-kubernetes-ingress-controller-credentials
to see what you've got (both should be present, showing 49 bytes
), and even decode them to see if they match what you've got from the dashboard.
Thanks @nikolay-ngrok
I get this when doing logs -p ngrok-ingress-controller-kubernetes-ingress-controller-mandrwcn
:
{"level":"info","ts":"2023-06-09T11:47:09Z","logger":"setup","msg":"starting manager","version":"0.7.0","commit":"4805e3cc63287a5b1b8d9c47d5483b84755fe716"}
{"level":"error","ts":"2023-06-09T11:47:10Z","msg":"Failed to get API Group-Resources","error":"Get \"https://10.96.0.1:443/api?timeout=32s\": dial tcp 10.96.0.1:443: connect: connection refused","stacktrace":"sigs.k8s.io/controller-runtime/pkg/cluster.New\n\tsigs.k8s.io/controller-runtime@v0.14.1/pkg/cluster/cluster.go:161\nsigs.k8s.io/controller-runtime/pkg/manager.New\n\tsigs.k8s.io/controller-runtime@v0.14.1/pkg/manager/manager.go:351\nmain.runController\n\t./main.go:161\nmain.cmd.func1\n\t./main.go:96\ngithub.com/spf13/cobra.(*Command).execute\n\tgithub.com/spf13/cobra@v1.6.1/command.go:916\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/cobra@v1.6.1/command.go:1044\ngithub.com/spf13/cobra.(*Command).Execute\n\tgithub.com/spf13/cobra@v1.6.1/command.go:968\nmain.main\n\t./main.go:67\nruntime.main\n\truntime/proc.go:250"}
Error: unable to start manager: Get "https://10.96.0.1:443/api?timeout=32s": dial tcp 10.96.0.1:443: connect: connection refused
Usage:
manager [flags]
Flags:
--controller-name string The name of the controller to use for matching ingresses classes (default "k8s.ngrok.com/ingress-controller")
--election-id string The name of the configmap that is used for holding the leader lock (default "ngrok-ingress-controller-leader")
--health-probe-bind-address string The address the probe endpoint binds to. (default ":8081")
-h, --help help for manager
--metadata string A comma separated list of key value pairs such as 'key1=value1,key2=value2' to be added to ngrok api resources as labels
--metrics-bind-address string The address the metric endpoint binds to (default ":8080")
--region string The region to use for ngrok tunnels
--server-addr string The address of the ngrok server to use for tunnels
--watch-namespace string Namespace to watch for Kubernetes resources. Defaults to all namespaces.
--zap-devel Development Mode defaults(encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn). Production Mode defaults(encoder=jsonEncoder,logLevel=Info,stackTraceLevel=Error)
--zap-encoder encoder Zap log encoding (one of 'json' or 'console') (default )
--zap-log-level level Zap Level to configure the verbosity of logging. Can be one of 'debug', 'info', 'error', or any integer value > 0 which corresponds to custom debug levels of increasing verbosity (default )
--zap-stacktrace-level level Zap Level at and above which stacktraces are captured (one of 'info', 'error', 'panic'). (default )
--zap-time-encoding time-encoding Zap time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano'). Defaults to 'epoch'.
{"level":"error","ts":"2023-06-09T11:47:10Z","logger":"setup","msg":"error running manager","error":"unable to start manager: Get \"https://10.96.0.1:443/api?timeout=32s\": dial tcp 10.96.0.1:443: connect: connection refused","stacktrace":"main.main\n\t./main.go:68\nruntime.main\n\truntime/proc.go:250"}
Should I install Metal or some other Ingress before using ngrok ingress?
@JCzz from what I can see, the controller cannot talk the the k8s api server. Haven't had the time to investigate why this could be the case just yet, but letting you know just in case you've got some ideas.
Hello @JCzz , just following up here - were you able to resolve your issue?
Closing as we can't reproduce and the message seems clear it was a connection problem to the k8s api server. Let us know if you still encounter this issue.
What happened
Great idea with an ingress controller!
Following this introduction: https://ngrok.com/blog-post/ngrok-k8s
I am able to install and I got this running:
kubectl get pods
I am running on a KinD cluster on MacOS latest:
kubectl get svc
I have tried: https://awear.ngrok.app https://awear.ngrok-free.app https://awear.ngrok-free.dev
I get:
I also tried:
kubectl edit ingress game-2048
and changed "- host: awear.ngrok.app" to "- host: awear.ngrok-free.app" But still the same error: ERR_NGROK_3200Any ideas?
Thanks
What you think should happen instead
Be able to access the ingress, routing to the serving the service
How to reproduce
No response