Closed MonkzCode closed 1 year ago
Hi, it appears that the openssl commands that generate kube-proxy (and most likely the second one for kubelet) fail, and I would assume that OpenSSL 1.0.2k-fips is closely related to this.
Can you please include more details by spawning a shell inside the snap environment and running the command manually? I.e.:
sudo snap run --shell microk8s
# inside the new shell, run the openssl command directly
/snap/microk8s/current/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
The openssl command should fail, but ideally stderr will contain some useful bits to keep debugging things.
Hi! Thanks, @neoaggelos for reply! Command output is:
Can't open /usr/lib/ssl/openssl.cnf for reading, No such file or directory 139971289392128:error:02001002:system library:fopen:No such file or directory:../crypto/bio/bss_file.c:72:fopen('/usr/lib/ssl/openssl.cnf','r') 139971289392128:error:2006D080:BIO routines:BIO_new_file:no such file:../crypto/bio/bss_file.c:79: unable to find 'distinguished_name' in config problems making Certificate Request 139971289392128:error:0E06D06A:configuration file routines:NCONF_get_string:no conf or environment variable:../crypto/conf/conf_lib.c:270:
OK, I think /usr/lib/ssl/openssl.cnf
missing is some progress on the issue.
Do you know how to locate the default openssl.cnf
file on your system? On a deb-based system, that would be dpkg -S openssl.cnf
, not sure what's the command for yum/dnf.
On a related-note, can you also check whether the following helps?
sudo snap run --shell microk8s
export OPENSSL_CONF=$SNAP/usr/lib/ssl/openssl.cnf
/snap/microk8s/current/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
@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 with export 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
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!
Summary
I have single-node microk8s instance. Status on it:
Firewall disabled.
Also i installed new worker node with:
When i make
microk8s join 10.10.20.20:25000/<redacted> --worker
command on worker node i got: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.