Skip to content

Container without internet access #1

@tsoft-globalproject

Description

@tsoft-globalproject

Hello there,

I managed to raise the 3 nodes following all the steps, the 3 nodes were networked and with internet access (Centos 7).

-192.168.0.7 kbworker02
-192.168.0.6 kbworker01
-192.168.0.9 kbmaster

But when I create some example PODS they are left in another network segment:

[kubeadmin @ kbmaster ~] $ kubectl get pods -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
hello-8685846c57-r9cfz 1/1 Running 1 21h 192.168.139.203 kbworker02
hello-8685846c57-tfxfp 1/1 Running 1 21h 192.168.170.76 kbworker01
hello-8685846c57-zhsrn 1/1 Running 1 21h 192.168.139.205 kbworker02
nginx-deployment-cnfbb 1/1 Running 1 23h 192.168.139.201 kbworker02
nginx-deployment-plr4s 1/1 Running 1 23h 192.168.170.73 kbworker01
ubuntu 1/1 Running 1 21h 192.168.139.204 kbworker02

And when I enter the ubuntu image, I don't get ping and it won't let me install:

[kubeadmin @ kbmaster ~] $ kubectl exec -it ubuntu - sh

ls

bin boot dev etc home lib lib32 lib64 libx32 media mnt opt ​​proc root run sbin srv sys tmp usr var

ping localhost

sh: 3: ping: not found

apt update

Err:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Temporary failure resolving 'security.ubuntu.com'
Err:2 http://archive.ubuntu.com/ubuntu focal InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

**apt install iputils-ping

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package iputils-ping**

which ping

Please can you help me to solve this first problem that comes my way.
Actually what I need is to be able to reach the services that run inside the containers.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions