Closed juliusoh closed 2 months ago
Hi @juliusoh, how do you see two nodes? Your instructions deploy only one.
@ktsakalozos The Packer creates AMI with MicroK8s installed on it, when I provision a new EC2 instance using that AMI, and run microk8s kubectl get nodes, i see 2 nodes.
The first node is the one that packer used to provision the AMI second is the new EC2 i just provisioned
I have not used Packer but I do not see any join command so I do not see how a cluster of two nodes is created.
I have not used Packer but I do not see any join command so I do not see how a cluster of two nodes is created.
Somehow it displays node of the ec2 packer used to provision the ami
So when I install it on the packer it does something that persist that node data
Ok so this is a ghost node comming from the initial setup. If you try to microk8s kubectl delete node "your_ghost_node"
what would happen?
Okay that fixes the duplicate ghost node thanks @ktsakalozos
Not sure why the microk8s remove node command didnt work
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Summary
I install Microk8s on packer
Via:
`
Install MicroK8s
sudo snap install microk8s --classic sudo usermod -a -G microk8s ubuntu sudo chown -f -R ubuntu ~/.kube sudo -E microk8s status --wait-ready sudo -E microk8s kubectl get nodes sudo -E microk8s kubectl get services sudo -E microk8s reset `
I deploy new EC2 running this AMI
What Should Happen Instead?
I run microk8s kubectl get nodes
I see two nodes
I try to run microk8s reset and get
This is a multi-node MicroK8s deployment. Reset is applicable for single node clusters. Please remove all joined nodes before calling reset.
Reproduction Steps
Introspection Report
Can you suggest a fix?
Are you interested in contributing with a fix?