Cannot connect worker node to master
See original GitHub issueSummary
I have single-node microk8s instance. Status on it:
microk8s is running high-availability: no datastore master nodes: 10.10.20.20:19001 datastore standby nodes: none addons: enabled: dashboard # (core) The Kubernetes dashboard dns # (core) CoreDNS ha-cluster # (core) Configure high availability on the current node helm3 # (core) Helm 3 - Kubernetes package manager ingress # (core) Ingress controller for external access metrics-server # (core) K8s Metrics Server for API access to service metrics rbac # (core) Role-Based Access Control for authorisation disabled: …
Firewall disabled.
Also i installed new worker node with:
microk8s is running high-availability: no datastore master nodes: 127.0.0.1:19001 datastore standby nodes: none addons: enabled: dns # (core) CoreDNS ha-cluster # (core) Configure high availability on the current node helm3 # (core) Helm 3 - Kubernetes package manager rbac # (core) Role-Based Access Control for authorisation disabled: …
When i make microk8s join 10.10.20.20:25000/<redacted> --worker
command on worker node i got:
Contacting cluster at 10.10.20.20 Traceback (most recent call last): File “/snap/microk8s/4175/scripts/cluster/join.py”, line 993, in <module> join(prog_name=“microk8s join”) File “/snap/microk8s/4175/usr/lib/python3/dist-packages/click/core.py”, line 722, in call return self.main(*args, **kwargs) File “/snap/microk8s/4175/usr/lib/python3/dist-packages/click/core.py”, line 697, in main rv = self.invoke(ctx) File “/snap/microk8s/4175/usr/lib/python3/dist-packages/click/core.py”, line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File “/snap/microk8s/4175/usr/lib/python3/dist-packages/click/core.py”, line 535, in invoke return callback(*args, **kwargs) File “/snap/microk8s/4175/scripts/cluster/join.py”, line 986, in join join_dqlite(connection_parts, verify, worker) File “/snap/microk8s/4175/scripts/cluster/join.py”, line 762, in join_dqlite join_dqlite_worker_node(info, master_ip, master_port, token) File “/snap/microk8s/4175/scripts/cluster/join.py”, line 846, in join_dqlite_worker_node update_cert_auth_kubeproxy(token, info[“ca”], master_ip, master_port, hostname_override) File “/snap/microk8s/4175/scripts/cluster/join.py”, line 423, in update_cert_auth_kubeproxy cert = get_client_cert(master_ip, master_port, “kube-proxy”, proxy_token, “system:kube-proxy”) File “/snap/microk8s/4175/scripts/cluster/join.py”, line 277, in get_client_cert subprocess.check_call(cmd_cert.split(), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) File “/snap/microk8s/4175/usr/lib/python3.6/subprocess.py”, line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command ‘[’/snap/microk8s/4175/usr/bin/openssl’, ‘req’, ‘-new’, ‘-sha256’, ‘-key’, ‘/var/snap/microk8s/current/certs/kube-proxy.key’, ‘-out’, ‘/var/snap/microk8s/current/certs/kube-proxy.csr’, ‘-subj’, ‘/CN=system:kube-proxy’]’ returned non-zero exit status 1.
In journal on master node i see:
microk8s.daemon-cluster-agent[189902]: 2022/12/05 07:50:37 POST 200 "/cluster/api/v2.0/join" 2112 bytes in 833.686178ms
Both servers - Centos7 with OpenSSL 1.0.2k-fips
How i can connect my worker node to master node? Please, help.
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (2 by maintainers)
Figured out, I had to execute the command
openssl rand -out .rnd 16
then i used Your, @neoaggelos , suggestion with my path to openssl.cnf. After that worker node successfully connected to master. HUGE thanks for Your support!@neoaggelos , i searched for default and found it only in
/etc/pki/tls/openssl.cnf
(except/var/lib/snap/
directories, there are several dirs with openssl.cnf) Tried with your suggestion - no luck, even withexport OPENSSL_CONF=/etc/pki/tls/openssl.cnf
. The error is:Can't load /root/.rnd into RNG 140480045253632:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/root/.rnd