Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
fix: rotate certs cp_certs on 20.04 (#5055)
Browse files Browse the repository at this point in the history
The rotate certs command was failing on 20.04 environments, output:
+ cp -p /etc/kubernetes/rotate-certs/certs/kubeconfig /root/.kube/config
cp: cannot create regular file '/root/.kube/config': No such file or directory

The fix specifies the user instead of using ~, works on both 20.04 and 18.04
  • Loading branch information
christinalau0 authored Jan 26, 2023
1 parent 06f547d commit 5a6ad49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion parts/k8s/rotate-certs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ cp_certs() {
cp -p ${NEW_CERTS_DIR}/ca.* /etc/kubernetes/certs/
cp -p ${NEW_CERTS_DIR}/client.* /etc/kubernetes/certs/
cp -p ${NEW_CERTS_DIR}/apiserver.* /etc/kubernetes/certs/
cp -p ${NEW_CERTS_DIR}/kubeconfig ~/.kube/config
cp -p ${NEW_CERTS_DIR}/kubeconfig /home/$(logname)/.kube/config

rm -f /var/lib/kubelet/pki/kubelet-client-current.pem
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/templates_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5a6ad49

Please sign in to comment.