kelseyhightower / kubernetes-the-hard-way

Bootstrap Kubernetes the hard way. No scripts.
Apache License 2.0
41.26k stars 14.12k forks source link

Utilize the absolute path to the ca.pem file #667

Closed AntonNguyen closed 2 years ago

AntonNguyen commented 3 years ago

On the Configure the Kubernetes API Server step, we're moving the file to the /var/lib/kubernetes/ directory. Now when we try to verify the Kubernetes version info utilizing the cert, we'll receive the following error:

curl --cacert ca.pem https://${KUBERNETES_PUBLIC_ADDRESS}:6443/version
curl: (77) error setting certificate verify locations:
  CAfile: ca.pem
  CApath: /etc/ssl/certs
JulianSkolozdra commented 3 years ago

Addition: IMHO if hardcoding absolute paths is not a best idea by itself, doing it in several places of the document tends to make it unmanageable very fast. Wouldn't it be the right time to put that path into variable to handle from single place?