Install: /etc/kubernetes/admin.conf does not exist

Hi,

I am simply running a script for the application I want to install:

bash app-kurl-installer.sh kurl-install-directory="/var/lib/replicated/kurl"

but I am getting:

⚙  Running install with the argument(s): kurl-install-directory=/var/lib/replicated/kurl
Package kurl-bin-utils-v2023.04.24-0.tar.gz already exists, not downloading
SELinux is not installed: no configuration will be applied
Awaiting 2 minutes to check kURL Pod(s) are Running
W0505 12:23:03.526348  126157 loader.go:223] Config not found: /etc/kubernetes/admin.conf
The connection to the server localhost:8080 was refused - did you specify the right host or port?
The installer will use network interface 'ens4' (with IP address '192.168.15.47')
Package containerd-1.6.20.tar.gz already exists, not downloading
Package ... [MORE PACKAGES] ...
⚙  Running host preflights
... [ALL PASS] ...
⚙  Running in cluster Preflights
W0505 12:27:25.525100  126811 loader.go:222] Config not found: /etc/kubernetes/admin.conf
Error: run preflight: collect results: failed to check RBAC for collectors: failed to run subject review: Post "http://localhost:8080/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": dial tcp 127.0.0.1:8080: connect: connection refused
On cluster Preflights checks have failures that block the installation.

What is wrong???

I had to enable forwarding etc.:

Found this after hours of trying and searching… I have to say kURL is one of the worst pieces of software I have ever seen when it gets to logging/debuggability. Why does it not forward the logs of the commands it is trying to run… Sadly, I am stuck with it.

EDIT: This did not solve the problem. What I tried was to see if kubeadm was working and saw the forwarding errors from above. BUT: running kubeadm init actually created the abovementioned config for me. After running kubeadm reset, the installer fails again…

Hi @kubenewb can you provide a bit more detail on the initial configuration of your kURL cluster? Are you doing a single node or multinode install? Is this an upgrade? Can you provide the kURL spec you are using that produces the resulting error?

This looks like a bug that might have been resolved as of v2023.04.11-0, but want to collect additional info as well to make sure we can look into surfacing better logs if we are missing something.

Hi @kubenewb,

Thank you for raising this one. This error seems to occurs because was not possible to find the config /etc/kubernetes/admin.conf as described on the log, see:

:gear: Running in cluster Preflights
W0505 12:27:25.525100 126811 loader.go:222] Config not found: /etc/kubernetes/admin.conf

The Cluster Preflights checks can only be executed when the cluster has kubernetes installed already. We are looking to address this scenario as soon as possible. Please, keep tuned within the next releases.

How you can try to workaround this issue?

If this is a new installation and assuming that you’ve stopped the process for any reason midway or it fails then: one option is to uninstall kubectl . Consequently, the cluster preflight checks would also not be executed when you re-try to run the script again.

Alternatively, you might able to workaround this one by editing the install script to comment the call of this check. In this case, search in the shell script for the main function and comment the call of cluster_preflights as follows:

function main() {
    logStep "Running install with the argument(s): $*"

    ...

   if [ -z "$CURRENT_KUBERNETES_VERSION" ]; then
        host_preflights "1" "0" "0"
      #  cluster_preflights "1" "0" "0"
    else
        host_preflights "1" "0" "1"
      #  cluster_preflights "1" "0" "1"
    fi

Hi @kubenewb,

I would like to let you know that a fix for this scenario will be available in the next release.
So, the ideal solution is to ensure that you will use an version of the installer that is upper than v2023.05.08-0.

Note that you are probably using airgap install or an kURL installer that has a version pinned because we can check that it is a release done previously by looking the logs, see kurl-bin-utils-v2023.04.24-0.tar.gz.

Therefore:

  • If you are NOT pinning the version on the Installer then: after the release you can just re-run the script or generate a new airgap bundle.
  • If you are pinning the kURL version in the installer then: you must generate a new Installer which will pinning a release version > v2023.05.08-0.

I hope that it can helps you out.

Hi! Thanks a lot for your answer.
I think it indeed was a problem due to an interrupted installation.
I would have hoped, that this can be handled or reverted by kURL though.

Or some kind of different warning message maybe.

Thanks again, disabling all preflight checks worked (I knew that the rest would be ok).

Are you by chance also familiar with your weave plugin? I currently have problems with this and am about to open a new topic.

Hi @kubenewb,

Thank you for you reply. I am glad that the info was helpful.
See that a new release with a fix for this scenario was made yesterday.

So, the ideal solution is to use a Installer(kURL) version which is equals or upper than v2023.05.11-0.
Ditto so, you should no longer see this error. See: Kubernetes Installer Release Notes | Replicated Docs

Again, thank you a lot for raise it and for your valuable input.
Please, do not hesitate in create new topics and reach out if you see issue or need help