{"id":7619,"date":"2026-08-13T02:17:12","date_gmt":"2026-08-12T18:17:12","guid":{"rendered":"https:\/\/i007.cc\/wordpress\/?p=7619"},"modified":"2026-08-13T02:17:12","modified_gmt":"2026-08-12T18:17:12","slug":"%e8%ae%b2%e8%ae%b2crossplane","status":"publish","type":"post","link":"https:\/\/i007.cc\/wordpress\/archives\/7619","title":{"rendered":"\u8bb2\u8bb2Crossplane"},"content":{"rendered":"<div data-rs-index=\"2\" data-index=\"2\">\n<div class=\"rounded-lg focus-visible:shadow-focus focus-visible:outline-hidden\" tabindex=\"0\" role=\"article\" aria-setsize=\"8\" aria-posinset=\"3\" aria-label=\"Message 3 of 8\">\n<div data-test-render-count=\"2\">\n<div class=\"mb-1 mt-[var(--msg-gap,1.5rem)] group group\/message-row\">\n<div class=\"flex flex-col items-end gap-1\">\n<div class=\"group\/message-row flex min-w-0 flex-col items-end gap-xs font-sans ms-auto max-w-[85%] cds-um-enter\" data-cds=\"UserMessage\">\n<div class=\"relative flex max-w-full min-w-0 flex-col gap-xs rounded-card px-lg py-md text-heading break-words select-text text-primary bg-neutral\">\n<div id=\"_r_2p2_\" class=\"\">\n<div class=\"grid grid-cols-1 gap-2 relative [&amp;_ul]:!space-y-0 [&amp;_ol]:!space-y-0 [&amp;_ul]:pl-8 [&amp;_ol]:pl-8\" data-testid=\"user-message\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div data-rs-index=\"3\" data-index=\"3\">\n<div class=\"rounded-lg focus-visible:shadow-focus focus-visible:outline-hidden\" tabindex=\"-1\" role=\"article\" aria-setsize=\"8\" aria-posinset=\"4\" aria-label=\"Message 4 of 8\">\n<div data-test-render-count=\"2\">\n<div class=\"group group\/message-row\">\n<div class=\"group relative relative pb-[var(--msg-assistant-pb,0.75rem)]\" data-is-streaming=\"false\">\n<div class=\"font-claude-response relative leading-[1.65rem] [&amp;_pre&gt;div]:bg-bg-000\/50 [&amp;_pre&gt;div]:border-0.5 [&amp;_pre&gt;div]:border-border-400 [&amp;_.ignore-pre-bg&gt;div]:bg-transparent [&amp;_.standard-markdown_:is(p,blockquote,h1,h2,h3,h4,h5,h6)]:pl-2 [&amp;_.standard-markdown_:is(p,blockquote,ul,ol,h1,h2,h3,h4,h5,h6)]:pr-8 [&amp;_.progressive-markdown_:is(p,blockquote,h1,h2,h3,h4,h5,h6)]:pl-2 [&amp;_.progressive-markdown_:is(p,blockquote,ul,ol,h1,h2,h3,h4,h5,h6)]:pr-8\">\n<div>\n<div class=\"grid grid-rows-[auto_auto] min-w-0\">\n<div class=\"row-start-2 col-start-1 relative grid grid-rows-[auto_auto] isolate min-w-0\">\n<div class=\"row-start-1 col-start-1 relative z-[2] min-w-0\">\n<div>\n<div>\n<div class=\"standard-markdown grid-cols-1 grid [&amp;_&gt;_*]:min-w-0 gap-3 [&amp;_&gt;_*:last-child]:mb-0 print:block print:[&amp;_&gt;_*_+_*]:mt-3 standard-markdown\">\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">Crossplane \u7684\u6838\u5fc3\u601d\u8def\u662f\u628a Kubernetes \u7684\u58f0\u660e\u5f0f API \u673a\u5236\u642c\u5230&#8221;\u7ba1\u7406\u4e91\u8d44\u6e90&#8221;\u8fd9\u4ef6\u4e8b\u4e0a\u2014\u2014\u4f60\u4e0d\u518d\u76f4\u63a5\u8c03\u7528 AWS\/GCP \u7684 SDK \u6216\u5199 Terraform\uff0c\u800c\u662f\u50cf\u521b\u5efa Kubernetes \u5bf9\u8c61\u4e00\u6837\uff0c&#8221;\u521b\u5efa&#8221;\u4e00\u4e2a\u63cf\u8ff0\u4f60\u60f3\u8981\u4ec0\u4e48\u8d44\u6e90\u7684 YAML\uff0cCrossplane \u8d1f\u8d23\u534f\u8c03\uff08reconcile\uff09\u51fa\u5b9e\u9645\u7684\u4e91\u8d44\u6e90\u5e76\u4fdd\u6301\u72b6\u6001\u4e00\u81f4\u3002\u56f4\u7ed5\u8fd9\u4e2a\u601d\u8def\uff0c\u6709\u51e0\u4e2a\u5c42\u5c42\u9012\u8fdb\u7684\u6838\u5fc3\u6982\u5ff5\u3002<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u6700\u5e95\u5c42\u662f\u00a0<strong>Provider<\/strong>\u3002Provider \u662f Crossplane \u7684\u63d2\u4ef6\uff0c\u8d1f\u8d23\u5bf9\u63a5\u5177\u4f53\u7684\u4e91\u5382\u5546\u6216\u7cfb\u7edf\uff08\u6bd4\u5982 AWS\u3001GCP\u3001Azure\u3001GitHub\u3001Kubernetes \u672c\u8eab\u7b49\uff09\uff0c\u5b83\u628a\u8be5\u5382\u5546\u7684\u8d44\u6e90\u7c7b\u578b\u8f6c\u6362\u6210\u4e00\u6279 Kubernetes CRD\uff0c\u6bd4\u5982 AWS Provider \u4f1a\u5e26\u6765\u00a0<code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">RDSInstance<\/code>\u3001<code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">S3Bucket<\/code>\u00a0\u8fd9\u6837\u7684\u81ea\u5b9a\u4e49\u8d44\u6e90\u7c7b\u578b\u3002Provider \u672c\u8eab\u4e5f\u8fd0\u884c\u4e00\u4e2a\u63a7\u5236\u5668\uff0c\u4e13\u95e8\u8d1f\u8d23\u628a\u8fd9\u4e9b\u8d44\u6e90\u5bf9\u8c61\u7684\u671f\u671b\u72b6\u6001\u540c\u6b65\u5230\u771f\u5b9e\u4e91\u7aef\u3002<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u5728 Provider \u63d0\u4f9b\u7684 CRD \u4e4b\u4e0a\uff0c\u5b9e\u9645\u521b\u5efa\u51fa\u6765\u7684\u5bf9\u8c61\u53eb\u00a0<strong>Managed Resource\uff08MR\uff09<\/strong>\uff0c\u6bd4\u5982\u4f60\u521b\u5efa\u4e00\u4e2a\u00a0<code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">RDSInstance<\/code>\u00a0\u5bf9\u8c61\uff0cProvider \u7684\u63a7\u5236\u5668\u5c31\u4f1a\u53bb AWS \u4e0a\u521b\u5efa\u4e00\u4e2a\u771f\u5b9e\u7684 RDS \u5b9e\u4f8b\uff0c\u5e76\u6301\u7eed\u5bf9\u9f50\u4e24\u8fb9\u7684\u72b6\u6001\u3002MR \u662f Crossplane \u91cc\u6700\u8d34\u8fd1\u5e95\u5c42\u4e91\u8d44\u6e90\u7684\u4e00\u5c42\uff0c\u9897\u7c92\u5ea6\u901a\u5e38\u548c\u4e91\u5382\u5546 API \u4e00\u4e00\u5bf9\u5e94\uff0c\u76f4\u63a5\u62ff\u7ed9\u4e1a\u52a1\u56e2\u961f\u7528\u4f1a\u663e\u5f97\u592a\u5e95\u5c42\u3001\u592a\u5382\u5546\u76f8\u5173\u3002<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u4e8e\u662f Crossplane \u63d0\u4f9b\u4e86\u4e00\u5c42\u62bd\u8c61\uff0c\u8ba9\u5e73\u53f0\u56e2\u961f\u53ef\u4ee5\u628a\u591a\u4e2a MR \u7ec4\u5408\u6210\u4e00\u4e2a\u66f4\u9ad8\u5c42\u3001\u9762\u5411\u4e1a\u52a1\u7684\u81ea\u5b9a\u4e49 API\uff0c\u8fd9\u5c31\u662f **XRD\uff08CompositeResourceDefinition\uff09**\u52a0\u00a0<strong>Composition<\/strong>\u00a0\u7684\u7ec4\u5408\u3002XRD \u5b9a\u4e49\u7684\u662f&#8221;\u8fd9\u4e2a\u81ea\u5b9a\u4e49 API \u957f\u4ec0\u4e48\u6837&#8221;\u2014\u2014\u5b83\u89c4\u5b9a\u4e86\u8fd9\u4e2a\u65b0 API \u7684\u540d\u5b57\u3001\u53ef\u4ee5\u4f20\u54ea\u4e9b\u53c2\u6570\u3001\u53c2\u6570\u7c7b\u578b\u548c\u6821\u9a8c\u89c4\u5219\uff08\u57fa\u4e8e OpenAPI v3\uff09\uff0c\u672c\u8d28\u4e0a\u662f\u4e2a\u6a21\u5f0f\uff08schema\uff09\u3002\u4f60\u628a XRD \u5e94\u7528\u5230\u96c6\u7fa4\u540e\uff0cCrossplane \u4f1a\u81ea\u52a8\u5e2e\u4f60\u751f\u6210\u4e00\u4e2a\u5bf9\u5e94\u7684 Kubernetes CRD\u3002<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">XRD \u5b9a\u4e49\u4e86&#8221;\u6709\u4ec0\u4e48&#8221;\uff0c\u800c\u00a0<strong>Composition<\/strong>\u00a0\u5b9a\u4e49\u7684\u662f&#8221;\u600e\u4e48\u5b9e\u73b0&#8221;\uff1a\u5b83\u63cf\u8ff0\u5f53\u6709\u4eba\u6839\u636e\u8fd9\u4e2a XRD \u521b\u5efa\u4e86\u4e00\u4e2a\u5b9e\u4f8b\u65f6\uff0c\u5177\u4f53\u5e94\u8be5\u7ec4\u5408\u521b\u5efa\u51fa\u54ea\u4e9b\u5e95\u5c42 MR\uff08\u751a\u81f3\u5728 v2 \u91cc\u8fd8\u53ef\u4ee5\u662f\u4efb\u610f Kubernetes \u8d44\u6e90\uff09\uff0c\u4ee5\u53ca\u53c2\u6570\u5982\u4f55\u5728\u8fd9\u4e9b\u8d44\u6e90\u4e4b\u95f4\u4f20\u9012\u6620\u5c04\u3002\u4e00\u4e2a XRD \u53ef\u4ee5\u5bf9\u5e94\u591a\u4e2a Composition\uff0c\u8fd9\u6837\u5e73\u53f0\u56e2\u961f\u5c31\u80fd\u9488\u5bf9\u4e0d\u540c\u73af\u5883\u6216\u4e91\u5382\u5546\u63d0\u4f9b\u4e0d\u540c\u7684\u5b9e\u73b0\uff0c\u6bd4\u5982&#8221;\u751f\u4ea7\u73af\u5883\u7528\u9ad8\u53ef\u7528\u914d\u7f6e\u7684 Composition\uff0c\u6d4b\u8bd5\u73af\u5883\u7528\u4fbf\u5b9c\u7684\u5355\u5b9e\u4f8b Composition&#8221;\uff0c\u800c\u4f7f\u7528\u8005\u611f\u77e5\u4e0d\u5230\u8fd9\u4e9b\u5dee\u5f02\u3002\u73b0\u5728\u5199 Composition \u903b\u8f91\u4e3b\u6d41\u505a\u6cd5\u662f\u7528\u00a0<strong>Composition Functions<\/strong>\uff08\u4e00\u6bb5\u53ef\u4ee5\u7528 Go\u3001Python \u7b49\u8bed\u8a00\u5199\u7684\u5c0f\u7a0b\u5e8f\uff0c\u4f5c\u4e3a Pipeline \u7684\u4e00\u6b65\u6267\u884c\uff0c\u63a5\u6536\u8bf7\u6c42\u3001\u8fd4\u56de\u8981\u521b\u5efa\u7684\u8d44\u6e90\uff09\uff0c\u53d6\u4ee3\u4e86\u65e9\u671f\u7eaf YAML patch-and-transform \u7684\u5199\u6cd5\uff0c\u7075\u6d3b\u6027\u9ad8\u5f88\u591a\uff0c\u4e4b\u524d\u63d0\u5230\u7684 function-pkl \u5c31\u662f\u8fd9\u6837\u4e00\u4e2a Function\u3002<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u6309\u7167 XRD \u7684 schema\u3001\u4f9d\u636e\u67d0\u4e2a Composition \u5b9e\u9645\u521b\u5efa\u51fa\u6765\u7684\u5bf9\u8c61\uff0c\u53eb\u00a0<strong>Composite Resource\uff08XR\uff09<\/strong>\u2014\u2014\u5b83\u662f\u7528\u6237\uff08\u901a\u5e38\u662f\u5e94\u7528\u5f00\u53d1\u8005\uff09\u771f\u6b63\u62ff\u6765\u4f7f\u7528\u7684\u9ad8\u5c42\u8d44\u6e90\u5b9e\u4f8b\u3002\u5728 Crossplane v1 \u91cc\uff0cXR \u662f\u96c6\u7fa4\u4f5c\u7528\u57df\u7684\uff0c\u6240\u4ee5\u5e73\u53f0\u56e2\u961f\u901a\u5e38\u8fd8\u4f1a\u989d\u5916\u7528\u4e00\u5c42\u00a0<strong>Claim<\/strong>\u00a0\u673a\u5236\uff0c\u8ba9\u4e1a\u52a1\u56e2\u961f\u5728\u81ea\u5df1\u7684\u547d\u540d\u7a7a\u95f4\u91cc\u521b\u5efa\u4e00\u4e2a&#8221;\u7533\u9886&#8221;\u5bf9\u8c61\uff0c\u7531 Claim \u53bb\u5173\u8054\/\u521b\u5efa\u5b9e\u9645\u7684 XR\uff0c\u4ece\u800c\u505a\u5230\u547d\u540d\u7a7a\u95f4\u7ea7\u522b\u7684\u9694\u79bb\u548c\u6743\u9650\u63a7\u5236\u3002<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u5230\u4e86 Crossplane v2\uff08\u4e5f\u662f\u4f60\u4e4b\u524d\u95ee\u7684\u90a3\u4e9b\u96c6\u6210\u9879\u76ee\u6240\u5904\u7684\u7248\u672c\uff09\uff0c\u67b6\u6784\u505a\u4e86\u51e0\u5904\u7b80\u5316\uff1aXR \u672c\u8eab\u53ef\u4ee5\u76f4\u63a5\u8bbe\u7f6e\u6210\u547d\u540d\u7a7a\u95f4\u4f5c\u7528\u57df\uff08<code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">scope: Namespaced<\/code>\uff09\uff0c\u8fd9\u6837\u4e1a\u52a1\u56e2\u961f\u53ef\u4ee5\u76f4\u63a5\u5728\u81ea\u5df1\u547d\u540d\u7a7a\u95f4\u91cc\u521b\u5efa XR\uff0c\u4e0d\u518d\u9700\u8981 Claim \u8fd9\u5c42\u989d\u5916\u62bd\u8c61\uff1b\u540c\u65f6 Managed Resource \u4e5f\u53ef\u4ee5\u547d\u540d\u7a7a\u95f4\u5316\uff0c\u65b9\u4fbf\u505a\u66f4\u7ec6\u7c92\u5ea6\u7684\u6743\u9650\u7ba1\u63a7\uff1b\u66f4\u91cd\u8981\u7684\u662f\uff0cComposition \u4e0d\u518d\u5c40\u9650\u4e8e\u53ea\u80fd\u7ec4\u5408 Crossplane \u81ea\u5df1\u7684 MR\uff0c\u800c\u662f\u53ef\u4ee5\u7ec4\u5408\u4efb\u610f Kubernetes \u8d44\u6e90\uff08\u6bd4\u5982\u539f\u751f\u7684 Deployment\u3001Service\uff0c\u6216\u8005\u5176\u4ed6 Operator \u7ba1\u7406\u7684\u81ea\u5b9a\u4e49\u8d44\u6e90\uff09\uff0c\u8fd9\u8ba9 Crossplane \u4ece&#8221;\u4e91\u8d44\u6e90\u7f16\u6392\u5de5\u5177&#8221;\u8fdb\u4e00\u6b65\u53d8\u6210\u4e86\u901a\u7528\u7684&#8221;Kubernetes \u8d44\u6e90\u7f16\u6392\/\u5e73\u53f0\u5de5\u7a0b\u6846\u67b6&#8221;\u3002v2 \u8fd8\u65b0\u589e\u4e86 Operation\u3001CronOperation\u3001WatchOperation \u8fd9\u7c7b&#8221;\u8fd0\u7ef4\u5de5\u4f5c\u6d41&#8221;\u8d44\u6e90\uff0c\u7528\u6765\u5904\u7406\u8bc1\u4e66\u8f6e\u6362\u3001\u5b9a\u671f\u5de1\u68c0\u8fd9\u79cd\u4e0d\u5c5e\u4e8e&#8221;\u521b\u5efa\u8d44\u6e90&#8221;\u8303\u7574\u7684\u8fd0\u7ef4\u4efb\u52a1\u3002<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u603b\u7ed3\u4e00\u4e0b\u8fd9\u6761\u94fe\u8def\uff1aProvider \u628a\u4e91\u5382\u5546\u80fd\u529b\u63a5\u5165\u96c6\u7fa4 \u2192 \u4ea7\u51fa Managed Resource \u8fd9\u79cd\u5e95\u5c42\u8d44\u6e90\u7c7b\u578b \u2192 \u5e73\u53f0\u56e2\u961f\u7528 XRD \u5b9a\u4e49\u4e00\u4e2a\u66f4\u53cb\u597d\u7684\u9ad8\u5c42 API schema \u2192 \u7528 Composition\uff08\u914d\u5408 Composition Function\uff09\u63cf\u8ff0\u8fd9\u4e2a\u9ad8\u5c42 API \u8be5\u5982\u4f55\u7ec4\u5408\u51fa\u5e95\u5c42\u8d44\u6e90 \u2192 \u4e1a\u52a1\u56e2\u961f\u521b\u5efa Composite Resource\uff08v1 \u91cc\u53ef\u80fd\u901a\u8fc7 Claim\uff09\u6765\u5b9e\u9645\u4f7f\u7528\u8fd9\u4e2a\u9ad8\u5c42 API\uff0c\u6700\u7ec8\u7531 Crossplane \u7684\u63a7\u5236\u5668\u6301\u7eed\u534f\u8c03\uff0c\u4fdd\u8bc1\u58f0\u660e\u7684\u72b6\u6001\u548c\u4e91\u4e0a\u771f\u5b9e\u72b6\u6001\u4e00\u81f4\u3002<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u5982\u679c\u4f60\u60f3\u6df1\u5165\u67d0\u4e00\u5757\uff0c\u6bd4\u5982 Composition Function \u5177\u4f53\u600e\u4e48\u5199\u3001\u6216\u8005 v1 \u5230 v2 \u8fc1\u79fb\u65f6 Claim \u600e\u4e48\u5904\u7406\uff0c\u53ef\u4ee5\u544a\u8bc9\u6211\uff0c\u6211\u518d\u5c55\u5f00\u3002<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div data-rs-index=\"4\" data-index=\"4\">\n<div class=\"rounded-lg focus-visible:shadow-focus focus-visible:outline-hidden\" tabindex=\"0\" role=\"article\" aria-setsize=\"8\" aria-posinset=\"5\" aria-label=\"Message 5 of 8\">\n<div data-test-render-count=\"2\">\n<div class=\"mb-1 mt-[var(--msg-gap,1.5rem)] group group\/message-row\">\n<div class=\"flex flex-col items-end gap-1\">\n<div class=\"group\/message-row flex min-w-0 flex-col items-end gap-xs font-sans ms-auto max-w-[85%] cds-um-enter\" data-cds=\"UserMessage\">\n<div class=\"relative flex max-w-full min-w-0 flex-col gap-xs rounded-card px-lg py-md text-heading break-words select-text text-primary bg-neutral\">\n<div id=\"_r_2qk_\" class=\"\">\n<div>\n<div class=\"grid grid-cols-1 gap-2 relative [&amp;_ul]:!space-y-0 [&amp;_ol]:!space-y-0 [&amp;_ul]:pl-8 [&amp;_ol]:pl-8\" data-testid=\"user-message\">\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p class=\"whitespace-pre-wrap break-words\">\u7b80\u5355\u5730\u8bf4Crossplane\u76f8\u5f53\u4e8e\u628a\u5404\u4e2a\u4e91\u5e73\u53f0\u7684\u4ea7\u54c1\u80fd\u529b\u66f4\u62bd\u8c61\u4e86\u4e00\u5c42\uff1f<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div data-rs-index=\"5\" data-index=\"5\">\n<div class=\"rounded-lg focus-visible:shadow-focus focus-visible:outline-hidden\" tabindex=\"-1\" role=\"article\" aria-setsize=\"8\" aria-posinset=\"6\" aria-label=\"Message 6 of 8\">\n<div data-test-render-count=\"2\">\n<div class=\"group group\/message-row\">\n<div class=\"group relative relative pb-[var(--msg-assistant-pb,0.75rem)]\" data-is-streaming=\"false\">\n<div class=\"font-claude-response relative leading-[1.65rem] [&amp;_pre&gt;div]:bg-bg-000\/50 [&amp;_pre&gt;div]:border-0.5 [&amp;_pre&gt;div]:border-border-400 [&amp;_.ignore-pre-bg&gt;div]:bg-transparent [&amp;_.standard-markdown_:is(p,blockquote,h1,h2,h3,h4,h5,h6)]:pl-2 [&amp;_.standard-markdown_:is(p,blockquote,ul,ol,h1,h2,h3,h4,h5,h6)]:pr-8 [&amp;_.progressive-markdown_:is(p,blockquote,h1,h2,h3,h4,h5,h6)]:pl-2 [&amp;_.progressive-markdown_:is(p,blockquote,ul,ol,h1,h2,h3,h4,h5,h6)]:pr-8\">\n<div>\n<div class=\"standard-markdown grid-cols-1 grid [&amp;_&gt;_*]:min-w-0 gap-3 [&amp;_&gt;_*:last-child]:mb-0 print:block print:[&amp;_&gt;_*_+_*]:mt-3 standard-markdown\">\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u53ef\u4ee5\u8fd9\u4e48\u7406\u89e3\uff0c\u4f46\u66f4\u51c6\u786e\u5730\u8bf4\uff0cCrossplane \u505a\u7684\u662f\u4e24\u5c42\u62bd\u8c61\uff0c\u800c\u4e14\u4ef7\u503c\u4e3b\u8981\u5728\u4e8e\u628a\u8fd9\u4e24\u5c42\u62bd\u8c61\u90fd&#8221;Kubernetes \u5316&#8221;\u4e86\u3002<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u7b2c\u4e00\u5c42\u62bd\u8c61\u662f\u628a\u4e0d\u540c\u4e91\u5382\u5546\u7684\u4ea7\u54c1\u80fd\u529b\u90fd\u7edf\u4e00\u6210 Kubernetes \u98ce\u683c\u7684\u58f0\u660e\u5f0f API\u2014\u2014\u4e0d\u7ba1\u662f AWS \u7684 RDS\u3001GCP \u7684 Cloud SQL \u8fd8\u662f Azure \u7684\u6570\u636e\u5e93\u670d\u52a1\uff0c\u5230\u4e86 Crossplane \u91cc\u90fd\u53d8\u6210&#8221;\u521b\u5efa\u4e00\u4e2a YAML \u5bf9\u8c61\uff0c\u63a7\u5236\u5668\u5e2e\u4f60\u534f\u8c03\u51fa\u771f\u5b9e\u8d44\u6e90&#8221;\u8fd9\u4e00\u5957\u7edf\u4e00\u7684\u64cd\u4f5c\u65b9\u5f0f\u548c\u5fc3\u667a\u6a21\u578b\u3002\u8fd9\u4e00\u5c42\u7684\u4ef7\u503c\u4e3b\u8981\u662f&#8221;\u7edf\u4e00\u4ea4\u4e92\u65b9\u5f0f&#8221;\uff0c\u8ba9\u4f60\u7528\u7ba1\u7406 Kubernetes \u7684\u90a3\u5957\u5de5\u5177\u94fe\uff08kubectl\u3001GitOps\u3001RBAC\uff09\u53bb\u7ba1\u7406\u4e91\u8d44\u6e90\uff0c\u4f46\u8fd9\u65f6\u5019\u8d44\u6e90\u7c92\u5ea6\u8fd8\u662f\u548c\u5382\u5546 API \u5dee\u4e0d\u591a\u7ec6\uff0c\u4e00\u4e2a MR \u57fa\u672c\u5bf9\u5e94\u4e00\u4e2a\u4e91\u4ea7\u54c1\u3002<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u7b2c\u4e8c\u5c42\u62bd\u8c61\u624d\u662f\u4f60\u8bf4\u7684&#8221;\u66f4\u62bd\u8c61&#8221;\u2014\u2014\u901a\u8fc7 XRD\/Composition\uff0c\u5e73\u53f0\u56e2\u961f\u53ef\u4ee5\u628a\u591a\u4e2a\u5e95\u5c42\u4e91\u8d44\u6e90\u6253\u5305\u6210\u4e00\u4e2a\u4e1a\u52a1\u89c6\u89d2\u7684\u9ad8\u5c42 API\uff0c\u6bd4\u5982\u628a&#8221;VPC + RDS + \u5b89\u5168\u7ec4 + IAM \u89d2\u8272&#8221;\u8fd9\u4e00\u5806\u4e1c\u897f\u5c01\u88c5\u6210\u4e00\u4e2a\u53eb\u00a0<code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">XPostgresDatabase<\/code>\u00a0\u7684\u81ea\u5b9a\u4e49\u8d44\u6e90\uff0c\u5e94\u7528\u5f00\u53d1\u8005\u53ea\u9700\u8981\u4f20\u51e0\u4e2a\u53c2\u6570\uff08\u6bd4\u5982&#8221;\u8981\u591a\u5927&#8221;\u3001&#8221;\u54ea\u4e2a\u73af\u5883&#8221;\uff09\uff0c\u4e0d\u9700\u8981\u77e5\u9053\u5e95\u4e0b\u5177\u4f53\u7528\u4e86\u54ea\u5bb6\u4e91\u3001\u54ea\u4e9b\u5177\u4f53\u4ea7\u54c1\u3002\u8fd9\u4e00\u5c42\u7684\u4ef7\u503c\u662f&#8221;\u9690\u85cf\u5b9e\u73b0\u7ec6\u8282\u3001\u7edf\u4e00\u591a\u4e91\u5dee\u5f02&#8221;\uff0c\u8ddf Terraform module \u6216\u8005\u4e91\u5382\u5546\u7684\u6258\u7ba1\u670d\u52a1\u7f16\u6392\u6709\u70b9\u50cf\uff0c\u4f46\u56e0\u4e3a\u662f\u539f\u751f Kubernetes CRD\uff0c\u5929\u7136\u80fd\u63a5\u5165 K8s \u751f\u6001\u7684\u6743\u9650\u63a7\u5236\u3001GitOps \u5de5\u4f5c\u6d41\u3001\u53ef\u89c2\u6d4b\u6027\u5de5\u5177\u7b49\u3002<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u6240\u4ee5\u7b80\u5355\u8bf4\u662f\u5bf9\u7684\uff1a\u672c\u8d28\u4e0a Crossplane \u662f\u628a\u5404\u5bb6\u4e91\u5e73\u53f0\u7684\u80fd\u529b\u62bd\u8c61\u6210\u4e86\u4e00\u5c42\u7edf\u4e00\u7684\u3001\u53ef\u4ee5\u8fdb\u4e00\u6b65\u518d\u62bd\u8c61\/\u7ec4\u5408\u7684\u58f0\u660e\u5f0f API\uff0c\u800c\u4e14\u8fd9\u4e2a\u62bd\u8c61\u662f&#8221;\u6d3b\u7684&#8221;\uff08\u6709\u63a7\u5236\u5668\u6301\u7eed\u534f\u8c03\u72b6\u6001\uff09\uff0c\u4e0d\u662f\u50cf Terraform \u90a3\u6837\u4e00\u6b21\u6027 apply \u5b8c\u5c31\u7ed3\u675f\uff0c\u8fd9\u4e5f\u662f\u5b83\u548c\u4f20\u7edf IaC \u5de5\u5177\u7684\u4e00\u4e2a\u5173\u952e\u533a\u522b\u3002<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p dir=\"ltr\">\n<div data-rs-index=\"6\" data-index=\"6\">\n<div class=\"rounded-lg focus-visible:shadow-focus focus-visible:outline-hidden\" tabindex=\"0\" role=\"article\" aria-setsize=\"8\" aria-posinset=\"7\" aria-label=\"Message 7 of 8\">\n<div data-test-render-count=\"2\">\n<div class=\"mb-1 mt-[var(--msg-gap,1.5rem)] group group\/message-row\">\n<div class=\"flex flex-col items-end gap-1\">\n<div class=\"group\/message-row flex min-w-0 flex-col items-end gap-xs font-sans ms-auto max-w-[85%] cds-um-enter\" data-cds=\"UserMessage\">\n<div class=\"relative flex max-w-full min-w-0 flex-col gap-xs rounded-card px-lg py-md text-heading break-words select-text text-primary bg-neutral\">\n<div id=\"_r_2rn_\" class=\"\">\n<div>\n<div class=\"grid grid-cols-1 gap-2 relative [&amp;_ul]:!space-y-0 [&amp;_ol]:!space-y-0 [&amp;_ul]:pl-8 [&amp;_ol]:pl-8\" data-testid=\"user-message\">\n<p class=\"whitespace-pre-wrap break-words\">\u7ed9\u4e00\u4e2a\u5177\u4f53\u7684\u7b80\u5355\u4e00\u70b9\u7684crossplane\u4f8b\u5b50<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"max-w-[85%]\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div data-rs-index=\"7\" data-index=\"7\" data-last-message=\"true\">\n<div class=\"rounded-lg focus-visible:shadow-focus focus-visible:outline-hidden\" tabindex=\"-1\" role=\"article\" aria-setsize=\"8\" aria-posinset=\"8\" aria-label=\"Message 8 of 8\">\n<div data-test-render-count=\"1\">\n<div class=\"group group\/message-row\">\n<div class=\"group relative relative pb-[var(--msg-assistant-pb,0.75rem)]\" data-is-streaming=\"false\">\n<div class=\"font-claude-response relative leading-[1.65rem] [&amp;_pre&gt;div]:bg-bg-000\/50 [&amp;_pre&gt;div]:border-0.5 [&amp;_pre&gt;div]:border-border-400 [&amp;_.ignore-pre-bg&gt;div]:bg-transparent [&amp;_.standard-markdown_:is(p,blockquote,h1,h2,h3,h4,h5,h6)]:pl-2 [&amp;_.standard-markdown_:is(p,blockquote,ul,ol,h1,h2,h3,h4,h5,h6)]:pr-8 [&amp;_.progressive-markdown_:is(p,blockquote,h1,h2,h3,h4,h5,h6)]:pl-2 [&amp;_.progressive-markdown_:is(p,blockquote,ul,ol,h1,h2,h3,h4,h5,h6)]:pr-8\">\n<div class=\"grid grid-rows-[auto_auto] min-w-0\">\n<div class=\"row-start-1 col-start-1 min-w-0\">\n<div class=\"contents\" data-find-omitted=\"\">\n<div class=\"min-w-0 pl-2 py-[var(--msg-pill-py,0.375rem)]\">\n<div class=\"flex items-center gap-2\">\n<div class=\"inline-flex items-center gap-1 min-w-0\"><span class=\"truncate font-base\">Searched the web<\/span><\/div>\n<\/div>\n<p><span class=\"sr-only\" role=\"status\" aria-live=\"polite\">Searched the web<\/span><\/p>\n<div data-closed=\"\" data-cds=\"Collapsible\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"row-start-2 col-start-1 relative grid grid-rows-[auto_auto] isolate min-w-0\">\n<div class=\"row-start-1 col-start-1 relative z-[2] min-w-0\">\n<div class=\"standard-markdown grid-cols-1 grid [&amp;_&gt;_*]:min-w-0 gap-3 [&amp;_&gt;_*:last-child]:mb-0 print:block print:[&amp;_&gt;_*_+_*]:mt-3 standard-markdown\">\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u597d\uff0c\u7ed9\u4f60\u4e00\u4e2a\u4ece\u7b80\u5355\u5230\u5b8c\u6574\u7684\u4f8b\u5b50\uff0c\u6b63\u597d\u628a\u4e4b\u524d\u804a\u7684 Provider \/ MR \/ XRD \/ Composition \/ XR \u4e32\u8d77\u6765\u3002\u8fd9\u662f Crossplane \u5b98\u65b9\u6587\u6863\u91cc\u7684\u771f\u5b9e\u4f8b\u5b50\uff08v2.3\uff09\uff0c\u7528\u7684\u662f\u521b\u5efa AWS S3 \u6876\u3002<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\"><strong>\u7b2c\u4e00\u6b65\uff1a\u6700\u7b80\u5355\u7684\u5c42\u6b21\u2014\u2014\u76f4\u63a5\u7528\u4e00\u4e2a Provider \u521b\u5efa\u4e00\u4e2a Managed Resource<\/strong><\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u5148\u88c5\u4e00\u4e2a\u5bf9\u63a5 AWS S3 \u7684 Provider\uff1a<\/p>\n<div class=\"relative group\/copy bg-bg-000\/50 border-0.5 border-border-400 rounded-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-accent-100\" tabindex=\"0\" role=\"group\" aria-label=\"yaml code\">\n<div class=\"sticky opacity-0 group-hover\/copy:opacity-100 group-focus-within\/copy:opacity-100 top-2 py-2 h-12 w-0 float-right\">\n<div class=\"absolute right-0 h-8 px-2 items-center inline-flex z-10\"><\/div>\n<\/div>\n<div class=\"text-text-500 font-small p-3.5 pb-0\">yaml<\/div>\n<div class=\"overflow-x-auto\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">apiVersion: pkg.crossplane.io\/v1\r\nkind: Provider\r\nmetadata:\r\n  name: crossplane-contrib-provider-aws-s3\r\nspec:\r\n  package: xpkg.crossplane.io\/crossplane-contrib\/provider-aws-s3:v2.0.0<\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u518d\u7ed9\u5b83\u914d\u7f6e\u597d AWS \u51ed\u8bc1\uff08\u5f15\u7528\u4e00\u4e2a\u5b58\u4e86 AWS key \u7684 Kubernetes Secret\uff09\uff1a<\/p>\n<div class=\"relative group\/copy bg-bg-000\/50 border-0.5 border-border-400 rounded-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-accent-100\" tabindex=\"0\" role=\"group\" aria-label=\"yaml code\">\n<div class=\"sticky opacity-0 group-hover\/copy:opacity-100 group-focus-within\/copy:opacity-100 top-2 py-2 h-12 w-0 float-right\">\n<div class=\"absolute right-0 h-8 px-2 items-center inline-flex z-10\"><\/div>\n<\/div>\n<div class=\"text-text-500 font-small p-3.5 pb-0\">yaml<\/div>\n<div class=\"overflow-x-auto\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">apiVersion: aws.m.upbound.io\/v1beta1\r\nkind: ClusterProviderConfig\r\nmetadata:\r\n  name: default\r\nspec:\r\n  credentials:\r\n    source: Secret\r\n    secretRef:\r\n      namespace: crossplane-system\r\n      name: aws-secret\r\n      key: creds<\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u7136\u540e\u4f60\u5c31\u53ef\u4ee5\u76f4\u63a5\u521b\u5efa\u4e00\u4e2a\u00a0<code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">Bucket<\/code>\u00a0\u5bf9\u8c61\u4e86\uff1a<\/p>\n<div class=\"relative group\/copy bg-bg-000\/50 border-0.5 border-border-400 rounded-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-accent-100\" tabindex=\"0\" role=\"group\" aria-label=\"yaml code\">\n<div class=\"sticky opacity-0 group-hover\/copy:opacity-100 group-focus-within\/copy:opacity-100 top-2 py-2 h-12 w-0 float-right\">\n<div class=\"absolute right-0 h-8 px-2 items-center inline-flex z-10\"><\/div>\n<\/div>\n<div class=\"text-text-500 font-small p-3.5 pb-0\">yaml<\/div>\n<div class=\"overflow-x-auto\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">apiVersion: s3.aws.m.upbound.io\/v1beta1\r\nkind: Bucket\r\nmetadata:\r\n  namespace: default\r\n  generateName: crossplane-bucket-\r\nspec:\r\n  forProvider:\r\n    region: us-east-2<\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\"><code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">kubectl apply<\/code>\u00a0\u8fd9\u4e2a YAML \u4e4b\u540e\uff0cCrossplane \u5c31\u4f1a\u5728 AWS \u4e0a\u771f\u7684\u521b\u5efa\u4e00\u4e2a S3 \u6876\u3002\u8fd9\u4e00\u5c42\u8fd8\u6bd4\u8f83&#8221;\u8584&#8221;\uff0c<code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">Bucket<\/code>\u00a0\u8fd9\u4e2a CRD \u57fa\u672c\u5c31\u662f AWS S3 API \u7684\u76f4\u63a5\u6620\u5c04\uff0c\u7528\u6237\u8fd8\u662f\u5f97\u61c2 AWS \u7684\u6982\u5ff5\uff08region\u3001bucket \u4e4b\u7c7b\uff09\u3002<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\"><strong>\u7b2c\u4e8c\u6b65\uff1a\u52a0\u4e00\u5c42\u62bd\u8c61\u2014\u2014\u7528 XRD + Composition \u5305\u88c5\u6210\u4e1a\u52a1 API<\/strong><\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u5047\u8bbe\u5e73\u53f0\u56e2\u961f\u4e0d\u60f3\u8ba9\u4e1a\u52a1\u5f00\u53d1\u8005\u76f4\u63a5\u63a5\u89e6\u00a0<code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">Bucket<\/code>\u00a0\u8fd9\u79cd\u4e91\u5382\u5546\u7ec6\u8282\uff0c\u800c\u662f\u60f3\u7ed9\u4ed6\u4eec\u4e00\u4e2a\u66f4\u7b80\u5355\u7684\u00a0<code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">App<\/code>\u00a0\u62bd\u8c61\uff08\u8fd9\u91cc\u5b98\u65b9\u4f8b\u5b50\u6362\u6210\u4e86\u7ec4\u5408 Kubernetes \u539f\u751f\u8d44\u6e90\uff0c\u5c55\u793a v2 \u7684\u65b0\u80fd\u529b\uff0c\u4f46\u9053\u7406\u548c\u7ec4\u5408\u4e91\u8d44\u6e90\u5b8c\u5168\u4e00\u6837\uff09\u3002\u5148\u7528 XRD \u5b9a\u4e49\u8fd9\u4e2a\u65b0 API \u957f\u4ec0\u4e48\u6837\uff1a<\/p>\n<div class=\"relative group\/copy bg-bg-000\/50 border-0.5 border-border-400 rounded-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-accent-100\" tabindex=\"0\" role=\"group\" aria-label=\"yaml code\">\n<div class=\"sticky opacity-0 group-hover\/copy:opacity-100 group-focus-within\/copy:opacity-100 top-2 py-2 h-12 w-0 float-right\">\n<div class=\"absolute right-0 h-8 px-2 items-center inline-flex z-10\"><\/div>\n<\/div>\n<div class=\"text-text-500 font-small p-3.5 pb-0\">yaml<\/div>\n<div class=\"overflow-x-auto\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">apiVersion: apiextensions.crossplane.io\/v2\r\nkind: CompositeResourceDefinition\r\nmetadata:\r\n  name: apps.example.crossplane.io\r\nspec:\r\n  scope: Namespaced\r\n  group: example.crossplane.io\r\n  names:\r\n    kind: App\r\n    plural: apps\r\n  versions:\r\n  - name: v1\r\n    served: true\r\n    referenceable: true\r\n    schema:\r\n     openAPIV3Schema:\r\n       type: object\r\n       properties:\r\n        spec:\r\n          type: object\r\n          properties:\r\n            image:\r\n              description: The app's OCI container image.\r\n              type: string\r\n          required:\r\n          - image<\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u8fd9\u4e2a XRD \u8bf4\uff1a&#8221;\u6211\u8981\u63d0\u4f9b\u4e00\u4e2a\u53eb\u00a0<code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">App<\/code>\u00a0\u7684\u65b0 API\uff0c\u7528\u6237\u53ea\u9700\u8981\u586b\u4e00\u4e2a\u00a0<code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">image<\/code>\u00a0\u5b57\u6bb5\u3002&#8221; \u5e94\u7528\u4e4b\u540e Crossplane \u4f1a\u81ea\u52a8\u5e2e\u4f60\u751f\u6210\u5bf9\u5e94\u7684 CRD\u3002<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u63a5\u7740\u7528 Composition \u5b9a\u4e49&#8221;\u521b\u5efa\u4e00\u4e2a App \u7684\u65f6\u5019\uff0c\u5e95\u5c42\u5b9e\u9645\u8981\u9020\u51fa\u4ec0\u4e48\u4e1c\u897f&#8221;\uff1a<\/p>\n<div class=\"relative group\/copy bg-bg-000\/50 border-0.5 border-border-400 rounded-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-accent-100\" tabindex=\"0\" role=\"group\" aria-label=\"yaml code\">\n<div class=\"sticky opacity-0 group-hover\/copy:opacity-100 group-focus-within\/copy:opacity-100 top-2 py-2 h-12 w-0 float-right\">\n<div class=\"absolute right-0 h-8 px-2 items-center inline-flex z-10\"><\/div>\n<\/div>\n<div class=\"text-text-500 font-small p-3.5 pb-0\">yaml<\/div>\n<div class=\"overflow-x-auto\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">apiVersion: apiextensions.crossplane.io\/v1\r\nkind: Composition\r\nmetadata:\r\n  name: app-yaml\r\nspec:\r\n  compositeTypeRef:\r\n    apiVersion: example.crossplane.io\/v1\r\n    kind: App\r\n  mode: Pipeline\r\n  pipeline:\r\n  - step: create-deployment-and-service\r\n    functionRef:\r\n      name: crossplane-contrib-function-patch-and-transform\r\n    input:\r\n      apiVersion: pt.fn.crossplane.io\/v1beta1\r\n      kind: Resources\r\n      resources:\r\n      - name: deployment\r\n        base:\r\n          apiVersion: apps\/v1\r\n          kind: Deployment\r\n          spec:\r\n            replicas: 2\r\n            template:\r\n              spec:\r\n                containers:\r\n                - name: app\r\n                  ports:\r\n                  - containerPort: 80<\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u8fd9\u6bb5\u7684\u610f\u601d\u662f\uff1a\u6bcf\u5f53\u6709\u4eba\u521b\u5efa\u4e00\u4e2a\u00a0<code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">App<\/code>\uff0c\u5c31\u7528\u00a0<code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">function-patch-and-transform<\/code>\u00a0\u8fd9\u4e2a Composition Function\uff0c\u5e2e\u5b83\u751f\u6210\u4e00\u4e2a\u00a0<code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">Deployment<\/code>\uff08\u8fd9\u91cc\u7701\u7565\u4e86\u628a\u00a0<code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">spec.image<\/code>\u00a0\u6620\u5c04\u8fdb\u5bb9\u5668\u955c\u50cf\u5b57\u6bb5\u7684 patch \u903b\u8f91\uff0c\u5b9e\u9645\u9879\u76ee\u91cc\u4f1a\u7528\u00a0<code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">patches<\/code>\u00a0\u628a\u7528\u6237\u4f20\u5165\u7684\u53c2\u6570\u6620\u5c04\u5230\u5e95\u5c42\u8d44\u6e90\u4e0a\uff09\u3002<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u6700\u540e\uff0c\u4e1a\u52a1\u5f00\u53d1\u8005\u8981\u7528\u7684\u65f6\u5019\uff0c\u5b8c\u5168\u4e0d\u7528\u7ba1 AWS \u6216\u8005 Deployment \u957f\u4ec0\u4e48\u6837\uff0c\u53ea\u9700\u8981\u5199\uff1a<\/p>\n<div class=\"relative group\/copy bg-bg-000\/50 border-0.5 border-border-400 rounded-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-accent-100\" tabindex=\"0\" role=\"group\" aria-label=\"yaml code\">\n<div class=\"sticky opacity-0 group-hover\/copy:opacity-100 group-focus-within\/copy:opacity-100 top-2 py-2 h-12 w-0 float-right\">\n<div class=\"absolute right-0 h-8 px-2 items-center inline-flex z-10\"><\/div>\n<\/div>\n<div class=\"text-text-500 font-small p-3.5 pb-0\">yaml<\/div>\n<div class=\"overflow-x-auto\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">apiVersion: example.crossplane.io\/v1\r\nkind: App\r\nmetadata:\r\n  namespace: default\r\n  name: my-app\r\nspec:\r\n  image: nginx<\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u4e00\u4e2a\u00a0<code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">kubectl apply<\/code>\uff0cCrossplane \u5c31\u4f1a\u6309\u7167 Composition \u91cc\u7684\u903b\u8f91\uff0c\u81ea\u52a8\u5e2e\u4ed6\u628a\u5e95\u5c42\u7684 Deployment\uff08\u4e43\u81f3 Service\u3001\u6570\u636e\u5e93\u3001S3 \u6876\u7b49\uff0c\u53d6\u51b3\u4e8e Composition \u600e\u4e48\u5199\uff09\u90fd\u521b\u5efa\u51fa\u6765\u3002\u5bf9\u5f00\u53d1\u8005\u6765\u8bf4\uff0c\u4ed6\u770b\u5230\u7684\u53ea\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u00a0<code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">App<\/code>\u00a0\u5bf9\u8c61\uff1b\u5bf9\u5e73\u53f0\u56e2\u961f\u6765\u8bf4\uff0c\u4ed6\u4eec\u53ef\u4ee5\u968f\u65f6\u8c03\u6574 Composition \u91cc\u7684\u5b9e\u73b0\u7ec6\u8282\uff08\u6bd4\u5982\u628a Deployment \u6362\u6210\u66f4\u590d\u6742\u7684\u914d\u7f6e\uff0c\u6216\u8005\u63a5\u5165\u4e91\u8d44\u6e90\uff09\uff0c\u800c\u4e0d\u7528\u6539\u52a8\u4e1a\u52a1\u65b9\u7684\u63a5\u53e3\u3002<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">\u8fd9\u5c31\u662f\u524d\u9762\u8bf4\u7684&#8221;\u4e24\u5c42\u62bd\u8c61&#8221;\u5728\u5177\u4f53 YAML \u4e0a\u7684\u6837\u5b50\uff1a\u7b2c\u4e00\u6bb5\u662f&#8221;\u7edf\u4e00\u4ea4\u4e92\u65b9\u5f0f&#8221;\u90a3\u5c42\uff08Provider\/MR\uff09\uff0c\u7b2c\u4e8c\u6bb5\u662f&#8221;\u9690\u85cf\u5b9e\u73b0\u7ec6\u8282&#8221;\u90a3\u5c42\uff08XRD\/Composition\/XR\uff09\u3002<\/p>\n<p class=\"font-claude-response-body break-words whitespace-normal\" dir=\"ltr\">Sources:<\/p>\n<ul class=\"[li_&amp;]:mb-0 [li_&amp;]:mt-1 [li_&amp;]:gap-1 [&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3 print:block print:space-y-1\" dir=\"ltr\">\n<li class=\"font-claude-response-body whitespace-normal break-words pl-2\"><a class=\"underline underline underline-offset-2 decoration-1 decoration-current\/40 hover:decoration-current focus:decoration-current\" href=\"https:\/\/docs.crossplane.io\/latest\/get-started\/get-started-with-managed-resources\/\">Get Started With Managed Resources \u00b7 Crossplane v2.3<\/a><\/li>\n<li class=\"font-claude-response-body whitespace-normal break-words pl-2\"><a class=\"underline underline underline-offset-2 decoration-1 decoration-current\/40 hover:decoration-current focus:decoration-current\" href=\"https:\/\/docs.crossplane.io\/latest\/get-started\/get-started-with-composition\/\">Get Started With Composition \u00b7 Crossplane v2.3<\/a><\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Crossplane \u7684\u6838\u5fc3\u601d\u8def\u662f\u628a K<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[24],"tags":[],"class_list":["post-7619","post","type-post","status-publish","format-standard","hentry","category-value_docs"],"_links":{"self":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/7619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/comments?post=7619"}],"version-history":[{"count":0,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/7619\/revisions"}],"wp:attachment":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/media?parent=7619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/categories?post=7619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/tags?post=7619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}