Kubernetes 工具栈

⬅︎ 返回上层

TOC

其他

  • https://kubernetes.io/
  • kompose: Go from Docker Compose to Kubernetes
  • k3s: 轻量级 k8s,用于边缘计算、嵌入式、物联网场景
  • k0s: 同上
  • k9s: 交互式 CLI 工具,用于管理 K8S 集群。
  • KubeEdge: 用于边缘计算场景
  • gVisor: 容器运行时沙盒。把容器跑在隔离的虚拟容器环境中,提高安全性。
  • ksync: 同步 POD 里的文件

K8S YAML

  • kube-linter: a static analysis tool that checks Kubernetes YAML files and Helm charts
  • Kubernetes YAML Generator
  • kubectl create $kind $name --dry-run=client -oyaml 通过命令行创建 YAML 文件。去掉 --dry-run 会直接创建资源。
    • kubectl create --help, kubectl create deploy --help

Dashboard

  • kuboard: K8S 的管理界面。全中文。

镜像与代理

  • DaoCloud 的镜像
  • https://mirror.azure.cn/kubernetes/ : containernetworking-plugins, etcd, kubectl, containerd 等资源的镜像
  • https://kubernetes-charts.proxy.ustclug.org : helm chart 仓库镜像,http、https 都支持
  • https://docker.aityp.com/
    • 不支持 containerd 的 registry 配置,只能用命令行直接 pull 镜像。因为这个镜像平台的镜像 path 前缀设计有问题,会导致匿名 auth 失败。
    • 同步镜像源: gcr.io ghcr.io quay.io k8s.gcr.io docker.io registry.k8s.io docker.elastic.co skywalking.docker.scarf.sh mcr.microsoft.com docker.n8n.io
    • 单个镜像大小限制 2G (超过 2G 闲时任务同步 凌晨 00-07 时)(超过 12G 镜像禁止同步)
    • 镜像同步不及时,需要手动添加镜像,等待 1 小时后才生效

kubectl

  • kubectx: 方便操作 kubectl。kubens 用来管理、切换 namespace,kubectx 用来管理、切换 k8s 集群
  • krew: kubectl 插件的包管理器

环境

编排

  • k8s-wait-for: 等待 K8S Service, Job 或 Pod to enter a desired state。纯 shell 脚本实现。
  • wait-for-it: 等待指定 host:port 可用,执行指定命令。纯 shell 脚本实现。

容器

  • cri-tools: CLI and validation tools for Kubelet Container Runtime Interface (CRI) .

构建

  • skaffold: Build\Test\Deploy\Tag\Push 自动化框架
  • kaniko: 在容器里构建镜像
    • img: 不依赖 docker daemon 编译镜像
    • buildkit: 「待评价」
  • Azure/draft: Draft makes it easy to build applications that run on Kubernetes. Draft targets the “inner loop” of a developer’s workflow: as they hack on code, but before code is committed to version control.

包管理

可视化管理/UI

监控

  • SkyWalking: 基于 K8S 的无侵入式的网络监控

Operator

Add-On

Provisioner

Debug

  • netshoot: a Docker + Kubernetes network trouble-shooting swiss-army container
  • kubectl-debug: 可以非侵入式地排查 pod 和容器的网络问题。默认使用 netshoot 镜像。相关议题 Ephemeral Containers
  • ksniff: Kubectl plugin to ease sniffing on kubernetes pods using tcpdump and wireshark
  • telepresence: 将远端 k8s 集群的流量转发到本地的服务,便于调试。

Load Balancer

  • MetalLB: a load-balancer implementation for bare metal Kubernetes clusters

Serverless