zookeeper
Less than 1 minute
zookeeper
main usage
- ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.
conceptions
- none
purpose
- prepare a kind cluster with basic components
- install
zookeeper
installation
- prepare a kind cluster with basic components
- download and load images to qemu machine(run command at the host of qemu machine)
- run scripts in download.and.load.function.sh to load function
download_and_load
TOPIC_DIRECTORY="zookeeper.software" BASE_URL="https://resource.geekcity.tech/kubernetes/docker-images/x86_64" download_and_load $TOPIC_DIRECTORY $BASE_URL \ "docker.io_bitnami_zookeeper_3.8.0-debian-10-r37.dim" \ "docker.io_bitnami_bitnami-shell_10-debian-10-r40.dim"
- run scripts in download.and.load.function.sh to load function
- install
zookeeper
- prepare zookeeper.values.yaml
- prepare images
- run scripts in load.image.function.sh to load function
load_image
load_image "docker.registry.local:443" \ "docker.io/bitnami/zookeeper:3.8.0-debian-10-r37" \ "docker.io/bitnami/bitnami-shell:10-debian-10-r403"
- run scripts in load.image.function.sh to load function
- install with helm
helm install \ --create-namespace --namespace application \ my-zookeeper \ https://resource.geekcity.tech/kubernetes/charts/https/charts.bitnami.com/bitnami/zookeeper-9.1.1.tgz \ --values zookeeper.values.yaml \ --atomic
- install
zookeeper-tool
- prepare zookeeper.tool.yaml
kubectl -n application apply -f zookeeper.tool.yaml
test with zookeeper-tool
- connect to
zookeeper
kubectl -n application exec -it deployment/zookeeper-tool -- \ zkCli.sh -server my-zookeeper.application:2181 ls / kubectl -n application exec -it deployment/zookeeper-tool -- \ zkCli.sh -server my-zookeeper.application:2181 create /zk_test kubectl -n application exec -it deployment/zookeeper-tool -- \ zkCli.sh -server my-zookeeper.application:2181 ls / kubectl -n application exec -it deployment/zookeeper-tool -- \ zkCli.sh -server my-zookeeper.application:2181 get /zk_test kubectl -n application exec -it deployment/zookeeper-tool -- \ zkCli.sh -server my-zookeeper.application:2181 delete /zk_test kubectl -n application exec -it deployment/zookeeper-tool -- \ zkCli.sh -server my-zookeeper.application:2181 ls /
uninstallation
- uninstall
zookeeper-tool
kubectl -n application delete -f zookeeper.tool.yaml
- uninstall
zookeeper
helm -n application uninstall my-zookeeper \ && kubectl -n application delete pvc data-my-zookeeper-0 \ && kubectl -n application delete pvc data-my-zookeeper-1 \ && kubectl -n application delete pvc data-my-zookeeper-2