Kubernetes Resource Manifests¶
Kubernetes Resource Manifests are configuration files, typically written in YAML or JSON, that define the desired state of Kubernetes resources such as Deployments, Services, and Ingress.^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md] They serve as the primary method for declaratively managing workloads and services within a cluster.
Deployment Workflow¶
In a standard Kubernetes PaaS delivery workflow, the application of resource manifests is a critical step. The general process involves preparing container images, preparing the resource configuration manifests, resolving domain names (if using Ingress), and finally applying the configuration manifests to complete the deployment.^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md]
Once the manifests are prepared, they are applied to the cluster using the kubectl apply command, referencing the manifest files via a URL or local path.^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md]
Common Manifest Components¶
Resource manifests are often split into separate files based on the resource type or function.
- RBAC and Security: Used for defining permissions.
rbac.yamltypically definesServiceAccountandClusterRoleBindingto manage access control (e.g., creating an admin account).^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md] - Deployments: Defined in
dp.yaml, these files specify the application workload, including the container image (image), resource limits (requests/limits), ports, andserviceAccountNameto be used by the pods.^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md] - Services: Defined in
svc.yaml, these abstract the access to the application pods, often defining aselectorto link to specific pods and exposingportsfor traffic.^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md] - Ingress: Defined in
ingress.yaml, these resources manage external access, typically HTTP/HTTPS, to the services, often mapping ahost(domain name) to a specific backend service.^[400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md]
Related Concepts¶
- Kubernetes
- [[RBAC]]
- [[Kubernetes Services]]
Sources¶
400-devops__06-Kubernetes__k8s-paas__04.dashboard插件及k8s实战交付.md