damp-manchester-26851
04/21/2023, 5:08 PMfrontend and api-gateway
. Their ports are respectively 3000 and 3001. The main issue is that i cant do a HTTP-request to http://api-gateway:3001 ( i get an ERR_NAME_NOT_RESOLVED
).
I can only do that using external IP-address (http://127.10.0.7:3001)
.
When i used Docker Compose, i had no problems with getting access to the other services with api-gateway:3001
.
I am sorry in advance for it, but can i ask one more question? I run my own test in Garden, but i cant see the succeed
option in the Dashboard near it. It uses Jest-library to run the test. And it really passes it.
Thanks in advance!wget
command. It works great. The services actually know about each other. Cool.
But i cant make axios requests in my NodeJS application 🙂bright-policeman-43626
04/23/2023, 10:38 AMenvironments:
- name: local
defaultNamespace: ${var.DEFAULT_NAMESPACE}
variables:
base-hostname: local.demo.garden
And then in your applications you can setup the ingress like the following:
services:
- name: api
ports:
- name: http
containerPort: 3000
ingresses:
- path: /
port: http
hostname: api.${var.base-hostname}
Do this for each one of your applications, and now you can do HTTP requests directly to the HTTP endpoint.
api.local.demo.garden
damp-manchester-26851
04/24/2023, 10:50 AMkubectl
bright-policeman-43626
04/24/2023, 11:03 AMkubectl get ingress -A
now to see which ingresses you have there?damp-manchester-26851
04/24/2023, 11:03 AMbright-policeman-43626
04/24/2023, 11:03 AMdamp-manchester-26851
04/24/2023, 11:04 AMbright-policeman-43626
04/24/2023, 11:06 AMdamp-manchester-26851
04/24/2023, 11:09 AMbright-policeman-43626
04/24/2023, 11:10 AMgarden delete environment
this will cleanup everything (including dbs and volumes)kubectl delete namespace garden-system
damp-manchester-26851
04/24/2023, 11:12 AMimage: mongo
bright-policeman-43626
04/24/2023, 11:17 AMdamp-manchester-26851
04/24/2023, 11:18 AMbright-policeman-43626
04/24/2023, 11:20 AMdamp-manchester-26851
04/24/2023, 11:20 AMbright-policeman-43626
04/24/2023, 11:23 AMdamp-manchester-26851
04/24/2023, 11:24 AMbright-policeman-43626
04/24/2023, 11:24 AMdamp-manchester-26851
04/24/2023, 11:25 AMhttp://127.10.0.8:8070
?bright-policeman-43626
04/24/2023, 11:26 AMkubectl get deployments -A
please?damp-manchester-26851
04/24/2023, 11:27 AMbright-policeman-43626
04/24/2023, 11:27 AMdamp-manchester-26851
04/24/2023, 11:28 AMbright-policeman-43626
04/24/2023, 11:28 AMkubectl port-forward -n kaptal-default deployment/api-gateway 3000:3001
damp-manchester-26851
04/24/2023, 11:29 AMbright-policeman-43626
04/24/2023, 11:30 AMdamp-manchester-26851
04/24/2023, 11:30 AMbright-policeman-43626
04/24/2023, 11:31 AMdamp-manchester-26851
04/24/2023, 11:32 AMbright-policeman-43626
04/24/2023, 11:32 AMdamp-manchester-26851
04/24/2023, 11:34 AMbright-policeman-43626
04/24/2023, 11:35 AMcat /etc/hosts
I think minikube might not be adding a Host entry to resolve DNS locally 🤔damp-manchester-26851
04/24/2023, 11:36 AMbright-policeman-43626
04/24/2023, 11:40 AM::1 localhost
damp-manchester-26851
04/24/2023, 11:41 AM# The following lines are desirable for IPv6 capable hosts
?bright-policeman-43626
04/24/2023, 11:42 AMdamp-manchester-26851
04/24/2023, 11:44 AMbright-policeman-43626
04/24/2023, 11:44 AMdamp-manchester-26851
04/24/2023, 11:45 AMbright-policeman-43626
04/24/2023, 11:46 AMdamp-manchester-26851
04/24/2023, 11:47 AMbright-policeman-43626
04/24/2023, 11:47 AMdamp-manchester-26851
04/24/2023, 11:48 AMbright-policeman-43626
04/24/2023, 11:51 AMdocker-desktop
contextdamp-manchester-26851
04/24/2023, 11:51 AMbright-policeman-43626
04/24/2023, 11:55 AMdamp-manchester-26851
04/24/2023, 11:59 AMbright-policeman-43626
04/24/2023, 11:59 AMdamp-manchester-26851
04/24/2023, 12:00 PMbright-policeman-43626
04/24/2023, 12:00 PMdamp-manchester-26851
04/24/2023, 12:00 PMbright-policeman-43626
04/24/2023, 12:02 PMdamp-manchester-26851
04/24/2023, 12:02 PMbright-policeman-43626
04/24/2023, 12:02 PMdamp-manchester-26851
04/24/2023, 12:02 PMhttp://api-gateway:3001
work?bright-policeman-43626
04/24/2023, 12:34 PMdamp-manchester-26851
04/24/2023, 12:37 PMbright-policeman-43626
04/24/2023, 12:41 PMdamp-manchester-26851
04/24/2023, 12:43 PMbright-policeman-43626
04/24/2023, 12:44 PMdamp-manchester-26851
04/24/2023, 12:44 PMbright-policeman-43626
04/24/2023, 12:48 PMdamp-manchester-26851
04/24/2023, 12:57 PMbright-policeman-43626
04/24/2023, 1:13 PM