Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong instructions and build #4

Open
ctmnz opened this issue May 26, 2024 · 1 comment
Open

Wrong instructions and build #4

ctmnz opened this issue May 26, 2024 · 1 comment

Comments

@ctmnz
Copy link

ctmnz commented May 26, 2024

The instructions in the "Lab 3.2 - Managing Applications with Argo CD" section of the course are not working.

The image(s) that we are downloading from docker hub https://hub.docker.com/r/liquidreply/argocd-example-app/tags is/are built to listen of port 80, but the deployment has 3000 as containerPort in the deployment.yaml manifest, and the service is using that wrong port too. The instructions for port forwarding are starting the forwarding but fail on the first request:

Forwarding from 127.0.0.1:9090 -> 3000
Forwarding from [::1]:9090 -> 3000
Handling connection for 9090
E0526 23:06:57.873145 39534 portforward.go:413] an error occurred forwarding 9090 -> 3000: error forwarding port 3000 to pod 78b33df8339f89d73c24aae388e0913977aa0b5db2a5ccec072b1d03f23d77d2, uid : failed to execute portforward in network namespace "/var/run/netns/cni-ece8624f-bf66-fe0f-9360-919d6b944074": failed to connect to localhost:3000 inside namespace "78b33df8339f89d73c24aae388e0913977aa0b5db2a5ccec072b1d03f23d77d2", IPv4: dial tcp4 127.0.0.1:3000: connect: connection refused IPv6 dial tcp6 [::1]:3000: connect: connection refused
error: lost connection to pod

If you change the port in the manifests from 3000 to 80 everything is working as expected. I can only guess that you have migrated from express app to nginx web server and have not changed the build parameters in the manifests but this is only a speculation.

@flphvlck
Copy link

That's really an issue.
Rather than change port in manifests, fix please the port in container to listen in some unprivileged port.
I know it's just for testing, but running the image as non-root should also be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants