Apollo configuration center¶
Apollo is a reliable, distributed configuration center designed to centrally manage application configurations.^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md] It facilitates the separation of code and configuration, allowing for dynamic updates without redeployment.^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md]
Overview¶
Apollo is designed to address common challenges in configuration management, such as scattered formats, security risks, and lack of version control.^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md] It supports centralized management, ensuring that configuration changes can be pushed to applications in real-time.
Architecture¶
The architecture of Apollo consists of several key components:
- ConfigService: Provides configuration reading interfaces for clients.^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md] It interacts with the ConfigDB to retrieve settings and typically uses a push-pull mechanism to deliver updates to clients.^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md]
- AdminService: Provides management interfaces for the Apollo Portal.^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md] It handles configuration modifications and synchronizes data with the ConfigDB.^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md]
- Portal: The web-based management interface where users can manage configurations and namespaces.^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md]
- Client: The application integration (e.g., Java client) that connects to ConfigService to fetch and listen for configuration changes.
Clients typically communicate with the ConfigService, while the Portal communicates with the AdminService to modify configurations stored in the database.^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md]
Key Features¶
Apollo offers several features to streamline configuration management:
- Centralized Management: Replaces hard-coded or local configuration files with a centralized system.^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md]
- Multi-Environment Support: Allows managing configurations for different environments (e.g., FAT, PRO) within the same Portal.^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md]
- Version Control & Audit: Changes are tracked, providing a history of modifications and preventing accidental data loss.^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md]
- Hot Release: Applications can receive updated configurations without restarting, adhering to principles of high availability.^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md]
Deployment Models¶
Apollo can be deployed in various environments, including physical servers, virtual machines, and containerized platforms like Kubernetes.
Kubernetes Integration¶
In Kubernetes, Apollo components are typically deployed as Deployments or StatefulSets.^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md] A common strategy involves separating the Portal (management UI) from the environment-specific ConfigService and AdminService instances.^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md]
For example, a setup might include:
* A shared Portal for administration.
* Separate instances of ConfigService and AdminService for "Test" (test) and "Production" (prod) namespaces.^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md]
This ensures that one image can be deployed across different environments while maintaining isolation of configuration data.
Comparison with Alternatives¶
Apollo is often compared to other configuration solutions like Spring Cloud Config.^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md] While Spring Cloud Config is foundational, Apollo provides additional features such as a built-in management UI, finer-grained permission control, and native support for multi-environment management.^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md]
Sources¶
^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md]