Unable to log in to go micro's remote server

41 views Asked by At

Description

Hello, I have been following a tutorial that sets up my own microservice in the cloud with go micro and kubernetes.

The tutorial has a kubernetes cluster as a prerequisite, so I followed another tutorial by the same author to create a kubernetes cluster.

To sum up the tutorials so you may get the big picture: I first used Hetzner Cloud to by some machines on a remote location so I can deploy my Rancher server there. Rancher is a UI tool for creating and managing a kubernetes cluster.

Therefore, I:

  • Bought a machine on Hetzner Cloud
  • Deployed my Rancher server there
  • Went to a public IP to log into Rancher
  • Made a kubernetes cluster with one master and one worker node. Everything was successful there, I could download kube's .config and manipulate the cluster from the command line.

The next tutorial was on how you deploy go micro framework and your own helloworld microservice in the kubernetes cluster. The tutorial walks you through deploying go micro's services first, and then shows you the deployment for your own microservice.

I managed to do everything and all of my services are up and running. There is just one problem, I can't log into the micro server with username: admin and password: micro.

Symptoms

What I can do:

  • I can list kubernetes pods with kubectl get pods -n micro
  • I can log into a particular pod (I logged into api like in tutorial) with kubectl exec -it -n micro {{pod}} -- bash
  • There I see the micro exec. From there, the tutorial just said log in and execute ./micro services and it lists all the services, but I am unable to log in. When I try with the default "admin, micro" combination it says Invalid token provided. I checked the jwt tokens in MICRO_AUTH_PRIVATE_KEY and MICRO_AUTH_PUBLIC_KEY and they match in every service.

I am able to create another user after which I get access denied to namespace error when trying to list the services. I am unable to create rules with that user.

Please help, this has been haunting me for days.

0

There are 0 answers