Need help in addressing issue with worker-pod which is part of demo-voting-app.
As checked from the cluster Below are the details for error.
Normal Started 7s (x3 over 24s) kubelet Started container worker-app
Warning BackOff 6s (x3 over 22s) kubelet Back-off restarting failed container
Logs:
kubectl logs worker-app-pod
System.NotSupportedException: Authentication method not supported (Received: 10)
at Npgsql.NpgsqlConnector.ParseServerMessage(ReadBuffer buf, BackendMessageCode code, Int32 len, DataRowLoadingMode dataRowLoadingMode, Boolean isPrependedMessage)
at Npgsql.NpgsqlConnector.DoReadMessage(DataRowLoadingMode dataRowLoadingMode, Boolean isPrependedMessage)
at Npgsql.NpgsqlConnector.ReadMessageWithPrepended(DataRowLoadingMode dataRowLoadingMode)
at Npgsql.NpgsqlConnector.HandleAuthentication(String username, NpgsqlTimeout timeout)
at Npgsql.NpgsqlConnector.Open(NpgsqlTimeout timeout)
at Npgsql.ConnectorPool.Allocate(NpgsqlConnection conn, NpgsqlTimeout timeout)
at Npgsql.NpgsqlConnection.OpenInternal()
at Worker.Program.OpenDbConnection(String connectionString) in /code/src/Worker/Program.cs:line 78
at Worker.Program.Main(String[] args) in /code/src/Worker/Program.cs:line 19
Hello @sri.lynx,
Please follow these full steps to know what you have missed and try again :
Note: We will create deployments again so please before following the steps, Runkubectl delete deployment --allto delete old deployments and avoid any conflicts.
Run git clone https://github.com/mmumshad/example-voting-app-kubernetes-v2.git
Run cd example-voting-app-kubernetes-v2/
Run vim postgres-deployment.yml and modify it’s content as below then save and exit.
Run kubectl create -f . if you create deployments for the first time, if you created the same deployments before Run kubectl apply -f . .
Run kubectl get service to get the exposed ports.
For example if the output of the command as above you can accces the voting app by hitting One_of_the_worker_nodes_IP:32733 on your browser and the same for the resulting app >> One_of_the_worker_nodes_IP:30013.
Check :
Note: The voting application only accepts one vote per client. It does not register votes if a vote has already been submitted from a client.
Fantastic, Works fine. Just want to understand as far as worker-app-pod is concerned the image do not contain the tag information, does it means it’s taking up the latest one?
Should we use POSTGRES_HOST_AUTH_METHOD=trust? As per postgres it is not recommended. We should be using user/password instead, but that that it does not work. What can be the issue?
See below:
WARNING: POSTGRES_HOST_AUTH_METHOD has been set to “trust”. This will allow
example-voting-app-db-1 | anyone with access to the Postgres port to access your database without
example-voting-app-db-1 | a password, even if POSTGRES_PASSWORD is set. See PostgreSQL
example-voting-app-db-1 | documentation about “trust”:
example-voting-app-db-1 | PostgreSQL: Documentation: 16: 21.4. Trust Authentication
example-voting-app-db-1 | In Docker’s default configuration, this is effectively any other
example-voting-app-db-1 | container on the same system.
example-voting-app-db-1 |
example-voting-app-db-1 | It is not recommended to use POSTGRES_HOST_AUTH_METHOD=trust. Replace
example-voting-app-db-1 | it with “-e POSTGRES_PASSWORD=password” instead to set a password in
example-voting-app-db-1 | “docker run”.
This app has multiple versions (some from kodekloud, some from docker-samples) and the postgres versions differ; one uses Postgresql 9, which is very old. But for now, let’s assume that your postgres version allows for POSTGRES_HOST_AUTH_METHOD. True, you don’t want to do this in production. But getting this particular lab to work right is a bit tricky, so I recommend it for purposes of completing the lab.
Hello team. I am using minikube in an EC2 instance, how can I open the url in the browser, when I made a curl inside the EC2 using the url using the commad
minikube start voting-app --url
I can observe that the URL is reachable inside the EC2, but not in browser,
Please, suggests me
I don’t believe that minikube is designed to be accessed that way; it’s not designed to be particularly secure, so minikube’s virtual system exposes itself to the host in host-only mode. This will make it difficult to access outside of your EC2 system.
It might be possible to coerce it into doing what you want though; you might want to ask to folks on the #minikube group of Kubernetes Slack.