![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
容器化
docker kubernetes
蓝~天~
这个作者很懒,什么都没留下…
展开
-
kubesphere集成自有的kube-prometheus-stack
环境说明:1、kubekey 2.2.12、kubesphere 3.3.03、kubernetes 1.23.74、kube-prometheus-stack 35.0.0官方文档https://kubesphere.com.cn/docs/v3.3/faq/observability/byop/要使用您自己的 Prometheus 堆栈设置,请执行以下步骤:步骤1、卸载 KubeSphere 的自定义 Prometheus 堆栈2、安装您自己的 Prometheus 堆栈KubeSph原创 2022-07-08 16:03:41 · 1503 阅读 · 1 评论 -
kubekey2.2.1 kubernetes1.23.7离线包制作+harbor部暑并上传镜像
1.2 生成manifest-sample.yaml#修改manifest-sample.yaml1.2导出并生成离线安装包2.2 生成离线集群配置文件#修改config-sample.yaml文件3.1、创建私仓库3.2创建仓库的projectbash create_project_harbor.sh4、 验证https://blog.csdn.net/ma726518972/article/details/125077760.........原创 2022-06-28 15:26:28 · 1560 阅读 · 0 评论 -
KEDA对HPA的扩展
https://zhuanlan.zhihu.com/p/415594861https://zhuanlan.zhihu.com/p/379361295https://www.cnblogs.com/larrydpk/p/14953946.html原创 2022-05-23 12:41:37 · 404 阅读 · 0 评论 -
helm3 部署 metalLB
一、如果使用metallb的layer2模式,需要如kube-proxy进行配置、让metallb接管主机上的arp管理。1、POD部暑kube-proxykubectl edit configmap -n kube-system kube-proxyconfigmap/kube-proxy editedapiVersion: kubeproxy.config.k8s.io/v1alpha1kind: KubeProxyConfigurationmode: "ipvs"ipvs: s原创 2022-05-18 12:35:18 · 764 阅读 · 0 评论 -
k8s 日志收集工具 (fluent operator)
参考: https://blog.csdn.net/easylife206/article/details/124507103一、 架构图二、 CRD 简介Fluent Operator 为 Fluent Bit 和 Fluentd 分别定义了两个 Group:fluentbit.fluent.io 和 fluentd.fluent.io。fluentbit.fluent.io 分组下包含以下 6 个 CRDs:Fluentbit CRD 定义了 Fluent Bit 的属性,比如镜像版本、原创 2022-05-14 20:45:55 · 1783 阅读 · 0 评论 -
docker与traefik2集成
https://doc.traefik.io/traefik/middlewares/目标:1、traefik与docker集成,docker通过使用label通知traefik进行配置2、集成https-redirect、basic-auth、digestauth等中间件3、docker network create traefikmkdir /data/traefik -pcd /data/traefikcat > docker-compose.yaml << 'E原创 2022-04-30 23:17:56 · 3108 阅读 · 0 评论 -
kube-prometheus-stack+thanos+minio经验
一、promeprometheus: extraSecret: #配置thanos的bucket config, 里面包括了minio的配置 name: bucket-config data: bucket_config.yaml: | type: S3 config: bucket: "thanos-buckets01" #minio的桶名 end原创 2022-04-29 17:29:42 · 4247 阅读 · 4 评论 -
k8s 1.23 使用 helm3部署traefik2
traefik详细说明:https://www.qikqiak.com/traefik-book/一、添加traefik仓库#添加 Traefik v2 helm charthelm repo add traefik https://helm.traefik.io/traefik# 更新下仓库helm repo update #查询repohelm repo listtraefik https://helm.traefik.io/traefik二、部暑traefik2原创 2022-04-26 11:13:07 · 2312 阅读 · 0 评论 -
mongo管理工具adminmongo
一、安装docker run -d \--name admin-mongo \--restart always \-p 8001:1234 \-e HOST=0.0.0.0 \-e PORT=1234 \-e PASSWORD=123456 \-v /etc/localtime:/etc/localtime \mrvautin/adminmongo二、admin-mongo默认开启了login-auth# default login config"username":"admin"原创 2022-04-20 12:53:34 · 1350 阅读 · 1 评论 -
mongo-express在arm64下不能正常运行的解决
一、在arm64下运行异常现象<--- Last few GCs ---><--- JS stacktrace --->## Fatal process OOM in insufficient memory to create an Isolate#二、排查方法进行容器中查看,直接运行node时同样报错(node版本为12),说明node不行正常运行。docker run -d -it --rm --entrypoint /bin/sh --name mongo-原创 2022-04-20 12:11:33 · 2205 阅读 · 1 评论 -
kubernetes使用CNI(flannel)
cat /run/flannel/subnet.env FLANNEL_NETWORK=172.120.0.0/16FLANNEL_SUBNET=172.120.1.1/24FLANNEL_MTU=1450FLANNEL_IPMASQ=trueoverlay 同一网段下vxlan、udp二、Pod之间互相访问1.flanneld将本机获取的subnet以及主机之间通信的public ip通过etcd存储起来,需要时发给相应模块2.flanneld通过各种backend mechani原创 2022-03-28 14:19:27 · 1255 阅读 · 0 评论 -
docker学习笔记
1、后台运行容器的piddocker inspect etcd | grep -i pid2、查看cgroupmount -t cgroup#1、memorycd /sys/fs/cgroup/memory/3、docker权限docker容器权限设置–cap-add | --cap-drop | --privilegedCAP_CHOWN:修改文件属主的权限CAP_DAC_OVERRIDE:忽略文件的DAC访问限制CAP_DAC_READ_SEARCH:忽略文件读及目录搜索原创 2022-02-15 22:18:32 · 510 阅读 · 0 评论 -
docker manifest
#创建manifest,以gitlab-ce为例,包括两个镜像yrzr/gitlab-ce-arm64v8:14.4.2-ce.0(arm64)和gitlab/gitlab-ce:14.4.2-ce.0(amd64)docker manifest create zengxiangbang/gitlab-ce:14.4.2-ce.0 yrzr/gitlab-ce-arm64v8:14.4.2-ce.0 gitlab/gitlab-ce:14.4.2-ce.0#上传manifestdocker mani原创 2022-02-09 15:33:48 · 717 阅读 · 0 评论 -
arm64部暑harbor_v2.2.2
mkdir -p /datagit clone https://github.com/goharbor/harbor.gitcd harborgit checkout -b v2.2.2 v2.2.2cd makecat > download_images.sh << 'EOF'namespace=cocl666version=v2.2.2imgs=(redis-photonharbor-dbharbor-jobserviceharbor-lognginx-p原创 2021-11-24 19:29:48 · 2788 阅读 · 3 评论 -
docker部暑nacos
git clone https://github.com/nacos-group/nacos-docker.gitdocker-compose -f example/standalone-mysql-5.7.yaml up -d访问url:http://xxx.xxx.xxx.xxx:8848/nacos/帐号,密码:nacos/nacos原创 2021-11-16 15:25:54 · 621 阅读 · 0 评论 -
helm3部暑cert-manager
一、添加cert-manager 仓库#添加 kubernetes-dashboard helm charthelm repo add jetstack https://charts.jetstack.io# 更新下仓库helm repo update #查询repohelm repo list 二、部暑cert-manager#指定变量pro=cert-managerchart_version=v1.5.3mkdir -p /data/$procd /data/$pro原创 2021-09-09 16:49:05 · 500 阅读 · 0 评论 -
helm3 部置traefik2
一、添加traefik仓库#添加 Traefik v2 helm charthelm repo add traefik https://containous.github.io/traefik-helm-chart# 更新下仓库helm repo update #查询repohelm repo listtraefik https://containous.github.io/traefik-helm-chart 二、部暑traefik2#mkdir -p /data原创 2021-09-07 17:34:55 · 1139 阅读 · 0 评论 -
helm3 部暑和资源
mkdir /opt/bin -p#下载helm3cd /opt/binwget https://get.helm.sh/helm-v3.6.3-linux-amd64.tar.gz#把helm3解压到本目录下tar zxvf helm-v3.6.3-linux-amd64.tar.gz --strip-components 1 linux-amd64/helm#通过软链把helm链接到目录/usr/bin下ln -s /opt/bin/helm /usr/bin/helm..原创 2021-09-07 16:11:10 · 124 阅读 · 0 评论 -
kubernetes删除处于Terminating状态的namespace的另一法(不安全)
进到etcd容器,以删除rook-ceph为例etcdctl del /registry/namespaces/rook-ceph也可以通这招删除podetcdctl del /registry/pods/default/nginx-test-0原创 2021-08-30 17:44:03 · 124 阅读 · 0 评论 -
springboot docker打包方法
#创建dockerfilecat > Dockerfle << 'EOF'FROM openjdk:11.0.12-jre-busterADD target/*.jar /EXPOSE 80 ENTRYPOINT ["/bin/sh","-c","java $JAVA_OPTS -XX:NativeMemoryTracking=detail -Djava.security.egd=file:/dev/./urandom -jar -Dserver.port=80 -Dloggin原创 2021-08-18 16:20:19 · 90 阅读 · 0 评论 -
centos8安装kubernetes(sealos)--arm64
yum install wget tar -y# 下载并安装sealos, sealos是个golang的二进制工具,直接下载拷贝到bin目录即可, release页面也可下载$ wget -c https://sealyun.oss-cn-beijing.aliyuncs.com/latest/sealos && \ chmod +x sealos && mv sealos /usr/bin # 下载离线资源包$ wget -c https://seal原创 2021-07-28 16:57:53 · 872 阅读 · 0 评论 -
prometheus部暑redis_exporter(sentinel, cluster实战)
监控redis_cluster。原创 2021-07-02 12:55:44 · 1870 阅读 · 0 评论 -
docker部暑rabbitmq集群(支持amd64和arm64)
Rabbitmq集群环境准备主机ip管理端口消息端口节点名称192.168.11.2115657rabbit1192.168.11.2125657rabbit2RabbitMQ 默认端口号4369 (epmd), 25672 (Erlang distribution)5672, 5671 (AMQP 0-9-1 without and with TLS)15672 (if management plugin is enabled)61613, 61原创 2021-06-25 15:03:39 · 451 阅读 · 1 评论 -
docker部暑nginx
nginx安装#创建目录mkdir -p /data/nginx/{conf,log,conf/conf.d}#创建nginx配置nginx.confcat > /data/nginx/conf/nginx.conf << 'EOF'user nginx;worker_processes auto;error_log /var/log/nginx/error.log notice;pid /var/run/nginx.pid;events原创 2021-06-24 17:34:10 · 64 阅读 · 0 评论 -
etcd 集群搭建
mkdir /data/etcd/{data,bin} -pcurl -L https://github.com/etcd-io/etcd/releases/download/v3.5.0/etcd-v3.5.0-linux-amd64.tar.gz -o /tmp/etcd-v3.5.0-linux-amd64.tar.gztar zxvf /tmp/etcd-v3.5.0-linux-amd64.tar.gz -C /data/etcdcd /data/etcd/etcd-v3.5.0-linu原创 2021-06-18 17:23:11 · 1452 阅读 · 1 评论 -
docker-compose和docker增加hosts
在docker-compose.yml文件中里添加下面内容: extra_hosts: - "www.163.com:172.17.3.1"原创 2021-06-22 17:04:40 · 9179 阅读 · 0 评论 -
docker部暑zookeeper_3.6.3/activemq_5.14.3集群
Zookeeper环境准备主机ip消息端口通信端口节点目录192.168.11.21121812888:3888zookeeper192.168.11.21221812888:3888zookeeper192.168.11.21321812888:3888zookeeperActiveMQ环境准备:主机IP集群通信端口消息端口控制台端口节点目录192.168.11.2116262161616,61613,5672,原创 2021-06-17 11:45:26 · 291 阅读 · 1 评论 -
docker部暑zookeeper_3.6\kafka_2.4集群(支持amd64和arm64)
1、安装zookeeperIP角色备注192.168.11.192server节点1192.168.11.193server节点2192.168.11.194server,client,ui节点32、配置文件说明zoo.confauthProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProviderrequireClientAuthScheme=sasljaasLogi原创 2021-06-15 16:46:51 · 1538 阅读 · 2 评论 -
docker安装openldap
mkdir -p /data/openldap/{data,config,init,ldap-account-manager,self-service-password}cd /data/openldap/vi docker-compose.yamlversion: "3"services: ldap: container_name: "ldap" hostname: ldap2.fly.cn image: "osixia/openldap:latest" re原创 2021-05-17 16:08:07 · 1007 阅读 · 2 评论 -
docker的dind
1、 docker in docker(dind)有时需要在容器内执行 docker 命令,比如:在 jenkins 容器内运行 docker 命令执行构建镜像直接在 docker 容器内嵌套安装 docker 未免太过臃肿更好的办法是:容器内仅部署 docker 命令行工具(作为客户端),实际执行交由宿主机内的 docker-engine(服务器)2、 两种方式在docker容器内启动一个docker daemon,对外提供服务。每个运行中的容器,都是一个进程,这个进程都托管在docker d原创 2021-05-14 18:30:33 · 3843 阅读 · 0 评论 -
用docker方式安装gitlab
version: '3'services: gitlab: container_name: "gitlab" image: 'gitlab/gitlab-ce:13.10.2-ce.0' restart: unless-stopped hostname: 'gitlab.fly.cn' environment: TZ: 'Asia/Shanghai' GITLAB_OMNIBUS_CONFIG: |原创 2021-05-14 14:07:25 · 152 阅读 · 0 评论 -
prometheus-operator中的grafana如何离线安装plugins
生产环境中grafana的数据在做持久化,以grafana-piechart-panel为例如:下载离线插件wget -nv https://grafana.com/api/plugins/grafana-piechart-panel/versions/latest/download -O /tmp/grafana-piechart-panel.zip把插件copy进容器中kubectl cp /tmp/grafana-piechart-panel.zip -n monitor prom原创 2021-05-13 17:43:58 · 1171 阅读 · 0 评论 -
k8s 部署nfs storeclass
yum install rpcbind nfs-utils -y systemctl enable nfs-server.servicesystemctl enable rpcbind.servicesystemctl start nfs-server.servicesystemctl start rpcbind.servicemkdir /nfsdataecho '/nfsdata 192.168.11.0/24(rw,sync,fsid=0)' >> /etc/export原创 2021-05-11 18:40:26 · 646 阅读 · 0 评论 -
kubernetes通过helm3安装kube-prometheus-stack经验记录
helm 3kubernetes 1.16+helm repo add prometheus-community https://prometheus-community.github.io/helm-chartshelm search repo prometheushelm pull prometheus-community/kube-prometheus-stackkubectl create ns monitoringhelm install prometheus kube-prometh原创 2021-04-26 16:26:01 · 4887 阅读 · 1 评论 -
kubernetes安装rook ceph 1.6
#ceph clusterwget https://raw.githubusercontent.com/rook/rook/release-1.6/cluster/examples/kubernetes/ceph/crds.yamlwget https://raw.githubusercontent.com/rook/rook/release-1.6/cluster/examples/kubernetes/ceph/common.yamlwget https://raw.githubuserconte原创 2021-04-23 16:03:15 · 462 阅读 · 0 评论 -
centos7 x86_64 下通过qemu-user-static 运行arm64的docker镜像
wget https://download.qemu.org/qemu-5.2.0.tar.xz1、binfmt支持#重置binfmtdocker run --rm --privileged multiarch/qemu-user-static --reset -p yes #设置binfmtdocker run --rm --privileged multiarch/qemu-user-static -p yes 确认是否成功[root@localhost binfmt_misc]#原创 2021-04-02 17:00:30 · 5750 阅读 · 2 评论 -
kubernetes dashboard 支持http (不推荐)
kind: IngressapiVersion: extensions/v1beta1metadata: name: dashboard namespace: kube-system annotations: kubernetes.io/ingress.class: traefik #ingress.kubernetes.io/ssl-passthrough: "true"spec: rules: - host: dashboard.digitalgd.com http:原创 2021-04-02 10:39:08 · 885 阅读 · 0 评论 -
k8s ingress CORS的解决方法
ingress --traefikapiVersion: networking.k8s.io/v1beta1kind: Ingressmetadata: name: test-ingress namespace: test labels: app: test-cors-app annotations: kubernetes.io/ingress.class: traefik traefik.ingress.kubernetes.io/custom-respons原创 2021-04-01 16:03:00 · 1555 阅读 · 0 评论 -
coreDNS添加自定义hosts
编辑configmap (coredns)kubectl edit configmap -n kube-system coredns 增加hosts节点 Corefile: | .:53 { errors health { lameduck 5s } ready kubernetes cluster.local in-addr.arpa ip6.arpa { po原创 2020-11-12 12:34:23 · 6527 阅读 · 1 评论 -
docker镜像启动前预处理
1、docker-entrypoint.sh#!/bin/bashset -eif [[ $redis_url ]]; then sed -i 's#redis://127.0.0.1:6379#redis://'${redis_url}'#' /data/smartgate/etc/settings.jsonfiif [[ $redis_password ]]; then sed -i 's#password=password#password='${redis_原创 2020-12-16 16:57:33 · 492 阅读 · 1 评论