Kubernetes Notes
  • README
  • 序:Kubernetes之道
  • 搭建开发环境
    • 搭建本地开发测试环境
  • 基本概念
    • Workloads
      • StatefulSet
    • 认证鉴权
      • 理解证书
      • Kubelet配置
    • 垃圾回收
    • Service
  • 基础组件
    • Scheduler
    • 自动扩缩容(HPA)
  • 容器运行时(Container Runtime)
    • CRI
    • Docker
      • 安装配置Docker
      • Docker FAQ
    • Containerd
  • 资源隔离与限制
    • 基础知识
      • Cgroup
      • Namespaces
    • CPU
    • Memory
    • 网络出/入带宽
    • GPU
    • Container
    • FAQ
  • 网络
    • 基础知识
      • Linux network interfaces
      • Iptables
      • Overlay network
    • CNI
    • Flannel
      • Flannel原理
      • host-gw
      • vxlan
      • ipip
    • Calico
    • Cilium
  • Service Mesh
    • Istio
  • 扩展Kubernetes
    • Admission controller
    • Custom resource definition(CRD)
    • Scheduler extender
    • 扩展资源维度
    • Kubectl plugin
    • Aggregator
    • Device plugin
  • 现网问题
    • Kubernetes
    • ETCD
    • Docker
  • 最佳实践
    • 各组件参数配置调优
    • 各大公司生产环境实践
    • 如何打造一个Kubernetes平台
  • 生产力小工具
    • 生成特定权限和配额的kubeconfig
  • 社区贡献
  • 学习资料
  • 附录:RTFSC
    • Informer
    • Pod deletion
Powered by GitBook
On this page
  • 1. 编译
  • 2. 本地节点运行kubernetes集群
  • 3. 运行集成测试
  • 4. 参考资料

Was this helpful?

  1. 搭建开发环境

搭建本地开发测试环境

Previous搭建开发环境Next基本概念

Last updated 5 years ago

Was this helpful?

1. 编译

编译全部组件:

make

编译某个组件:

make all WHAT=$(COMPNAME_NAME)

例:编译kubelet:make all WHAT=cmd/kubelet

2. 本地节点运行kubernetes集群

hack/local-up-cluster.sh

注:运行hack/local-up-cluster.sh时要确保没有设置proxy(env | grep -i proxy),否则会有一些莫名其妙的错误(比如:DNS pod启动有问题),我的mac上增加了命令proxy_off关掉proxy。

3. 运行集成测试

  • The following invocation will run all integration tests: make test-integration

  • The following invocation will run a specific test with the verbose flag set:make test-integration WHAT=./test/integration/pods GOFLAGS="-v" KUBE_TEST_ARGS="-run ^TestPodUpdateActiveDeadlineSeconds$", e.g. make test-integration WHAT=./staging/src/k8s.io/apiextensions-apiserver/test/integration/ GOFLAGS="-v" KUBE_TEST_ARGS="-run TestEtcdStorage"

4. 参考资料

Testing guide:

https://github.com/kubernetes/community/blob/master/contributors/devel/sig-testing/integration-tests.md
https://github.com/kubernetes/community/blob/master/contributors/devel/testing.md