-
Notifications
You must be signed in to change notification settings - Fork 26
Could not resolve host: controller hostname #67
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
Comments
there does seems to be some problem, /usr/src/docker-nginx-controller/ubuntu/no-nap# docker ps
/usr/src/docker-nginx-controller/ubuntu/no-nap# docker logs 7a3e37caaa3b
I do not see the nginx plus instance added in nginx controller no tail log from agent log
|
Do you have any orphaned instances in Controller? You should see a new instance "7a3e37caaa3b" |
hm, after I deploy the image in k3s as pod with
kubectl get po -o wide
cat /etc/hosts
kubectl exec -it nginx-agent -- head -20 /etc/nginx-controller/agent.conf
|
the problem is when building the image, the ubuntu 18.04 container does not have access to host machine /etc/hosts, adding docker build argument |
Use the controller ip address for this: api_url = ngx-ctlr-master.localhost:443 |
I did use the IP address initially, but at later docker build stage, it complains something about controller hostname |
DOCKER_BUILDKIT=1 docker build --build-arg CONTROLLER_URL=https://10.154.120.180/install/controller-agent --build-arg API_KEY='495ad61b1beb6c0cfbd4e0eafd22ac9b' --secret id=nginx-crt,src=nginx-repo.crt --secret id=nginx-key,src=nginx-repo.key -t nginx-agent .
|
the FQDN setting of the Controller platform drives this value. |
while building the image, ran into
the
ngx-ctlr-master.localhost
is the nginx controller name, I don't have any DNS setup for the build host machine to resolve nginx controller host:ngx-ctlr-master.localhost
, tried to addngx-ctlr-master.localhost
in build host machine/etc/hosts
, does not work. then i added docker argument--add-host "ngx-ctlr-master.localhost:10.154.120.180"
, this workedmoby/moby#34078 says the host:ip mapping will not persist in the image
/etc/hosts
file, wonder if this could be a problemThe text was updated successfully, but these errors were encountered: