[TOC]
## 運行時
### docker
```shell
$ curl --unix-socket /var/run/docker.sock -X GET http://localhost/debug/pprof/profile > docker.profile
$ curl --unix-socket /var/run/docker.sock -X GET http://localhost/debug/pprof/heap > docker.heap
$ curl --unix-socket /var/run/docker.sock -X GET http://localhost/debug/pprof/goroutine > docker.goroutine
```
### containerd
>[info] 確認主機上 `/run/containerd/debug.sock` 是否有debug的socket文件。如沒有的話,請將 [debug] 下的 address 參數配置成上面的文件。**重啟containerd服務,重啟containerd服務不會導致跑在pod里面的業務重啟**
```shell
$ grep -A1 "\[debug\]" /app/containerd/config/config.toml
[debug]
address = "/run/containerd/debug.sock"
ctr pprof heap > containerd.heap
ctr pprof profile > containerd.profile
ctr pprof goroutines > containerd.goroutines
```
## kube-apiserver
```shell
kubectl proxy --address='0.0.0.0' --accept-hosts='^*$'
curl -o kube-apiserver.heap http://localhost:8001/debug/pprof/heap
curl -o kube-apiserver.profile http://localhost:8001/debug/pprof/profile
curl -o kube-apiserver.goroutine http://localhost:8001/debug/pprof/goroutine
```
## kube-controller-manager
```shell
```
## kube-scheudler
```shell
```
## kubelet
```shell
kubectl proxy --address='0.0.0.0' --accept-hosts='^*$'
curl http://192.168.32.127:8001/api/v1/nodes/[k8s節點名稱]/proxy/debug/pprof/profile -o kubelet.heap
curl http://192.168.32.127:8001/api/v1/nodes/[k8s節點名稱]/proxy/debug/pprof/profile -o kubelet.profile
curl http://192.168.32.127:8001/api/v1/nodes/[k8s節點名稱]/proxy/debug/pprof/goroutine -o kubelet.goroutine
```
## kube-proxy
> 需要在配置文件(kubectl -n kube-system get cm kube-proxy)中將 `enableProfiling` 設置為 `true` 的值。
```shell
curl localhost:10249/debug/pprof/heap -o proxy.heap
curl localhost:10249/debug/pprof/profile -o proxy.profile
curl localhost:10249/debug/pprof/goroutine -o proxy.goroutine
```
- 前言
- 架構
- 部署
- kubeadm部署
- kubeadm擴容節點
- 二進制安裝基礎組件
- 添加master節點
- 添加工作節點
- 選裝插件安裝
- Kubernetes使用
- k8s與dockerfile啟動參數
- hostPort與hostNetwork異同
- 應用上下線最佳實踐
- 進入容器命名空間
- 主機與pod之間拷貝
- events排序問題
- k8s會話保持
- 容器root特權
- CNI插件
- calico
- calicoctl安裝
- calico網絡通信
- calico更改pod地址范圍
- 新增節點網卡名不一致
- 修改calico模式
- calico數據存儲遷移
- 啟用 kubectl 來管理 Calico
- calico卸載
- cilium
- cilium架構
- cilium/hubble安裝
- cilium網絡路由
- IP地址管理(IPAM)
- Cilium替換KubeProxy
- NodePort運行DSR模式
- IP地址偽裝
- ingress使用
- nginx-ingress
- ingress安裝
- ingress高可用
- helm方式安裝
- 基本使用
- Rewrite配置
- tls安全路由
- ingress發布管理
- 代理k8s集群外的web應用
- ingress自定義日志
- ingress記錄真實IP地址
- 自定義參數
- traefik-ingress
- traefik名詞概念
- traefik安裝
- traefik初次使用
- traefik路由(IngressRoute)
- traefik中間件(middlewares)
- traefik記錄真實IP地址
- cert-manager
- 安裝教程
- 頒布者CA
- 創建證書
- 外部存儲
- 對接NFS
- 對接ceph-rbd
- 對接cephfs
- 監控平臺
- Prometheus
- Prometheus安裝
- grafana安裝
- Prometheus配置文件
- node_exporter安裝
- kube-state-metrics安裝
- Prometheus黑盒監控
- Prometheus告警
- grafana儀表盤設置
- 常用監控配置文件
- thanos
- Prometheus
- Sidecar組件
- Store Gateway組件
- Querier組件
- Compactor組件
- Prometheus監控項
- grafana
- Querier對接grafana
- alertmanager
- Prometheus對接alertmanager
- 日志中心
- filebeat安裝
- kafka安裝
- logstash安裝
- elasticsearch安裝
- elasticsearch索引生命周期管理
- kibana安裝
- event事件收集
- 資源預留
- 節點資源預留
- imagefs與nodefs驗證
- 資源預留 vs 驅逐 vs OOM
- scheduler調度原理
- Helm
- Helm安裝
- Helm基本使用
- 安全
- apiserver審計日志
- RBAC鑒權
- namespace資源限制
- 加密Secret數據
- 服務網格
- 備份恢復
- Velero安裝
- 備份與恢復
- 常用維護操作
- container runtime
- 拉取私有倉庫鏡像配置
- 拉取公網鏡像加速配置
- runtime網絡代理
- overlay2目錄占用過大
- 更改Docker的數據目錄
- Harbor
- 重置Harbor密碼
- 問題處理
- 關閉或開啟Harbor的認證
- 固定harbor的IP地址范圍
- ETCD
- ETCD擴縮容
- ETCD常用命令
- ETCD數據空間壓縮清理
- ingress
- ingress-nginx header配置
- kubernetes
- 驗證yaml合法性
- 切換KubeProxy模式
- 容器解析域名
- 刪除節點
- 修改鏡像倉庫
- 修改node名稱
- 升級k8s集群
- 切換容器運行時
- apiserver接口
- 其他
- 升級內核
- k8s組件性能分析
- ETCD
- calico
- calico健康檢查失敗
- Harbor
- harbor同步失敗
- Kubernetes
- 資源Terminating狀態
- 啟動容器報錯