Closed mthird closed 6 years ago
This is for version 1.1.1, btw.
Just discovered something interesting ... but removing the worker nodes, the pharos log now shows the certificate generation step.
My cluster.yaml file:
hosts:
- address: "172.17.0.103"
role: master
user: vmadmin
ssh_key_path: ~/.ssh/ae/id_rsa
#- address: "172.17.0.104"
#role: worker
#user: vmadmin
#ssh_key_path: ~/.ssh/ae/id_rsa
#- address: "172.17.0.105"
#role: worker
#user: vmadmin
#ssh_key_path: ~/.ssh/ae/id_rsa
network:
provider: calico
calico:
ipip_mode: CrossSubnet
addons:
kubernetes-dashboard:
enabled: true
host-upgrades:
enabled: true
interval: "7d"
openebs:
enabled: true
For anyone else that wants to reset pharos without reinstalling the OS, the following script takes care of it.
Before figuring out every directory that needed to be deleted, I saw the following errors:
Internal error occurred: invalid padding on input
Note that this will destroy any data stored in existing containers and volumes!
sudo kubeadm reset && sudo apt-get remove -y --allow-change-held-packages kubeadm kubelet kubectl docker.io && sudo rm -rf /etc/kubernetes /etc/pharos /var/etcd ~/.kube /var/lib/docker /var/lib/kubelet /var/lib/cni /var/lib/etcd /var/lib/weave /var/lib/calico
I think that reset example is missing few things... more complete reset would be something like:
#!/bin/sh
systemctl stop kubelet
systemctl disable kubelet
systemctl stop docker
systemctl disable docker
kubeadm reset
apt-get purge -y --allow-change-held-packages --purge kubeadm kubelet kubectl docker.io
apt-get autoremove -y
rm -rf /etc/kubernetes \
/etc/pharos \
/etc/systemd/system/kubelet.service \
/etc/systemd/system/kubelet.service.d \
~/.kube \
/var/lib/docker \
/var/lib/containerd \
/var/lib/kubelet \
/opt/cni \
/var/lib/etcd \
/var/lib/weave \
/var/lib/calico \
/usr/local/bin/crictl
systemctl daemon-reload
systemctl reset-failed
What's the best way to reset and reinstall pharos without having to pave the machines?
I've tried kubeadm reset, removing the /etc/pharos and /etc/kubernetes directories, uninstalling kubeadm/kubelet/docker.io, then running the up command, but it gets stuck at verifying port 6443 is listening.
The syslog shows
I trolled through the source code but I don't see where the ca.crt file is explictly created.
Any help would be appreciated.