On my Server1, Server2 and Server3, I've installed PostgreSQL and Patroni, and on Server1 only, I've installed HAProxy and etcd. Server1 is acting as master db and Server2 and Server3 are acting as replica.
Since it is not a production setup, I'm trying to install kubernetes on Server1 and Server2, where Server1 will act as kmaster and Server2 will act as knode.
As etcd is already being used by Patroni and HaProxy, Kubeadm is throwing error.
root@Server1:# kubeadm init --apiserver-advertise-address=192.168.1.111 --pod-network-cidr=192.168.0.0/16
[init] Using Kubernetes version: v1.28.1
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR Port-2379]: Port 2379 is in use
[ERROR Port-2380]: Port 2380 is in use
[ERROR DirAvailable--var-lib-etcd]: /var/lib/etcd is not empty
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher
The IP of my Server1 is 192.168.1.111 and I'm following this guide for setup, as it is my first time playing with K8s. Setting up using Minikube start is not giving any error, and everything is setup smoothly. But, manually setup is throwing errors. How should I modify kubeadm init command to ensure the use of etcd by both K8s and Patroni.