Following the guide on the kubernetes page to a tee I get this issue with my setup:
sudo kubectl cluster-info dump
The connection to the server localhost:8080 was refused - did you specify the right host or port?
sudo kubectl cluster-info
E0223 20:32:29.693102 38190 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"http://localhost:8080/api?timeout=32s\": dial tcp [::1]:8080: connect: connection refused"
E0223 20:32:29.694741 38190 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"http://localhost:8080/api?timeout=32s\": dial tcp [::1]:8080: connect: connection refused"
E0223 20:32:29.696175 38190 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"http://localhost:8080/api?timeout=32s\": dial tcp [::1]:8080: connect: connection refused"
E0223 20:32:29.697626 38190 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"http://localhost:8080/api?timeout=32s\": dial tcp [::1]:8080: connect: connection refused"
E0223 20:32:29.699242 38190 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"http://localhost:8080/api?timeout=32s\": dial tcp [::1]:8080: connect: connection refused"
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
The connection to the server localhost:8080 was refused - did you specify the right host or port?
I have firewall disabled, and I am using systemd.network if that matters:
networking.hostName = "hostname"; # Define your hostname.
networking.networkmanager.enable = false;
systemd.network.enable = true;
networking.useNetworkd = true;
networking.extraHosts = "${kubeMasterIP} ${kubeMasterHostname}";
systemd.network.networks."10-wan" = {
matchConfig.Name = "enp40s0";
address = [
"10.3.0.53/24"
];
domains = [
"internal.lan"
];
routes = [
{ Gateway = "10.3.0.1"; }
];
linkConfig.RequiredForOnline = "routable";
};
I just want to create a simple server kubernetes node for learning purposes… I tried k3s and that worked great, but I want to go the next step up.