Kubernetes Service Delivery Workflow¶
The Kubernetes Service Delivery Workflow is a standardized, five-step procedure used to deploy applications and infrastructure components within a Kubernetes cluster.^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md] This workflow emphasizes the use of declarative configuration manifests to ensure consistent and repeatable deployments^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md].
Standard Delivery Process¶
The general workflow for delivering services using Kubernetes is as follows^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md]:
- Prepare Image: Build or pull the required container image (e.g., Docker), tag it, and push it to a private registry such as Harbor^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md].
- Prepare Resource Manifests: Create the necessary resource definition files (e.g.,
RBAC,Deployment,Service,Ingress)^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md]. - Resolve Domain: If the service requires external access via an Ingress Controller, configure the DNS A record to point to the Ingress node's IP address^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md].
- Apply Manifests: Execute the deployment using
kubectl applyagainst the prepared manifest files^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md]. - Completion: Verify the deployment status by checking pods, services, and Ingress resources^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md].
Example: Dashboard Deployment¶
This workflow is exemplified in the installation of the Kubernetes Dashboard. The process begins by pulling the kubernetes-dashboard-amd64:v1.8.3 image and pushing it to harbor.od.com^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md]. Subsequently, specific resource manifests are defined:
rbac.yaml: ConfiguresServiceAccountandClusterRoleBindingto grant the dashboard the necessary permissions^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md].dp.yaml: Defines theDeployment, specifying the container image, resource limits (CPU/Memory), and ports^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md].svc.yaml: Creates aServiceto expose the application internally, typically mapping a port to the target port 8443^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md].ingress.yaml: Sets up theIngressrule, mapping a specific host (e.g.,dashboard.od.com) to the backend service to allow external access^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md].
Once these manifests are applied and the domain is resolved, the service delivery is complete^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md].
Related Concepts¶
- Kubernetes
- [[Continuous Delivery]]
- Ingress
Sources¶
^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md]