@umacloud/knowledge 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/00-governance/governance-capabilities.md +557 -0
- package/00-governance/knowledge-map.md +39 -0
- package/00-governance/maintenance-policy.md +76 -0
- package/00-governance/review-checklist.md +81 -0
- package/README.md +13 -0
- package/ai/01-standards/agent-development-complete.md +691 -0
- package/ai/01-standards/llm-application-complete.md +488 -0
- package/ai/01-standards/mlops-complete.md +798 -0
- package/ai/01-standards/prompt-engineering-complete.md +646 -0
- package/ai/01-standards/rag-architecture-complete.md +649 -0
- package/ai/02-playbooks/llm-evaluation-playbook.md +847 -0
- package/ai/03-checklists/ai-project-checklist.md +215 -0
- package/ai/04-antipatterns/ai-antipatterns.md +661 -0
- package/ai/05-cases/case-rag-production.md +147 -0
- package/ai/06-glossary/ai-glossary.md +162 -0
- package/ai/agent-evaluation-benchmark.md +53 -0
- package/ai/ai-agent-memory-context-management.md +41 -0
- package/ai/ai-cost-capacity-optimization-playbook.md +42 -0
- package/ai/ai-data-security-and-compliance-playbook.md +37 -0
- package/ai/ai-domain-index-and-checklist.md +40 -0
- package/ai/ai-governance-maturity-model.md +50 -0
- package/ai/ai-model-selection-and-routing-strategy.md +47 -0
- package/ai/ai-observability-and-oncall-runbook.md +52 -0
- package/ai/ai-rag-engineering-playbook.md +42 -0
- package/ai/ai-red-team-and-safety-evaluation.md +42 -0
- package/ai/ai-release-readiness-and-rollback-gate.md +42 -0
- package/ai/llm-agent-engineering-deep-dive.md +57 -0
- package/ai/prompt-and-tool-guardrails.md +52 -0
- package/api/01-standards/enterprise-api-standards.md +198 -0
- package/api/01-standards/rest-api-design-guide.md +63 -0
- package/api/02-playbooks/api-pagination-playbook.md +93 -0
- package/api/02-playbooks/graphql-production-playbook.md +176 -0
- package/api/03-checklists/api-review-checklist.md +55 -0
- package/api/04-antipatterns/api-antipatterns.md +112 -0
- package/architecture/01-standards/api-gateway-patterns.md +496 -0
- package/architecture/01-standards/cloud-native-patterns.md +644 -0
- package/architecture/01-standards/distributed-systems-patterns.md +591 -0
- package/architecture/01-standards/event-driven-architecture.md +595 -0
- package/architecture/01-standards/microservices-patterns-complete.md +968 -0
- package/architecture/01-standards/microservices-patterns.md +495 -0
- package/architecture/01-standards/system-design-interview.md +664 -0
- package/architecture/02-playbooks/microservices-patterns-playbook.md +137 -0
- package/architecture/02-playbooks/migration-playbook.md +780 -0
- package/architecture/02-playbooks/system-design-playbook.md +779 -0
- package/architecture/03-checklists/architecture-decision-checklist.md +297 -0
- package/architecture/04-antipatterns/architecture-antipatterns.md +417 -0
- package/architecture/05-cases/case-netflix-microservices.md +413 -0
- package/architecture/06-glossary/architecture-glossary.md +164 -0
- package/architecture/adr-template-and-examples.md +38 -0
- package/architecture/api-gateway-deep-dive.md +1291 -0
- package/architecture/configuration-management.md +1162 -0
- package/architecture/distributed-transactions.md +1220 -0
- package/architecture/microservices-complete.md +735 -0
- package/architecture/resilience-and-disaster-patterns.md +37 -0
- package/architecture/service-governance.md +1198 -0
- package/architecture/system-architecture-deep-dive.md +37 -0
- package/backend/01-standards/analytics-and-growth.md +65 -0
- package/backend/01-standards/api-and-error-conventions.md +120 -0
- package/backend/01-standards/application-layering-and-packaging.md +160 -0
- package/backend/01-standards/auth-implementation.md +104 -0
- package/backend/01-standards/backend-framework-idioms.md +74 -0
- package/backend/01-standards/background-jobs-and-async.md +66 -0
- package/backend/01-standards/caching-strategies-complete.md +390 -0
- package/backend/01-standards/config-and-observability.md +77 -0
- package/backend/01-standards/data-modeling-and-persistence.md +94 -0
- package/backend/01-standards/django-complete.md +1765 -0
- package/backend/01-standards/email-and-notifications.md +64 -0
- package/backend/01-standards/fastapi-complete.md +925 -0
- package/backend/01-standards/file-upload-and-storage.md +66 -0
- package/backend/01-standards/graphql-api-complete.md +416 -0
- package/backend/01-standards/llm-application-standard.md +78 -0
- package/backend/01-standards/message-queue-patterns.md +379 -0
- package/backend/01-standards/microservices-and-distributed.md +78 -0
- package/backend/01-standards/nestjs-complete.md +2167 -0
- package/backend/01-standards/payment-integration.md +80 -0
- package/backend/01-standards/rate-limiting-complete.md +451 -0
- package/backend/01-standards/realtime-and-websocket.md +65 -0
- package/backend/01-standards/search-and-filtering.md +64 -0
- package/backend/01-standards/spring-boot-complete.md +445 -0
- package/backend/02-playbooks/api-design-playbook.md +718 -0
- package/backend/02-playbooks/email-send-playbook.md +130 -0
- package/backend/02-playbooks/file-upload-s3-playbook.md +153 -0
- package/backend/02-playbooks/typescript-enterprise-playbook.md +133 -0
- package/backend/02-playbooks/websocket-realtime-playbook.md +154 -0
- package/backend/03-checklists/api-launch-checklist.md +189 -0
- package/backend/04-antipatterns/backend-antipatterns.md +1051 -0
- package/blockchain/01-standards/blockchain-basics.md +557 -0
- package/blockchain/01-standards/smart-contract-development.md +1315 -0
- package/cicd/01-standards/deployment-and-delivery-standard.md +96 -0
- package/cicd/01-standards/github-actions-complete.md +473 -0
- package/cicd/01-standards/release-and-store-submission.md +75 -0
- package/cicd/02-playbooks/cicd-pipeline-playbook.md +144 -0
- package/cicd/02-playbooks/release-management-playbook.md +605 -0
- package/cicd/03-checklists/pipeline-security-checklist.md +168 -0
- package/cicd/04-antipatterns/cicd-antipatterns.md +589 -0
- package/cicd/05-cases/case-deployment-automation.md +221 -0
- package/cicd/05-cases/case-gitops-transformation.md +212 -0
- package/cicd/06-glossary/cicd-glossary.md +114 -0
- package/cicd/cicd-blueprint-deep-dive.md +38 -0
- package/cicd/release-readiness-gate.md +37 -0
- package/cloud-native/01-standards/container-security.md +741 -0
- package/cloud-native/01-standards/kubernetes-complete.md +812 -0
- package/cloud-native/02-playbooks/api-gateway-playbook.md +155 -0
- package/cloud-native/02-playbooks/gitops-with-argocd.md +760 -0
- package/cloud-native/02-playbooks/k8s-troubleshooting-playbook.md +1942 -0
- package/cloud-native/02-playbooks/message-queue-playbook.md +129 -0
- package/cloud-native/02-playbooks/multicloud-governance.md +726 -0
- package/cloud-native/02-playbooks/serverless-patterns.md +788 -0
- package/cloud-native/02-playbooks/service-mesh-playbook.md +612 -0
- package/cloud-native/02-playbooks/terraform-iac-playbook.md +143 -0
- package/cloud-native/03-checklists/container-security-checklist.md +431 -0
- package/cloud-native/03-checklists/k8s-production-readiness-checklist.md +460 -0
- package/cloud-native/04-antipatterns/container-antipatterns.md +660 -0
- package/cloud-native/04-antipatterns/k8s-antipatterns.md +743 -0
- package/cloud-native/05-cases/case-k8s-migration.md +478 -0
- package/cloud-native/05-cases/case-k8s-scaling.md +642 -0
- package/cloud-native/05-cases/case-k8s-security-incident.md +397 -0
- package/cloud-native/06-glossary/cloud-native-glossary.md +337 -0
- package/cross-platform/01-standards/cross-platform-frameworks.md +83 -0
- package/cross-platform/01-standards/platform-selection-and-architecture.md +77 -0
- package/data/01-standards/elasticsearch-complete.md +2098 -0
- package/data/01-standards/postgresql-complete.md +1613 -0
- package/data/01-standards/redis-complete.md +1527 -0
- package/data/02-playbooks/database-optimization-playbook.md +403 -0
- package/data/02-playbooks/elasticsearch-production-playbook.md +132 -0
- package/data/03-checklists/database-launch-checklist.md +187 -0
- package/data/04-antipatterns/database-antipatterns.md +873 -0
- package/data/05-cases/case-database-migration.md +310 -0
- package/data/06-glossary/database-glossary.md +440 -0
- package/data/data-governance-and-modeling-deep-dive.md +39 -0
- package/data-engineering/01-standards/airflow-complete.md +523 -0
- package/data-engineering/01-standards/kafka-complete.md +1521 -0
- package/data-engineering/02-playbooks/spark-etl-playbook.md +496 -0
- package/data-engineering/03-checklists/pipeline-launch-checklist.md +194 -0
- package/data-engineering/04-antipatterns/data-pipeline-antipatterns.md +684 -0
- package/data-engineering/05-cases/case-real-time-pipeline.md +355 -0
- package/data-engineering/06-glossary/data-engineering-glossary.md +429 -0
- package/database/01-standards/database-schema-standards.md +147 -0
- package/database/02-playbooks/postgresql-optimization-quick.md +52 -0
- package/database/02-playbooks/postgresql-performance-optimization.md +58 -0
- package/database/02-playbooks/postgresql-production-playbook.md +146 -0
- package/database/02-playbooks/redis-caching-playbook.md +117 -0
- package/database/03-checklists/database-review-checklist.md +50 -0
- package/database/04-antipatterns/database-antipatterns.md +112 -0
- package/design/01-standards/ui-design-system-complete.md +423 -0
- package/design/02-playbooks/design-handoff-playbook.md +254 -0
- package/design/02-playbooks/design-review-playbook.md +388 -0
- package/design/03-checklists/design-review-checklist.md +246 -0
- package/design/04-antipatterns/design-antipatterns.md +378 -0
- package/design/05-cases/case-design-system-adoption.md +328 -0
- package/design/06-glossary/design-glossary.md +329 -0
- package/design/ui-full-lifecycle-cross-platform-playbook.md +571 -0
- package/design/ux-system-deep-dive.md +38 -0
- package/design-systems/00-craft-rules.md +71 -0
- package/design-systems/aesthetic-families.md +43 -0
- package/design-systems/anti-ai-slop.md +162 -0
- package/design-systems/bold-geometric.md +120 -0
- package/design-systems/brutalist-bold.md +103 -0
- package/design-systems/editorial-clean.md +109 -0
- package/design-systems/glass-aurora.md +108 -0
- package/design-systems/modern-minimal.md +145 -0
- package/design-systems/premium-luxury.md +106 -0
- package/design-systems/product-type-design-map.md +48 -0
- package/design-systems/soft-warm.md +123 -0
- package/design-systems/tech-utility.md +113 -0
- package/desktop/01-standards/desktop-app-standard.md +72 -0
- package/desktop/01-standards/desktop-design.md +71 -0
- package/development/00-governance/document-template.md +41 -0
- package/development/01-standards/api-versioning-strategies.md +432 -0
- package/development/01-standards/authentication-patterns-complete.md +479 -0
- package/development/01-standards/css-architecture-complete.md +550 -0
- package/development/01-standards/database-migration-strategies.md +484 -0
- package/development/01-standards/elasticsearch-complete.md +347 -0
- package/development/01-standards/git-complete.md +371 -0
- package/development/01-standards/golang-complete.md +1565 -0
- package/development/01-standards/graphql-complete.md +298 -0
- package/development/01-standards/javascript-bundlers-complete.md +469 -0
- package/development/01-standards/javascript-typescript-complete.md +528 -0
- package/development/01-standards/jest-complete.md +275 -0
- package/development/01-standards/linux-complete.md +234 -0
- package/development/01-standards/logging-observability-complete.md +526 -0
- package/development/01-standards/microservices-communication.md +502 -0
- package/development/01-standards/mongodb-complete.md +406 -0
- package/development/01-standards/oauth2-complete.md +285 -0
- package/development/01-standards/performance-optimization-complete.md +289 -0
- package/development/01-standards/playwright-complete.md +247 -0
- package/development/01-standards/postgresql-complete.md +456 -0
- package/development/01-standards/pytest-complete.md +340 -0
- package/development/01-standards/python-async-programming.md +902 -0
- package/development/01-standards/python-complete.md +956 -0
- package/development/01-standards/python-decorators-complete.md +799 -0
- package/development/01-standards/python-design-patterns.md +2854 -0
- package/development/01-standards/python-packaging-distribution.md +420 -0
- package/development/01-standards/python-testing-strategies.md +607 -0
- package/development/01-standards/python-web-frameworks-comparison.md +471 -0
- package/development/01-standards/redis-complete.md +317 -0
- package/development/01-standards/rest-api-complete.md +316 -0
- package/development/01-standards/rust-complete.md +578 -0
- package/development/01-standards/typescript-advanced-types.md +1513 -0
- package/development/01-standards/web-security-complete.md +292 -0
- package/development/02-playbooks/api-design-playbook.md +810 -0
- package/development/02-playbooks/database-migration-playbook.md +580 -0
- package/development/02-playbooks/debugging-playbook.md +692 -0
- package/development/02-playbooks/feature-delivery-playbook.md +430 -0
- package/development/02-playbooks/incident-hotfix-playbook.md +387 -0
- package/development/02-playbooks/performance-optimization-playbook.md +531 -0
- package/development/02-playbooks/performance-tuning-playbook.md +652 -0
- package/development/02-playbooks/refactor-playbook.md +403 -0
- package/development/02-playbooks/release-playbook.md +469 -0
- package/development/03-checklists/architecture-review-checklist.md +168 -0
- package/development/03-checklists/data-migration-checklist.md +157 -0
- package/development/03-checklists/oncall-handover-checklist.md +173 -0
- package/development/03-checklists/pr-checklist.md +158 -0
- package/development/03-checklists/production-readiness-checklist.md +190 -0
- package/development/03-checklists/release-readiness-checklist.md +154 -0
- package/development/03-checklists/security-review-checklist.md +182 -0
- package/development/04-antipatterns/api-antipatterns.md +657 -0
- package/development/04-antipatterns/architecture-antipatterns.md +686 -0
- package/development/04-antipatterns/backend-antipatterns.md +648 -0
- package/development/04-antipatterns/cicd-antipatterns.md +540 -0
- package/development/04-antipatterns/code-smell-antipatterns.md +571 -0
- package/development/04-antipatterns/data-antipatterns.md +658 -0
- package/development/04-antipatterns/database-antipatterns.md +578 -0
- package/development/04-antipatterns/frontend-antipatterns.md +635 -0
- package/development/04-antipatterns/reliability-antipatterns.md +700 -0
- package/development/04-antipatterns/security-antipatterns.md +747 -0
- package/development/05-cases/case-api-version-migration.md +428 -0
- package/development/05-cases/case-authorization-hardening.md +383 -0
- package/development/05-cases/case-bluegreen-rollback.md +466 -0
- package/development/05-cases/case-cache-snowball-protection.md +485 -0
- package/development/05-cases/case-ci-cd-pipeline.md +544 -0
- package/development/05-cases/case-database-scaling.md +500 -0
- package/development/05-cases/case-db-hotspot-optimization.md +487 -0
- package/development/05-cases/case-incident-mttr-reduction.md +563 -0
- package/development/05-cases/case-microservice-migration.md +375 -0
- package/development/05-cases/case-performance-optimization.md +406 -0
- package/development/05-cases/case-security-incident-response.md +345 -0
- package/development/06-glossary/full-stack-glossary.md +166 -0
- package/development/09-maturity/quarterly-audit-template.md +35 -0
- package/development/11-ui-excellence/ui-aesthetic-system.md +41 -0
- package/development/11-ui-excellence/ui-engineering-excellence.md +435 -0
- package/development/12-scenarios/development-scenarios-guide.md +565 -0
- package/development/13-implementation-assets/implementation-toolkit.md +282 -0
- package/development/13-implementation-assets/knowledge-gates-execution.md +43 -0
- package/development/14-full-lifecycle/software-lifecycle-gates.md +511 -0
- package/development/15-lifecycle-templates/project-templates-collection.md +791 -0
- package/development/api-contract-and-versioning-guide.md +36 -0
- package/development/api-governance-complete.md +43 -0
- package/development/backend-engineering-complete.md +43 -0
- package/development/code-review-quality-complete.md +43 -0
- package/development/concurrency-reliability-complete.md +43 -0
- package/development/database-engineering-complete.md +43 -0
- package/development/engineering-effectiveness-complete.md +43 -0
- package/development/engineering-standards-deep-dive.md +38 -0
- package/development/frontend-engineering-complete.md +43 -0
- package/development/performance-capacity-complete.md +43 -0
- package/development/refactor-migration-complete.md +42 -0
- package/development/refactoring-and-techdebt-playbook.md +37 -0
- package/development/security-in-development-complete.md +43 -0
- package/devops/01-standards/cicd-pipeline-complete.md +262 -0
- package/devops/01-standards/docker-complete.md +1490 -0
- package/devops/01-standards/github-actions-complete.md +337 -0
- package/devops/01-standards/kubernetes-complete.md +638 -0
- package/devops/01-standards/terraform-complete.md +2117 -0
- package/devops/02-playbooks/docker-compose-playbook.md +233 -0
- package/devops/02-playbooks/docker-k8s-production-playbook.md +186 -0
- package/devops/02-playbooks/docker-production-playbook.md +952 -0
- package/edge-iot/01-standards/edge-iot-complete.md +473 -0
- package/experts/architect/api-design.md +178 -0
- package/experts/architect/methodology.md +124 -0
- package/experts/architect/security.md +75 -0
- package/experts/backend-lead/methodology.md +216 -0
- package/experts/devops/methodology.md +160 -0
- package/experts/frontend-lead/methodology.md +178 -0
- package/experts/product-manager/industry/ecommerce.md +43 -0
- package/experts/product-manager/industry/saas.md +40 -0
- package/experts/product-manager/methodology.md +97 -0
- package/experts/qa-lead/methodology.md +123 -0
- package/experts/qa-lead/test-strategy.md +128 -0
- package/experts/uiux-designer/methodology.md +125 -0
- package/frontend/01-standards/accessibility-complete.md +532 -0
- package/frontend/01-standards/accessibility-standard.md +74 -0
- package/frontend/01-standards/admin-dashboard-and-crud.md +72 -0
- package/frontend/01-standards/design-tokens-complete.md +444 -0
- package/frontend/01-standards/forms-and-validation.md +77 -0
- package/frontend/01-standards/frontend-architecture-and-layering.md +119 -0
- package/frontend/01-standards/i18n-and-localization.md +65 -0
- package/frontend/01-standards/nextjs-complete.md +451 -0
- package/frontend/01-standards/react-complete.md +713 -0
- package/frontend/01-standards/react-hooks-complete-guide.md +1100 -0
- package/frontend/01-standards/react-hooks-complete.md +1171 -0
- package/frontend/01-standards/seo-and-web-vitals.md +77 -0
- package/frontend/01-standards/state-management-complete.md +444 -0
- package/frontend/01-standards/vue-complete.md +499 -0
- package/frontend/01-standards/vue3-complete.md +2002 -0
- package/frontend/01-standards/web-framework-best-practices.md +64 -0
- package/frontend/01-standards/web-performance-complete.md +495 -0
- package/frontend/02-playbooks/accessibility-a11y-playbook.md +161 -0
- package/frontend/02-playbooks/frontend-performance-playbook.md +707 -0
- package/frontend/02-playbooks/i18n-internationalization-playbook.md +120 -0
- package/frontend/02-playbooks/performance-optimization-playbook.md +163 -0
- package/frontend/02-playbooks/react-nextjs-production-playbook.md +167 -0
- package/frontend/02-playbooks/react-state-management-playbook.md +173 -0
- package/frontend/03-checklists/component-quality-checklist.md +166 -0
- package/frontend/03-checklists/frontend-launch-checklist.md +299 -0
- package/frontend/04-antipatterns/frontend-antipatterns.md +886 -0
- package/frontend/05-cases/case-performance-optimization.md +274 -0
- package/harmony/01-standards/harmonyos-arkts-standard.md +75 -0
- package/harmony/01-standards/harmonyos-design.md +65 -0
- package/high-quality-engineering-playbook.md +54 -0
- package/incident/01-standards/incident-response-complete.md +303 -0
- package/incident/02-playbooks/chaos-engineering-playbook.md +883 -0
- package/incident/02-playbooks/postmortem-playbook.md +398 -0
- package/incident/03-checklists/incident-readiness-checklist.md +181 -0
- package/incident/04-antipatterns/incident-antipatterns.md +490 -0
- package/incident/05-cases/case-cascade-failure.md +176 -0
- package/incident/06-glossary/incident-glossary.md +114 -0
- package/incident/postmortem-and-response-deep-dive.md +39 -0
- package/industries/ecommerce/ecommerce-complete.md +631 -0
- package/industries/education/education-complete.md +555 -0
- package/industries/fintech/fintech-complete.md +501 -0
- package/industries/gaming/gaming-complete.md +587 -0
- package/industries/healthcare/healthcare-complete.md +452 -0
- package/low-code/01-standards/low-code-complete.md +944 -0
- package/miniprogram/01-standards/ai-common-mistakes.md +61 -0
- package/miniprogram/01-standards/miniprogram-custom-navbar-capsule.md +77 -0
- package/miniprogram/01-standards/miniprogram-design.md +61 -0
- package/miniprogram/01-standards/miniprogram-standard.md +81 -0
- package/mobile/01-standards/android-material-design.md +70 -0
- package/mobile/01-standards/flutter-complete.md +384 -0
- package/mobile/01-standards/ios-design-hig.md +78 -0
- package/mobile/01-standards/mobile-app-standard.md +85 -0
- package/mobile/01-standards/react-native-complete.md +352 -0
- package/mobile/02-playbooks/mobile-cross-platform-playbook.md +175 -0
- package/mobile/02-playbooks/mobile-performance.md +473 -0
- package/mobile/03-checklists/mobile-release-checklist.md +234 -0
- package/mobile/04-antipatterns/mobile-antipatterns.md +798 -0
- package/mobile/05-cases/case-app-performance.md +500 -0
- package/mobile/05-cases/case-app-startup-optimization.md +218 -0
- package/mobile/06-glossary/mobile-glossary.md +484 -0
- package/observability/01-standards/observability-standards.md +103 -0
- package/observability/02-playbooks/prometheus-grafana-playbook.md +135 -0
- package/observability/02-playbooks/structured-logging-playbook.md +73 -0
- package/observability/03-checklists/observability-checklist.md +54 -0
- package/observability/04-antipatterns/observability-antipatterns.md +106 -0
- package/operations/01-standards/prometheus-monitoring-complete.md +1578 -0
- package/operations/02-playbooks/capacity-planning-playbook.md +620 -0
- package/operations/03-checklists/production-launch-checklist.md +365 -0
- package/operations/04-antipatterns/operations-antipatterns.md +664 -0
- package/operations/05-cases/case-sre-practices.md +581 -0
- package/operations/06-glossary/operations-glossary.md +120 -0
- package/operations/aiops-anomaly-detection.md +758 -0
- package/operations/capacity-planning.md +1061 -0
- package/operations/chaos-engineering.md +659 -0
- package/operations/incident-command-system.md +38 -0
- package/operations/observability-complete.md +442 -0
- package/operations/slo-sli-playbook.md +517 -0
- package/operations/sre-operations-deep-dive.md +39 -0
- package/package.json +8 -0
- package/performance/01-standards/performance-and-scalability.md +80 -0
- package/performance/01-standards/performance-standards.md +156 -0
- package/performance/02-playbooks/query-optimization-playbook.md +103 -0
- package/performance/03-checklists/performance-checklist.md +56 -0
- package/performance/04-antipatterns/performance-antipatterns.md +146 -0
- package/product/01-standards/product-management-complete.md +285 -0
- package/product/02-playbooks/feature-launch-playbook.md +207 -0
- package/product/02-playbooks/user-research-playbook.md +532 -0
- package/product/03-checklists/feature-launch-checklist.md +275 -0
- package/product/04-antipatterns/product-antipatterns.md +355 -0
- package/product/05-cases/case-mvp-to-scale.md +384 -0
- package/product/06-glossary/product-glossary.md +462 -0
- package/product/feature-prioritization-framework.md +40 -0
- package/product/kpi-and-metric-tree.md +37 -0
- package/product/product-discovery-and-prd-deep-dive.md +41 -0
- package/quantum/01-standards/quantum-complete.md +1186 -0
- package/security/01-standards/api-security-complete.md +511 -0
- package/security/01-standards/container-runtime-security.md +574 -0
- package/security/01-standards/data-protection-gdpr.md +543 -0
- package/security/01-standards/owasp-top10-complete.md +1890 -0
- package/security/01-standards/secure-coding-baseline.md +90 -0
- package/security/01-standards/supply-chain-security.md +441 -0
- package/security/01-standards/web-security-checklist.md +108 -0
- package/security/01-standards/zero-trust-architecture.md +521 -0
- package/security/02-playbooks/auth-sso-playbook.md +166 -0
- package/security/02-playbooks/incident-response-security-playbook.md +588 -0
- package/security/02-playbooks/owasp-api-security-playbook.md +129 -0
- package/security/02-playbooks/payment-integration-playbook.md +119 -0
- package/security/02-playbooks/penetration-testing-playbook.md +517 -0
- package/security/03-checklists/security-audit-checklist.md +356 -0
- package/security/04-antipatterns/security-coding-antipatterns.md +580 -0
- package/security/05-cases/case-log4shell-incident.md +537 -0
- package/security/05-cases/case-major-breaches.md +468 -0
- package/security/06-glossary/security-glossary.md +212 -0
- package/security/compliance-automation.md +993 -0
- package/security/container-security.md +680 -0
- package/security/devsecops-complete.md +426 -0
- package/security/sast-dast-sca.md +775 -0
- package/security/secrets-management.md +594 -0
- package/security/security-architecture-deep-dive.md +37 -0
- package/security/threat-modeling-stride-playbook.md +40 -0
- package/seed-templates/auth-system.md +59 -0
- package/seed-templates/blog-content.md +94 -0
- package/seed-templates/dashboard.md +89 -0
- package/seed-templates/docs-site.md +73 -0
- package/seed-templates/e-commerce.md +50 -0
- package/seed-templates/saas-landing.md +92 -0
- package/seed-templates/settings-page.md +51 -0
- package/testing/01-standards/test-strategy-and-layering.md +83 -0
- package/testing/01-standards/testing-strategy-complete.md +422 -0
- package/testing/01-standards/unit-testing-best-practices.md +118 -0
- package/testing/02-playbooks/e2e-testing-playbook.md +988 -0
- package/testing/02-playbooks/testing-strategy-playbook.md +126 -0
- package/testing/03-checklists/test-strategy-checklist.md +208 -0
- package/testing/04-antipatterns/testing-antipatterns.md +718 -0
- package/testing/05-cases/case-testing-transformation.md +300 -0
- package/testing/06-glossary/testing-glossary.md +110 -0
- package/testing/risk-based-test-matrix.md +36 -0
- package/testing/testing-strategy-deep-dive.md +37 -0
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 案例:Kubernetes 迁移
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
last_updated: 2025-03-20
|
|
5
|
+
owner: platform-team
|
|
6
|
+
tags: [kubernetes, migration, case-study]
|
|
7
|
+
status: production
|
|
8
|
+
domain: cloud-native
|
|
9
|
+
difficulty: intermediate
|
|
10
|
+
quality_score: 70
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# 开发:Excellent(11964948@qq.com)
|
|
14
|
+
# 功能:Kubernetes 迁移实战案例
|
|
15
|
+
# 作用:分享传统应用到 Kubernetes 的迁移经验
|
|
16
|
+
# 创建时间:2025-03-20
|
|
17
|
+
# 最后修改:2025-03-20
|
|
18
|
+
|
|
19
|
+
## 背景
|
|
20
|
+
|
|
21
|
+
某电商平台原有系统运行在传统虚拟机上,面临以下问题:
|
|
22
|
+
- 部署周期长(2-3 天)
|
|
23
|
+
- 资源利用率低(平均 20%)
|
|
24
|
+
- 扩容响应慢(需要 30 分钟)
|
|
25
|
+
- 运维成本高(每季度 50 万)
|
|
26
|
+
|
|
27
|
+
**目标**:迁移到 Kubernetes,实现:
|
|
28
|
+
- 部署周期缩短到分钟级
|
|
29
|
+
- 资源利用率提升到 60% 以上
|
|
30
|
+
- 秒级弹性伸缩
|
|
31
|
+
- 运维成本降低 50%
|
|
32
|
+
|
|
33
|
+
## 迁移策略
|
|
34
|
+
|
|
35
|
+
采用 **绞杀者模式(Strangler Fig Pattern)**,逐步迁移:
|
|
36
|
+
|
|
37
|
+
1. **阶段 1**:搭建 K8s 集群,迁移无状态服务
|
|
38
|
+
2. **阶段 2**:迁移数据库和有状态服务
|
|
39
|
+
3. **阶段 3**:迁移遗留系统,下线虚拟机
|
|
40
|
+
|
|
41
|
+
## 实施步骤
|
|
42
|
+
|
|
43
|
+
### 第一阶段:基础设施搭建
|
|
44
|
+
|
|
45
|
+
#### 1.1 集群规划
|
|
46
|
+
|
|
47
|
+
```yaml
|
|
48
|
+
# 集群架构
|
|
49
|
+
Production Cluster:
|
|
50
|
+
- Control Plane: 3 节点(高可用)
|
|
51
|
+
- System Node Pool: 3 节点(系统组件)
|
|
52
|
+
- General Node Pool: 10 节点(无状态应用)
|
|
53
|
+
- Memory Node Pool: 5 节点(缓存/数据库)
|
|
54
|
+
|
|
55
|
+
Staging Cluster:
|
|
56
|
+
- Control Plane: 1 节点
|
|
57
|
+
- General Node Pool: 3 节点
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### 1.2 基础组件部署
|
|
61
|
+
|
|
62
|
+
```yaml
|
|
63
|
+
# 核心组件清单
|
|
64
|
+
components:
|
|
65
|
+
networking:
|
|
66
|
+
- CNI: Calico
|
|
67
|
+
- Ingress: Nginx Ingress Controller
|
|
68
|
+
- DNS: CoreDNS
|
|
69
|
+
- Load Balancer: MetalLB
|
|
70
|
+
|
|
71
|
+
storage:
|
|
72
|
+
- CSI: AWS EBS CSI Driver
|
|
73
|
+
- StorageClass: gp3(默认)、io2(高性能)
|
|
74
|
+
|
|
75
|
+
security:
|
|
76
|
+
- RBAC: 原生 RBAC
|
|
77
|
+
- Network Policy: Calico
|
|
78
|
+
- Secret: External Secrets Operator
|
|
79
|
+
- Policy: OPA Gatekeeper
|
|
80
|
+
|
|
81
|
+
observability:
|
|
82
|
+
- Monitoring: Prometheus + Grafana
|
|
83
|
+
- Logging: Loki + Promtail
|
|
84
|
+
- Tracing: Jaeger
|
|
85
|
+
- Alerting: Alertmanager
|
|
86
|
+
|
|
87
|
+
gitops:
|
|
88
|
+
- ArgoCD
|
|
89
|
+
- Image Updater
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 第二阶段:应用迁移
|
|
93
|
+
|
|
94
|
+
#### 2.1 应用评估和分类
|
|
95
|
+
|
|
96
|
+
```yaml
|
|
97
|
+
# 应用分类
|
|
98
|
+
tier_1_critical: # 核心业务,优先迁移
|
|
99
|
+
- api-gateway
|
|
100
|
+
- order-service
|
|
101
|
+
- payment-service
|
|
102
|
+
|
|
103
|
+
tier_2_important: # 重要服务
|
|
104
|
+
- user-service
|
|
105
|
+
- product-service
|
|
106
|
+
- inventory-service
|
|
107
|
+
|
|
108
|
+
tier_3_supporting: # 支撑服务
|
|
109
|
+
- recommendation-service
|
|
110
|
+
- analytics-service
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
#### 2.2 容器化改造
|
|
114
|
+
|
|
115
|
+
**改造前(虚拟机部署):**
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# 传统部署脚本
|
|
119
|
+
#!/bin/bash
|
|
120
|
+
apt-get update
|
|
121
|
+
apt-get install -y python3 python3-pip nginx
|
|
122
|
+
pip3 install -r requirements.txt
|
|
123
|
+
python3 manage.py migrate
|
|
124
|
+
service nginx start
|
|
125
|
+
gunicorn app:app
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**改造后(容器化):**
|
|
129
|
+
|
|
130
|
+
```dockerfile
|
|
131
|
+
# Dockerfile
|
|
132
|
+
FROM python:3.11-slim AS builder
|
|
133
|
+
WORKDIR /app
|
|
134
|
+
COPY requirements.txt .
|
|
135
|
+
RUN pip install --no-cache-dir --target=/app/deps -r requirements.txt
|
|
136
|
+
|
|
137
|
+
FROM python:3.11-slim
|
|
138
|
+
RUN groupadd -r appgroup && useradd -r -g appgroup appuser
|
|
139
|
+
WORKDIR /app
|
|
140
|
+
COPY --from=builder /app/deps /usr/local/lib/python3.11/site-packages
|
|
141
|
+
COPY --chown=appuser:appgroup . .
|
|
142
|
+
USER appuser
|
|
143
|
+
EXPOSE 8080
|
|
144
|
+
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "app:app"]
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
```yaml
|
|
148
|
+
# Kubernetes 部署
|
|
149
|
+
apiVersion: apps/v1
|
|
150
|
+
kind: Deployment
|
|
151
|
+
metadata:
|
|
152
|
+
name: api-gateway
|
|
153
|
+
namespace: production
|
|
154
|
+
spec:
|
|
155
|
+
replicas: 3
|
|
156
|
+
selector:
|
|
157
|
+
matchLabels:
|
|
158
|
+
app: api-gateway
|
|
159
|
+
template:
|
|
160
|
+
metadata:
|
|
161
|
+
labels:
|
|
162
|
+
app: api-gateway
|
|
163
|
+
version: v1.0.0
|
|
164
|
+
spec:
|
|
165
|
+
serviceAccountName: api-gateway-sa
|
|
166
|
+
containers:
|
|
167
|
+
- name: api-gateway
|
|
168
|
+
image: registry.example.com/api-gateway:v1.0.0
|
|
169
|
+
ports:
|
|
170
|
+
- containerPort: 8080
|
|
171
|
+
env:
|
|
172
|
+
- name: DATABASE_URL
|
|
173
|
+
valueFrom:
|
|
174
|
+
secretKeyRef:
|
|
175
|
+
name: db-credentials
|
|
176
|
+
key: url
|
|
177
|
+
resources:
|
|
178
|
+
requests:
|
|
179
|
+
cpu: "500m"
|
|
180
|
+
memory: "1Gi"
|
|
181
|
+
limits:
|
|
182
|
+
cpu: "2000m"
|
|
183
|
+
memory: "2Gi"
|
|
184
|
+
livenessProbe:
|
|
185
|
+
httpGet:
|
|
186
|
+
path: /health/live
|
|
187
|
+
port: 8080
|
|
188
|
+
initialDelaySeconds: 30
|
|
189
|
+
periodSeconds: 10
|
|
190
|
+
readinessProbe:
|
|
191
|
+
httpGet:
|
|
192
|
+
path: /health/ready
|
|
193
|
+
port: 8080
|
|
194
|
+
initialDelaySeconds: 10
|
|
195
|
+
periodSeconds: 5
|
|
196
|
+
affinity:
|
|
197
|
+
podAntiAffinity:
|
|
198
|
+
preferredDuringSchedulingIgnoredDuringExecution:
|
|
199
|
+
- weight: 100
|
|
200
|
+
podAffinityTerm:
|
|
201
|
+
labelSelector:
|
|
202
|
+
matchLabels:
|
|
203
|
+
app: api-gateway
|
|
204
|
+
topologyKey: kubernetes.io/hostname
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
#### 2.3 数据库迁移策略
|
|
208
|
+
|
|
209
|
+
**双写模式(平滑迁移):**
|
|
210
|
+
|
|
211
|
+
```python
|
|
212
|
+
# 应用层双写
|
|
213
|
+
class DatabaseManager:
|
|
214
|
+
def __init__(self):
|
|
215
|
+
self.old_db = OldDatabase()
|
|
216
|
+
self.new_db = NewDatabase()
|
|
217
|
+
|
|
218
|
+
def write(self, data):
|
|
219
|
+
# 写入新数据库
|
|
220
|
+
try:
|
|
221
|
+
self.new_db.write(data)
|
|
222
|
+
except Exception as e:
|
|
223
|
+
logger.error(f"New DB write failed: {e}")
|
|
224
|
+
|
|
225
|
+
# 同时写入旧数据库(兼容期)
|
|
226
|
+
self.old_db.write(data)
|
|
227
|
+
|
|
228
|
+
def read(self, key):
|
|
229
|
+
# 优先读新数据库
|
|
230
|
+
result = self.new_db.read(key)
|
|
231
|
+
if result:
|
|
232
|
+
return result
|
|
233
|
+
# 回退到旧数据库
|
|
234
|
+
return self.old_db.read(key)
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**迁移步骤:**
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
# 1. 部署新数据库到 K8s
|
|
241
|
+
kubectl apply -f postgres-statefulset.yaml
|
|
242
|
+
|
|
243
|
+
# 2. 数据同步
|
|
244
|
+
pg_dump -h old-db.internal -U user db_name | psql -h new-db.internal -U user db_name
|
|
245
|
+
|
|
246
|
+
# 3. 开启双写
|
|
247
|
+
kubectl set env deployment/api-gateway ENABLE_DUAL_WRITE=true
|
|
248
|
+
|
|
249
|
+
# 4. 验证数据一致性
|
|
250
|
+
python verify_data.py
|
|
251
|
+
|
|
252
|
+
# 5. 切换读流量
|
|
253
|
+
kubectl set env deployment/api-gateway READ_FROM_NEW_DB=true
|
|
254
|
+
|
|
255
|
+
# 6. 下线旧数据库
|
|
256
|
+
kubectl set env deployment/api-gateway ENABLE_DUAL_WRITE=false
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### 第三阶段:流量切换
|
|
260
|
+
|
|
261
|
+
#### 3.1 流量分割(蓝绿发布)
|
|
262
|
+
|
|
263
|
+
```yaml
|
|
264
|
+
# Istio VirtualService
|
|
265
|
+
apiVersion: networking.istio.io/v1beta1
|
|
266
|
+
kind: VirtualService
|
|
267
|
+
metadata:
|
|
268
|
+
name: api-gateway
|
|
269
|
+
spec:
|
|
270
|
+
hosts:
|
|
271
|
+
- api.example.com
|
|
272
|
+
http:
|
|
273
|
+
- route:
|
|
274
|
+
- destination:
|
|
275
|
+
host: api-gateway
|
|
276
|
+
subset: vm # 虚拟机版本
|
|
277
|
+
weight: 100
|
|
278
|
+
- destination:
|
|
279
|
+
host: api-gateway
|
|
280
|
+
subset: k8s # K8s 版本
|
|
281
|
+
weight: 0
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
#### 3.2 渐进式切换
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
# 流量切换计划
|
|
288
|
+
# Week 1: 1% -> 观察 1 周
|
|
289
|
+
kubectl patch virtualservice api-gateway --type=json \
|
|
290
|
+
-p='[{"op": "replace", "path": "/spec/http/0/route/0/weight", "value": 99},
|
|
291
|
+
{"op": "replace", "path": "/spec/http/0/route/1/weight", "value": 1}]'
|
|
292
|
+
|
|
293
|
+
# Week 2: 10% -> 观察 3 天
|
|
294
|
+
# Week 3: 50% -> 观察 3 天
|
|
295
|
+
# Week 4: 100%
|
|
296
|
+
|
|
297
|
+
# 监控指标
|
|
298
|
+
- 错误率 < 0.1%
|
|
299
|
+
- P99 延迟 < 200ms
|
|
300
|
+
- 业务指标正常
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
## 遇到的问题和解决方案
|
|
304
|
+
|
|
305
|
+
### 问题 1:配置管理混乱
|
|
306
|
+
|
|
307
|
+
**现象**:应用配置分散在配置文件、环境变量、配置中心。
|
|
308
|
+
|
|
309
|
+
**解决方案**:统一使用 ConfigMap + External Secrets。
|
|
310
|
+
|
|
311
|
+
```yaml
|
|
312
|
+
# External Secrets 配置
|
|
313
|
+
apiVersion: external-secrets.io/v1beta1
|
|
314
|
+
kind: ExternalSecret
|
|
315
|
+
metadata:
|
|
316
|
+
name: app-secrets
|
|
317
|
+
spec:
|
|
318
|
+
refreshInterval: 1h
|
|
319
|
+
secretStoreRef:
|
|
320
|
+
name: vault-backend
|
|
321
|
+
target:
|
|
322
|
+
name: app-secrets
|
|
323
|
+
data:
|
|
324
|
+
- secretKey: database-url
|
|
325
|
+
remoteRef:
|
|
326
|
+
key: secret/data/production/database
|
|
327
|
+
property: url
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
### 问题 2:日志采集困难
|
|
331
|
+
|
|
332
|
+
**现象**:容器日志分散,查询困难。
|
|
333
|
+
|
|
334
|
+
**解决方案**:统一日志采集到 Loki。
|
|
335
|
+
|
|
336
|
+
```yaml
|
|
337
|
+
# Promtail 配置
|
|
338
|
+
apiVersion: apps/v1
|
|
339
|
+
kind: DaemonSet
|
|
340
|
+
metadata:
|
|
341
|
+
name: promtail
|
|
342
|
+
spec:
|
|
343
|
+
template:
|
|
344
|
+
spec:
|
|
345
|
+
containers:
|
|
346
|
+
- name: promtail
|
|
347
|
+
image: grafana/promtail:latest
|
|
348
|
+
args:
|
|
349
|
+
- -config.file=/etc/promtail/config.yaml
|
|
350
|
+
volumeMounts:
|
|
351
|
+
- name: varlog
|
|
352
|
+
mountPath: /var/log
|
|
353
|
+
- name: config
|
|
354
|
+
mountPath: /etc/promtail
|
|
355
|
+
volumes:
|
|
356
|
+
- name: varlog
|
|
357
|
+
hostPath:
|
|
358
|
+
path: /var/log
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
### 问题 3:网络策略导致服务不通
|
|
362
|
+
|
|
363
|
+
**现象**:迁移后服务间调用失败。
|
|
364
|
+
|
|
365
|
+
**解决方案**:梳理服务依赖,配置 NetworkPolicy。
|
|
366
|
+
|
|
367
|
+
```yaml
|
|
368
|
+
# NetworkPolicy
|
|
369
|
+
apiVersion: networking.k8s.io/v1
|
|
370
|
+
kind: NetworkPolicy
|
|
371
|
+
metadata:
|
|
372
|
+
name: api-gateway-policy
|
|
373
|
+
spec:
|
|
374
|
+
podSelector:
|
|
375
|
+
matchLabels:
|
|
376
|
+
app: api-gateway
|
|
377
|
+
policyTypes:
|
|
378
|
+
- Egress
|
|
379
|
+
egress:
|
|
380
|
+
- to:
|
|
381
|
+
- podSelector:
|
|
382
|
+
matchLabels:
|
|
383
|
+
app: user-service
|
|
384
|
+
ports:
|
|
385
|
+
- port: 8080
|
|
386
|
+
- to:
|
|
387
|
+
- podSelector:
|
|
388
|
+
matchLabels:
|
|
389
|
+
app: order-service
|
|
390
|
+
ports:
|
|
391
|
+
- port: 8080
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
## 迁移成果
|
|
395
|
+
|
|
396
|
+
### 指标对比
|
|
397
|
+
|
|
398
|
+
| 指标 | 迁移前 | 迁移后 | 改进 |
|
|
399
|
+
|------|--------|--------|------|
|
|
400
|
+
| 部署周期 | 2-3 天 | 10 分钟 | 99% |
|
|
401
|
+
| 资源利用率 | 20% | 65% | 225% |
|
|
402
|
+
| 扩容响应 | 30 分钟 | 30 秒 | 98% |
|
|
403
|
+
| 运维成本 | 50 万/季度 | 20 万/季度 | 60% |
|
|
404
|
+
| 故障恢复 | 2 小时 | 5 分钟 | 96% |
|
|
405
|
+
|
|
406
|
+
### 关键收益
|
|
407
|
+
|
|
408
|
+
1. **部署效率**:GitOps 自动化部署,10 分钟完成
|
|
409
|
+
2. **弹性伸缩**:HPA 自动扩缩,应对流量高峰
|
|
410
|
+
3. **成本优化**:资源利用率提升 3 倍
|
|
411
|
+
4. **可靠性**:故障自动恢复,SLA 提升
|
|
412
|
+
|
|
413
|
+
## 经验教训
|
|
414
|
+
|
|
415
|
+
### 成功因素
|
|
416
|
+
|
|
417
|
+
1. **渐进式迁移**:降低风险,快速验证
|
|
418
|
+
2. **充分测试**:每个阶段完整测试
|
|
419
|
+
3. **监控先行**:先建立监控,再迁移
|
|
420
|
+
4. **团队培训**:提前培训 K8s 技能
|
|
421
|
+
|
|
422
|
+
### 注意事项
|
|
423
|
+
|
|
424
|
+
1. **数据迁移**:提前规划数据迁移策略
|
|
425
|
+
2. **网络规划**:充分测试网络策略
|
|
426
|
+
3. **配置管理**:统一配置管理方案
|
|
427
|
+
4. **回滚方案**:每个阶段准备回滚计划
|
|
428
|
+
|
|
429
|
+
## 复用要点
|
|
430
|
+
|
|
431
|
+
### 迁移检查清单
|
|
432
|
+
|
|
433
|
+
- [ ] 应用评估完成
|
|
434
|
+
- [ ] 容器化改造完成
|
|
435
|
+
- [ ] K8s 清单编写
|
|
436
|
+
- [ ] 测试环境验证
|
|
437
|
+
- [ ] 监控部署完成
|
|
438
|
+
- [ ] 数据迁移计划
|
|
439
|
+
- [ ] 流量切换计划
|
|
440
|
+
- [ ] 回滚方案准备
|
|
441
|
+
- [ ] 团队培训完成
|
|
442
|
+
- [ ] 应急预案准备
|
|
443
|
+
|
|
444
|
+
### 关键配置模板
|
|
445
|
+
|
|
446
|
+
```yaml
|
|
447
|
+
# 标准化 Deployment 模板
|
|
448
|
+
apiVersion: apps/v1
|
|
449
|
+
kind: Deployment
|
|
450
|
+
metadata:
|
|
451
|
+
name: ${APP_NAME}
|
|
452
|
+
namespace: ${NAMESPACE}
|
|
453
|
+
spec:
|
|
454
|
+
replicas: ${REPLICAS}
|
|
455
|
+
strategy:
|
|
456
|
+
type: RollingUpdate
|
|
457
|
+
rollingUpdate:
|
|
458
|
+
maxSurge: 1
|
|
459
|
+
maxUnavailable: 0
|
|
460
|
+
template:
|
|
461
|
+
spec:
|
|
462
|
+
containers:
|
|
463
|
+
- name: ${APP_NAME}
|
|
464
|
+
image: ${IMAGE_REGISTRY}/${APP_NAME}:${VERSION}
|
|
465
|
+
resources:
|
|
466
|
+
requests:
|
|
467
|
+
cpu: ${CPU_REQUEST}
|
|
468
|
+
memory: ${MEMORY_REQUEST}
|
|
469
|
+
limits:
|
|
470
|
+
cpu: ${CPU_LIMIT}
|
|
471
|
+
memory: ${MEMORY_LIMIT}
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
## 参考资料
|
|
475
|
+
|
|
476
|
+
- [Kubernetes 迁移指南](https://kubernetes.io/docs/tasks/administer-cluster/migrating-from-docker/)
|
|
477
|
+
- [绞杀者模式](https://martinfowler.com/bliki/StranglerFigApplication.html)
|
|
478
|
+
- [12-Factor App](https://12factor.net/)
|