Kubernetes App Essentials
Resources
- Deploy Nextcloud on Kubernetes - Self-hosted Dropbox alternative.
- Self-host Media Center on Kubernetes - Plex, Sonarr, Radarr, Transmission, and Jackett.
- Self-host Pi-Hole on Kubernetes - Block ads and trackers at the network level.
- Self-host Bitwarden on Kubernetes - Password manager.
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), andkube-public. - Avoid using the
defaultnamespace 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.