Run flows as Kubernetes Jobs with the Kubernetes worker, customize the base job template, and manage cluster resources from Prefect flows.
prefect-kubernetes contains Prefect tasks, flows, and blocks enabling orchestration, observation and management of Kubernetes resources.This library is most commonly used for installation with a Kubernetes worker. See the Prefect docs on deploying with Kubernetes to learn how to create and run deployments in Kubernetes.Prefect provides a Helm chart for deploying a worker, a self-hosted Prefect server instance, and other resources to a Kubernetes cluster. See the Prefect Helm chart for more information.
The Kubernetes worker executes flow runs as Kubernetes Jobs. When you create a Kubernetes work pool, you can customize the base job template to control how jobs are created.
Important: When customizing a work pool’s base job template, variables defined in the
variables section must be explicitly referenced in job_configuration using
{{ variable_name }} syntax to take effect. If you add or modify a variable in variables
but don’t reference it in job_configuration, its value (including defaults) will not be
passed to the worker.For example, if you set a default for cluster_config in variables, ensure your
job_configuration includes "cluster_config": "{{ cluster_config }}".
The following command will install a version of prefect-kubernetes compatible with your installed version of prefect.
If you don’t already have prefect installed, it will install the newest version of prefect as well.
pip install "prefect[kubernetes]"
Upgrade to the latest versions of prefect and prefect-kubernetes:
Use with_options to customize options on an existing task or flow
from prefect_kubernetes.flows import run_namespaced_jobcustomized_run_namespaced_job = run_namespaced_job.with_options( name="My flow running a Kubernetes Job", retries=2, retry_delay_seconds=10,) # this is now a new flow object that can be called
from prefect import flow, get_run_loggerfrom prefect_kubernetes.credentials import KubernetesCredentialsfrom prefect_kubernetes.flows import run_namespaced_job # this is a flowfrom prefect_kubernetes.jobs import KubernetesJobk8s_creds = KubernetesCredentials.load("k8s-creds")job = KubernetesJob.from_yaml_file( # or create in the UI with a dict manifest credentials=k8s_creds, manifest_path="path/to/job.yaml",)job.save("my-k8s-job", overwrite=True)@flowdef kubernetes_orchestrator(): # run the flow and send logs to the parent flow run's logger logger = get_run_logger() run_namespaced_job(job, print_func=logger.info)if __name__ == "__main__": kubernetes_orchestrator()
As with all Prefect flows and tasks, you can call the underlying function directly if you don’t need Prefect features:
Generate a resource-specific client from KubernetesClusterConfig
# with minikube / docker desktop & a valid ~/.kube/config this should ~just work~from prefect_kubernetes.credentials import KubernetesCredentials, KubernetesClusterConfigk8s_config = KubernetesClusterConfig.from_file('~/.kube/config')k8s_credentials = KubernetesCredentials(cluster_config=k8s_config)with k8s_credentials.get_client("core") as v1_core_client: for namespace in v1_core_client.list_namespace().items: print(namespace.metadata.name)
For assistance using Kubernetes, consult the Kubernetes documentation.Refer to the prefect-kubernetesSDK documentation to explore all the capabilities of the prefect-kubernetes library.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Prefect","colors":{"primary":"#2D6DF6","light":"#5F92FF","dark":"#2D6DF6"},"logo":{"light":"https://mintcdn.com/prefect-bd373955/2_4m_dDmEdgqK7r9/logos/logo-wordmark-dark.svg?fit=max\u0026auto=format\u0026n=2_4m_dDmEdgqK7r9\u0026q=85\u0026s=076c95a93dbe29192ba9129faefcc878","dark":"https://mintcdn.com/prefect-bd373955/2_4m_dDmEdgqK7r9/logos/logo-wordmark-light.svg?fit=max\u0026auto=format\u0026n=2_4m_dDmEdgqK7r9\u0026q=85\u0026s=46ef25a1069c303ca7d9e24ec801e760","href":"https://www.prefect.io/docs"},"favicon":"https://mintcdn.com/prefect-bd373955/2_4m_dDmEdgqK7r9/logos/favicon.svg?fit=max\u0026auto=format\u0026n=2_4m_dDmEdgqK7r9\u0026q=85\u0026s=c0e62122cb72036e569b2656916a1b33","api":{"playground":{"display":"simple"}},"appearance":{"default":"light","strict":false},"navbar":{"primary":{"type":"github","href":"https://github.com/PrefectHQ/Prefect"}},"footer":{"socials":{"bluesky":"https://bsky.app/profile/prefect.io","github":"https://github.com/PrefectHQ/prefect","linkedin":"https://www.linkedin.com/company/prefect/mycompany","slack":"https://prefect.io/slack","x":"https://x.com/PrefectIO","youtube":"https://www.youtube.com/c/PrefectIO"}},"seo":{"metatags":{"canonical":"https://www.prefect.io/docs"}},"integrations":{"ga4":{"measurementId":"G-8GR5P04T5Y"},"gtm":{"tagId":"GTM-N633BZ8"}},"errors":{"404":{"redirect":false}},"contextual":{"options":["copy","view"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"prefect-bd373955","hasAudioNarration":false,"actualSubdomain":"prefect-bd373955","customDomains":[],"gitSource":{"type":"github","owner":"prefecthq","repo":"prefect","deployBranch":"main","contentDirectory":"docs","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aebae2be8d23663794098e8","collectionId":"28a32e15-27de-4edf-91c2-0682e8bb6873","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aebae2be8d23663794098e8"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aee42ba68213475f1385309","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"API Reference","count":1172},{"language":"default","tag":"Python SDK Reference","count":364},{"language":"default","tag":"Integrations","count":329},{"language":"default","tag":"REST API","count":183},{"language":"default","tag":"Server API","count":181},{"language":"default","tag":"prefect.server","count":148},{"language":"default","tag":"SDK Reference","count":127},{"language":"default","tag":"How-to Guides","count":71},{"language":"default","tag":"models","count":60},{"language":"default","tag":"api","count":39}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":"#topbar-cta-button>a>span{background-color:#2d6df6;border-radius:0.25rem}#topbar-cta-button>a{padding:0.5rem 1rem}#topbar-cta-button>a div>span{font-weight:400;letter-spacing:0.4px}#topbar-cta-button>a div>span,#topbar-cta-button>a div>svg{color:#fff}img{filter:none!important}@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700\u0026display=swap\");@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700\u0026display=swap\");body{font-family:\"Inter\", sans-serif}h1,h2,h3,h4,h5,h6{font-family:\"Roboto\", sans-serif}p{font-family:\"Inter\", sans-serif}[role=\"listitem\"] *:last-child:not(.code-block,.link){border-bottom:none!important}.badge{display:table;margin:0 0 1rem;font-family:\"Inter\", sans-serif;font-size:0.6875rem;font-weight:600;line-height:1;letter-spacing:0.02em;text-transform:uppercase;padding:0.35em 0.6em;border-radius:0.375rem;white-space:nowrap}.badge.cloud{color:#fff;background-color:#2d6df6}.badge.cloud::after{content:\"Prefect Cloud\"}"},{"filePath":"assets/code.css","content":".namespace{opacity:0.7}.token.doctype .token.doctype-tag{color:#79c0ff}.token.doctype .token.name{color:#d2a8ff}.token.comment,.token.prolog{color:#8b949e}.token.punctuation,.language-html .language-css .token.punctuation,.language-html .language-javascript .token.punctuation{color:#c9d1d9}.token.property,.token.tag,.token.boolean,.token.number,.token.constant,.token.symbol,.token.inserted,.token.unit{color:#79c0ff}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.deleted{color:#79c0ff}.token.plain-text{color:#fafafa}.language-css .token.string.url{text-decoration:underline}.token.operator,.token.entity{color:#79c0ff}.token.operator.arrow{color:#ff7b72}.token.atrule{color:#79c0ff}.token.atrule .token.rule{color:#d2a8ff}.token.atrule .token.url{color:#79c0ff}.token.atrule .token.url .token.function{color:#79c0ff}.token.atrule .token.url .token.punctuation{color:#d4d4d4}.token.keyword{color:#ff7b72}.token.keyword.module,.token.keyword.control-flow{color:#c586c0}.token.function,.token.function .token.maybe-class-name{color:#d2a8ff}.token.regex{color:#a5d6ff}.token.important{color:#ff7b72}.token.italic{font-style:italic;color:#c9d1d9}.token.constant{color:#79c0ff}.token.class-name,.token.maybe-class-name{color:#d2a8ff}.token.console{color:#9cdcfe}.token.parameter{color:#79c0ff}.token.interpolation{color:#79c0ff}.token.punctuation.interpolation-punctuation{color:#569cd6}.token.boolean{color:#ff7b72}.token.property,.token.variable,.token.imports .token.maybe-class-name,.token.exports .token.maybe-class-name{color:#79c0ff}.token.selector{color:#7ee787}.token.escape{color:#7ee787}.token.tag{color:#7ee787}.token.tag .token.punctuation{color:#808080}.token.cdata{color:#808080}.token.attr-name{color:#79c0ff}.token.attr-value,.token.attr-value .token.punctuation{color:#a5d6ff}.token.attr-value .token.punctuation.attr-equals{color:#d4d4d4}.token.entity{color:#79c0ff}.token.namespace{color:#7ee787}.token.operator{color:#94a3b8}pre[class*=\"language-javascript\"],code[class*=\"language-javascript\"],pre[class*=\"language-jsx\"],code[class*=\"language-jsx\"],pre[class*=\"language-typescript\"],code[class*=\"language-typescript\"],pre[class*=\"language-tsx\"],code[class*=\"language-tsx\"]{color:#79c0ff}pre[class*=\"language-css\"],code[class*=\"language-css\"]{color:#a5d6ff}pre[class*=\"language-html\"],code[class*=\"language-html\"]{color:#c9d1d9}.language-regex .token.anchor{color:#dcdcaa}.language-html .token.punctuation{color:#808080}span.language-json .token.punctuation{color:#4b5563}:is(.dark span.language-json .token.punctuation){color:#d1d5db}span.language-json .token.property{color:#0284c7}:is(.dark span.language-json .token.property){color:9cdcfe}span.language-json .token.string{color:#d97706}:is(.dark span.language-json .token.string){color:#ce9178}span.language-json .token.number{color:#16a34a}:is(.dark span.language-json .token.number){color:#b5cea8}.line-highlight.line-highlight{background:#f7ebc6;box-shadow:inset 5px 0 0 #f7d87c;z-index:0}"}],"page":{"pagePath":"integrations/prefect-kubernetes","slug":"/integrations/prefect-kubernetes","pageMetadata":{"title":"prefect-kubernetes","description":"Run flows as Kubernetes Jobs with the Kubernetes worker, customize the base job template, and manage cluster resources from Prefect flows.","keywords":["Kubernetes","k8s","pod","cluster","container","worker"],"href":"/integrations/prefect-kubernetes/index"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Run flows as Kubernetes Jobs with the Kubernetes worker, customize the base job template, and manage cluster resources from Prefect flows.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`prefect-kubernetes`}),` contains Prefect tasks, flows, and blocks enabling orchestration, observation and management of Kubernetes resources.`]}),`\n`,_jsxs(_components.p,{children:[`This library is most commonly used for installation with a Kubernetes worker. See the `,_jsx(_components.a,{href:`/v3/how-to-guides/deployment_infra/kubernetes`,children:`Prefect docs on deploying with Kubernetes`}),` to learn how to create and run deployments in Kubernetes.`]}),`\n`,_jsxs(_components.p,{children:[`Prefect provides a Helm chart for deploying a worker, a self-hosted Prefect server instance, and other resources to a Kubernetes cluster. See the `,_jsx(_components.a,{href:`https://github.com/PrefectHQ/prefect-helm`,children:`Prefect Helm chart`}),` for more information.`]}),`\n`,_jsx(Heading,{level:`2`,id:`kubernetes-worker`,children:`Kubernetes Worker`}),`\n`,_jsx(_components.p,{children:`The Kubernetes worker executes flow runs as Kubernetes Jobs. When you create a Kubernetes work pool, you can customize the base job template to control how jobs are created.`}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Important`}),`: When customizing a work pool’s base job template, variables defined in the\n`,_jsx(_components.code,{children:`variables`}),` section must be explicitly referenced in `,_jsx(_components.code,{children:`job_configuration`}),` using\n`,_jsx(_components.code,{children:`{{ variable_name }}`}),` syntax to take effect. If you add or modify a variable in `,_jsx(_components.code,{children:`variables`}),`\nbut don’t reference it in `,_jsx(_components.code,{children:`job_configuration`}),`, its value (including defaults) will not be\npassed to the worker.`]}),_jsxs(_components.p,{children:[`For example, if you set a default for `,_jsx(_components.code,{children:`cluster_config`}),` in `,_jsx(_components.code,{children:`variables`}),`, ensure your\n`,_jsx(_components.code,{children:`job_configuration`}),` includes `,_jsx(_components.code,{children:`\"cluster_config\": \"{{ cluster_config }}\"`}),`.`]})]}),`\n`,_jsxs(_components.p,{children:[`See the `,_jsx(_components.a,{href:`/v3/how-to-guides/deployment_infra/kubernetes`,children:`Kubernetes deployment guide`}),` for complete setup instructions.`]}),`\n`,_jsx(Heading,{level:`2`,id:`getting-started`,children:`Getting started`}),`\n`,_jsx(Heading,{level:`3`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`https://kubernetes.io/`,children:`Kubernetes installed`}),`.`]}),`\n`]}),`\n`,_jsxs(Heading,{level:`3`,id:`install-prefect-kubernetes`,children:[`Install `,_jsx(_components.code,{children:`prefect-kubernetes`})]}),`\n`,_jsxs(_components.p,{children:[`The following command will install a version of `,_jsx(_components.code,{children:`prefect-kubernetes`}),` compatible with your installed version of `,_jsx(_components.code,{children:`prefect`}),`.\nIf you don’t already have `,_jsx(_components.code,{children:`prefect`}),` installed, it will install the newest version of `,_jsx(_components.code,{children:`prefect`}),` as well.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prefect[kubernetes]\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Upgrade to the latest versions of `,_jsx(_components.code,{children:`prefect`}),` and `,_jsx(_components.code,{children:`prefect-kubernetes`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -U`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prefect[kubernetes]\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`register-newly-installed-block-types`,children:`Register newly installed block types`}),`\n`,_jsxs(_components.p,{children:[`Register the block types in the `,_jsx(_components.code,{children:`prefect-kubernetes`}),` module to make them available for use.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`prefect`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` block`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` register`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -m`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` prefect_kubernetes`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsxs(Heading,{level:`3`,id:`use-with_options-to-customize-options-on-an-existing-task-or-flow`,children:[`Use `,_jsx(_components.code,{children:`with_options`}),` to customize options on an existing task or flow`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` prefect_kubernetes.flows `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` run_namespaced_job`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`customized_run_namespaced_job `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` run_namespaced_job.with_options(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"My flow running a Kubernetes Job\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` retry_delay_seconds`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# this is now a new flow object that can be called`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`specify-and-run-a-kubernetes-job-from-a-yaml-file`,children:`Specify and run a Kubernetes Job from a YAML file`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`24`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`24`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` prefect `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` flow, get_run_logger`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` prefect_kubernetes.credentials `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` KubernetesCredentials`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` prefect_kubernetes.flows `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` run_namespaced_job `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# this is a flow`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` prefect_kubernetes.jobs `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` KubernetesJob`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`k8s_creds `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` KubernetesCredentials.load(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"k8s-creds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`job `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` KubernetesJob.from_yaml_file( `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# or create in the UI with a dict manifest`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` credentials`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`k8s_creds,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` manifest_path`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"path/to/job.yaml\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`job.save(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"my-k8s-job\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`overwrite`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`@flow`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` kubernetes_orchestrator`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # run the flow and send logs to the parent flow run's logger`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` logger `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` get_run_logger()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` run_namespaced_job(job, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`print_func`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`logger.info)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` __name__`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"__main__\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` kubernetes_orchestrator()`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`As with all Prefect flows and tasks, you can call the underlying function directly if you don’t need Prefect features:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`run_namespaced_job.fn(job, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`print_func`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsxs(Heading,{level:`3`,id:`generate-a-resource-specific-client-from-kubernetesclusterconfig`,children:[`Generate a resource-specific client from `,_jsx(_components.code,{children:`KubernetesClusterConfig`})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# with minikube / docker desktop \u0026 a valid ~/.kube/config this should ~just work~`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` prefect_kubernetes.credentials `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` KubernetesCredentials, KubernetesClusterConfig`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`k8s_config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` KubernetesClusterConfig.from_file(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'~/.kube/config'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`k8s_credentials `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` KubernetesCredentials(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`cluster_config`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`k8s_config)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` k8s_credentials.get_client(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"core\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` v1_core_client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` namespace `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` v1_core_client.list_namespace().items:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(namespace.metadata.name)`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`list-jobs-in-a-namespace`,children:`List jobs in a namespace`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` prefect `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` flow`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` prefect_kubernetes.credentials `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` KubernetesCredentials`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` prefect_kubernetes.jobs `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` list_namespaced_job`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`@flow`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` kubernetes_orchestrator`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` v1_job_list `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` list_namespaced_job(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` kubernetes_credentials`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`KubernetesCredentials.load(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"k8s-creds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` namespace`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"my-namespace\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`For assistance using Kubernetes, consult the `,_jsx(_components.a,{href:`https://kubernetes.io/`,children:`Kubernetes documentation`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Refer to the `,_jsx(_components.code,{children:`prefect-kubernetes`}),` `,_jsx(_components.a,{href:`/integrations/prefect-kubernetes/api-ref/prefect_kubernetes-credentials`,children:`SDK documentation`}),` to explore all the capabilities of the `,_jsx(_components.code,{children:`prefect-kubernetes`}),` library.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"prefect-kubernetes","description":"Run flows as Kubernetes Jobs with the Kubernetes worker, customize the base job template, and manage cluster resources from Prefect flows.","keywords":["Kubernetes","k8s","pod","cluster","container","worker"],"href":"/integrations/prefect-kubernetes/index"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Kubernetes Worker","slug":"kubernetes-worker","depth":2,"children":[]},{"title":"Getting started","slug":"getting-started","depth":2,"children":[{"title":"Prerequisites","slug":"prerequisites","depth":3,"children":[]},{"title":"Install prefect-kubernetes","slug":"install-prefect-kubernetes","depth":3,"children":[]},{"title":"Register newly installed block types","slug":"register-newly-installed-block-types","depth":3,"children":[]}]},{"title":"Examples","slug":"examples","depth":2,"children":[{"title":"Use with_options to customize options on an existing task or flow","slug":"use-with_options-to-customize-options-on-an-existing-task-or-flow","depth":3,"children":[]},{"title":"Specify and run a Kubernetes Job from a YAML file","slug":"specify-and-run-a-kubernetes-job-from-a-yaml-file","depth":3,"children":[]},{"title":"Generate a resource-specific client from KubernetesClusterConfig","slug":"generate-a-resource-specific-client-from-kubernetesclusterconfig","depth":3,"children":[]},{"title":"List jobs in a namespace","slug":"list-jobs-in-a-namespace","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/prefect-bd373955/4f3e55fa53d4a575/script.js","/docs/_mintlify/custom/prefect-bd373955/87a13774513287dd/osano.js","/docs/_mintlify/custom/prefect-bd373955/e7b7298d9b02df32/outbound-referrer.js"],"subdomain":"prefect-bd373955","siteName":"Prefect","title":"prefect-kubernetes - Prefect","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-03T16:58:02.205Z","originalFileLocation":"integrations/prefect-kubernetes/index.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Run flows as Kubernetes Jobs with the Kubernetes worker, customize the base job template, and manage cluster resources from Prefect flows.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Prefect\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"prefect-kubernetes - Prefect\">\u003cmeta data-mint-head property=\"og:description\" content=\"Run flows as Kubernetes Jobs with the Kubernetes worker, customize the base job template, and manage cluster resources from Prefect flows.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Prefect\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.prefect.io/docs/integrations/prefect-kubernetes\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://prefect-bd373955.mintlify.site/docs/_mintlify/api/og/v2?division=Kubernetes\u0026amp;title=prefect-kubernetes\u0026amp;description=Run+flows+as+Kubernetes+Jobs+with+the+Kubernetes+worker%2C+customize+the+base+job+template%2C+and+manage+cluster+resources+from+Prefect+flows.\u0026amp;theme=ce2957f9cdece17b41396978\u0026amp;signature=293dce8e4dc61ae6699201e5c7d922a47b9f3daf553f35d54b7b73afcb2f8215\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"prefect-kubernetes - Prefect\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Run flows as Kubernetes Jobs with the Kubernetes worker, customize the base job template, and manage cluster resources from Prefect flows.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://prefect-bd373955.mintlify.site/docs/_mintlify/api/og/v2?division=Kubernetes\u0026amp;title=prefect-kubernetes\u0026amp;description=Run+flows+as+Kubernetes+Jobs+with+the+Kubernetes+worker%2C+customize+the+base+job+template%2C+and+manage+cluster+resources+from+Prefect+flows.\u0026amp;theme=ce2957f9cdece17b41396978\u0026amp;signature=293dce8e4dc61ae6699201e5c7d922a47b9f3daf553f35d54b7b73afcb2f8215\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/prefect-bd373955/QsizguCJ7nwtgDte/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Prefect\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2D6DF6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.prefect.io/docs/integrations/prefect-kubernetes\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/integrations/prefect-kubernetes.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.prefect.io/#organization\",\"name\":\"Prefect\",\"url\":\"https://www.prefect.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/prefect-bd373955/2_4m_dDmEdgqK7r9/logos/logo-wordmark-dark.svg?fit=max\u0026auto=format\u0026n=2_4m_dDmEdgqK7r9\u0026q=85\u0026s=076c95a93dbe29192ba9129faefcc878\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.prefect.io/docs#website\",\"name\":\"Prefect\",\"url\":\"https://www.prefect.io/docs\",\"publisher\":{\"@id\":\"https://www.prefect.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.prefect.io/docs/integrations/prefect-kubernetes#webpage\",\"url\":\"https://www.prefect.io/docs/integrations/prefect-kubernetes\",\"name\":\"prefect-kubernetes\",\"description\":\"Run flows as Kubernetes Jobs with the Kubernetes worker, customize the base job template, and manage cluster resources from Prefect flows.\",\"dateModified\":\"2026-11-03T16:58:02.205Z\",\"isPartOf\":{\"@id\":\"https://www.prefect.io/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.prefect.io/docs/integrations/prefect-kubernetes#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.prefect.io/docs/integrations/prefect-kubernetes#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Integrations\",\"item\":\"https://www.prefect.io/docs/integrations/integrations\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Kubernetes\",\"item\":\"https://www.prefect.io/docs/integrations/prefect-kubernetes/index\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"prefect-kubernetes\",\"item\":\"https://www.prefect.io/docs/integrations/prefect-kubernetes\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.prefect.io/docs/integrations/prefect-kubernetes#article\",\"headline\":\"prefect-kubernetes\",\"name\":\"prefect-kubernetes\",\"description\":\"Run flows as Kubernetes Jobs with the Kubernetes worker, customize the base job template, and manage cluster resources from Prefect flows.\",\"url\":\"https://www.prefect.io/docs/integrations/prefect-kubernetes\",\"mainEntityOfPage\":{\"@id\":\"https://www.prefect.io/docs/integrations/prefect-kubernetes#webpage\"},\"dateModified\":\"2026-11-03T16:58:02.205Z\",\"keywords\":\"Kubernetes, k8s, pod, cluster, container, worker\",\"publisher\":{\"@id\":\"https://www.prefect.io/#organization\"},\"isPartOf\":{\"@id\":\"https://www.prefect.io/docs#website\"}}]}\u003c/script>","siteName":"Prefect","nav":{"global":null,"tabs":[{"tab":"Getting Started","pages":[{"title":"Getting Started","href":"/v3/get-started"}]},{"tab":"Concepts","pages":[{"title":"Concepts","href":"/v3/concepts"}]},{"tab":"How-to Guides","pages":[{"title":"How-to Guides","href":"/v3/how-to-guides"}]},{"tab":"Advanced","pages":[{"title":"Advanced","href":"/v3/advanced"}]},{"tab":"Examples","pages":[{"title":"Examples","href":"/v3/examples"}]},{"tab":"Integrations","groups":[{"group":"Integrations","pages":[{"sidebarTitle":"Overview","mode":"wide","title":null,"href":"/integrations/integrations"},{"title":null,"href":"/integrations/use-integrations"},{"group":"AWS","pages":[{"title":"prefect-aws","href":"/integrations/prefect-aws/index"},{"group":"SDK Reference","pages":[{"title":"assume_role_parameters","sidebarTitle":"assume_role_parameters","href":"/integrations/prefect-aws/api-ref/prefect_aws-assume_role_parameters"},{"title":"batch","sidebarTitle":"batch","href":"/integrations/prefect-aws/api-ref/prefect_aws-batch"},{"title":"client_parameters","sidebarTitle":"client_parameters","href":"/integrations/prefect-aws/api-ref/prefect_aws-client_parameters"},{"title":"client_waiter","sidebarTitle":"client_waiter","href":"/integrations/prefect-aws/api-ref/prefect_aws-client_waiter"},{"title":"credentials","sidebarTitle":"credentials","href":"/integrations/prefect-aws/api-ref/prefect_aws-credentials"},{"title":"decorators","sidebarTitle":"decorators","href":"/integrations/prefect-aws/api-ref/prefect_aws-decorators"},{"title":"glue_job","sidebarTitle":"glue_job","href":"/integrations/prefect-aws/api-ref/prefect_aws-glue_job"},{"title":"lambda_function","sidebarTitle":"lambda_function","href":"/integrations/prefect-aws/api-ref/prefect_aws-lambda_function"},{"title":"plugins","sidebarTitle":"plugins","href":"/integrations/prefect-aws/api-ref/prefect_aws-plugins"},{"title":"s3","sidebarTitle":"s3","href":"/integrations/prefect-aws/api-ref/prefect_aws-s3"},{"title":"secrets_manager","sidebarTitle":"secrets_manager","href":"/integrations/prefect-aws/api-ref/prefect_aws-secrets_manager"},{"title":"settings","sidebarTitle":"settings","href":"/integrations/prefect-aws/api-ref/prefect_aws-settings"},{"title":"utilities","sidebarTitle":"utilities","href":"/integrations/prefect-aws/api-ref/prefect_aws-utilities"},{"group":"prefect_aws.bundles","pages":[{"title":"execute","sidebarTitle":"execute","href":"/integrations/prefect-aws/api-ref/prefect_aws-bundles-execute"},{"title":"upload","sidebarTitle":"upload","href":"/integrations/prefect-aws/api-ref/prefect_aws-bundles-upload"}]},{"group":"prefect_aws.deployments","pages":[{"title":"steps","sidebarTitle":"steps","href":"/integrations/prefect-aws/api-ref/prefect_aws-deployments-steps"}]},{"group":"prefect_aws.templates","pages":[{"title":"__init__","sidebarTitle":"__init__","href":"/integrations/prefect-aws/api-ref/prefect_aws-templates-__init__"},{"title":"ecs","sidebarTitle":"ecs","href":"/integrations/prefect-aws/api-ref/prefect_aws-templates-ecs"}]},{"group":"prefect_aws.workers","pages":[{"title":"ecs_worker","sidebarTitle":"ecs_worker","href":"/integrations/prefect-aws/api-ref/prefect_aws-workers-ecs_worker"}]}]},{"group":"ECS Worker","pages":[{"title":"Get to know the ECS worker","sidebarTitle":"Overview","href":"/integrations/prefect-aws/ecs-worker/index"},{"title":"How to manually deploy an ECS worker to an ECS cluster","sidebarTitle":"Deploy manually","href":"/integrations/prefect-aws/ecs-worker/manual-deployment"}]}]},{"group":"Azure","pages":[{"title":"prefect-azure","href":"/integrations/prefect-azure/index"},{"group":"SDK Reference","pages":[{"title":"blob_storage","sidebarTitle":"blob_storage","href":"/integrations/prefect-azure/api-ref/prefect_azure-blob_storage"},{"title":"container_instance","sidebarTitle":"container_instance","href":"/integrations/prefect-azure/api-ref/prefect_azure-container_instance"},{"title":"cosmos_db","sidebarTitle":"cosmos_db","href":"/integrations/prefect-azure/api-ref/prefect_azure-cosmos_db"},{"title":"credentials","sidebarTitle":"credentials","href":"/integrations/prefect-azure/api-ref/prefect_azure-credentials"},{"title":"decorators","sidebarTitle":"decorators","href":"/integrations/prefect-azure/api-ref/prefect_azure-decorators"},{"title":"ml_datastore","sidebarTitle":"ml_datastore","href":"/integrations/prefect-azure/api-ref/prefect_azure-ml_datastore"},{"title":"plugins","sidebarTitle":"plugins","href":"/integrations/prefect-azure/api-ref/prefect_azure-plugins"},{"title":"repository","sidebarTitle":"repository","href":"/integrations/prefect-azure/api-ref/prefect_azure-repository"},{"title":"settings","sidebarTitle":"settings","href":"/integrations/prefect-azure/api-ref/prefect_azure-settings"},{"group":"prefect_azure.bundles","pages":[{"title":"execute","sidebarTitle":"execute","href":"/integrations/prefect-azure/api-ref/prefect_azure-bundles-execute"},{"title":"upload","sidebarTitle":"upload","href":"/integrations/prefect-azure/api-ref/prefect_azure-bundles-upload"}]},{"group":"prefect_azure.deployments","pages":[{"title":"steps","sidebarTitle":"steps","href":"/integrations/prefect-azure/api-ref/prefect_azure-deployments-steps"}]},{"group":"prefect_azure.workers","pages":[{"title":"__init__","sidebarTitle":"__init__","href":"/integrations/prefect-azure/api-ref/prefect_azure-workers-__init__"},{"title":"container_instance","sidebarTitle":"container_instance","href":"/integrations/prefect-azure/api-ref/prefect_azure-workers-container_instance"}]}]},{"title":"Azure Container Instances Worker Guide","href":"/integrations/prefect-azure/aci_worker"}]},{"group":"Bitbucket","pages":[{"title":"prefect-bitbucket","href":"/integrations/prefect-bitbucket/index"},{"group":"SDK Reference","pages":[{"title":"credentials","sidebarTitle":"credentials","href":"/integrations/prefect-bitbucket/api-ref/prefect_bitbucket-credentials"},{"title":"repository","sidebarTitle":"repository","href":"/integrations/prefect-bitbucket/api-ref/prefect_bitbucket-repository"}]}]},{"group":"Dask","pages":[{"title":"prefect-dask","href":"/integrations/prefect-dask/index"},{"group":"SDK Reference","pages":[{"title":"client","sidebarTitle":"client","href":"/integrations/prefect-dask/api-ref/prefect_dask-client"},{"title":"task_runners","sidebarTitle":"task_runners","href":"/integrations/prefect-dask/api-ref/prefect_dask-task_runners"},{"title":"utils","sidebarTitle":"utils","href":"/integrations/prefect-dask/api-ref/prefect_dask-utils"}]}]},{"group":"Databricks","pages":[{"title":"prefect-databricks","href":"/integrations/prefect-databricks/index"},{"group":"SDK Reference","pages":[{"title":"credentials","sidebarTitle":"credentials","href":"/integrations/prefect-databricks/api-ref/prefect_databricks-credentials"},{"title":"flows","sidebarTitle":"flows","href":"/integrations/prefect-databricks/api-ref/prefect_databricks-flows"},{"title":"jobs","sidebarTitle":"jobs","href":"/integrations/prefect-databricks/api-ref/prefect_databricks-jobs"},{"title":"rest","sidebarTitle":"rest","href":"/integrations/prefect-databricks/api-ref/prefect_databricks-rest"}]}]},{"group":"dbt","pages":[{"title":"prefect-dbt","href":"/integrations/prefect-dbt/index"},{"title":"Installation","sidebarTitle":"Installation","href":"/integrations/prefect-dbt/install"},{"title":"PrefectDbtRunner","sidebarTitle":"PrefectDbtRunner","href":"/integrations/prefect-dbt/runner"},{"title":"PrefectDbtOrchestrator","sidebarTitle":"PrefectDbtOrchestrator","href":"/integrations/prefect-dbt/orchestrator"},{"title":"dbt Cloud","sidebarTitle":"dbt Cloud","href":"/integrations/prefect-dbt/dbt-cloud"},{"title":"Legacy","sidebarTitle":"Legacy","href":"/integrations/prefect-dbt/legacy"},{"group":"SDK Reference","pages":[{"title":"utilities","sidebarTitle":"utilities","href":"/integrations/prefect-dbt/api-ref/prefect_dbt-utilities"},{"group":"prefect_dbt.cli","pages":[{"title":"commands","sidebarTitle":"commands","href":"/integrations/prefect-dbt/api-ref/prefect_dbt-cli-commands"},{"group":"configs","pages":[{"title":"base","sidebarTitle":"base","href":"/integrations/prefect-dbt/api-ref/prefect_dbt-cli-configs-base"},{"title":"bigquery","sidebarTitle":"bigquery","href":"/integrations/prefect-dbt/api-ref/prefect_dbt-cli-configs-bigquery"},{"title":"postgres","sidebarTitle":"postgres","href":"/integrations/prefect-dbt/api-ref/prefect_dbt-cli-configs-postgres"},{"title":"snowflake","sidebarTitle":"snowflake","href":"/integrations/prefect-dbt/api-ref/prefect_dbt-cli-configs-snowflake"}]},{"title":"credentials","sidebarTitle":"credentials","href":"/integrations/prefect-dbt/api-ref/prefect_dbt-cli-credentials"}]},{"group":"prefect_dbt.cloud","pages":[{"title":"clients","sidebarTitle":"clients","href":"/integrations/prefect-dbt/api-ref/prefect_dbt-cloud-clients"},{"title":"credentials","sidebarTitle":"credentials","href":"/integrations/prefect-dbt/api-ref/prefect_dbt-cloud-credentials"},{"title":"exceptions","sidebarTitle":"exceptions","href":"/integrations/prefect-dbt/api-ref/prefect_dbt-cloud-exceptions"},{"title":"jobs","sidebarTitle":"jobs","href":"/integrations/prefect-dbt/api-ref/prefect_dbt-cloud-jobs"},{"title":"models","sidebarTitle":"models","href":"/integrations/prefect-dbt/api-ref/prefect_dbt-cloud-models"},{"title":"runs","sidebarTitle":"runs","href":"/integrations/prefect-dbt/api-ref/prefect_dbt-cloud-runs"},{"title":"utils","sidebarTitle":"utils","href":"/integrations/prefect-dbt/api-ref/prefect_dbt-cloud-utils"}]},{"group":"prefect_dbt.core","pages":[{"title":"runner","sidebarTitle":"runner","href":"/integrations/prefect-dbt/api-ref/prefect_dbt-core-runner"},{"title":"settings","sidebarTitle":"settings","href":"/integrations/prefect-dbt/api-ref/prefect_dbt-core-settings"}]}]}]},{"group":"Docker","pages":[{"title":"prefect-docker","href":"/integrations/prefect-docker/index"},{"group":"SDK Reference","pages":[{"title":"containers","sidebarTitle":"containers","href":"/integrations/prefect-docker/api-ref/prefect_docker-containers"},{"title":"credentials","sidebarTitle":"credentials","href":"/integrations/prefect-docker/api-ref/prefect_docker-credentials"},{"title":"decorators","sidebarTitle":"decorators","href":"/integrations/prefect-docker/api-ref/prefect_docker-decorators"},{"title":"host","sidebarTitle":"host","href":"/integrations/prefect-docker/api-ref/prefect_docker-host"},{"title":"images","sidebarTitle":"images","href":"/integrations/prefect-docker/api-ref/prefect_docker-images"},{"title":"types","sidebarTitle":"types","href":"/integrations/prefect-docker/api-ref/prefect_docker-types"},{"title":"worker","sidebarTitle":"worker","href":"/integrations/prefect-docker/api-ref/prefect_docker-worker"},{"group":"prefect_docker.deployments","pages":[{"title":"steps","sidebarTitle":"steps","href":"/integrations/prefect-docker/api-ref/prefect_docker-deployments-steps"}]}]}]},{"group":"Email","pages":[{"title":"prefect-email","href":"/integrations/prefect-email/index"},{"group":"SDK Reference","pages":[{"title":"credentials","sidebarTitle":"credentials","href":"/integrations/prefect-email/api-ref/prefect_email-credentials"},{"title":"message","sidebarTitle":"message","href":"/integrations/prefect-email/api-ref/prefect_email-message"}]}]},{"group":"GCP","pages":[{"title":"prefect-gcp","href":"/integrations/prefect-gcp/index"},{"title":"Google Cloud Run Worker Guide","href":"/integrations/prefect-gcp/gcp-worker-guide"},{"group":"SDK Reference","pages":[{"title":"bigquery","sidebarTitle":"bigquery","href":"/integrations/prefect-gcp/api-ref/prefect_gcp-bigquery"},{"title":"cloud_storage","sidebarTitle":"cloud_storage","href":"/integrations/prefect-gcp/api-ref/prefect_gcp-cloud_storage"},{"title":"credentials","sidebarTitle":"credentials","href":"/integrations/prefect-gcp/api-ref/prefect_gcp-credentials"},{"title":"decorators","sidebarTitle":"decorators","href":"/integrations/prefect-gcp/api-ref/prefect_gcp-decorators"},{"title":"secret_manager","sidebarTitle":"secret_manager","href":"/integrations/prefect-gcp/api-ref/prefect_gcp-secret_manager"},{"title":"settings","sidebarTitle":"settings","href":"/integrations/prefect-gcp/api-ref/prefect_gcp-settings"},{"title":"utilities","sidebarTitle":"utilities","href":"/integrations/prefect-gcp/api-ref/prefect_gcp-utilities"},{"group":"prefect_gcp.bundles","pages":[{"title":"execute","sidebarTitle":"execute","href":"/integrations/prefect-gcp/api-ref/prefect_gcp-bundles-execute"},{"title":"upload","sidebarTitle":"upload","href":"/integrations/prefect-gcp/api-ref/prefect_gcp-bundles-upload"}]},{"group":"prefect_gcp.deployments","pages":[{"title":"steps","sidebarTitle":"steps","href":"/integrations/prefect-gcp/api-ref/prefect_gcp-deployments-steps"}]},{"group":"prefect_gcp.models","pages":[{"title":"cloud_run_v2","sidebarTitle":"cloud_run_v2","href":"/integrations/prefect-gcp/api-ref/prefect_gcp-models-cloud_run_v2"}]},{"group":"prefect_gcp.workers","pages":[{"title":"cloud_run","sidebarTitle":"cloud_run","href":"/integrations/prefect-gcp/api-ref/prefect_gcp-workers-cloud_run"},{"title":"cloud_run_v2","sidebarTitle":"cloud_run_v2","href":"/integrations/prefect-gcp/api-ref/prefect_gcp-workers-cloud_run_v2"},{"title":"vertex","sidebarTitle":"vertex","href":"/integrations/prefect-gcp/api-ref/prefect_gcp-workers-vertex"}]}]}]},{"group":"GitHub","pages":[{"title":"prefect-github","href":"/integrations/prefect-github/index"},{"group":"SDK Reference","pages":[{"title":"credentials","sidebarTitle":"credentials","href":"/integrations/prefect-github/api-ref/prefect_github-credentials"},{"title":"exceptions","sidebarTitle":"exceptions","href":"/integrations/prefect-github/api-ref/prefect_github-exceptions"},{"title":"graphql","sidebarTitle":"graphql","href":"/integrations/prefect-github/api-ref/prefect_github-graphql"},{"title":"mutations","sidebarTitle":"mutations","href":"/integrations/prefect-github/api-ref/prefect_github-mutations"},{"title":"organization","sidebarTitle":"organization","href":"/integrations/prefect-github/api-ref/prefect_github-organization"},{"title":"repository","sidebarTitle":"repository","href":"/integrations/prefect-github/api-ref/prefect_github-repository"},{"title":"repository_owner","sidebarTitle":"repository_owner","href":"/integrations/prefect-github/api-ref/prefect_github-repository_owner"},{"title":"user","sidebarTitle":"user","href":"/integrations/prefect-github/api-ref/prefect_github-user"},{"title":"utils","sidebarTitle":"utils","href":"/integrations/prefect-github/api-ref/prefect_github-utils"},{"title":"viewer","sidebarTitle":"viewer","href":"/integrations/prefect-github/api-ref/prefect_github-viewer"},{"group":"prefect_github.schemas","pages":[{"title":"graphql_schema","sidebarTitle":"graphql_schema","href":"/integrations/prefect-github/api-ref/prefect_github-schemas-graphql_schema"}]}]}]},{"group":"Gitlab","pages":[{"title":"prefect-gitlab","href":"/integrations/prefect-gitlab/index"},{"group":"SDK Reference","pages":[{"title":"credentials","sidebarTitle":"credentials","href":"/integrations/prefect-gitlab/api-ref/prefect_gitlab-credentials"},{"title":"repositories","sidebarTitle":"repositories","description":null,"href":"/integrations/prefect-gitlab/api-ref/prefect_gitlab-repositories"}]}]},{"group":"Kubernetes","pages":[{"title":"prefect-kubernetes","href":"/integrations/prefect-kubernetes/index"},{"group":"SDK Reference","pages":[{"title":"credentials","sidebarTitle":"credentials","description":null,"href":"/integrations/prefect-kubernetes/api-ref/prefect_kubernetes-credentials"},{"title":"custom_objects","sidebarTitle":"custom_objects","href":"/integrations/prefect-kubernetes/api-ref/prefect_kubernetes-custom_objects"},{"title":"decorators","sidebarTitle":"decorators","href":"/integrations/prefect-kubernetes/api-ref/prefect_kubernetes-decorators"},{"title":"deployments","sidebarTitle":"deployments","href":"/integrations/prefect-kubernetes/api-ref/prefect_kubernetes-deployments"},{"title":"diagnostics","sidebarTitle":"diagnostics","href":"/integrations/prefect-kubernetes/api-ref/prefect_kubernetes-diagnostics"},{"title":"exceptions","sidebarTitle":"exceptions","href":"/integrations/prefect-kubernetes/api-ref/prefect_kubernetes-exceptions"},{"title":"flows","sidebarTitle":"flows","href":"/integrations/prefect-kubernetes/api-ref/prefect_kubernetes-flows"},{"title":"jobs","sidebarTitle":"jobs","href":"/integrations/prefect-kubernetes/api-ref/prefect_kubernetes-jobs"},{"title":"observer","sidebarTitle":"observer","href":"/integrations/prefect-kubernetes/api-ref/prefect_kubernetes-observer"},{"title":"pods","sidebarTitle":"pods","href":"/integrations/prefect-kubernetes/api-ref/prefect_kubernetes-pods"},{"title":"services","sidebarTitle":"services","href":"/integrations/prefect-kubernetes/api-ref/prefect_kubernetes-services"},{"title":"settings","sidebarTitle":"settings","href":"/integrations/prefect-kubernetes/api-ref/prefect_kubernetes-settings"},{"title":"utilities","sidebarTitle":"utilities","href":"/integrations/prefect-kubernetes/api-ref/prefect_kubernetes-utilities"},{"title":"worker","sidebarTitle":"worker","href":"/integrations/prefect-kubernetes/api-ref/prefect_kubernetes-worker"}]}]},{"group":"Ray","pages":[{"title":"prefect-ray","href":"/integrations/prefect-ray/index"},{"group":"SDK Reference","pages":[{"title":"context","sidebarTitle":"context","href":"/integrations/prefect-ray/api-ref/prefect_ray-context"},{"title":"task_runners","sidebarTitle":"task_runners","href":"/integrations/prefect-ray/api-ref/prefect_ray-task_runners"}]}]},{"group":"Redis","pages":[{"title":"prefect-redis","href":"/integrations/prefect-redis/index"},{"group":"SDK Reference","pages":[{"title":"blocks","sidebarTitle":"blocks","href":"/integrations/prefect-redis/api-ref/prefect_redis-blocks"},{"title":"cleanup_queue","sidebarTitle":"cleanup_queue","href":"/integrations/prefect-redis/api-ref/prefect_redis-cleanup_queue"},{"title":"client","sidebarTitle":"client","href":"/integrations/prefect-redis/api-ref/prefect_redis-client"},{"title":"connection","sidebarTitle":"connection","href":"/integrations/prefect-redis/api-ref/prefect_redis-connection"},{"title":"lease_storage","sidebarTitle":"lease_storage","href":"/integrations/prefect-redis/api-ref/prefect_redis-lease_storage"},{"title":"locking","sidebarTitle":"locking","href":"/integrations/prefect-redis/api-ref/prefect_redis-locking"},{"title":"messaging","sidebarTitle":"messaging","href":"/integrations/prefect-redis/api-ref/prefect_redis-messaging"},{"title":"ordering","sidebarTitle":"ordering","href":"/integrations/prefect-redis/api-ref/prefect_redis-ordering"},{"title":"tasks","sidebarTitle":"tasks","href":"/integrations/prefect-redis/api-ref/prefect_redis-tasks"}]}]},{"group":"Shell","pages":[{"title":"prefect-shell","href":"/integrations/prefect-shell/index"},{"group":"SDK Reference","pages":[{"title":"commands","sidebarTitle":"commands","href":"/integrations/prefect-shell/api-ref/prefect_shell-commands"}]}]},{"group":"Slack","pages":[{"title":"prefect-slack","href":"/integrations/prefect-slack/index"},{"group":"SDK Reference","pages":[{"title":"credentials","sidebarTitle":"credentials","href":"/integrations/prefect-slack/api-ref/prefect_slack-credentials"},{"title":"messages","sidebarTitle":"messages","href":"/integrations/prefect-slack/api-ref/prefect_slack-messages"}]}]},{"group":"Snowflake","pages":[{"title":"prefect-snowflake","href":"/integrations/prefect-snowflake/index"},{"group":"SDK Reference","pages":[{"title":"credentials","sidebarTitle":"credentials","href":"/integrations/prefect-snowflake/api-ref/prefect_snowflake-credentials"},{"title":"database","sidebarTitle":"database","href":"/integrations/prefect-snowflake/api-ref/prefect_snowflake-database"}]}]},{"group":"SQLAlchemy","pages":[{"title":"prefect-sqlalchemy","href":"/integrations/prefect-sqlalchemy/index"},{"group":"SDK Reference","pages":[{"title":"credentials","sidebarTitle":"credentials","href":"/integrations/prefect-sqlalchemy/api-ref/prefect_sqlalchemy-credentials"},{"title":"database","sidebarTitle":"database","href":"/integrations/prefect-sqlalchemy/api-ref/prefect_sqlalchemy-database"}]}]}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/v3/api-ref"}]},{"tab":"Contribute","pages":[{"title":"Contribute","href":"/contribute"}]},{"tab":"Release Notes","pages":[{"title":"Release Notes","href":"/v3/release-notes"}]}]},"basePath":"","title":"prefect-kubernetes - Prefect","buildId":"dpl_ATnXPMW25DMPUr9VBw6kL6MfBt6T","deploymentId":"dpl_ATnXPMW25DMPUr9VBw6kL6MfBt6T","dynamics":[],"chunks":[]}