Kubernetes的NameSpace无法删除 前言在日常运维中,有时候我们操作不规范,删除资源的先后顺序不正确,或某项关键服务没有启动,导致 Kubernetes 经常会出现无法删除 NameSpace 的情况 规范删除流程很多时候出现这种问题,主要是因为我们的删除操作不规范,典型情况如下: 删除的先后顺序有问题,如: 先删除了 Traefik 的关键组件,再尝试删除包含 Traefik Ingress 或 EdgeIngress 的 CR 2024-04-02 Kubernetes #Kubernetes
使用 Prometheus Stack 监控 Etcd 前沿默认部署好 kube-prometheus-stack ,如果Kubernetes集群采用了外部 etcd - 分布式kv存储 (例如: 部署TLS认证的etcd集群 ),那么 Grafana通用可视分析平台 中显示 etcd - 分布式kv存储 的内容是空白的。此时需要定制 values 并通过 更新Kubernetes集群的Prometheus配置,提交etcd相关配置(包括证书),这样才 2024-03-15 Kubernetes #Prometheus
使用 Prometheus Stack 监控 Ingress-nginx-Controller 前置条件K8S 集群已经安装 Ingress-nginx-Controller 参考文档:使用Helm安装Ingress-nginx-Controller 修改 Chart 的 values文件# nginx/values.yaml controller: metrics: enabled: true serviceMonitor: enabled: true 2024-03-13 Kubernetes #Prometheus_Stack
使用 Helm 安装 Prometheus Stack 安装 Prometheus添加 Prometheus chart repo 到 Helm helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo update 查看版本信息 $ helm search repo prometheus-community/kube 2024-03-10 Kubernetes #Prometheus_Stack
K8S集群中部署 MinIO 以支持对象存储 前置条件MinIO 是一个兼容 s3 标准的对象存储。创建 NFS 存储作为容器存储插件 部署文档:https://github.com/minio/minio/tree/master/helm/minio 部署准备创建命名空间 $ kubectl create ns minio 添加 helm 仓库 $ helm repo add minio https://charts.min.io/ $ 2024-03-09 Kubernetes #MinIO
使用Cert-Manager为DNSPod的域名签发免费证书 概述随着 HTTPS 不断普及,大多数网站开始由 HTTP 升级到 HTTPS。使用 HTTPS 需要向权威机构申请证书,并且需要付出一定的成本,如果需求数量多,则开支也相对增加。cert-manager 是 Kubernetes 上的全能证书管理工具,支持利用 cert-manager 基于 ACME 协议与 Let’s Encrypt 签发免费证书并为证书自动续期,实现永久免费使用证书。 域名 2024-03-08 Kubernetes #Cert-Manager
使用Helm安装Ingress-nginx-Controller 概述Nginx Ingress Controller 是使用 Kubernetes Ingress 资源对象构建的,用ConfigMap 来存储 Nginx 配置的一种 Ingress Controller 实现。 安装 ingress-nginx 有多种方式,本文使用 helm 3.12 方式进行安装。 其它安装方式可以参考文档:https://kubernetes.github.io/ingr 2024-03-07 Kubernetes #Helm
K8S集群Etcd 备份与恢复 Etcd 常见操作查看集群状态 $ ETCDCTL_API=3 etcdctl --cacert=/etc/kubernetes/ssl/ca.pem --cert=/etc/kubernetes/ssl/etcd.pem --key=/etc/kubernetes/ssl/etcd-key.pem --endpoints=https://192.168.1.60:2379 endpoint he 2024-03-06 Kubernetes #Etcd
本地K8S集群基于MetalLB工具实现LoadBalancer 概述MetalLB 是裸机的负载均衡器实现库伯内斯集群,使用标准路由协议 官方文档:https://metallb.universe.tf/ 安装准备前提在 IPVS 模式下使用 kube-proxy,则从 Kubernetes v1.14.2 开始,必须启用严格 ARP 模式 # 二进制部署的K8S集群,kube-proxy的配置文件,是在本地,而不是在configmap $ vim /var/ 2024-03-04 Kubernetes #LoadBalancer