Hello,
I followed the steps in kubernetes-the-hard-way to create a k8s lab.
Update 08-bootstrapping-kubernetes-controllers.md
In Bootstrapping the Kubernetes Control Plane, after creating the script for kube-apiserver kube-controller-manager kube-scheduler scripts, then start the 3 services, the kube-apiserver cannot start.
From the error messages, it said encryption key issue, I try to run echo $ENCRYPTION_KEY that created in step 6 have the result, seems not the key get corrupted.
Did anyone hit the same issue? How do I fix it? Thank you.
vagrant@controlplane01:/etc/kubernetes$ sudo systemctl -l status kube-apiserver
â—Ź kube-apiserver.service - Kubernetes API Server
Loaded: loaded (/etc/systemd/system/kube-apiserver.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2024-09-04 14:35:51 UTC; 2s ago
Docs: GitHub - kubernetes/kubernetes: Production-Grade Container Scheduling and Management
Process: 10781 ExecStart=/usr/local/bin/kube-apiserver --advertise-address=192.168.56.11 --allow-privileged=true --apiserver-count=3 --audit-log-maxage=30 --audit-log-maxbackup=3 --audit-log-maxsize=100 --audit-log-path=/var/log/aud>
Main PID: 10781 (code=exited, status=1/FAILURE)
CPU: 701ms
Sep 04 14:35:51 controlplane01 kube-apiserver[10781]: --log-dir string If non-empty, write log files in this directory
Sep 04 14:35:51 controlplane01 kube-apiserver[10781]: --log-file string If non-empty, use this log file
Sep 04 14:35:51 controlplane01 kube-apiserver[10781]: --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s)
Sep 04 14:35:51 controlplane01 kube-apiserver[10781]: --logtostderr log to standard error instead of files (default true)
Sep 04 14:35:51 controlplane01 kube-apiserver[10781]: --skip-headers If true, avoid header prefixes in the log messages
Sep 04 14:35:51 controlplane01 kube-apiserver[10781]: --stderrthreshold severity logs at or above this threshold go to stderr (default 2)
Sep 04 14:35:51 controlplane01 kube-apiserver[10781]: -v, --v Level log level for V logs (default 0)
Sep 04 14:35:51 controlplane01 kube-apiserver[10781]: --version version[=true] Print version information and quit
Sep 04 14:35:51 controlplane01 kube-apiserver[10781]: --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
Sep 04 14:35:51 controlplane01 kube-apiserver[10781]: error: error while parsing encryption provider configuration file “/var/lib/kubernetes/encryption-config.yaml”: could not obtain secret for named key key1: illegal base64 data at input byte 0