Files
eagle/deploy
2023-05-20 16:14:26 +08:00
..
2021-05-31 19:43:50 +08:00
2023-05-20 16:14:26 +08:00
2021-07-22 23:09:55 +08:00

部署

主要存放一些部署相关的配置文件和脚本

部署Go应用

see: https://eddycjy.com/posts/kubernetes/2020-05-03-deployment/

监控

包含对机器(node或者container)的监控、应用的监控、数据库的监控等。

使用 docker-compose 可以在本地一键部署,配置如下:


配置etcd

create a namespace

$ kubectl create namespace etcd

create the service

$ kubectl apply -f etcd-service.yaml -n etcd

create the cluster(statefulSet)

$ cat etcd.yml.tmpl | etcd_config.bash | kubectl apply -n etcd -f -

Verify the cluster's health

$ kubectl exec -it etcd-0 -n etcd etcdctl cluster-health

The cluster is exposed through minikube's IP

$ IP=$(minikube ip)
$ PORT=$(kubectl get services -o jsonpath="{.spec.ports[].nodePort}" etcd-client -n etcd)
$ etcdctl --endpoints http://${IP}:${PORT} get foo

Destroy the services

$ kubectl delete services,statefulsets --all -n etcd

给Etcd集群做个Web UI

$ kubectl apply -f etcd-ui-configmap.yaml
$ kubectl apply -f etcd-ui.yaml

Ref: https://github.com/kevinyan815/LearningKubernetes/tree/master/e3w

参考: https://mp.weixin.qq.com/s/AkIvkW22dvqcdFXkiTpv8Q https://github.com/kevinyan815/LearningKubernetes/tree/master/etcd