Welcome to the Linux Foundation Forum!

Lab 3.2 Reboot error, cannot to kube-apiserver, retried from scratch and getting same error

So this is the second time I ran into this issue. Yesterday I ran into this issue and tried to trouble shoot it for next few hours but could not get it to work. Yes I already checked the discussion board and there was no solution.

So I tried the solution to delete the VM and start from scratch since I read it worked for some other students. However I am running into the same issue once again.

"curl: (28) Failed to connect to 10.97.40.62 port 5000 after 134912 ms: Couldn't connect to server"
or
"The connection to the server 10.2.0.7:6443 was refused - did you specify the right host or port?"

Note, for my VM I had to use Ubuntu 24.04 LTS since 20.04 is not available anymore will this cause a problem?
I have checked and Kubernetes API Server is not running after Reboot.

Answers

  • chrispokorni
    chrispokorni Posts: 2,550

    Hi @kenneth.kon001,

    With Ubuntu 24.04 being the recommended guest OS for the lab environment (per Exercise 2.1: Overview and Preliminaries), I don't see the benefit of using an earlier release such as 20.04.

    According to Step 11 of Lab 3.2, the repository service may take a few minutes to become available after the reboot, as all Kubernetes resources need to initialize and the repository components needs to launch as well. If not available after a few minutes, Step 11 also recommends checking .bashrc for the export repo=10.97.40.62:5000 instruction. If the instruction is there, you can simply source .bashrc to set and export the environment variable:

    source $HOME/.bashrc

    If this does not resolve your issue, check /etc/containerd/config.toml for the following entries:

    [plugins."io.containerd.cri.v1.images".registry.mirrors."*"]
    endpoint = ["http://10.97.40.62:5000"]
    

    If your entries are different or missing, please update accordingly, then restart the containerd service:

    sudo systemctl daemon-reload
    sudo systemctl restart containerd
    

    If attempting to provision a new lab environment and bootstrap a new Kubernetes cluster, I recommend downloading once again the SOLUTIONS tarball to ensure it includes the latest relevant configuration for the containerd runtime.

    Regards,
    -Chris

  • So first I tried checking ".bashrc" file and at the end of the file it has these two line of code.

    I also searched for config.toml but the only location I can find that is in the s_03 folder it seems.
    Output:
    student@cp:~$ find $HOME -name config.toml
    /home/student/LFD259/SOLUTIONS/s_03/config.toml

    Are either of this a problem?

  • chrispokorni
    chrispokorni Posts: 2,550

    Hi @kenneth.kon001,

    Your find command is restricted only to subdirectories of $HOME, an alias to /home/student, completely disregarding other possible ocurences of the config.toml file on the rest of the file system.

    I also searched for config.toml but the only location I can find that is in the s_03 folder it seems.

    I find it strange that the export and echo instructions found towards the end of the local-repo-setup.sh shell script executed successfully yet the config.toml has not been created in /etc/containerd/ after the containerd configuration executed by the same shell script. Did you encounter any errors when executing the sequence of instructions from Step 4 of Lab exercise 3.2?

    Are either of this a problem?

    Yes. The local image registry will not operate as expected if the shell script does not complete successfully in its entirety.

    Regards,
    -Chris

  • I dont believe I ran into any errors following Step 4 of Lab Exercise 3.2. I believe the config.toml was never created and only one that exist is in the project folder itself.

    Are these source and echo command at the end of .bashrc not suppose to be there?

    At this point it seems like I need to delete the VM again and try it from scratch the third time?

Categories

Upcoming Training