Skip to main content

Kubernetes App Essentials

Resources

Namespaces

  • 默认创建三个空间 default、kube-system、kube-public
  • 不建议超过 10 个服务的场景下使用 default 空间
  • 创建空间没有什么坏处,相反,如果单个空间内容过多可能影响性能
  • 空间职责
    • 切分团队
    • 切分环境
    • 切分服务

Best Practices

  • Use kubens for namespace management.
  • Kubernetes best practices: Organizing with Namespaces
  • Kubernetes ships with: default, kube-system (used for Kubernetes components), and kube-public.
  • Avoid using the default namespace in large production systems to prevent accidental overwrites or disruption.
  • Use multiple namespaces to segment services into manageable chunks.
  • To isolate namespaces, use Network Policies.

Platform Components (Mantl Example)

Mantl is a modern platform for rapidly deploying globally distributed services.

  • Kubernetes: For managing, organizing, and scheduling containers.
  • Consul: For service discovery.
  • Vault: For managing secrets.
  • Mesos: Cluster manager for efficient resource isolation and sharing.
  • Marathon: Cluster management for long-running containerized services.
  • Terraform: Deployment to multiple cloud providers.
  • Docker: Container runtime.
  • Traefik: For proxying external traffic.
  • mesos-consul: Populating Consul service discovery with Mesos tasks.

GitOps