Welcome to the Linux Foundation Forum!

Lab 9.3

Hello,

I encounter a problem on the exercise Working with CoreDNS, It is impossible for me to update packets through containers.

My config is local:
My host is an ubuntu 20.04
I have 2 VMs with KVM for my master and my worker, I have installed Docker, both are on the same network which is a NAT. And I am unable to update inside a container.

Here is my error:

Basically, I know to resolve my problems, but on this one, I do not understand where the problem come from, is it from K8s, my local network or simply from Docker.

Thank you in advance, for helping me to resolve this issue.

Regards
Damien

Comments

  • serewicz
    serewicz Posts: 1,000

    Hello,

    First off our labs are tested using Ubuntu 18.04, not 20. While this is probably not the issues, its something to consider. The networking of your VMs is most likely the issue.

    Can you connect from the VM to the outside world? Something like: curl http://archive.ubuntu.com

    Is there a proxy between you and the internet? If so you may need to add to the apt command something like this: sudo http_proxy='http://username:password@proxy.yournet.com:8080/' apt-get update

    There are many ways to set up the networking between your VMs and the host and outside world when using KVM/QEMU, I would start looking there.

    Regards,

  • Hello,

    First of all, thank you for according your time on my issue.

    Sorry, i think I forget to say: my Desktop is Ubuntu 20.04.
    Each of my VM are on Ubuntu 18.04 like the lab.

    From the VM I do not have any problem to contact the outside world, I have installed my kubeadm,kubelet et kubectl from there.

    I suppose it comes from the network between my pod/container with the outside world through my VMs. I do not think to use proxy, the lab is on my pc at home (Classic configuration I think)

    From my Ubuntu's Container, I am not able to check if I am connected through the outside world, I tried "curl", or "ping" but "Command not found" . Do I missed something about the docker configuration to access on www ? I have checked all the steps, and I do not see my mistakes.

    Any ideas ?

  • Hi @seiph,

    Typically, Ubuntu containers are very flexible, they allow you to install in them any package you may need, such as curl or ping. Unfortunately, this may not be possible since your container seems to be isolated from the outside world.

    What are the contents of /etc/resolv.conf and /etc/hosts files of the container?

    Also, what are the IP addresses of your Nodes, and what is the IP address of the container?

    Regards,
    -Chris

  • seiph
    seiph Posts: 4
    edited September 2020

    Hi @chrispokorni ,

    Thank you for your response,

    Here is my screenshots:

    I think IP on hosts is the IP of the container right ?

    For my VMs, here is my IPs:
    master: 172.16.200.31
    worker: 172.16.200.11

    Do you see something which explains this situation ? The nameserver address maybe ?

    Regards,
    Damien

  • seiph
    seiph Posts: 4
    edited September 2020

    Hello,

    I tried to create an other VM with a docker installation and pull the same ubuntu image. It works, I am able to update my packets.

    So I imagine, it comes from my pod configuration, I am looking for a way to know if I use a proxy, or if I need to specify something else.

    Edit: I tried to change the ubuntu Image by debian to do the same command and it works ....

  • Glad to see it all works!

    Regards,
    -Chris

Categories

Upcoming Training