410 lines
2.2 MiB
Plaintext
410 lines
2.2 MiB
Plaintext
{"text": "Kubernetes includes a beta feature that lets an\nAPI Server\nproxy resource requests to other _peer_ API servers. It also lets clients get\na holistic view of resources served across the entire cluster through discovery.\nThis is useful when there are multiple\nAPI servers running different versions of Kubernetes in one cluster\n(for example, during a long-lived rollout to a new release of Kubernetes).\n\nThis enables cluster administrators to configure highly available clusters that can be upgraded\nmore safely, by :\n\n1. ensuring that controllers relying on discovery to show a comprehensive list of resources\nfor important tasks always get the complete view of all resources. We call this complete cluster-wide\ndiscovery _Peer-aggregated discovery_.\n1. directing resource requests (made during the upgrade) to the correct kube-apiserver.\nThis proxying prevents users from seeing unexpected 404 Not Found errors that stem\nfrom the upgrade process. This mechanism is called the _Mixed Version Proxy_.\n\n## Enabling Peer-aggregated Discovery and Mixed Version Proxy\n\nEnsure that `UnknownVersionInteroperabilityProxy` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/#UnknownVersionInteroperabilityProxy)\nis enabled when you start the API Server:\n\n```shell\nkube-apiserver \\\n--feature-gates=UnknownVersionInteroperabilityProxy=true \\\n# required command line arguments for this feature\n--peer-ca-file=\n--proxy-client-cert-file= ,\n--proxy-client-key-file= ,\n--requestheader-client-ca-file= ,\n# requestheader-allowed-names can be set to blank to allow any Common Name\n--requestheader-allowed-names= ,\n\n# optional flags for this feature\n--peer-advertise-ip=`IP of this kube-apiserver that should be used by peers to proxy requests`\n--peer-advertise-port=`port of this kube-apiserver that should be used by peers to proxy requests`\n\n# …and other flags as usual\n```\n\n### Proxy transport and authentication between API servers {#transport-and-authn}\n\n* The source kube-apiserver reuses the\n[existing APIserver client authentication flags](/docs/tasks/extend-kubernetes/configure-aggregation-layer/#kubernetes-apiserver-client-authentication)\n`--proxy-client-cert-file` and `--proxy-client-key-file` to present its identity that\nwill be verified by its peer (the destination kube-apiserver). The destination API server\nverifies that peer connection based on the configuration you specify using the\n`--requestheader-client-ca-file` command line argument.\n\n* To authenticate the destination server's serving certs, you must configure a certificate\nauthority bundle by specifying the `--peer-ca-file` command line argument to the **source** API server.\n\n### Configuration for peer API server connectivity\n\nTo set the network location of a kube-apiserver that peers will use to proxy requests, use the\n`--peer-advertise-ip` and `--peer-advertise-port` command line arguments to kube-apiserver or specify\nthese fields in the API server configuration file.\nIf these flags are unspecified, peers will use the value from either `--advertise-address` or\n`--bind-address` command line argument to the kube-apiserver.\nIf those too, are unset, the host's default interface is used.\n\n## Peer-aggregated discovery\n\nWhen you enable the feature, discovery requests are automatically enabled to serve\na comprehensive discovery document (listing all resources served by any apiserver in the cluster)\nby default.\n\nIf you would like to request\na non peer-aggregated discovery document, you can indicate so by adding the following Accept header to the discovery request:\n\n```\napplication/json;g=apidiscovery.k8s.io;v=v2;as=APIGroupDiscoveryList;profile=nopeer\n```\n\nPeer-aggregated discovery is only supported\nfor [Aggregated Discovery](/docs/concepts/overview/kubernetes-api/#aggregated-discovery) requests\nto the `/apis` endpoint and not for [Unaggregated (Legacy) Discovery](/docs/concepts/overview/kubernetes-api/#unaggregated-discovery) requests.\n\n## Mixed version proxying\n\nWhen you enable mixed version proxying, the [aggregation layer](/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/)\nloads a special filter that does the following:\n\n* When a resource request reaches an API server that cannot serve that API\n(either because it is at a version pre-dating the introduction of the API or the API is turned off on the API server)\nthe API server attempts to send the request to a peer API server that can serve the requested API.\nIt does so by identifying API groups / versions / resources that the local server doesn't recognise,\nand tries to proxy those requests to a peer API server that is capable of handling the request.\n* If the peer API server fails to respond, the _source_ API server responds with 503 (\"Service Unavailable\") error.\n\n### How it works under the hood\n\nWhen an API Server receives a resource request, it first checks which API servers can\nserve the requested resource. This check happens using the non peer-aggregated discovery document.\n\n* If the resource is listed in the non peer-aggregated discovery document retrieved from the API server that received the request(for example, `GET /api/v1/pods/some-pod`), the request is handled locally.\n\n* If the resource in a request (for example, `GET /apis/resource.k8s.io/v1beta1/resourceclaims`) is not found in the non peer-aggregated discovery document retrieved from the API server trying to handle the request (the _handling API server_), likely because the `resource.k8s.io/v1beta1` API was introduced in a newer Kubernetes version and the _handling API server_ is running an older version that does not support it, then the _handling API server_ fetches the peer API servers that do serve the relevant API group / version / resource (`resource.k8s.io/v1beta1/resourceclaims` in this case) by checking the non peer-aggregated discovery documents from all peer API servers. The _handling API server_ then proxies the request to one of the matching peer kube-apiservers that are aware of the requested resource.\n\n* If there is no peer known for that API group / version / resource, the handling API server\npasses the request to its own handler chain which should eventually return a 404 (\"Not Found\") response.\n\n* If the handling API server has identified and selected a peer API server, but that peer fails\nto respond (for reasons such as network connectivity issues, or a data race between the request\nbeing received and a controller registering the peer's info into the control plane), then the handling\nAPI server responds with a 503 (\"Service Unavailable\") error.", "source": "content/en/docs/concepts/architecture/mixed-version-proxy.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page provides good practices and considerations when designing\n_admission webhooks_ in Kubernetes. This information is intended for\ncluster operators who run admission webhook servers or third-party applications\nthat modify or validate your API requests.\n\nBefore reading this page, ensure that you're familiar with the following\nconcepts:\n\n* [Admission controllers](/docs/reference/access-authn-authz/admission-controllers/)\n* [Admission webhooks](/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks)\n\n## Importance of good webhook design {#why-good-webhook-design-matters}\n\nAdmission control occurs when any create, update, or delete request\nis sent to the Kubernetes API. Admission controllers intercept requests that\nmatch specific criteria that you define. These requests are then sent to\nmutating admission webhooks or validating admission webhooks. These webhooks are\noften written to ensure that specific fields in object specifications exist or\nhave specific allowed values.\n\nWebhooks are a powerful mechanism to extend the Kubernetes API. Badly-designed\nwebhooks often result in workload disruptions because of how much control\nthe webhooks have over objects in the cluster. Like other API extension\nmechanisms, webhooks are challenging to test at scale for compatibility with\nall of your workloads, other webhooks, add-ons, and plugins.\n\nAdditionally, with every release, Kubernetes adds or modifies the API with new\nfeatures, feature promotions to beta or stable status, and deprecations. Even\nstable Kubernetes APIs are likely to change. For example, the `Pod` API changed\nin v1.29 to add the\n[Sidecar containers](/docs/concepts/workloads/pods/sidecar-containers/) feature.\nWhile it's rare for a Kubernetes object to enter a broken state because of a new\nKubernetes API, webhooks that worked as expected with earlier versions of an API\nmight not be able to reconcile more recent changes to that API. This can result\nin unexpected behavior after you upgrade your clusters to newer versions.\n\nThis page describes common webhook failure scenarios and how to avoid them by\ncautiously and thoughtfully designing and implementing your webhooks.\n\n## Identify whether you use admission webhooks {#identify-admission-webhooks}\n\nEven if you don't run your own admission webhooks, some third-party applications\nthat you run in your clusters might use mutating or validating admission\nwebhooks.\n\nTo check whether your cluster has any mutating admission webhooks, run the\nfollowing command:\n\n```shell\nkubectl get mutatingwebhookconfigurations\n```\nThe output lists any mutating admission controllers in the cluster.\n\nTo check whether your cluster has any validating admission webhooks, run the\nfollowing command:\n\n```shell\nkubectl get validatingwebhookconfigurations\n```\nThe output lists any validating admission controllers in the cluster.\n\n## Choose an admission control mechanism {#choose-admission-mechanism}\n\nKubernetes includes multiple admission control and policy enforcement options.\nKnowing when to use a specific option can help you to improve latency and\nperformance, reduce management overhead, and avoid issues during version\nupgrades. The following table describes the mechanisms that let you mutate or\nvalidate resources during admission:\n\nMutating and validating admission control in Kubernetes\n\nMechanism\nDescription\nUse cases\n\nMutating admission webhook\nIntercept API requests before admission and modify as needed using\ncustom logic.\n\nMake critical modifications that must happen before resource\nadmission.\nMake complex modifications that require advanced logic, like calling\nexternal APIs.\n\nMutating admission policy\nIntercept API requests before admission and modify as needed using\nCommon Expression Language (CEL) expressions.\n\nMake critical modifications that must happen before resource\nadmission.\nMake simple modifications, such as adjusting labels or replica\ncounts.\n\nValidating admission webhook\nIntercept API requests before admission and validate against complex\npolicy declarations.\n\nValidate critical configurations before resource admission.\nEnforce complex policy logic before admission.\n\nValidating admission policy\nIntercept API requests before admission and validate against CEL\nexpressions.\n\nValidate critical configurations before resource admission.\nEnforce policy logic using CEL expressions.\n\nIn general, use _webhook_ admission control when you want an extensible way to\ndeclare or configure the logic. Use built-in CEL-based admission control when\nyou want to declare simpler logic without the overhead of running a webhook\nserver. The Kubernetes project recommends that you use CEL-based admission\ncontrol when possible.\n\n### Use built-in validation and defaulting for CustomResourceDefinitions {#no-crd-validation-defaulting}\n\nIf you use\nCustomResourceDefinitions,\ndon't use admission webhooks to validate values in CustomResource specifications\nor to set default values for fields. Kubernetes lets you define validation rules\nand default field values when you create CustomResourceDefinitions.\n\nTo learn more, see the following resources:\n\n* [Validation rules](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation-rules)\n* [Defaulting](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#defaulting)\n\n## Performance and latency {#performance-latency}\n\nThis section describes recommendations for improving performance and reducing\nlatency. In summary, these are as follows:\n\n* Consolidate webhooks and limit the number of API calls per webhook.\n* Use audit logs to check for webhooks that repeatedly do the same action.\n* Use load balancing for webhook availability.\n* Set a small timeout value for each webhook.\n* Consider cluster availability needs during webhook design.\n\n### Design admission webhooks for low latency {#design-admission-webhooks-low-latency}\n\nMutating admission webhooks are called in sequence. Depending on the mutating\nwebhook setup, some webhooks might be called multiple times. Every mutating\nwebhook call adds latency to the admission process. This is unlike validating\nwebhooks, which get called in parallel.\n\nWhen designing your mutating webhooks, consider your latency requirements and\ntolerance. The more mutating webhooks there are in your cluster, the greater the\nchance of latency increases.\n\nConsider the following to reduce latency:\n\n* Consolidate webhooks that perform a similar mutation on different objects.\n* Reduce the number of API calls made in the mutating webhook server logic.\n* Limit the match conditions of each mutating webhook to reduce how many\nwebhooks are triggered by a specific API request.\n* Consolidate small webhooks into one server and configuration to help with\nordering and organization.\n\n### Prevent loops caused by competing controllers {#prevent-loops-competing-controllers}\n\nConsider any other components that run in your cluster that might conflict with\nthe mutations that your webhook makes. For example, if your webhook adds a label\nthat a different controller removes, your webhook gets called again. This leads\nto a loop.\n\nTo detect these loops, try the following:\n\n1. Update your cluster audit policy to log audit events. Use the following\nparameters:\n\n* `level`: `RequestResponse`\n* `verbs`: `[\"patch\"]`\n* `omitStages`: `RequestReceived`\n\nSet the audit rule to create events for the specific resources that your\nwebhook mutates.\n\n1. Check your audit events for webhooks being reinvoked multiple times with the\nsame patch being applied to the same object, or for an object having\na field updated and reverted multiple times.\n\n### Set a small timeout value {#small-timeout}\n\nAdmission webhooks should evaluate as quickly as possible (typically in\nmilliseconds), since they add to API request latency. Use a small timeout for\nwebhooks.\n\nFor details, see\n[Timeouts](/docs/reference/access-authn-authz/extensible-admission-controllers/#timeouts).\n\n### Use a load balancer to ensure webhook availability {#load-balancer-webhook}\n\nAdmission webhooks should leverage some form of load-balancing to provide high\navailability and performance benefits. If a webhook is running within the\ncluster, you can run multiple webhook backends behind a Service of type\n`ClusterIP`.\n\n### Use a high-availability deployment model {#ha-deployment}\n\nConsider your cluster's availability requirements when designing your webhook.\nFor example, during node downtime or zonal outages, Kubernetes marks Pods as\n`NotReady` to allow load balancers to reroute traffic to available zones and\nnodes. These updates to Pods might trigger your mutating webhooks. Depending on\nthe number of affected Pods, the mutating webhook server has a risk of timing\nout or causing delays in Pod processing. As a result, traffic won't get\nrerouted as quickly as you need.\n\nConsider situations like the preceding example when writing your webhooks.\nExclude operations that are a result of Kubernetes responding to unavoidable\nincidents.\n\n## Request filtering {#request-filtering}\n\nThis section provides recommendations for filtering which requests trigger\nspecific webhooks. In summary, these are as follows:\n\n* Limit the webhook scope to avoid system components and read-only requests.\n* Limit webhooks to specific namespaces.\n* Use match conditions to perform fine-grained request filtering.\n* Match all versions of an object.\n\n### Limit the scope of each webhook {#webhook-limit-scope}\n\nAdmission webhooks are only called when an API request matches the corresponding\nwebhook configuration. Limit the scope of each webhook to reduce unnecessary\ncalls to the webhook server. Consider the following scope limitations:\n\n* Avoid matching objects in the `kube-system` namespace. If you run your own\nPods in the `kube-system` namespace, use an\n[`objectSelector`](/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-objectselector)\nto avoid mutating a critical workload.\n* Don't mutate node leases, which exist as Lease objects in the\n`kube-node-lease` system namespace. Mutating node leases might result in\nfailed node upgrades. Only apply validation controls to Lease objects in this\nnamespace if you're confident that the controls won't put your cluster at\nrisk.\n* Don't match TokenReview, SubjectAccessReview, or other\n[virtual authentication and authorization resources](/docs/reference/access-authn-authz/extensible-admission-controllers/#excluded-virtual-resources).\nThese are always read-only requests, and intercepting them might break your\ncluster. Starting with Kubernetes v1.37, admission webhooks are not called\nfor these resources by default.\n* Limit each webhook to a specific namespace by using a\n[`namespaceSelector`](/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-namespaceselector).\n\n### Filter for specific requests by using match conditions {#filter-match-conditions}\n\nAdmission controllers support multiple fields that you can use to match requests\nthat meet specific criteria. For example, you can use a `namespaceSelector` to\nfilter for requests that target a specific namespace.\n\nFor more fine-grained request filtering, use the `matchConditions` field in your\nwebhook configuration. This field lets you write multiple CEL expressions that\nmust evaluate to `true` for a request to trigger your admission webhook. Using\n`matchConditions` might significantly reduce the number of calls to your webhook\nserver.\n\nFor details, see\n[Matching requests: `matchConditions`](/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-matchconditions).\n\n### Match all versions of an API {#match-all-versions}\n\nBy default, admission webhooks run on any API versions that affect a specified\nresource. The `matchPolicy` field in the webhook configuration controls this\nbehavior. Specify a value of `Equivalent` in the `matchPolicy` field or omit\nthe field to allow the webhook to run on any API version.\n\nFor details, see\n[Matching requests: `matchPolicy`](/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-matchpolicy).\n\n## Mutation scope and field considerations {#mutation-scope-considerations}\n\nThis section provides recommendations for the scope of mutations and any special\nconsiderations for object fields. In summary, these are as follows:\n\n* Patch only the fields that you need to patch.\n* Don't overwrite array values.\n* Avoid side effects in mutations when possible.\n* Avoid self-mutations.\n* Fail open and validate the final state.\n* Plan for future field updates in later versions.\n* Prevent webhooks from self-triggering.\n* Don't change immutable objects.\n\n### Patch only required fields {#patch-required-fields}\n\nAdmission webhook servers send HTTP responses to indicate what to do with a\nspecific Kubernetes API request. This response is an AdmissionReview object.\nA mutating webhook can add specific fields to mutate before allowing admission\nby using the `patchType` field and the `patch` field in the response. Ensure\nthat you only modify the fields that require a change.\n\nFor example, consider a mutating webhook that's configured to ensure that\n`web-server` Deployments have at least three replicas. When a request to\ncreate a Deployment object matches your webhook configuration, the webhook\nshould only update the value in the `spec.replicas` field.\n\n### Don't overwrite array values {#dont-overwrite-arrays}\n\nFields in Kubernetes object specifications might include arrays. Some arrays\ncontain key:value pairs (like the `envVar` field in a container specification),\nwhile other arrays are unkeyed (like the `readinessGates` field in a Pod\nspecification). The order of values in an array field might matter in some\nsituations. For example, the order of arguments in the `args` field of a\ncontainer specification might affect the container.\n\nConsider the following when modifying arrays:\n\n* Whenever possible, use the `add` JSONPatch operation instead of `replace` to\navoid accidentally replacing a required value.\n* Treat arrays that don't use key:value pairs as sets.\n* Ensure that the values in the field that you modify aren't required to be\nin a specific order.\n* Don't overwrite existing key:value pairs unless absolutely necessary.\n* Use caution when modifying label fields. An accidental modification might\ncause label selectors to break, resulting in unintended behavior.\n\n### Avoid side effects {#avoid-side-effects}\n\nEnsure that your webhooks operate only on the content of the AdmissionReview\nthat's sent to them, and do not make out-of-band changes. These additional\nchanges, called _side effects_, might cause conflicts during admission if they\naren't reconciled properly. The `.webhooks[].sideEffects` field should\nbe set to `None` if a webhook doesn't have any side effect.\n\nIf side effects are required during the admission evaluation, they must be\nsuppressed when processing an AdmissionReview object with `dryRun` set to\n`true`, and the `.webhooks[].sideEffects` field should be set to `NoneOnDryRun`.\n\nFor details, see\n[Side effects](/docs/reference/access-authn-authz/extensible-admission-controllers/#side-effects).\n\n### Avoid self-mutations {#avoid-self-mutation}\n\nA webhook running inside the cluster might cause deadlocks for its own\ndeployment if it is configured to intercept resources required to start its own\nPods.\n\nFor example, a mutating admission webhook is configured to admit **create** Pod\nrequests only if a certain label is set in the Pod (such as `env: prod`).\nThe webhook server runs in a Deployment that doesn't set the `env` label.\n\nWhen a node that runs the webhook server Pods becomes unhealthy, the webhook\nDeployment tries to reschedule the Pods to another node. However, the existing\nwebhook server rejects the requests since the `env` label is unset. As a\nresult, the migration cannot happen.\n\nExclude the namespace where your webhook is running with a\n[`namespaceSelector`](/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-namespaceselector).\n\n### Avoid dependency loops {#avoid-dependency-loops}\n\nDependency loops can occur in scenarios like the following:\n\n* Two webhooks check each other's Pods. If both webhooks become unavailable\nat the same time, neither webhook can start.\n* Your webhook intercepts cluster add-on components, such as networking plugins\nor storage plugins, that your webhook depends on. If both the webhook and the\ndependent add-on become unavailable, neither component can function.\n\nTo avoid these dependency loops, try the following:\n\n* Use\n[ValidatingAdmissionPolicies](/docs/reference/access-authn-authz/validating-admission-policy/)\nto avoid introducing dependencies.\n* Prevent webhooks from validating or mutating other webhooks. Consider\n[excluding specific namespaces](/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-namespaceselector)\nfrom triggering your webhook.\n* Prevent your webhooks from acting on dependent add-ons by using an\n[`objectSelector`](/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-objectselector).\n\n### Fail open and validate the final state {#fail-open-validate-final-state}\n\nMutating admission webhooks support the `failurePolicy` configuration field.\nThis field indicates whether the API server should admit or reject the request\nif the webhook fails. Webhook failures might occur because of timeouts or errors\nin the server logic.\n\nBy default, admission webhooks set the `failurePolicy` field to Fail. The API\nserver rejects a request if the webhook fails. However, rejecting requests by\ndefault might result in compliant requests being rejected during webhook\ndowntime.\n\nLet your mutating webhooks \"fail open\" by setting the `failurePolicy` field to\nIgnore. Use a validating controller to check the state of requests to ensure\nthat they comply with your policies.\n\nThis approach has the following benefits:\n\n* Mutating webhook downtime doesn't affect compliant resources from deploying.\n* Policy enforcement occurs during validating admission control.\n* Mutating webhooks don't interfere with other controllers in the cluster.\n\n### Plan for future updates to fields {#plan-future-field-updates}\n\nIn general, design your webhooks under the assumption that Kubernetes APIs might\nchange in a later version. Don't write a server that takes the stability of an\nAPI for granted. For example, the release of sidecar containers in Kubernetes\nadded a `restartPolicy` field to the Pod API.\n\n### Prevent your webhook from triggering itself {#prevent-webhook-self-trigger}\n\nMutating webhooks that respond to a broad range of API requests might\nunintentionally trigger themselves. For example, consider a webhook that\nresponds to all requests in the cluster. If you configure the webhook to create\nEvent objects for every mutation, it'll respond to its own Event object\ncreation requests.\n\nTo avoid this, consider setting a unique label in any resources that your\nwebhook creates. Exclude this label from your webhook match conditions.\n\n### Don't change immutable objects {#dont-change-immutable-objects}\n\nSome Kubernetes objects in the API server can't change. For example, when you\ndeploy a static Pod, the\nkubelet on the node creates a\nmirror Pod in the API\nserver to track the static Pod. However, changes to the mirror Pod don't\npropagate to the static Pod.\n\nDon't attempt to mutate these objects during admission. All mirror Pods have the\n`kubernetes.io/config.mirror` annotation. To exclude mirror Pods while reducing\nthe security risk of ignoring an annotation, allow static Pods to only run in\nspecific namespaces.\n\n## Mutating webhook ordering and idempotence {#ordering-idempotence}\n\nThis section provides recommendations for webhook order and designing idempotent\nwebhooks. In summary, these are as follows:\n\n* Don't rely on a specific order of execution.\n* Validate mutations before admission.\n* Check for mutations being overwritten by other controllers.\n* Ensure that the set of mutating webhooks is idempotent, not just the\nindividual webhooks.\n\n### Don't rely on mutating webhook invocation order {#dont-rely-webhook-order}\n\nMutating admission webhooks don't run in a consistent order. Various factors\nmight change when a specific webhook is called. Don't rely on your webhook\nrunning at a specific point in the admission process. Other webhooks could still\nmutate your modified object.\n\nThe following recommendations might help to minimize the risk of unintended\nchanges:\n\n* [Validate mutations before admission](#validate-mutations)\n* Use a reinvocation policy to observe changes to an object by other plugins\nand re-run the webhook as needed. For details, see\n[Reinvocation policy](/docs/reference/access-authn-authz/extensible-admission-controllers/#reinvocation-policy).\n\n### Ensure that the mutating webhooks in your cluster are idempotent {#ensure-mutating-webhook-idempotent}\n\nEvery mutating admission webhook should be _idempotent_. The webhook should be\nable to run on an object that it already modified without making additional\nchanges beyond the original change.\n\nAdditionally, all of the mutating webhooks in your cluster should, as a\ncollection, be idempotent. After the mutation phase of admission control ends,\nevery individual mutating webhook should be able to run on an object without\nmaking additional changes to the object.\n\nDepending on your environment, ensuring idempotence at scale might be\nchallenging. The following recommendations might help:\n\n* Use validating admission controllers to verify the final state of\ncritical workloads.\n* Test your deployments in a staging cluster to see if any objects get modified\nmultiple times by the same webhook.\n* Ensure that the scope of each mutating webhook is specific and limited.\n\nThe following examples show idempotent mutation logic:\n\n1. For a **create** Pod request, set the field\n`.spec.securityContext.runAsNonRoot` of the Pod to true.\n\n1. For a **create** Pod request, if the field\n`.spec.containers[].resources.limits` of a container is not set, set default\nresource limits.\n\n1. For a **create** Pod request, inject a sidecar container with name\n`foo-sidecar` if no container with the name `foo-sidecar` already exists.\n\nIn these cases, the webhook can be safely reinvoked, or admit an object that\nalready has the fields set.\n\nThe following examples show non-idempotent mutation logic:\n\n1. For a **create** Pod request, inject a sidecar container with name\n`foo-sidecar` suffixed with the current timestamp (such as\n`foo-sidecar-19700101-000000`).\n\nReinvoking the webhook can result in the same sidecar being injected multiple\ntimes to a Pod, each time with a different container name. Similarly, the\nwebhook can inject duplicated containers if the sidecar already exists in\na user-provided pod.\n\n1. For a **create**/**update** Pod request, reject if the Pod has label `env`\nset, otherwise add an `env: prod` label to the Pod.\n\nReinvoking the webhook will result in the webhook failing on its own output.\n\n1. For a **create** Pod request, append a sidecar container named `foo-sidecar`\nwithout checking whether a `foo-sidecar` container exists.\n\nReinvoking the webhook will result in duplicated containers in the Pod, which\nmakes the request invalid and rejected by the API server.\n\n## Mutation testing and validation {#mutation-testing-validation}\n\nThis section provides recommendations for testing your mutating webhooks and\nvalidating mutated objects. In summary, these are as follows:\n\n* Test webhooks in staging environments.\n* Avoid mutations that violate validations.\n* Test minor version upgrades for regressions and conflicts.\n* Validate mutated objects before admission.\n\n### Test webhooks in staging environments {#test-in-staging-environments}\n\nRobust testing should be a core part of your release cycle for new or updated\nwebhooks. If possible, test any changes to your cluster webhooks in a staging\nenvironment that closely resembles your production clusters. At the very least,\nconsider using a tool like [minikube](https://minikube.sigs.k8s.io/docs/) or\n[kind](https://kind.sigs.k8s.io/) to create a small test cluster for webhook\nchanges.\n\n### Ensure that mutations don't violate validations {#ensure-mutations-dont-violate-validations}\n\nYour mutating webhooks shouldn't break any of the validations that apply to an\nobject before admission. For example, consider a mutating webhook that sets the\ndefault CPU request of a Pod to a specific value. If the CPU limit of that Pod\nis set to a lower value than the mutated request, the Pod fails admission.\n\nTest every mutating webhook against the validations that run in your cluster.\n\n### Test minor version upgrades to ensure consistent behavior {#test-minor-version-upgrades}\n\nBefore upgrading your production clusters to a new minor version, test your\nwebhooks and workloads in a staging environment. Compare the results to ensure\nthat your webhooks continue to function as expected after the upgrade.\n\nAdditionally, use the following resources to stay informed about API changes:\n\n* [Kubernetes release notes](/releases/)\n* [Kubernetes blog](/blog/)\n\n### Validate mutations before admission {#validate-mutations}\n\nMutating webhooks run to completion before any validating webhooks run. There is\nno stable order in which mutations are applied to objects. As a result, your\nmutations could get overwritten by a mutating webhook that runs at a later time.\n\nAdd a validating admission controller like a ValidatingAdmissionWebhook or a\nValidatingAdmissionPolicy to your cluster to ensure that your mutations\nare still present. For example, consider a mutating webhook that inserts the\n`restartPolicy: Always` field to specific init containers to make them run as\nsidecar containers. You could run a validating webhook to ensure that those\ninit containers retained the `restartPolicy: Always` configuration after all\nmutations were completed.\n\nFor details, see the following resources:\n\n* [Validating Admission Policy](/docs/reference/access-authn-authz/validating-admission-policy/)\n* [ValidatingAdmissionWebhooks](/docs/reference/access-authn-authz/admission-controllers/#validatingadmissionwebhook)\n\n## Mutating webhook deployment {#mutating-webhook-deployment}\n\nThis section provides recommendations for deploying your mutating admission\nwebhooks. In summary, these are as follows:\n\n* Gradually roll out the webhook configuration and monitor for issues by\nnamespace.\n* Limit access to edit the webhook configuration resources.\n* Limit access to the namespace that runs the webhook server, if the server is\nin-cluster.\n\n### Install and enable a mutating webhook {#install-enable-mutating-webhook}\n\nWhen you're ready to deploy your mutating webhook to a cluster, use the\nfollowing order of operations:\n\n1. Install the webhook server and start it.\n1. Set the `failurePolicy` field in the MutatingWebhookConfiguration manifest\nto Ignore. This lets you avoid disruptions caused by misconfigured webhooks.\n1. Set the `namespaceSelector` field in the MutatingWebhookConfiguration\nmanifest to a test namespace.\n1. Deploy the MutatingWebhookConfiguration to your cluster.\n\nMonitor the webhook in the test namespace to check for any issues, then roll the\nwebhook out to other namespaces. If the webhook intercepts an API request that\nit wasn't meant to intercept, pause the rollout and adjust the scope of the\nwebhook configuration.\n\n### Limit edit access to mutating webhooks {#limit-edit-access}\n\nMutating webhooks are powerful Kubernetes controllers. Use RBAC or another\nauthorization mechanism to limit access to your webhook configurations and\nservers. For RBAC, ensure that the following access is only available to trusted\nentities:\n\n* Verbs: **create**, **update**, **patch**, **delete**, **deletecollection**\n* API group: `admissionregistration.k8s.io/v1`\n* API kind: MutatingWebhookConfigurations\n\nIf your mutating webhook server runs in the cluster, limit access to create or\nmodify any resources in that namespace.\n\n## Examples of good implementations {#example-good-implementations}\n\nThe following projects are examples of \"good\" custom webhook server\nimplementations. You can use them as a starting point when designing your own\nwebhooks. Don't use these examples as-is; use them as a starting point and\ndesign your webhooks to run well in your specific environment.\n\n* [`cert-manager`](https://github.com/cert-manager/cert-manager/tree/master/internal/webhook)\n* [Gatekeeper Open Policy Agent (OPA)](https://open-policy-agent.github.io/gatekeeper/website/docs/mutation)\n\n##\n\n* [Use webhooks for authentication and authorization](/docs/reference/access-authn-authz/webhook/)\n* [Learn about MutatingAdmissionPolicies](/docs/reference/access-authn-authz/mutating-admission-policy/)\n* [Learn about ValidatingAdmissionPolicies](/docs/reference/access-authn-authz/validating-admission-policy/)", "source": "content/en/docs/concepts/cluster-administration/admission-webhooks-good-practices.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Controlling the behavior of the Kubernetes API server in an overload situation\nis a key task for cluster administrators. The kube-apiserver has some controls available\n(i.e. the `--max-requests-inflight` and `--max-mutating-requests-inflight`\ncommand-line flags) to limit the amount of outstanding work that will be\naccepted, preventing a flood of inbound requests from overloading and\npotentially crashing the API server, but these flags are not enough to ensure\nthat the most important requests get through in a period of high traffic.\n\nThe API Priority and Fairness feature (APF) is an alternative that improves upon\naforementioned max-inflight limitations. APF classifies\nand isolates requests in a more fine-grained way. It also introduces\na limited amount of queuing, so that no requests are rejected in cases\nof very brief bursts. Requests are dispatched from queues using a\nfair queuing technique so that, for example, a poorly-behaved\ncontroller need not\nstarve others (even at the same priority level).\n\nThis feature is designed to work well with standard controllers, which\nuse informers and react to failures of API requests with exponential\nback-off, and other clients that also work this way.\n\nSome requests classified as \"long-running\"—such as remote\ncommand execution or log tailing—are not subject to the API\nPriority and Fairness filter. This is also true for the\n`--max-requests-inflight` flag without the API Priority and Fairness\nfeature enabled. API Priority and Fairness _does_ apply to **watch**\nrequests. When API Priority and Fairness is disabled, **watch** requests\nare not subject to the `--max-requests-inflight` limit.\n\n## Enabling/Disabling API Priority and Fairness\n\nThe API Priority and Fairness feature is controlled by a command-line flag\nand is enabled by default. See\n[Options](/docs/reference/command-line-tools-reference/kube-apiserver/#options)\nfor a general explanation of the available kube-apiserver command-line\noptions and how to enable and disable them. The name of the\ncommand-line option for APF is \"--enable-priority-and-fairness\". This feature\nalso involves an API Group\nwith: (a) a stable `v1` version, introduced in 1.29, and\nenabled by default (b) a `v1beta3` version, enabled by default, and\ndeprecated in v1.29. You can\ndisable the API group beta version `v1beta3` by adding the\nfollowing command-line flags to your `kube-apiserver` invocation:\n\n```shell\nkube-apiserver \\\n--runtime-config=flowcontrol.apiserver.k8s.io/v1beta3=false \\\n# …and other flags as usual\n```\n\nThe command-line flag `--enable-priority-and-fairness=false` will disable the\nAPI Priority and Fairness feature.\n\n## Recursive server scenarios\n\nAPI Priority and Fairness must be used carefully in recursive server\nscenarios. These are scenarios in which some server A, while serving\na request, issues a subsidiary request to some server B. Perhaps\nserver B might even make a further subsidiary call back to server\nA. In situations where Priority and Fairness control is applied to\nboth the original request and some subsidiary ones(s), no matter how\ndeep in the recursion, there is a danger of priority inversions and/or\ndeadlocks.\n\nOne example of recursion is when the `kube-apiserver` issues an\nadmission webhook call to server B, and while serving that call,\nserver B makes a further subsidiary request back to the\n`kube-apiserver`. Another example of recursion is when an `APIService`\nobject directs the `kube-apiserver` to delegate requests about a\ncertain API group to a custom external server B (this is one of the\nthings called \"aggregation\").\n\nWhen the original request is known to belong to a certain priority\nlevel, and the subsidiary controlled requests are classified to higher\npriority levels, this is one possible solution. When the original\nrequests can belong to any priority level, the subsidiary controlled\nrequests have to be exempt from Priority and Fairness limitation. One\nway to do that is with the objects that configure classification and\nhandling, discussed below. Another way is to disable Priority and\nFairness on server B entirely, using the techniques discussed above. A\nthird way, which is the simplest to use when server B is not\n`kube-apiserver`, is to build server B with Priority and Fairness\ndisabled in the code.\n\n## Concepts\n\nThere are several distinct features involved in the API Priority and Fairness\nfeature. Incoming requests are classified by attributes of the request using\n_FlowSchemas_, and assigned to priority levels. Priority levels add a degree of\nisolation by maintaining separate concurrency limits, so that requests assigned\nto different priority levels cannot starve each other. Within a priority level,\na fair-queuing algorithm prevents requests from different _flows_ from starving\neach other, and allows for requests to be queued to prevent bursty traffic from\ncausing failed requests when the average load is acceptably low.\n\n### Priority Levels\n\nWithout APF enabled, overall concurrency in the API server is limited by the\n`kube-apiserver` flags `--max-requests-inflight` and\n`--max-mutating-requests-inflight`. With APF enabled, the concurrency limits\ndefined by these flags are summed and then the sum is divided up among a\nconfigurable set of _priority levels_. Each incoming request is assigned to a\nsingle priority level, and each priority level will only dispatch as many\nconcurrent requests as its particular limit allows.\n\nThe default configuration, for example, includes separate priority levels for\nleader-election requests, requests from built-in controllers, and requests from\nPods. This means that an ill-behaved Pod that floods the API server with\nrequests cannot prevent leader election or actions by the built-in controllers\nfrom succeeding.\n\nThe concurrency limits of the priority levels are periodically\nadjusted, allowing under-utilized priority levels to temporarily lend\nconcurrency to heavily-utilized levels. These limits are based on\nnominal limits and bounds on how much concurrency a priority level may\nlend and how much it may borrow, all derived from the configuration\nobjects mentioned below.\n\n### Seats Occupied by a Request\n\nThe above description of concurrency management is the baseline story.\nRequests have different durations but are counted equally at any given\nmoment when comparing against a priority level's concurrency limit. In\nthe baseline story, each request occupies one unit of concurrency. The\nword \"seat\" is used to mean one unit of concurrency, inspired by the\nway each passenger on a train or aircraft takes up one of the fixed\nsupply of seats.\n\nBut some requests take up more than one seat. Some of these are **list**\nrequests that the server estimates will return a large number of\nobjects. These have been found to put an exceptionally heavy burden\non the server. For this reason, the server estimates the number of objects\nthat will be returned and considers the request to take a number of seats\nthat is proportional to that estimated number.\n\n### Execution time tweaks for watch requests\n\nAPI Priority and Fairness manages **watch** requests, but this involves a\ncouple more excursions from the baseline behavior. The first concerns\nhow long a **watch** request is considered to occupy its seat. Depending\non request parameters, the response to a **watch** request may or may not\nbegin with **create** notifications for all the relevant pre-existing\nobjects. API Priority and Fairness considers a **watch** request to be\ndone with its seat once that initial burst of notifications, if any,\nis over.\n\nThe normal notifications are sent in a concurrent burst to all\nrelevant **watch** response streams whenever the server is notified of an\nobject create/update/delete. To account for this work, API Priority\nand Fairness considers every write request to spend some additional\ntime occupying seats after the actual writing is done. The server\nestimates the number of notifications to be sent and adjusts the write\nrequest's number of seats and seat occupancy time to include this\nextra work.\n\n### Queuing\n\nEven within a priority level there may be a large number of distinct sources of\ntraffic. In an overload situation, it is valuable to prevent one stream of\nrequests from starving others (in particular, in the relatively common case of a\nsingle buggy client flooding the kube-apiserver with requests, that buggy client\nwould ideally not have much measurable impact on other clients at all). This is\nhandled by use of a fair-queuing algorithm to process requests that are assigned\nthe same priority level. Each request is assigned to a _flow_, identified by the\nname of the matching FlowSchema plus a _flow distinguisher_ — which\nis either the requesting user, the target resource's namespace, or nothing — and the\nsystem attempts to give approximately equal weight to requests in different\nflows of the same priority level.\nTo enable distinct handling of distinct instances, controllers that have\nmany instances should authenticate with distinct usernames\n\nAfter classifying a request into a flow, the API Priority and Fairness\nfeature then may assign the request to a queue. This assignment uses\na technique known as shuffle sharding, which makes relatively efficient use of\nqueues to insulate low-intensity flows from high-intensity flows.\n\nThe details of the queuing algorithm are tunable for each priority level, and\nallow administrators to trade off memory use, fairness (the property that\nindependent flows will all make progress when total traffic exceeds capacity),\ntolerance for bursty traffic, and the added latency induced by queuing.\n\n### Exempt requests\n\nSome requests are considered sufficiently important that they are not subject to\nany of the limitations imposed by this feature. These exemptions prevent an\nimproperly-configured flow control configuration from totally disabling an API\nserver.\n\n## Resources\n\nThe flow control API involves two kinds of resources.\n[PriorityLevelConfigurations](/docs/reference/generated/kubernetes-api//#prioritylevelconfiguration-v1-flowcontrol-apiserver-k8s-io)\ndefine the available priority levels, the share of the available concurrency\nbudget that each can handle, and allow for fine-tuning queuing behavior.\n[FlowSchemas](/docs/reference/generated/kubernetes-api//#flowschema-v1-flowcontrol-apiserver-k8s-io)\nare used to classify individual inbound requests, matching each to a\nsingle PriorityLevelConfiguration.\n\n### PriorityLevelConfiguration\n\nA PriorityLevelConfiguration represents a single priority level. Each\nPriorityLevelConfiguration has an independent limit on the number of outstanding\nrequests, and limitations on the number of queued requests.\n\nThe nominal concurrency limit for a PriorityLevelConfiguration is not\nspecified in an absolute number of seats, but rather in \"nominal\nconcurrency shares.\" The total concurrency limit for the API Server is\ndistributed among the existing PriorityLevelConfigurations in\nproportion to these shares, to give each level its nominal limit in\nterms of seats. This allows a cluster administrator to scale up or\ndown the total amount of traffic to a server by restarting\n`kube-apiserver` with a different value for `--max-requests-inflight`\n(or `--max-mutating-requests-inflight`), and all\nPriorityLevelConfigurations will see their maximum allowed concurrency\ngo up (or down) by the same fraction.\n\nIn the versions before `v1beta3` the relevant\nPriorityLevelConfiguration field is named \"assured concurrency shares\"\nrather than \"nominal concurrency shares\". Also, in Kubernetes release\n1.25 and earlier there were no periodic adjustments: the\nnominal/assured limits were always applied without adjustment.\n\nThe bounds on how much concurrency a priority level may lend and how\nmuch it may borrow are expressed in the PriorityLevelConfiguration as\npercentages of the level's nominal limit. These are resolved to\nabsolute numbers of seats by multiplying with the nominal limit /\n100.0 and rounding. The dynamically adjusted concurrency limit of a\npriority level is constrained to lie between (a) a lower bound of its\nnominal limit minus its lendable seats and (b) an upper bound of its\nnominal limit plus the seats it may borrow. At each adjustment the\ndynamic limits are derived by each priority level reclaiming any lent\nseats for which demand recently appeared and then jointly fairly\nresponding to the recent seat demand on the priority levels, within\nthe bounds just described.\n\nWith the Priority and Fairness feature enabled, the total concurrency limit for\nthe server is set to the sum of `--max-requests-inflight` and\n`--max-mutating-requests-inflight`. There is no longer any distinction made\nbetween mutating and non-mutating requests; if you want to treat them\nseparately for a given resource, make separate FlowSchemas that match the\nmutating and non-mutating verbs respectively.\n\nWhen the volume of inbound requests assigned to a single\nPriorityLevelConfiguration is more than its permitted concurrency level, the\n`type` field of its specification determines what will happen to extra requests.\nA type of `Reject` means that excess traffic will immediately be rejected with\nan HTTP 429 (Too Many Requests) error. A type of `Queue` means that requests\nabove the threshold will be queued, with the shuffle sharding and fair queuing techniques used\nto balance progress between request flows.\n\nThe queuing configuration allows tuning the fair queuing algorithm for a\npriority level. Details of the algorithm can be read in the\n[enhancement proposal](https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/1040-priority-and-fairness), but in short:\n\n* Increasing `queues` reduces the rate of collisions between different flows, at\nthe cost of increased memory usage. A value of 1 here effectively disables the\nfair-queuing logic, but still allows requests to be queued.\n\n* Increasing `queueLengthLimit` allows larger bursts of traffic to be\nsustained without dropping any requests, at the cost of increased\nlatency and memory usage.\n\n* Changing `handSize` allows you to adjust the probability of collisions between\ndifferent flows and the overall concurrency available to a single flow in an\noverload situation.\n\nA larger `handSize` makes it less likely for two individual flows to collide\n(and therefore for one to be able to starve the other), but more likely that\na small number of flows can dominate the apiserver. A larger `handSize` also\npotentially increases the amount of latency that a single high-traffic flow\ncan cause. The maximum number of queued requests possible from a\nsingle flow is `handSize * queueLengthLimit`.\n\nFollowing is a table showing an interesting collection of shuffle\nsharding configurations, showing for each the probability that a\ngiven mouse (low-intensity flow) is squished by the elephants (high-intensity flows) for\nan illustrative collection of numbers of elephants. See\nhttps://play.golang.org/p/Gi0PLgVHiUg , which computes this table.\n\nHandSize | Queues | 1 elephant | 4 elephants | 16 elephants\n|----------|-----------|------------|----------------|--------------------|\n| 12 | 32 | 4.428838398950118e-09 | 0.11431348830099144 | 0.9935089607656024 |\n| 10 | 32 | 1.550093439632541e-08 | 0.0626479840223545 | 0.9753101519027554 |\n| 10 | 64 | 6.601827268370426e-12 | 0.00045571320990370776 | 0.49999929150089345 |\n| 9 | 64 | 3.6310049976037345e-11 | 0.00045501212304112273 | 0.4282314876454858 |\n| 8 | 64 | 2.25929199850899e-10 | 0.0004886697053040446 | 0.35935114681123076 |\n| 8 | 128 | 6.994461389026097e-13 | 3.4055790161620863e-06 | 0.02746173137155063 |\n| 7 | 128 | 1.0579122850901972e-11 | 6.960839379258192e-06 | 0.02406157386340147 |\n| 7 | 256 | 7.597695465552631e-14 | 6.728547142019406e-08 | 0.0006709661542533682 |\n| 6 | 256 | 2.7134626662687968e-12 | 2.9516464018476436e-07 | 0.0008895654642000348 |\n| 6 | 512 | 4.116062922897309e-14 | 4.982983350480894e-09 | 2.26025764343413e-05 |\n| 6 | 1024 | 6.337324016514285e-16 | 8.09060164312957e-11 | 4.517408062903668e-07 |\n\n### FlowSchema\n\nA FlowSchema matches some inbound requests and assigns them to a\npriority level. Every inbound request is tested against FlowSchemas,\nstarting with those with the numerically lowest `matchingPrecedence` and\nworking upward. The first match wins.\n\nOnly the first matching FlowSchema for a given request matters. If multiple\nFlowSchemas match a single inbound request, it will be assigned based on the one\nwith the highest `matchingPrecedence`. If multiple FlowSchemas with equal\n`matchingPrecedence` match the same request, the one with lexicographically\nsmaller `name` will win, but it's better not to rely on this, and instead to\nensure that no two FlowSchemas have the same `matchingPrecedence`.\n\nA FlowSchema matches a given request if at least one of its `rules`\nmatches. A rule matches if at least one of its `subjects` *and* at least\none of its `resourceRules` or `nonResourceRules` (depending on whether the\nincoming request is for a resource or non-resource URL) match the request.\n\nFor the `name` field in subjects, and the `verbs`, `apiGroups`, `resources`,\n`namespaces`, and `nonResourceURLs` fields of resource and non-resource rules,\nthe wildcard `*` may be specified to match all values for the given field,\neffectively removing it from consideration.\n\nA FlowSchema's `distinguisherMethod.type` determines how requests matching that\nschema will be separated into flows. It may be `ByUser`, in which one requesting\nuser will not be able to starve other users of capacity; `ByNamespace`, in which\nrequests for resources in one namespace will not be able to starve requests for\nresources in other namespaces of capacity; or blank (or `distinguisherMethod` may be\nomitted entirely), in which all requests matched by this FlowSchema will be\nconsidered part of a single flow. The correct choice for a given FlowSchema\ndepends on the resource and your particular environment.\n\n## Defaults\n\nEach kube-apiserver maintains two sorts of APF configuration objects:\nmandatory and suggested.\n\n### Mandatory Configuration Objects\n\nThe four mandatory configuration objects reflect fixed built-in\nguardrail behavior. This is behavior that the servers have before\nthose objects exist, and when those objects exist their specs reflect\nthis behavior. The four mandatory objects are as follows.\n\n* The mandatory `exempt` priority level is used for requests that are\nnot subject to flow control at all: they will always be dispatched\nimmediately. The mandatory `exempt` FlowSchema classifies all\nrequests from the `system:masters` group into this priority\nlevel. You may define other FlowSchemas that direct other requests\nto this priority level, if appropriate.\n\n* The mandatory `catch-all` priority level is used in combination with\nthe mandatory `catch-all` FlowSchema to make sure that every request\ngets some kind of classification. Typically you should not rely on\nthis catch-all configuration, and should create your own catch-all\nFlowSchema and PriorityLevelConfiguration (or use the suggested\n`global-default` priority level that is installed by default) as\nappropriate. Because it is not expected to be used normally, the\nmandatory `catch-all` priority level has a very small concurrency\nshare and does not queue requests.\n\n### Suggested Configuration Objects\n\nThe suggested FlowSchemas and PriorityLevelConfigurations constitute a\nreasonable default configuration. You can modify these and/or create\nadditional configuration objects if you want. If your cluster is\nlikely to experience heavy load then you should consider what\nconfiguration will work best.\n\nThe suggested configuration groups requests into six priority levels:\n\n* The `node-high` priority level is for health updates from nodes.\n\n* The `system` priority level is for non-health requests from the\n`system:nodes` group, i.e. Kubelets, which must be able to contact\nthe API server in order for workloads to be able to schedule on\nthem.\n\n* The `leader-election` priority level is for leader election requests from\nbuilt-in controllers (in particular, requests for `endpoints`, `configmaps`,\nor `leases` coming from the `system:kube-controller-manager` or\n`system:kube-scheduler` users and service accounts in the `kube-system`\nnamespace). These are important to isolate from other traffic because failures\nin leader election cause their controllers to fail and restart, which in turn\ncauses more expensive traffic as the new controllers sync their informers.\n\n* The `workload-high` priority level is for other requests from built-in\ncontrollers.\n\n* The `workload-low` priority level is for requests from any other service\naccount, which will typically include all requests from controllers running in\nPods.\n\n* The `global-default` priority level handles all other traffic, e.g.\ninteractive `kubectl` commands run by nonprivileged users.\n\nThe suggested FlowSchemas serve to steer requests into the above\npriority levels, and are not enumerated here.\n\n### Maintenance of the Mandatory and Suggested Configuration Objects\n\nEach `kube-apiserver` independently maintains the mandatory and\nsuggested configuration objects, using initial and periodic behavior.\nThus, in a situation with a mixture of servers of different versions\nthere may be thrashing as long as different servers have different\nopinions of the proper content of these objects.\n\nEach `kube-apiserver` makes an initial maintenance pass over the\nmandatory and suggested configuration objects, and after that does\nperiodic maintenance (once per minute) of those objects.\n\nFor the mandatory configuration objects, maintenance consists of\nensuring that the object exists and, if it does, has the proper spec.\nThe server refuses to allow a creation or update with a spec that is\ninconsistent with the server's guardrail behavior.\n\nMaintenance of suggested configuration objects is designed to allow\ntheir specs to be overridden. Deletion, on the other hand, is not\nrespected: maintenance will restore the object. If you do not want a\nsuggested configuration object then you need to keep it around but set\nits spec to have minimal consequences. Maintenance of suggested\nobjects is also designed to support automatic migration when a new\nversion of the `kube-apiserver` is rolled out, albeit potentially with\nthrashing while there is a mixed population of servers.\n\nMaintenance of a suggested configuration object consists of creating\nit --- with the server's suggested spec --- if the object does not\nexist. OTOH, if the object already exists, maintenance behavior\ndepends on whether the `kube-apiservers` or the users control the\nobject. In the former case, the server ensures that the object's spec\nis what the server suggests; in the latter case, the spec is left\nalone.\n\nThe question of who controls the object is answered by first looking\nfor an annotation with key `apf.kubernetes.io/autoupdate-spec`. If\nthere is such an annotation and its value is `true` then the\nkube-apiservers control the object. If there is such an annotation\nand its value is `false` then the users control the object. If\nneither of those conditions holds then the `metadata.generation` of the\nobject is consulted. If that is 1 then the kube-apiservers control\nthe object. Otherwise the users control the object. These rules were\nintroduced in release 1.22 and their consideration of\n`metadata.generation` is for the sake of migration from the simpler\nearlier behavior. Users who wish to control a suggested configuration\nobject should set its `apf.kubernetes.io/autoupdate-spec` annotation\nto `false`.\n\nMaintenance of a mandatory or suggested configuration object also\nincludes ensuring that it has an `apf.kubernetes.io/autoupdate-spec`\nannotation that accurately reflects whether the kube-apiservers\ncontrol the object.\n\nMaintenance also includes deleting objects that are neither mandatory\nnor suggested but are annotated\n`apf.kubernetes.io/autoupdate-spec=true`.\n\n## Health check concurrency exemption\n\nThe suggested configuration gives no special treatment to the health\ncheck requests on kube-apiservers from their local kubelets --- which\ntend to use the secured port but supply no credentials. With the\nsuggested config, these requests get assigned to the `global-default`\nFlowSchema and the corresponding `global-default` priority level,\nwhere other traffic can crowd them out.\n\nIf you add the following additional FlowSchema, this exempts those\nrequests from rate limiting.\n\nMaking this change also allows any hostile party to then send\nhealth-check requests that match this FlowSchema, at any volume they\nlike. If you have a web traffic filter or similar external security\nmechanism to protect your cluster's API server from general internet\ntraffic, you can configure rules to block any health check requests\nthat originate from outside your cluster.\n\n## Observability\n\n### Metrics\n\nIn versions of Kubernetes before v1.20, the labels `flow_schema` and\n`priority_level` were inconsistently named `flowSchema` and `priorityLevel`,\nrespectively. If you're running Kubernetes versions v1.19 and earlier, you\nshould refer to the documentation for your version.\n\nWhen you enable the API Priority and Fairness feature, the kube-apiserver\nexports additional metrics. Monitoring these can help you determine whether your\nconfiguration is inappropriately throttling important traffic, or find\npoorly-behaved workloads that may be harming system health.\n\n#### Maturity level BETA\n\n* `apiserver_flowcontrol_rejected_requests_total` is a counter vector\n(cumulative since server start) of requests that were rejected,\nbroken down by the labels `flow_schema` (indicating the one that\nmatched the request), `priority_level` (indicating the one to which\nthe request was assigned), and `reason`. The `reason` label will be\none of the following values:\n\n* `queue-full`, indicating that too many requests were already\nqueued.\n* `concurrency-limit`, indicating that the\nPriorityLevelConfiguration is configured to reject rather than\nqueue excess requests.\n* `time-out`, indicating that the request was still in the queue\nwhen its queuing time limit expired.\n* `cancelled`, indicating that the request is not purge locked\nand has been ejected from the queue.\n\n* `apiserver_flowcontrol_dispatched_requests_total` is a counter\nvector (cumulative since server start) of requests that began\nexecuting, broken down by `flow_schema` and `priority_level`.\n\n* `apiserver_flowcontrol_current_inqueue_requests` is a gauge vector\nholding the instantaneous number of queued (not executing) requests,\nbroken down by `priority_level` and `flow_schema`.\n\n* `apiserver_flowcontrol_current_executing_requests` is a gauge vector\nholding the instantaneous number of executing (not waiting in a\nqueue) requests, broken down by `priority_level` and `flow_schema`.\n\n* `apiserver_flowcontrol_current_executing_seats` is a gauge vector\nholding the instantaneous number of occupied seats, broken down by\n`priority_level` and `flow_schema`.\n\n* `apiserver_flowcontrol_request_wait_duration_seconds` is a histogram\nvector of how long requests spent queued, broken down by the labels\n`flow_schema`, `priority_level`, and `execute`. The `execute` label\nindicates whether the request has started executing.\n\nSince each FlowSchema always assigns requests to a single\nPriorityLevelConfiguration, you can add the histograms for all the\nFlowSchemas for one priority level to get the effective histogram for\nrequests assigned to that priority level.\n\n* `apiserver_flowcontrol_nominal_limit_seats` is a gauge vector\nholding each priority level's nominal concurrency limit, computed\nfrom the API server's total concurrency limit and the priority\nlevel's configured nominal concurrency shares.\n\n#### Maturity level ALPHA\n\n* `apiserver_current_inqueue_requests` is a gauge vector of recent\nhigh water marks of the number of queued requests, grouped by a\nlabel named `request_kind` whose value is `mutating` or `readOnly`.\nThese high water marks describe the largest number seen in the one\nsecond window most recently completed. These complement the older\n`apiserver_current_inflight_requests` gauge vector that holds the\nlast window's high water mark of number of requests actively being\nserved.\n\n* `apiserver_current_inqueue_seats` is a gauge vector of the sum over\nqueued requests of the largest number of seats each will occupy,\ngrouped by labels named `flow_schema` and `priority_level`.\n\n* `apiserver_flowcontrol_read_vs_write_current_requests` is a\nhistogram vector of observations, made at the end of every\nnanosecond, of the number of requests broken down by the labels\n`phase` (which takes on the values `waiting` and `executing`) and\n`request_kind` (which takes on the values `mutating` and\n`readOnly`). Each observed value is a ratio, between 0 and 1, of\nthe number of requests divided by the corresponding limit on the\nnumber of requests (queue volume limit for waiting and concurrency\nlimit for executing).\n\n* `apiserver_flowcontrol_request_concurrency_in_use` is a gauge vector\nholding the instantaneous number of occupied seats, broken down by\n`priority_level` and `flow_schema`.\n\n* `apiserver_flowcontrol_priority_level_request_utilization` is a\nhistogram vector of observations, made at the end of each\nnanosecond, of the number of requests broken down by the labels\n`phase` (which takes on the values `waiting` and `executing`) and\n`priority_level`. Each observed value is a ratio, between 0 and 1,\nof a number of requests divided by the corresponding limit on the\nnumber of requests (queue volume limit for waiting and concurrency\nlimit for executing).\n\n* `apiserver_flowcontrol_priority_level_seat_utilization` is a\nhistogram vector of observations, made at the end of each\nnanosecond, of the utilization of a priority level's concurrency\nlimit, broken down by `priority_level`. This utilization is the\nfraction (number of seats occupied) / (concurrency limit). This\nmetric considers all stages of execution (both normal and the extra\ndelay at the end of a write to cover for the corresponding\nnotification work) of all requests except WATCHes; for those it\nconsiders only the initial stage that delivers notifications of\npre-existing objects. Each histogram in the vector is also labeled\nwith `phase: executing` (there is no seat limit for the waiting\nphase).\n\n* `apiserver_flowcontrol_request_queue_length_after_enqueue` is a\nhistogram vector of queue lengths for the queues, broken down by\n`priority_level` and `flow_schema`, as sampled by the enqueued requests.\nEach request that gets queued contributes one sample to its histogram,\nreporting the length of the queue immediately after the request was added.\nNote that this produces different statistics than an unbiased survey would.\n\nAn outlier value in a histogram here means it is likely that a single flow\n(i.e., requests by one user or for one namespace, depending on\nconfiguration) is flooding the API server, and being throttled. By contrast,\nif one priority level's histogram shows that all queues for that priority\nlevel are longer than those for other priority levels, it may be appropriate\nto increase that PriorityLevelConfiguration's concurrency shares.\n\n* `apiserver_flowcontrol_request_concurrency_limit` is the same as\n`apiserver_flowcontrol_nominal_limit_seats`. Before the\nintroduction of concurrency borrowing between priority levels,\nthis was always equal to `apiserver_flowcontrol_current_limit_seats`\n(which did not exist as a distinct metric).\n\n* `apiserver_flowcontrol_lower_limit_seats` is a gauge vector holding\nthe lower bound on each priority level's dynamic concurrency limit.\n\n* `apiserver_flowcontrol_upper_limit_seats` is a gauge vector holding\nthe upper bound on each priority level's dynamic concurrency limit.\n\n* `apiserver_flowcontrol_demand_seats` is a histogram vector counting\nobservations, at the end of every nanosecond, of each priority\nlevel's ratio of (seat demand) / (nominal concurrency limit).\nA priority level's seat demand is the sum, over both queued requests\nand those in the initial phase of execution, of the maximum of the\nnumber of seats occupied in the request's initial and final\nexecution phases.\n\n* `apiserver_flowcontrol_demand_seats_high_watermark` is a gauge vector\nholding, for each priority level, the maximum seat demand seen\nduring the last concurrency borrowing adjustment period.\n\n* `apiserver_flowcontrol_demand_seats_average` is a gauge vector\nholding, for each priority level, the time-weighted average seat\ndemand seen during the last concurrency borrowing adjustment period.\n\n* `apiserver_flowcontrol_demand_seats_stdev` is a gauge vector\nholding, for each priority level, the time-weighted population\nstandard deviation of seat demand seen during the last concurrency\nborrowing adjustment period.\n\n* `apiserver_flowcontrol_demand_seats_smoothed` is a gauge vector\nholding, for each priority level, the smoothed enveloped seat demand\ndetermined at the last concurrency adjustment.\n\n* `apiserver_flowcontrol_target_seats` is a gauge vector holding, for\neach priority level, the concurrency target going into the borrowing\nallocation problem.\n\n* `apiserver_flowcontrol_seat_fair_frac` is a gauge holding the fair\nallocation fraction determined in the last borrowing adjustment.\n\n* `apiserver_flowcontrol_current_limit_seats` is a gauge vector\nholding, for each priority level, the dynamic concurrency limit\nderived in the last adjustment.\n\n* `apiserver_flowcontrol_request_execution_seconds` is a histogram\nvector of how long requests took to actually execute, broken down by\n`flow_schema` and `priority_level`.\n\n* `apiserver_flowcontrol_watch_count_samples` is a histogram vector of\nthe number of active WATCH requests relevant to a given write,\nbroken down by `flow_schema` and `priority_level`.\n\n* `apiserver_flowcontrol_work_estimated_seats` is a histogram vector\nof the number of estimated seats (maximum of initial and final stage\nof execution) associated with requests, broken down by `flow_schema`\nand `priority_level`.\n\n* `apiserver_flowcontrol_request_dispatch_no_accommodation_total` is a\ncounter vector of the number of events that in principle could have led\nto a request being dispatched but did not, due to lack of available\nconcurrency, broken down by `flow_schema` and `priority_level`.\n\n* `apiserver_flowcontrol_epoch_advance_total` is a counter vector of\nthe number of attempts to jump a priority level's progress meter\nbackward to avoid numeric overflow, grouped by `priority_level` and\n`success`.\n\n## Good practices for using API Priority and Fairness\n\nWhen a given priority level exceeds its permitted concurrency, requests can\nexperience increased latency or be dropped with an HTTP 429 (Too Many Requests)\nerror. To prevent these side effects of APF, you can modify your workload or\ntweak your APF settings to ensure there are sufficient seats available to serve\nyour requests.\n\nTo detect whether requests are being rejected due to APF, check the following\nmetrics:\n\n- apiserver_flowcontrol_rejected_requests_total: the total number of requests\nrejected per FlowSchema and PriorityLevelConfiguration.\n- apiserver_flowcontrol_current_inqueue_requests: the current number of requests\nqueued per FlowSchema and PriorityLevelConfiguration.\n- apiserver_flowcontrol_request_wait_duration_seconds: the latency added to\nrequests waiting in queues.\n- apiserver_flowcontrol_priority_level_seat_utilization: the seat utilization\nper PriorityLevelConfiguration.\n\n### Workload modifications {#good-practice-workload-modifications}\n\nTo prevent requests from queuing and adding latency or being dropped due to APF,\nyou can optimize your requests by:\n\n- Reducing the rate at which requests are executed. A fewer number of requests\nover a fixed period will result in a fewer number of seats being needed at a\ngiven time.\n- Avoid issuing a large number of expensive requests concurrently. Requests can\nbe optimized to use fewer seats or have lower latency so that these requests\nhold those seats for a shorter duration. List requests can occupy more than 1\nseat depending on the number of objects fetched during the request. Restricting\nthe number of objects retrieved in a list request, for example by using\npagination, will use less total seats over a shorter period. Furthermore,\nreplacing list requests with watch requests will require lower total concurrency\nshares as watch requests only occupy 1 seat during its initial burst of\nnotifications. If using streaming lists in versions 1.27 and later, watch\nrequests will occupy the same number of seats as a list request for its initial\nburst of notifications because the entire state of the collection has to be\nstreamed. Note that in both cases, a watch request will not hold any seats after\nthis initial phase.\n\nKeep in mind that queuing or rejected requests from APF could be induced by\neither an increase in the number of requests or an increase in latency for\nexisting requests. For example, if requests that normally take 1s to execute\nstart taking 60s, it is possible that APF will start rejecting requests because\nrequests are occupying seats for a longer duration than normal due to this\nincrease in latency. If APF starts rejecting requests across multiple priority\nlevels without a significant change in workload, it is possible there is an\nunderlying issue with control plane performance rather than the workload or APF\nsettings.\n\n### Priority and fairness settings {#good-practice-apf-settings}\n\nYou can also modify the default FlowSchema and PriorityLevelConfiguration\nobjects or create new objects of these types to better accommodate your\nworkload.\n\nAPF settings can be modified to:\n\n- Give more seats to high priority requests.\n- Isolate non-essential or expensive requests that would starve a concurrency\nlevel if it was shared with other flows.\n\n#### Give more seats to high priority requests\n\n1. If possible, the number of seats available across all priority levels for a\nparticular `kube-apiserver` can be increased by increasing the values for the\n`max-requests-inflight` and `max-mutating-requests-inflight` flags. Alternatively,\nhorizontally scaling the number of `kube-apiserver` instances will increase the\ntotal concurrency per priority level across the cluster assuming there is\nsufficient load balancing of requests.\n1. You can create a new FlowSchema which references a PriorityLevelConfiguration\nwith a larger concurrency level. This new PriorityLevelConfiguration could be an\nexisting level or a new level with its own set of nominal concurrency shares.\nFor example, a new FlowSchema could be introduced to change the\nPriorityLevelConfiguration for your requests from global-default to workload-low\nto increase the number of seats available to your user. Creating a new\nPriorityLevelConfiguration will reduce the number of seats designated for\nexisting levels. Recall that editing a default FlowSchema or\nPriorityLevelConfiguration will require setting the\n`apf.kubernetes.io/autoupdate-spec` annotation to false.\n1. You can also increase the NominalConcurrencyShares for the\nPriorityLevelConfiguration which is serving your high priority requests.\nAlternatively, for versions 1.26 and later, you can increase the LendablePercent\nfor competing priority levels so that the given priority level has a higher pool\nof seats it can borrow.\n\n#### Isolate non-essential requests from starving other flows\n\nFor request isolation, you can create a FlowSchema whose subject matches the\nuser making these requests or create a FlowSchema that matches what the request\nis (corresponding to the resourceRules). Next, you can map this FlowSchema to a\nPriorityLevelConfiguration with a low share of seats.\n\nFor example, suppose list event requests from Pods running in the default namespace\nare using 10 seats each and execute for 1 minute. To prevent these expensive\nrequests from impacting requests from other Pods using the existing service-accounts\nFlowSchema, you can apply the following FlowSchema to isolate these list calls\nfrom other requests.\n\nExample FlowSchema object to isolate list event requests:\n\n- This FlowSchema captures all list event calls made by the default service\naccount in the default namespace. The matching precedence 8000 is lower than the\nvalue of 9000 used by the existing service-accounts FlowSchema so these list\nevent calls will match list-events-default-service-account rather than\nservice-accounts.\n- The catch-all PriorityLevelConfiguration is used to isolate these requests.\nThe catch-all priority level has a very small concurrency share and does not\nqueue requests.\n\n##\n\n- You can visit flow control [reference doc](/docs/reference/debug-cluster/flow-control/) to learn more about troubleshooting.\n- For background information on design details for API priority and fairness, see\nthe [enhancement proposal](https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/1040-priority-and-fairness).\n- You can make suggestions and feature requests via [SIG API Machinery](https://github.com/kubernetes/community/tree/main/sig-api-machinery)\nor the feature's [slack channel](https://kubernetes.slack.com/messages/api-priority-and-fairness).", "source": "content/en/docs/concepts/cluster-administration/flow-control.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "System component logs record events happening in cluster, which can be very useful for debugging.\nYou can configure log verbosity to see more or less detail.\nLogs can be as coarse-grained as showing errors within a component, or as fine-grained as showing\nstep-by-step traces of events (like HTTP access logs, pod state changes, controller actions, or\nscheduler decisions).\n\nIn contrast to the command line flags described here, the *log\noutput* itself does *not* fall under the Kubernetes API stability guarantees:\nindividual log entries and their formatting may change from one release\nto the next!\n\n## Klog\n\nklog is the Kubernetes logging library. [klog](https://github.com/kubernetes/klog)\ngenerates log messages for the Kubernetes system components.\n\nKubernetes is in the process of simplifying logging in its components.\nThe following klog command line flags\n[are deprecated](https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components)\nstarting with Kubernetes v1.23 and removed in Kubernetes v1.26:\n\n- `--add-dir-header`\n- `--alsologtostderr`\n- `--log-backtrace-at`\n- `--log-dir`\n- `--log-file`\n- `--log-file-max-size`\n- `--logtostderr`\n- `--one-output`\n- `--skip-headers`\n- `--skip-log-headers`\n- `--stderrthreshold`\n\nOutput will always be written to stderr, regardless of the output format. Output redirection is\nexpected to be handled by the component which invokes a Kubernetes component. This can be a POSIX\nshell or a tool like systemd.\n\nIn some cases, for example a distroless container or a Windows system service, those options are\nnot available. Then the\n[`kube-log-runner`](https://github.com/kubernetes/kubernetes/blob/d2a8a81639fcff8d1221b900f66d28361a170654/staging/src/k8s.io/component-base/logs/kube-log-runner/README.md)\nbinary can be used as wrapper around a Kubernetes component to redirect\noutput. A prebuilt binary is included in several Kubernetes base images under\nits traditional name as `/go-runner` and as `kube-log-runner` in server and\nnode release archives.\n\nThis table shows how `kube-log-runner` invocations correspond to shell redirection:\n\n| Usage | POSIX shell (such as bash) | `kube-log-runner ` |\n| -----------------------------------------|----------------------------|-------------------------------------------------------------|\n| Merge stderr and stdout, write to stdout | `2>&1` | `kube-log-runner` (default behavior) |\n| Redirect both into log file | `1>>/tmp/log 2>&1` | `kube-log-runner -log-file=/tmp/log` |\n| Copy into log file and to stdout | `2>&1 \\| tee -a /tmp/log` | `kube-log-runner -log-file=/tmp/log -also-stdout` |\n| Redirect only stdout into log file | `>/tmp/log` | `kube-log-runner -log-file=/tmp/log -redirect-stderr=false` |\n\n### Klog output\n\nAn example of the traditional klog native format:\n\n```\nI1025 00:15:15.525108 1 httplog.go:79] GET /api/v1/namespaces/kube-system/pods/metrics-server-v0.3.1-57c75779f-9p8wg: (1.512ms) 200 [pod_nanny/v0.0.0 (linux/amd64) kubernetes/$Format 10.56.1.19:51756]\n```\n\nThe message string may contain line breaks:\n\n```\nI1025 00:15:15.525108 1 example.go:79] This is a message\nwhich has a line break.\n```\n\n### Structured Logging\n\nMigration to structured log messages is an ongoing process. Not all log messages are structured in\nthis version. When parsing log files, you must also handle unstructured log messages.\n\nLog formatting and value serialization are subject to change.\n\nStructured logging introduces a uniform structure in log messages allowing for programmatic\nextraction of information. You can store and process structured logs with less effort and cost.\nThe code which generates a log message determines whether it uses the traditional unstructured\nklog output or structured logging.\n\nThe default formatting of structured log messages is as text, with a format that is backward\ncompatible with traditional klog:\n\n```\n\" \" =\" \" =\" \" ...\n```\n\nExample:\n\n```\nI1025 00:15:15.525108 1 controller_utils.go:116] \"Pod status updated\" pod=\"kube-system/kubedns\" status=\"ready\"\n```\n\nStrings are quoted. Other values are formatted with\n[`%+v`](https://pkg.go.dev/fmt#hdr-Printing), which may cause log messages to\ncontinue on the next line [depending on the data](https://github.com/kubernetes/kubernetes/issues/106428).\n\n```\nI1025 00:15:15.525108 1 example.go:116] \"Example\" data=\"This is text with a line break\\nand \\\"quotation marks\\\".\" someInt=1 someFloat=0.1 someStruct={StringField: First line,\nsecond line.}\n```\n\n### Contextual Logging\n\nContextual logging builds on top of structured logging. It is primarily about\nhow developers use logging calls: code based on that concept is more flexible\nand supports additional use cases as described in the [Contextual Logging\nKEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/3077-contextual-logging).\n\nIf developers use additional functions like `WithValues` or `WithName` in\ntheir components, then log entries contain additional information that gets\npassed into functions by their caller.\n\nFor Kubernetes , this is gated behind the `ContextualLogging`\n[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) and is\nenabled by default. The infrastructure for this was added in 1.24 without\nmodifying components. The\n[`component-base/logs/example`](https://github.com/kubernetes/kubernetes/blob/v1.24.0-beta.0/staging/src/k8s.io/component-base/logs/example/cmd/logger.go)\ncommand demonstrates how to use the new logging calls and how a component\nbehaves that supports contextual logging.\n\n```console\n$ cd $GOPATH/src/k8s.io/kubernetes/staging/src/k8s.io/component-base/logs/example/cmd/\n$ go run . --help\n...\n--feature-gates mapStringBool A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:\nAllAlpha=true|false (ALPHA - default=false)\nAllBeta=true|false (BETA - default=false)\nContextualLogging=true|false (BETA - default=true)\n$ go run . --feature-gates ContextualLogging=true\n...\nI0222 15:13:31.645988 197901 example.go:54] \"runtime\" logger=\"example.myname\" foo=\"bar\" duration=\"1m0s\"\nI0222 15:13:31.646007 197901 example.go:55] \"another runtime\" logger=\"example\" foo=\"bar\" duration=\"1h0m0s\" duration=\"1m0s\"\n```\n\nThe `logger` key and `foo=\"bar\"` were added by the caller of the function\nwhich logs the `runtime` message and `duration=\"1m0s\"` value, without having to\nmodify that function.\n\nWith contextual logging disable, `WithValues` and `WithName` do nothing and log\ncalls go through the global klog logger. Therefore this additional information\nis not in the log output anymore:\n\n```console\n$ go run . --feature-gates ContextualLogging=false\n...\nI0222 15:14:40.497333 198174 example.go:54] \"runtime\" duration=\"1m0s\"\nI0222 15:14:40.497346 198174 example.go:55] \"another runtime\" duration=\"1h0m0s\" duration=\"1m0s\"\n```\n\n### JSON log format\n\nJSON output does not support many standard klog flags. For list of unsupported klog flags, see the\n[Command line tool reference](/docs/reference/command-line-tools-reference/).\n\nNot all logs are guaranteed to be written in JSON format (for example, during process start).\nIf you intend to parse logs, make sure you can handle log lines that are not JSON as well.\n\nField names and JSON serialization are subject to change.\n\nThe `--logging-format=json` flag changes the format of logs from klog native format to JSON format.\nExample of JSON log format (pretty printed):\n\n```json\n{\n\"ts\": 1580306777.04728,\n\"v\": 4,\n\"msg\": \"Pod status updated\",\n\"pod\":{\n\"name\": \"nginx-1\",\n\"namespace\": \"default\"\n},\n\"status\": \"ready\"\n}\n```\n\nKeys with special meaning:\n\n* `ts` - timestamp as Unix time (required, float)\n* `v` - verbosity (only for info and not for error messages, int)\n* `err` - error string (optional, string)\n* `msg` - message (required, string)\n\nList of components currently supporting JSON format:\n\n* kube-controller-manager\n* kube-apiserver\n* kube-scheduler\n* kubelet\n\n### Log verbosity level\n\nThe `-v` flag controls log verbosity. Increasing the value increases the number of logged events.\nDecreasing the value decreases the number of logged events. Increasing verbosity settings logs\nincreasingly less severe events. A verbosity setting of 0 logs only critical events.\n\n### Log location\n\nThere are two types of system components: those that run in a container and those\nthat do not run in a container. For example:\n\n* The Kubernetes scheduler and kube-proxy run in a container.\n* The kubelet and container runtime\ndo not run in containers.\n\nOn machines with systemd, the kubelet and container runtime write to journald.\nOtherwise, they write to `.log` files in the `/var/log` directory.\nSystem components inside containers always write to `.log` files in the `/var/log` directory,\nbypassing the default logging mechanism.\nSimilar to the container logs, you should rotate system component logs in the `/var/log` directory.\nIn Kubernetes clusters created by the `kube-up.sh` script, log rotation is configured by the `logrotate` tool.\nThe `logrotate` tool rotates logs daily, or once the log size is greater than 100MB.\n\n## Log query\n\nThe Log Query feature can help debugging issues in both Linux and Windows\nnodes. Introduced in Kubernetes v1.27, the feature allows viewing logs of\nservices running on the node. To use the feature, ensure that the kubelet\nconfiguration options `enableSystemLogHandler` and `enableSystemLogQuery`\nare both set to _true_ for the target node.\n\nIn Kubernetes v1.36 this feature graduated to stable and the `NodeLogQuery`[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)\nis now locked to _true_, hence the feature gate is enabled by default, leaving\n`enableSystemLogHandler` as the only option required to enable or disable the\nLog Query feature.\n\n`enableSystemLogHandler` defaults to _false_ and is recommended to be left\ndisabled unless actively debugging.\n\nGranting permissions to `nodes/proxy` (even just **get** permission) also\nauthorizes access to powerful kubelet APIs that can be used to execute commands\nin any container running on the node, so be careful about how you manage them.\nSee [Kubelet authentication/authorization](/docs/reference/access-authn-authz/kubelet-authn-authz/#get-nodes-proxy-warning)\nfor more information.\n\nOn Linux, the assumption is that service logs are available via _journald_. On\nWindows the assumption is that service logs are available in the application log\nprovider. On both operating systems, logs are also available by reading files\nwithin `/var/log/`.\n\nProvided you are authorized to interact with node objects, you can try out this feature on all your nodes or\njust a subset. Here is an example to retrieve the kubelet service logs from a node:\n\n```shell\n# Fetch kubelet logs from a node named node-1.example\nkubectl get --raw \"/api/v1/nodes/node-1.example/proxy/logs/?query=kubelet\"\n```\n\nYou can also fetch files, provided that the files are in a directory that the kubelet allows for log\nfetches. For example, you can fetch a log from `/var/log` on a Linux node:\n\n```shell\nkubectl get --raw \"/api/v1/nodes/ /proxy/logs/?query=/ \"\n```\n\nThe kubelet uses heuristics to retrieve logs. This helps if you are not aware whether a given system service is\nwriting logs to the operating system's native logger like journald or to a log file in `/var/log/`. The heuristics\nfirst checks the native logger and if that is not available attempts to retrieve the first logs from\n`/var/log/ ` or `/var/log/ .log` or `/var/log/ / .log`.\n\nThe complete list of options that can be used are:\n\n| Option | Description |\n|-------------|-----------------------------------------------------------------------------------------------------|\n| `boot` | boot show messages from a specific system boot |\n| `pattern` | pattern filters log entries by the provided PERL-compatible regular expression |\n| `query` | query specifies services(s) or files from which to return logs (required) |\n| `sinceTime` | an [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) timestamp from which to show logs (inclusive) |\n| `untilTime` | an [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) timestamp until which to show logs (inclusive) |\n| `tailLines` | specify how many lines from the end of the log to retrieve; the default is to fetch the whole log |\n\nExample of a more complex query:\n\n```shell\n# Fetch kubelet logs from a node named node-1.example that have the word \"error\"\nkubectl get --raw \"/api/v1/nodes/node-1.example/proxy/logs/?query=kubelet&pattern=error\"\n```\n\n##\n\n* Read about the [Kubernetes Logging Architecture](/docs/concepts/cluster-administration/logging/)\n* Read about [Structured Logging](https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/1602-structured-logging)\n* Read about [Contextual Logging](https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/3077-contextual-logging)\n* Read about [deprecation of klog flags](https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components)\n* Read about the [Conventions for logging severity](https://github.com/kubernetes/community/blob/main/contributors/devel/sig-instrumentation/logging.md)\n* Read about [Log Query](https://kep.k8s.io/2258)", "source": "content/en/docs/concepts/cluster-administration/system-logs.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Kubernetes provides a device plugin framework that you can use to advertise system hardware\nresources to the .\n\nInstead of customizing the code for Kubernetes itself, vendors can implement a\ndevice plugin that you deploy either manually or as a .\nThe targeted devices include GPUs, high-performance NICs, FPGAs, InfiniBand adapters,\nand other similar computing resources that may require vendor specific initialization\nand setup.\n\n## Device plugin registration\n\nThe kubelet exports a `Registration` gRPC service:\n\n```gRPC\nservice Registration {\nrpc Register(RegisterRequest) returns (Empty) {}\n}\n```\n\nA device plugin can register itself with the kubelet through this gRPC service.\nDuring the registration, the device plugin needs to send:\n\n* The name of its Unix socket.\n* The Device Plugin API version against which it was built.\n* The `ResourceName` it wants to advertise. Here `ResourceName` needs to follow the\n[extended resource naming scheme](/docs/concepts/configuration/manage-resources-containers/#extended-resources)\nas `vendor-domain/resourcetype`.\n(For example, an NVIDIA GPU is advertised as `nvidia.com/gpu`.)\n\nFollowing a successful registration, the device plugin sends the kubelet the\nlist of devices it manages, and the kubelet is then in charge of advertising those\nresources to the API server as part of the kubelet node status update.\nFor example, after a device plugin registers `hardware-vendor.example/foo` with the kubelet\nand reports two healthy devices on a node, the node status is updated\nto advertise that the node has 2 \"Foo\" devices installed and available.\n\nThen, users can request devices as part of a Pod specification\n(see [`container`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container)).\nRequesting extended resources is similar to how you manage requests and limits for\nother resources, with the following differences:\n* Extended resources are only supported as integer resources and cannot be overcommitted.\n* Devices cannot be shared between containers.\n\n### Example {#example-pod}\n\nSuppose a Kubernetes cluster is running a device plugin that advertises resource `hardware-vendor.example/foo`\non certain nodes. Here is an example of a pod requesting this resource to run a demo workload:\n\n```yaml\n---\napiVersion: v1\nkind: Pod\nmetadata:\nname: demo-pod\nspec:\ncontainers:\n- name: demo-container-1\nimage: registry.k8s.io/pause:3.8\nresources:\nlimits:\nhardware-vendor.example/foo: 2\n#\n# This Pod needs 2 of the hardware-vendor.example/foo devices\n# and can only schedule onto a Node that's able to satisfy\n# that need.\n#\n# If the Node has more than 2 of those devices available, the\n# remainder would be available for other Pods to use.\n```\n\n## Device plugin implementation\n\nThe general workflow of a device plugin includes the following steps:\n\n1. Initialization. During this phase, the device plugin performs vendor-specific\ninitialization and setup to make sure the devices are in a ready state.\n\n1. The plugin starts a gRPC service, with a Unix socket under the host path\n`/var/lib/kubelet/device-plugins/` (this path is hardcoded and is not\naffected by the kubelet's `--root-dir` or any other configuration), that\nimplements the following interfaces:\n\n```gRPC\nservice DevicePlugin {\n// GetDevicePluginOptions returns options to be communicated with Device Manager.\nrpc GetDevicePluginOptions(Empty) returns (DevicePluginOptions) {}\n\n// ListAndWatch returns a stream of List of Devices\n// Whenever a Device state change or a Device disappears, ListAndWatch\n// returns the new list\nrpc ListAndWatch(Empty) returns (stream ListAndWatchResponse) {}\n\n// Allocate is called during container creation so that the Device\n// Plugin can run device specific operations and instruct Kubelet\n// of the steps to make the Device available in the container\nrpc Allocate(AllocateRequest) returns (AllocateResponse) {}\n\n// GetPreferredAllocation returns a preferred set of devices to allocate\n// from a list of available ones. The resulting preferred allocation is not\n// guaranteed to be the allocation ultimately performed by the\n// devicemanager. It is only designed to help the devicemanager make a more\n// informed allocation decision when possible.\nrpc GetPreferredAllocation(PreferredAllocationRequest) returns (PreferredAllocationResponse) {}\n\n// PreStartContainer is called, if indicated by Device Plugin during registration phase,\n// before each container start. Device plugin can run device specific operations\n// such as resetting the device before making devices available to the container.\nrpc PreStartContainer(PreStartContainerRequest) returns (PreStartContainerResponse) {}\n}\n```\n\nPlugins are not required to provide useful implementations for\n`GetPreferredAllocation()` or `PreStartContainer()`. Flags indicating\nthe availability of these calls, if any, should be set in the `DevicePluginOptions`\nmessage sent back by a call to `GetDevicePluginOptions()`. The `kubelet` will\nalways call `GetDevicePluginOptions()` to see which optional functions are\navailable, before calling any of them directly.\n\n1. The plugin registers itself with the kubelet through the Unix socket at host\npath `/var/lib/kubelet/device-plugins/kubelet.sock`.\n\nThe ordering of the workflow is important. A plugin MUST start serving gRPC\nservice before registering itself with kubelet for successful registration.\n\n1. After successfully registering itself, the device plugin runs in serving mode, during which it keeps\nmonitoring device health and reports back to the kubelet upon any device state changes.\nIt is also responsible for serving `Allocate` gRPC requests. During `Allocate`, the device plugin may\ndo device-specific preparation; for example, GPU cleanup or QRNG initialization.\nIf the operations succeed, the device plugin returns an `AllocateResponse` that contains container\nruntime configurations for accessing the allocated devices. The kubelet passes this information\nto the container runtime.\n\nAn `AllocateResponse` contains zero or more `ContainerAllocateResponse` objects. In these, the\ndevice plugin defines modifications that must be made to a container's definition to provide\naccess to the device. These modifications include:\n\n* [Annotations](/docs/concepts/overview/working-with-objects/annotations/)\n* device nodes\n* environment variables\n* mounts\n* fully-qualified CDI device names\n\nThe processing of the fully-qualified CDI device names by the Device Manager requires\nthat the `DevicePluginCDIDevices` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)\nis enabled for both the kubelet and the kube-apiserver. This was added as an alpha feature in Kubernetes\nv1.28, graduated to beta in v1.29 and to GA in v1.31.\n\n### Handling kubelet restarts\n\nA device plugin is expected to detect kubelet restarts and re-register itself with the new\nkubelet instance. A new kubelet instance deletes all the existing Unix sockets under\n`/var/lib/kubelet/device-plugins` (the hardcoded path for device plugins) when it starts. A device plugin can monitor the deletion\nof its Unix socket and re-register itself upon such an event.\n\n### Device plugin and unhealthy devices\n\nThere are cases when devices fail or are shut down. The responsibility of the Device Plugin\nin this case is to notify the kubelet about the situation using the `ListAndWatchResponse` API.\n\nOnce a device is marked as unhealthy, the kubelet will decrease the allocatable count\nfor this resource on the Node to reflect how many devices can be used for scheduling new pods.\nCapacity count for the resource will not change.\n\nPods that were assigned to the failed devices will continue be assigned to this device.\nIt is typical that code relying on the device will start failing and Pod may get\ninto Failed phase if `restartPolicy` for the Pod was not `Always` or enter the crash loop\notherwise.\n\nBefore Kubernetes v1.31, the way to know whether or not a Pod is associated with the\nfailed device is to use the [PodResources API](#monitoring-device-plugin-resources).\n\nWhen the feature gate `ResourceHealthStatus` is enabled (beta and enabled by default since v1.36),\nthe field `allocatedResourcesStatus`\nis added to each container status, within the `.status` for each Pod. The `allocatedResourcesStatus`\nfield reports health information for each device assigned to the container.\nEach resource health entry can include an optional `message` field with additional\nhuman readable context about the health status, such as error details or failure reasons.\n\nFor a failed Pod, or where you suspect a fault, you can use this status to understand whether\nthe Pod behavior may be associated with device failure. For example, if an accelerator is reporting\nan over-temperature event, the `allocatedResourcesStatus` field may report this.\n\n## Device plugin deployment\n\nYou can deploy a device plugin as a DaemonSet, as a package for your node's operating system,\nor manually.\n\nThe canonical directory `/var/lib/kubelet/device-plugins` (which is hardcoded on the kubelet) requires privileged access,\nso a device plugin must run in a privileged security context.\nIf you're deploying a device plugin as a DaemonSet, `/var/lib/kubelet/device-plugins`\nmust be mounted as a\nin the plugin's [PodSpec](/docs/reference/generated/kubernetes-api//#podspec-v1-core).\n\nIf you choose the DaemonSet approach you can rely on Kubernetes to: place the device plugin's\nPod onto Nodes, to restart the daemon Pod after failure, and to help automate upgrades.\n\n## API compatibility\n\nPreviously, the versioning scheme required the Device Plugin's API version to match\nexactly the Kubelet's version. Since the graduation of this feature to Beta in v1.12\nthis is no longer a hard requirement. The API is versioned and has been stable since\nBeta graduation of this feature. Because of this, kubelet upgrades should be seamless\nbut there still may be changes in the API before stabilization making upgrades not\nguaranteed to be non-breaking.\n\nAlthough the Device Manager component of Kubernetes is a generally available feature,\nthe _device plugin API_ is not stable. For information on the device plugin API and\nversion compatibility, read [Device Plugin API versions](/docs/reference/node/device-plugin-api-versions/).\n\nAs a project, Kubernetes recommends that device plugin developers:\n\n* Watch for Device Plugin API changes in the future releases.\n* Support multiple versions of the device plugin API for backward/forward compatibility.\n\nTo run device plugins on nodes that need to be upgraded to a Kubernetes release with\na newer device plugin API version, upgrade your device plugins to support both versions\nbefore upgrading these nodes. Taking that approach will ensure the continuous functioning\nof the device allocations during the upgrade.\n\n## Monitoring device plugin resources\n\nIn order to monitor resources provided by device plugins, monitoring agents need to be able to\ndiscover the set of devices that are in-use on the node and obtain metadata to describe which\ncontainer the metric should be associated with. [Prometheus](https://prometheus.io/) metrics\nexposed by device monitoring agents should follow the\n[Kubernetes Instrumentation Guidelines](https://github.com/kubernetes/community/blob/main/contributors/devel/sig-instrumentation/metric-instrumentation.md),\nidentifying containers using `pod`, `namespace`, and `container` prometheus labels.\n\nThe kubelet provides a gRPC service to enable discovery of in-use devices, and to provide metadata\nfor these devices:\n\n```gRPC\n// PodResourcesLister is a service provided by the kubelet that provides information about the\n// node resources consumed by pods and containers on the node\nservice PodResourcesLister {\nrpc List(ListPodResourcesRequest) returns (ListPodResourcesResponse) {}\nrpc GetAllocatableResources(AllocatableResourcesRequest) returns (AllocatableResourcesResponse) {}\nrpc Get(GetPodResourcesRequest) returns (GetPodResourcesResponse) {}\n}\n```\n\n### `List` gRPC endpoint {#grpc-endpoint-list}\n\nThe `List` endpoint provides information on resources of running pods, with details such as the\nid of exclusively allocated CPUs, device id as it was reported by device plugins and id of\nthe NUMA node where these devices are allocated. Also, for NUMA-based machines, it contains the\ninformation about memory and hugepages reserved for a container.\n\nStarting from Kubernetes v1.27, the `List` endpoint can provide information on resources\nof running pods allocated in `ResourceClaims` by the `DynamicResourceAllocation` API.\nStarting from Kubernetes v1.34, this feature is enabled by default.\n\n```gRPC\n// ListPodResourcesResponse is the response returned by List function\nmessage ListPodResourcesResponse {\nrepeated PodResources pod_resources = 1;\n}\n\n// PodResources contains information about the node resources assigned to a pod\nmessage PodResources {\nstring name = 1;\nstring namespace = 2;\nrepeated ContainerResources containers = 3;\n}\n\n// ContainerResources contains information about the resources assigned to a container\nmessage ContainerResources {\nstring name = 1;\nrepeated ContainerDevices devices = 2;\nrepeated int64 cpu_ids = 3;\nrepeated ContainerMemory memory = 4;\nrepeated DynamicResource dynamic_resources = 5;\n}\n\n// ContainerMemory contains information about memory and hugepages assigned to a container\nmessage ContainerMemory {\nstring memory_type = 1;\nuint64 size = 2;\nTopologyInfo topology = 3;\n}\n\n// Topology describes hardware topology of the resource\nmessage TopologyInfo {\nrepeated NUMANode nodes = 1;\n}\n\n// NUMA representation of NUMA node\nmessage NUMANode {\nint64 ID = 1;\n}\n\n// ContainerDevices contains information about the devices assigned to a container\nmessage ContainerDevices {\nstring resource_name = 1;\nrepeated string device_ids = 2;\nTopologyInfo topology = 3;\n}\n\n// DynamicResource contains information about the devices assigned to a container by Dynamic Resource Allocation\nmessage DynamicResource {\nstring class_name = 1;\nstring claim_name = 2;\nstring claim_namespace = 3;\nrepeated ClaimResource claim_resources = 4;\n}\n\n// ClaimResource contains per-plugin resource information\nmessage ClaimResource {\nrepeated CDIDevice cdi_devices = 1 [(gogoproto.customname) = \"CDIDevices\"];\n}\n\n// CDIDevice specifies a CDI device information\nmessage CDIDevice {\n// Fully qualified CDI device name\n// for example: vendor.com/gpu=gpudevice1\n// see more details in the CDI specification:\n// https://github.com/container-orchestrated-devices/container-device-interface/blob/main/SPEC.md\nstring name = 1;\n}\n```\n\ncpu_ids in the `ContainerResources` in the `List` endpoint correspond to exclusive CPUs allocated\nto a particular container. If the goal is to evaluate CPUs that belong to the shared pool, the `List`\nendpoint needs to be used in conjunction with the `GetAllocatableResources` endpoint as explained\nbelow:\n1. Call `GetAllocatableResources` to get a list of all the allocatable CPUs\n2. Call `GetCpuIds` on all `ContainerResources` in the system\n3. Subtract out all of the CPUs from the `GetCpuIds` calls from the `GetAllocatableResources` call\n\n### `GetAllocatableResources` gRPC endpoint {#grpc-endpoint-getallocatableresources}\n\nGetAllocatableResources provides information on resources initially available on the worker node.\nIt provides more information than kubelet exports to APIServer.\n\n`GetAllocatableResources` should only be used to evaluate [allocatable](/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable)\nresources on a node. If the goal is to evaluate free/unallocated resources it should be used in\nconjunction with the List() endpoint. The result obtained by `GetAllocatableResources` would remain\nthe same unless the underlying resources exposed to kubelet change. This happens rarely but when\nit does (for example: hotplug/hotunplug, device health changes), client is expected to call\n`GetAllocatableResources` endpoint.\n\nHowever, calling `GetAllocatableResources` endpoint is not sufficient in case of cpu and/or memory\nupdate and Kubelet needs to be restarted to reflect the correct resource capacity and allocatable.\n\n```gRPC\n// AllocatableResourcesResponses contains information about all the devices known by the kubelet\nmessage AllocatableResourcesResponse {\nrepeated ContainerDevices devices = 1;\nrepeated int64 cpu_ids = 2;\nrepeated ContainerMemory memory = 3;\n}\n```\n\n`ContainerDevices` do expose the topology information declaring to which NUMA cells the device is\naffine. The NUMA cells are identified using a opaque integer ID, which value is consistent to\nwhat device plugins report\n[when they register themselves to the kubelet](/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#device-plugin-integration-with-the-topology-manager).\n\nThe gRPC service is served over a unix socket at `pod-resources/kubelet.sock` within the\nkubelet's root directory (typically `/var/lib/kubelet/pod-resources/kubelet.sock`).\nMonitoring agents for device plugin resources can be deployed as a daemon, or as a DaemonSet.\nThe canonical directory `pod-resources` within the kubelet root directory (typically\n`/var/lib/kubelet/pod-resources`) requires privileged access, so monitoring\nagents must run in a privileged security context. If a device monitoring agent is running as a\nDaemonSet, the `pod-resources` directory must be mounted as a\nin the device monitoring agent's\n[PodSpec](/docs/reference/generated/kubernetes-api//#podspec-v1-core).\n\nWhen accessing the `pod-resources/kubelet.sock` from DaemonSet\nor any other app deployed as a container on the host, which is mounting socket as\na volume, it is a good practice to mount the `pod-resources` directory\ninstead of the socket file itself. This will ensure\nthat after kubelet restart, the container will be able to re-connect to this socket.\n\nOn a typical Linux node, this means mounting `/var/lib/kubelet/pod-resources/`\ninstead of `/var/lib/kubelet/pod-resources/kubelet.sock`.\n\nContainer mounts are managed by inode referencing the socket or directory,\ndepending on what was mounted. When kubelet restarts, the socket is deleted\nand a new socket is created, while the directory stays untouched.\nSo the original inode for the socket becomes unusable. The inode to the directory\nwill continue working.\n\n### `Get` gRPC endpoint {#grpc-endpoint-get}\n\nThe `Get` endpoint provides information on resources of a running Pod. It exposes information\nsimilar to those described in the `List` endpoint. The `Get` endpoint requires `PodName`\nand `PodNamespace` of the running Pod.\n\n```gRPC\n// GetPodResourcesRequest contains information about the pod\nmessage GetPodResourcesRequest {\nstring pod_name = 1;\nstring pod_namespace = 2;\n}\n```\n\nThe `Get` endpoint can provide Pod information related to dynamic resources\nallocated by the dynamic resource allocation API.\nStarting from Kubernetes v1.34, this feature is enabled by default.\n\n## Device plugin integration with the Topology Manager\n\nThe Topology Manager is a Kubelet component that allows resources to be co-ordinated in a Topology\naligned manner. In order to do this, the Device Plugin API was extended to include a\n`TopologyInfo` struct.\n\n```gRPC\nmessage TopologyInfo {\nrepeated NUMANode nodes = 1;\n}\n\nmessage NUMANode {\nint64 ID = 1;\n}\n```\n\nDevice Plugins that wish to leverage the Topology Manager can send back a populated TopologyInfo\nstruct as part of the device registration, along with the device IDs and the health of the device.\nThe device manager will then use this information to consult with the Topology Manager and make\nresource assignment decisions.\n\n`TopologyInfo` supports setting a `nodes` field to either `nil` or a list of NUMA nodes. This\nallows the Device Plugin to advertise a device that spans multiple NUMA nodes.\n\nSetting `TopologyInfo` to `nil` or providing an empty list of NUMA nodes for a given device\nindicates that the Device Plugin does not have a NUMA affinity preference for that device.\n\nAn example `TopologyInfo` struct populated for a device by a Device Plugin:\n\n```\npluginapi.Device{ID: \"25102017\", Health: pluginapi.Healthy, Topology:&pluginapi.TopologyInfo{Nodes: []*pluginapi.NUMANode{&pluginapi.NUMANode{ID: 0,},}}}\n```\n\n## Device plugin examples {#examples}\n\nHere are some examples of device plugin implementations:\n\n* [Akri](https://github.com/project-akri/akri), which lets you easily expose heterogeneous leaf devices (such as IP cameras and USB devices).\n* The [AMD GPU device plugin](https://github.com/ROCm/k8s-device-plugin)\n* The [generic device plugin](https://github.com/squat/generic-device-plugin) for generic Linux devices and USB devices\n* The [HAMi](https://github.com/Project-HAMi/HAMi) for heterogeneous AI computing virtualization middleware (for example, NVIDIA, Cambricon, Hygon, Iluvatar, MThreads, Ascend, Metax)\n* The [Intel device plugins](https://github.com/intel/intel-device-plugins-for-kubernetes) for\nIntel GPU, FPGA, QAT, VPU, SGX, DSA, DLB and IAA devices\n* The [KubeVirt device plugins](https://github.com/kubevirt/kubernetes-device-plugins) for\nhardware-assisted virtualization\n* The [NVIDIA GPU device plugin](https://github.com/NVIDIA/k8s-device-plugin), NVIDIA's\nofficial device plugin to expose NVIDIA GPUs and monitor GPU health\n* The [NVIDIA GPU device plugin for Container-Optimized OS](https://github.com/GoogleCloudPlatform/container-engine-accelerators/tree/master/cmd/nvidia_gpu)\n* The [RDMA device plugin](https://github.com/hustcat/k8s-rdma-device-plugin)\n* The [SocketCAN device plugin](https://github.com/collabora/k8s-socketcan)\n* The [Solarflare device plugin](https://github.com/vikaschoudhary16/sfc-device-plugin)\n* The [SR-IOV Network device plugin](https://github.com/intel/sriov-network-device-plugin)\n* The [Xilinx FPGA device plugins](https://github.com/Xilinx/FPGA_as_a_Service/tree/master/k8s-device-plugin) for Xilinx FPGA devices\n\n##\n\n* Learn about [scheduling GPU resources](/docs/tasks/manage-gpus/scheduling-gpus/) using device\nplugins\n* Learn about [advertising extended resources](/docs/tasks/administer-cluster/extended-resource-node/)\non a node\n* Learn about the [Topology Manager](/docs/tasks/administer-cluster/topology-manager/)\n* Read about using [hardware acceleration for TLS ingress](/blog/2019/04/24/hardware-accelerated-ssl/tls-termination-in-ingress-controllers-using-kubernetes-device-plugins-and-runtimeclass/)\nwith Kubernetes\n* Read more about [Extended Resource allocation by DRA](/docs/concepts/resource-management/dynamic-resource-allocation/dra-features/#extended-resource)", "source": "content/en/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Kubernetes (version 1.3 through to the latest , and likely onwards) lets you use\n[Container Network Interface](https://github.com/containernetworking/cni)\n(CNI) plugins for cluster networking. You must use a CNI plugin that is compatible with your\ncluster and that suits your needs. Different plugins are available (both open- and closed- source)\nin the wider Kubernetes ecosystem.\n\nA CNI plugin is required to implement the\n[Kubernetes network model](/docs/concepts/services-networking/#the-kubernetes-network-model).\n\nYou must use a CNI plugin that is compatible with the\n[v0.4.0](https://github.com/containernetworking/cni/blob/spec-v0.4.0/SPEC.md) or later\nreleases of the CNI specification. The Kubernetes project recommends using a plugin that is\ncompatible with the [v1.0.0](https://github.com/containernetworking/cni/blob/spec-v1.0.0/SPEC.md)\nCNI specification (plugins can be compatible with multiple spec versions).\n\n## Installation\n\nA Container Runtime, in the networking context, is a daemon on a node configured to provide CRI\nServices for kubelet. In particular, the Container Runtime must be configured to load the CNI\nplugins required to implement the Kubernetes network model.\n\nPrior to Kubernetes 1.24, the CNI plugins could also be managed by the kubelet using the\n`cni-bin-dir` and `network-plugin` command-line parameters.\nThese command-line parameters were removed in Kubernetes 1.24, with management of the CNI no\nlonger in scope for kubelet.\n\nSee [Troubleshooting CNI plugin-related errors](/docs/tasks/administer-cluster/migrating-from-dockershim/troubleshooting-cni-plugin-related-errors/)\nif you are facing issues following the removal of dockershim.\n\nFor specific information about how a Container Runtime manages the CNI plugins, see the\ndocumentation for that Container Runtime, for example:\n\n- [containerd](https://github.com/containerd/containerd/blob/main/script/setup/install-cni)\n- [CRI-O](https://github.com/cri-o/cri-o/blob/main/contrib/cni/README.md)\n\nFor specific information about how to install and manage a CNI plugin, see the documentation for\nthat plugin or [networking provider](/docs/concepts/cluster-administration/networking/#how-to-implement-the-kubernetes-network-model).\n\n## Network Plugin Requirements\n\n### Loopback CNI\n\nIn addition to the CNI plugin installed on the nodes for implementing the Kubernetes network\nmodel, Kubernetes also requires the container runtimes to provide a loopback interface `lo`, which\nis used for each sandbox (pod sandboxes, vm sandboxes, ...).\nImplementing the loopback interface can be accomplished by re-using the\n[CNI loopback plugin.](https://github.com/containernetworking/plugins/blob/master/plugins/main/loopback/loopback.go)\nor by developing your own code to achieve this (see\n[this example from CRI-O](https://github.com/cri-o/ocicni/blob/release-1.24/pkg/ocicni/util_linux.go#L91)).\n\n### Support hostPort\n\nThe CNI networking plugin supports `hostPort`. You can use the official\n[portmap](https://github.com/containernetworking/plugins/tree/master/plugins/meta/portmap)\nplugin offered by the CNI plugin team or use your own plugin with portMapping functionality.\n\nIf you want to enable `hostPort` support, you must specify `portMappings capability` in your\n`cni-conf-dir`. For example:\n\n```json\n{\n\"name\": \"k8s-pod-network\",\n\"cniVersion\": \"0.4.0\",\n\"plugins\": [\n{\n\"type\": \"calico\",\n\"log_level\": \"info\",\n\"datastore_type\": \"kubernetes\",\n\"nodename\": \"127.0.0.1\",\n\"ipam\": {\n\"type\": \"host-local\",\n\"subnet\": \"usePodCidr\"\n},\n\"policy\": {\n\"type\": \"k8s\"\n},\n\"kubernetes\": {\n\"kubeconfig\": \"/etc/cni/net.d/calico-kubeconfig\"\n}\n},\n{\n\"type\": \"portmap\",\n\"capabilities\": {\"portMappings\": true},\n\"externalSetMarkChain\": \"KUBE-MARK-MASQ\"\n}\n]\n}\n```\n\n### Support traffic shaping\n\n**Experimental Feature**\n\nThe CNI networking plugin also supports pod ingress and egress traffic shaping. You can use the\nofficial [bandwidth](https://github.com/containernetworking/plugins/tree/master/plugins/meta/bandwidth)\nplugin offered by the CNI plugin team or use your own plugin with bandwidth control functionality.\n\nIf you want to enable traffic shaping support, you must add the `bandwidth` plugin to your CNI\nconfiguration file (default `/etc/cni/net.d`) and ensure that the binary is included in your CNI\nbin dir (default `/opt/cni/bin`).\n\n```json\n{\n\"name\": \"k8s-pod-network\",\n\"cniVersion\": \"0.4.0\",\n\"plugins\": [\n{\n\"type\": \"calico\",\n\"log_level\": \"info\",\n\"datastore_type\": \"kubernetes\",\n\"nodename\": \"127.0.0.1\",\n\"ipam\": {\n\"type\": \"host-local\",\n\"subnet\": \"usePodCidr\"\n},\n\"policy\": {\n\"type\": \"k8s\"\n},\n\"kubernetes\": {\n\"kubeconfig\": \"/etc/cni/net.d/calico-kubeconfig\"\n}\n},\n{\n\"type\": \"bandwidth\",\n\"capabilities\": {\"bandwidth\": true}\n}\n]\n}\n```\n\nNow you can add the `kubernetes.io/ingress-bandwidth` and `kubernetes.io/egress-bandwidth`\nannotations to your Pod. For example:\n\n```yaml\napiVersion: v1\nkind: Pod\nmetadata:\nannotations:\nkubernetes.io/ingress-bandwidth: 1M\nkubernetes.io/egress-bandwidth: 1M\n...\n```\n\n##\n\n- Learn more about [Cluster Networking](/docs/concepts/cluster-administration/networking/)\n- Learn more about [Network Policies](/docs/concepts/services-networking/network-policies/)\n- Learn about the [Troubleshooting CNI plugin-related errors](/docs/tasks/administer-cluster/migrating-from-dockershim/troubleshooting-cni-plugin-related-errors/)", "source": "content/en/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "You can visualize and manage Kubernetes objects with more tools than kubectl and\nthe dashboard. A common set of labels allows tools to work interoperably, describing\nobjects in a common manner that all tools can understand.\n\nIn addition to supporting tooling, the recommended labels describe applications\nin a way that can be queried.\n\nThe metadata is organized around the concept of an _application_. Kubernetes is not\na platform as a service (PaaS) and doesn't have or enforce a formal notion of an application.\nInstead, applications are informal and described with metadata. The definition of\nwhat an application contains is loose.\n\nThese are recommended labels. They make it easier to manage applications\nbut aren't required for any core tooling.\n\nShared labels and annotations share a common prefix: `app.kubernetes.io`. Labels\nwithout a prefix are private to users. The shared prefix ensures that shared labels\ndo not interfere with custom user labels.\n\n## Labels\n\nIn order to take full advantage of using these labels, they should be applied\non every resource object.\n\n| Key | Description | Example | Type |\n| ----------------------------------- | --------------------- | -------- | ---- |\n| `app.kubernetes.io/name` | The name of the application | `mysql` | string |\n| `app.kubernetes.io/instance` | A unique name identifying the instance of an application | `mysql-abcxyz` | string |\n| `app.kubernetes.io/version` | The current version of the application (e.g., a [SemVer 1.0](https://semver.org/spec/v1.0.0.html), revision hash, etc.) | `5.7.21` | string |\n| `app.kubernetes.io/component` | The component within the architecture | `database` | string |\n| `app.kubernetes.io/part-of` | The name of a higher level application this one is part of | `wordpress` | string |\n| `app.kubernetes.io/managed-by` | The tool being used to manage the operation of an application | `Helm` | string |\n\nTo illustrate these labels in action, consider the following StatefulSet object:\n\n```yaml\n# This is an excerpt\napiVersion: apps/v1\nkind: StatefulSet\nmetadata:\nlabels:\napp.kubernetes.io/name: mysql\napp.kubernetes.io/instance: mysql-abcxyz\napp.kubernetes.io/version: \"5.7.21\"\napp.kubernetes.io/component: database\napp.kubernetes.io/part-of: wordpress\napp.kubernetes.io/managed-by: Helm\n```\n\n## Applications And Instances Of Applications\n\nAn application can be installed one or more times into a Kubernetes cluster and,\nin some cases, the same namespace. For example, WordPress can be installed more\nthan once where different websites are different installations of WordPress.\n\nThe name of an application and the instance name are recorded separately. For\nexample, WordPress has a `app.kubernetes.io/name` of `wordpress` while it has\nan instance name, represented as `app.kubernetes.io/instance` with a value of\n`wordpress-abcxyz`. This enables the application and instance of the application\nto be identifiable. Every instance of an application must have a unique name.\n\n## Examples\n\nTo illustrate different ways to use these labels the following examples have varying complexity.\n\n### A Simple Stateless Service\n\nConsider the case for a simple stateless service deployed using `Deployment` and `Service` objects. The following two snippets represent how the labels could be used in their simplest form.\n\nThe `Deployment` is used to oversee the pods running the application itself.\n```yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\nlabels:\napp.kubernetes.io/name: myservice\napp.kubernetes.io/instance: myservice-abcxyz\n...\n```\n\nThe `Service` is used to expose the application.\n```yaml\napiVersion: v1\nkind: Service\nmetadata:\nlabels:\napp.kubernetes.io/name: myservice\napp.kubernetes.io/instance: myservice-abcxyz\n...\n```\n\n### Web Application With A Database\n\nConsider a slightly more complicated application: a web application (WordPress)\nusing a database (MySQL), installed using Helm. The following snippets illustrate\nthe start of objects used to deploy this application.\n\nThe start to the following `Deployment` is used for WordPress:\n\n```yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\nlabels:\napp.kubernetes.io/name: wordpress\napp.kubernetes.io/instance: wordpress-abcxyz\napp.kubernetes.io/version: \"4.9.4\"\napp.kubernetes.io/managed-by: Helm\napp.kubernetes.io/component: server\napp.kubernetes.io/part-of: wordpress\n...\n```\n\nThe `Service` is used to expose WordPress:\n\n```yaml\napiVersion: v1\nkind: Service\nmetadata:\nlabels:\napp.kubernetes.io/name: wordpress\napp.kubernetes.io/instance: wordpress-abcxyz\napp.kubernetes.io/version: \"4.9.4\"\napp.kubernetes.io/managed-by: Helm\napp.kubernetes.io/component: server\napp.kubernetes.io/part-of: wordpress\n...\n```\n\nMySQL is exposed as a `StatefulSet` with metadata for both it and the larger application it belongs to:\n\n```yaml\napiVersion: apps/v1\nkind: StatefulSet\nmetadata:\nlabels:\napp.kubernetes.io/name: mysql\napp.kubernetes.io/instance: mysql-abcxyz\napp.kubernetes.io/version: \"5.7.21\"\napp.kubernetes.io/managed-by: Helm\napp.kubernetes.io/component: database\napp.kubernetes.io/part-of: wordpress\n...\n```\n\nThe `Service` is used to expose MySQL as part of WordPress:\n\n```yaml\napiVersion: v1\nkind: Service\nmetadata:\nlabels:\napp.kubernetes.io/name: mysql\napp.kubernetes.io/instance: mysql-abcxyz\napp.kubernetes.io/version: \"5.7.21\"\napp.kubernetes.io/managed-by: Helm\napp.kubernetes.io/component: database\napp.kubernetes.io/part-of: wordpress\n...\n```\n\nWith the MySQL `StatefulSet` and `Service` you'll notice information about both MySQL and WordPress, the broader application, are included.", "source": "content/en/docs/concepts/overview/working-with-objects/common-labels.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "The Kubernetes API server stores objects, relying on an etcd-compatible backing\nstore (often, the backing storage is etcd itself). Each object is serialized\nusing a particular version of that API type; for example, the v1 representation\nof a ConfigMap. Kubernetes uses the term _storage version_ to describe how an\nobject is stored in your cluster.\n\nThe Kubernetes API also relies on automatic conversion; for example, if you have\na HorizontalPodAutoscaler, then you can interact with that\nHorizontalPodAutoscaler using any mix of the v1 and v2 versions of the\nHorizontalPodAutoscaler API. Kubernetes is responsible for converting each API\ncall so that clients do not see what version is actually serialized.\n\nFor cluster administrators, object storage version is an important concept to\nunderstand since it is what links the API representation of the object to the\nactual encoding in the storage backend. This can be important for when the\nunderlying binary encodings of the object matter, such as for encryption at\nrest, or API deprecation.\n\nThe same API may have multiple storage versions that the API Server can then\nconvert to an object schema. A single object that is part of that resource must\nonly have one storage version at any time. This means that the API Server is\naware of the binary encodings of the objects and is able to convert between all\nthe stored versions to the API Representation of the object dynamically.\n\nThe version of an object is separate from the storage version entirely. For\nexample, a `v1alpha1` and `v1beta1` API Object for the same Resource will be\nencoded the same in storage as long as the storage version has not been updated\nbetween the two objects.\n\n## Storage version to resource mapping\n\nEvery resource will have 1 active storage version at any point in time, meaning\nthat any write to an object will store the object at that storage version. The\nstorage version can be updated however, making it so that objects can be stored\nat differing versions. One object will only be stored at one storage version at\nany time.\n\nReads from the API Server will convert the stored data to the API representation\nof the object. This makes it so that old storage versions can sit indefinitely\nas long as no updates occur to the object. Writes, on the other hand, will\nconvert the stored object to the new representation upon update.\n\n## Storage versions for custom resources {#CustomResourceDefinition-storage-version}\n\n[Custom\nresources](/docs/concepts/extend-kubernetes/api-extension/custom-resources/#storage) are\ndefined dynamically, and as such differ from built in Kubernetes types with\ntheir storage version. Builtin objects generally have their storage encoding\ndefined separately from their API types, where the stored object acts as a hub\nand the specific version of the resource does not matter apart from being a\nfield in the object schema.\n\nHowever, for custom resources, a certain version of the resource must be set as\nthe storage version. The schema defined by that specific version of the custom\nresource will be used as the encoding of the resource in the storage layer. See\nthe [advanced CRD\nfeatureset](/docs/concepts/extend-kubernetes/api-extension/custom-resources/#advanced-features-and-flexibility)\nfor more detailed information on the API setup and versioning.\n\nFor example see this CustomResourceDefinition for _crontabs_:\n\n```yaml\napiVersion: apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\nname: crontabs.example.com\nspec:\ngroup: example.com\n# list of versions supported by this CustomResourceDefinition\nversions:\n- name: v1beta1\n# Each version can be enabled/disabled by Served flag.\nserved: true\n# One and only one version must be marked as the storage version.\nstorage: true\nschema:\nopenAPIV3Schema:\ntype: object\nproperties:\nhost:\ntype: string\nport:\ntype: string\n- name: v1\nserved: true\nstorage: false\nschema:\nopenAPIV3Schema:\ntype: object\nproperties:\nhost:\ntype: string\nport:\ntype: string\ntime:\ntype: string\nconversion:\nstrategy: None\nscope: Namespaced\nnames:\nplural: crontabs\nsingular: crontab\nkind: CronTab\nshortNames:\n- ct\n```\n\nThe `v1beta1` API definition is used as the storage version, meaning that any\nupdates or creation of `crontabs` will be stored with the object schema of the\n`v1beta1` api. In this case it actually would mean that the `v1` API object\nwould never be able to store the `time` field since it is not part of the\nstorage definition. This schema is used in the storage layer as the binary\nencoding of the object itself. Trying to set two versions as the stored version\nat the same time is considered invalid, since that would mean that two data\nschemes would be considered valid ways to store the objects at the same time.\n\nUpon modification of the version that is used for storage, that version of the\nAPI will be used to store any new or update CRs. Watching or getting the object\nwill have the object be in use but will just convert the object from the old\nstorage version and not affect the object. Only updating or creating will have\nan effect and use the newly defined storage version.\n\n## How storage versions are relevant to encryption at rest\n\nThere are tools to [encrypt the at rest\nstorage](/docs/tasks/administer-cluster/kms-provider/) of a cluster, especially\nfor cluster secrets. This adds an additional layer of protection for data\nexfiltration since the actual stored data in the cluster is encrypted. This\nmeans that the API Server is actually decrypting the data as it retrieves them\nfrom storage. The APIServer must have the key for that\nstorage version in order to decode the object properly.\n\nThe storage version in this case is more than just the binary encoding of the\nobject. As long as what is stored can be somehow converted into the API object,\nit can be used as a storage version.\n\n## Migrating to a different storage version\n\nMultiple storage versions for a single resource can pose problems for cluster\nadministrators. A cluster administrator may not remove old versions of an API\nfor CRDs which may be unsupported until they are sure that all objects are no\nlonger using the storage version associated with it. With a large number of\nobjects and an opaque view into which ones are new and which ones still are\nbacked by old storage versions, it makes it difficult to tell when a version can\nbe safely removed. If a version is removed prematurely, it can mean being unable\nto read the object entirely.\n\nAnother important issue is the use of encryption keys as defined in the section\nabove. Since a resource must be actively in use to update the storage version,\nwhen a key rotation is done, both the old encryption key and the new encryption\nkey must remain in use until the administrator is sure all objects have been\nwritten to at least once. This poses both security risks and usability issues,\nsince a key cannot be fully removed from use until then.\n\nSee [storage version\nmigration](/docs/tasks/manage-kubernetes-objects/storage-version-migration) on\nexamples of how to run a migration to ensure that all objects are using a newer\nstorage version without manual intervention.", "source": "content/en/docs/concepts/overview/working-with-objects/storage-version.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page describes how to observe the status and health of resources that are\ndynamically allocated with DRA.\n\n## Observability of dynamic resources {#observability-dynamic-resources}\n\nYou can check the status of dynamically allocated resources by using any of the\nfollowing methods:\n\n* [kubelet device metrics](#monitoring-resources)\n* [ResourceClaim status](#resourceclaim-device-status)\n* [Device health monitoring](#device-health-monitoring)\n\n### kubelet device metrics {#monitoring-resources}\n\nThe `PodResourcesLister` kubelet gRPC service lets you monitor in-use devices.\nThe `DynamicResource` message provides information that's specific to dynamic\nresource allocation, such as the device name and the claim name. For details,\nsee\n[Monitoring device plugin resources](/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#monitoring-device-plugin-resources).\n\n### ResourceClaim device status {#resourceclaim-device-status}\n\nDRA drivers can report driver-specific\n[device status](/docs/concepts/overview/working-with-objects/#object-spec-and-status)\ndata for each allocated device in the `status.devices` field of a ResourceClaim.\nFor example, the driver might list the IP addresses that are assigned to a\nnetwork interface device. Updating this field requires specific synthetic RBAC permissions,\nsee\n[Hardening Guide - Dynamic Resource Allocation](/docs/concepts/security/hardening-guide/dynamic-resource-allocation/)\nand\n[Harden Dynamic Resource Allocation in Your Cluster](/docs/tasks/administer-cluster/hardening-dra/).\n\nThe accuracy of the information that a driver adds to a ResourceClaim\n`status.devices` field depends on the driver. Evaluate drivers to decide whether\nyou can rely on this field as the only source of device information.\n\nIf you disable the\n[`DRAResourceClaimDeviceStatus` feature gate](/docs/reference/command-line-tools-reference/feature-gates/#DRAResourceClaimDeviceStatus), the\n`status.devices` field automatically gets cleared when storing the ResourceClaim.\nA ResourceClaim device status is supported when it is possible, from a DRA\ndriver, to update an existing ResourceClaim where the `status.devices` field is\nset.\n\nIn the following example, the `status.devices` field of a ResourceClaim has been\npopulated by the driver (`resource-driver.example.com`) responsible for managing\nthe allocated device:\n\n```yaml\napiVersion: resource.k8s.io/v1\nkind: ResourceClaim\nmetadata:\nname: macvlan-eth0\nspec:\n...\nstatus:\nallocation:\ndevices:\nresults:\n- device: eth0\ndriver: resource-driver.example.com\npool: nic-worker-a\nrequest: macvlan-eth0\nshareID: 8e7acdf9-0290-4ecd-a801-a654b021d2b7\nconsumedCapacity:\nresource-driver.example.com/bandwidth: 1G\ndevices:\n- conditions:\n- lastTransitionTime: \"2025-10-21T08:38:17Z\"\nmessage: Device successfully allocated and assigned to the pod\nreason: NetworkReady\nstatus: \"True\"\ntype: NetworkReady\ndevice: eth0\ndriver: resource-driver.example.com\nnetworkData:\nhardwareAddress: 00:01:ec:84:fb:51\ninterfaceName: net1\nips:\n- 10.10.1.2/24\n- 2001:db8::1/64\npool: nic-worker-a\nshareID: 8e7acdf9-0290-4ecd-a801-a654b021d2b7\n```\n\nIf a device has not been allocated, a driver's request to update the `status.devices`\nfield of the ResourceClaim with that device is rejected. When a device is\ndeallocated (removed from `status.allocation.devices`), the corresponding entry in\n`status.devices` is automatically removed.\n\nFor details about the `status.devices` field, see the\nAPI reference.\n\n### Device Health Monitoring {#device-health-monitoring}\n\nKubernetes provides a mechanism for monitoring and reporting the health of dynamically allocated infrastructure resources.\nFor stateful applications running on specialized hardware, it is critical to know when a device has failed or become unhealthy. It is also helpful to find out if the device recovers.\n\nTo use this functionality, the `ResourceHealthStatus` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/#ResourceHealthStatus) must be enabled (beta and enabled by default since v1.36), and the DRA driver must implement the `DRAResourceHealth` gRPC service.\n\nWhen a DRA driver detects that an allocated device has become unhealthy, it reports this status back to the kubelet. This health information is then exposed directly in the Pod's status. The kubelet populates the `allocatedResourcesStatus` field in the status of each container, detailing the health of each device assigned to that container. Each resource health entry can include an optional `message` field with additional human-readable context about the health status, such as error details or failure reasons.\n\nIf the kubelet does not receive a health update from a DRA driver within a timeout period, the device's health status is marked as \"Unknown\". DRA drivers can configure this timeout on a per-device basis by setting the `health_check_timeout_seconds` field in the `DeviceHealth` gRPC message. If not specified, the kubelet uses a default timeout of 30 seconds. This allows different hardware types (for example, GPUs, FPGAs, or storage devices) to use appropriate timeout values based on their health-reporting characteristics.\n\nThis provides crucial visibility for users and controllers to react to hardware failures.\nFor a Pod that is failing, you can inspect this status to determine if the failure was related to an unhealthy device.\n\nDevice health status is not updated in the Pod status after a Pod has terminated (for example, in Failed state).\n\n## Resource pool status {#resource-pool-status}\n\nYou can query the availability of devices in resource pools using the\nResourcePoolStatusRequest API. This provides visibility into how many devices\nare available, allocated, or unavailable across your cluster's DRA resource pools.\n\nTo check resource pool status:\n\n1. Create a ResourcePoolStatusRequest specifying the driver name (required) and\noptionally a limit on the number of pools returned. You can also limit it to a single pool by specifying a pool name:\n\n```yaml\napiVersion: resource.k8s.io/v1alpha3\nkind: ResourcePoolStatusRequest\nmetadata:\nname: check-gpus\nspec:\ndriver: example.com/gpu\n# Optional: filter to a specific pool\n# poolName: my-pool\n# Optional: limit number of pools returned (default: 100, max: 1000)\n# limit: 10\n```\n\n1. Wait for the controller to process the request:\n\n```shell\nkubectl wait --for=condition=Complete resourcepoolstatusrequest/check-gpus --timeout=30s\n```\n\n1. Read the status to see pool availability:\n\n```shell\nkubectl get resourcepoolstatusrequest/check-gpus -o yaml\n```\n\nThe status includes:\n- `poolCount`: total number of pools matching the filter (may exceed the number\nof pools listed if truncated by the limit).\n- `pools`: a list of pool details, each containing:\n- `driver` and `poolName`: identify the pool.\n- `generation`: the latest pool generation observed across ResourceSlices.\n- `resourceSliceCount`: the number of ResourceSlices making up the pool.\n- `totalDevices`: total devices in the pool.\n- `allocatedDevices`: devices currently allocated to claims.\n- `availableDevices`: devices available for allocation\n(totalDevices - allocatedDevices - unavailableDevices).\n- `unavailableDevices`: devices not available due to taints or other conditions.\n- `nodeName`: the node associated with the pool, if any.\n- `validationError`: set when the pool's data could not be fully validated\n(for example, during a generation rollout). When set, device count fields\nmay be unset.\n- `partitionSummary`: for [partitionable](/docs/concepts/resource-management/dynamic-resource-allocation/dra-features/#partitionable-devices)\npools, per-partition-type allocatability (see\n[Partition summary](#resource-pool-partition-summary)).\n- `shareableSummary`: for pools with [shareable devices](/docs/concepts/resource-management/dynamic-resource-allocation/dra-features/#consumable-capacity),\naggregate capacity usage (see\n[Shareable summary](#resource-pool-shareable-summary)).\n- `conditions`: includes `Complete` (success) or `Failed` (error) condition types.\n\n1. Delete the request when done:\n\n```shell\nkubectl delete resourcepoolstatusrequest/check-gpus\n```\n\nResourcePoolStatusRequest objects are processed once by a controller in\nkube-controller-manager. The spec is immutable once created, and the entire\nobject becomes immutable once the status is populated. To get updated\navailability data, delete and recreate the request. Completed requests are\nautomatically cleaned up after 1 hour.\n\nThis feature requires explicit RBAC permissions on the ResourcePoolStatusRequest\nresource. No default ClusterRoles include this permission.\n\nResource pool status is controlled by the\n[`DRAResourcePoolStatus` feature gate](/docs/reference/command-line-tools-reference/feature-gates/#DRAResourcePoolStatus)\nin the `kube-apiserver` and `kube-controller-manager`.\n\n### Partition summary {#resource-pool-partition-summary}\n\nA single physical device such as a GPU may be advertised as several partition\ntypes (for example, a full GPU versus a half-sized MIG slice) that draw from the\nsame shared counters. Because these partitions compete for the same underlying\ncapacity, a plain device count does not tell you how many of each type can still\nbe allocated. For [partitionable](/docs/concepts/resource-management/dynamic-resource-allocation/dra-features/#partitionable-devices)\npools, the `partitionSummary` view answers that question. For each partition type\nit reports:\n\n- `attribute`: the fully qualified name of the device attribute whose value\ngroups this entry. It is the ResourceSlice's `spec.partitionTypeAttribute`, or\nthe request's `spec.defaultPartitionTypeAttribute` when the slice declares none.\n- `type`: the value of that attribute on the device (for example, `Full` or\n`Half`).\n- `total`: the number of devices of this partition type in the pool.\n- `allocatable`: how many *additional* devices of this partition type could still\nbe allocated given current shared-counter consumption.\n\nThe named attribute must be a string attribute. If a partitionable device's\npartition-type attribute is missing or is not a string (for example, an integer,\nboolean, or version value), the pool reports a validation error instead of a\npartition summary. There is no special handling for\n[list-type attributes](/docs/reference/command-line-tools-reference/feature-gates/#DRAListTypeAttributes);\na non-string attribute is simply not a valid partition-type attribute.\n\nTo produce this view, the driver labels each partitionable device with a string\nattribute whose value names the partition type, and names that attribute in the\nResourceSlice's `partitionTypeAttribute` field:\n\n```yaml\napiVersion: resource.k8s.io/v1\nkind: ResourceSlice\n# ...\nspec:\n# Every partitionable device in this slice carries this attribute; devices\n# that share a value share the same shared-counter cost.\npartitionTypeAttribute: gpu.example.com/profile\n```\n\nIf a driver has not yet been updated to declare `partitionTypeAttribute`, a\nrequest can still obtain a partition summary by naming a fallback attribute in\nits spec. A slice's own `partitionTypeAttribute` always takes precedence; the\nrequest-level default applies only to devices whose slice does not declare one:\n\n```yaml\napiVersion: resource.k8s.io/v1alpha3\nkind: ResourcePoolStatusRequest\nmetadata:\nname: check-gpu-partitions\nspec:\ndriver: gpu.example.com\n# Fallback grouping attribute for slices that don't declare one themselves.\ndefaultPartitionTypeAttribute: gpu.example.com/profile\n```\n\nWhen neither the slice nor the request names an attribute, a partitionable pool\nreports no `partitionSummary`.\n\nThe `partitionSummary` view is controlled by the\n[`DRAPartitionableDevicesType` feature gate](/docs/reference/command-line-tools-reference/feature-gates/#DRAPartitionableDevicesType)\nin the `kube-apiserver` and `kube-controller-manager`, which in turn requires the\n[`DRAResourcePoolStatus`](/docs/reference/command-line-tools-reference/feature-gates/#DRAResourcePoolStatus)\nand\n[`DRAPartitionableDevices`](/docs/reference/command-line-tools-reference/feature-gates/#DRAPartitionableDevices)\nfeature gates to be enabled.\n\n### Shareable summary {#resource-pool-shareable-summary}\n\nFor pools that contain [shareable devices](/docs/concepts/resource-management/dynamic-resource-allocation/dra-features/#consumable-capacity)\n(devices that set `allowMultipleAllocations` and can be consumed by multiple\nclaims), `shareableSummary` reports aggregate capacity usage across the pool:\n\n- `fullyAvailableDevices`: shareable devices with no capacity consumed.\n- `partiallyAvailableDevices`: shareable devices with some, but not all, capacity\nconsumed.\n- `capacity`: per capacity name, the aggregate `total`, `consumed`, and\n`available` (`total` minus `consumed`, never negative) amounts across the pool.\n\nThe `shareableSummary` is populated only when at least one device in the pool is\nshareable. It is part of the [resource pool status](#resource-pool-status)\nfeature (the\n[`DRAResourcePoolStatus`](/docs/reference/command-line-tools-reference/feature-gates/#DRAResourcePoolStatus)\nfeature gate) and does not require `DRAPartitionableDevicesType`; the shareable\ndevices it summarizes come from the\n[consumable capacity](/docs/concepts/resource-management/dynamic-resource-allocation/dra-features/#consumable-capacity)\nfeature.\n\n## DRA device metadata in containers {#device-metadata}\n\nDRA drivers can expose device metadata such as device attributes (PCI bus\naddresses or mediated device UUIDs) and network configuration directly to\ncontainers as JSON files.\nThis lets applications discover information about allocated devices without\nquerying the Kubernetes API or using custom controllers.\n\nKEP-5304 defines a\n[device metadata protocol](#device-metadata-protocol) that drivers must follow\nso that applications see a consistent layout across drivers and clusters. The\n[DRA kubelet plugin library](https://pkg.go.dev/k8s.io/dynamic-resource-allocation/kubeletplugin)\nimplements this protocol.\n\nDevice metadata follows the same rules as device access: it is available inside\na container only when that container requests the device. For details, see\n[Request devices in workloads using DRA](/docs/tasks/configure-pod-container/assign-resources/allocate-devices-dra/#request-devices-workloads).\n\n### Device metadata protocol {#device-metadata-protocol}\n\nThe protocol consists of four rules:\n\n1. **File paths.** Metadata files live inside containers under\n`/var/run/kubernetes.io/dra-device-attributes`. For a directly referenced\nResourceClaim, the path is\n`resourceclaims/ / / -metadata.json`. For a\nclaim created from a ResourceClaimTemplate, the path is\n`resourceclaimtemplates/ / / -metadata.json`,\nwhere `podClaimName` is `pod.spec.resourceClaims[].name`.\n\nWhen a request uses a [prioritized list](/docs/concepts/resource-management/dynamic-resource-allocation/dra-api/#prioritized-list), only the\ntop-level request name is used for the ` ` path segment. The\n`requests[].name` field in the file contains the full\n` / ` reference, such as `gpu/high-memory`.\n\nThe path constants are defined in\n[`k8s.io/dynamic-resource-allocation/api/metadata`](https://pkg.go.dev/k8s.io/dynamic-resource-allocation/api/metadata).\n\n1. **JSON API.** Each file is a stream of one or more\n[`DeviceMetadata`](https://pkg.go.dev/k8s.io/dynamic-resource-allocation/api/metadata/v1beta1#DeviceMetadata)\nobjects. Each object has `apiVersion` and `kind`, following Kubernetes API\nconventions. The same metadata is encoded once per configured API version\nin the order selected by the driver. Consumers use the first version that\nthey can decode and skip unknown versions. A malformed object in a known\nversion is an error.\n\n1. **Generation.** The initial file has `metadata.generation` set to `1`.\nEach update increments the generation so that consumers can detect changes.\n\n1. **Container exposure.** The DRA kubelet plugin library uses\nCDI to bind-mount each file\nread-only. Other implementations can use a different mechanism as long as\nthe file appears at the required path and is read-only.\n\n### Enable device metadata in a driver {#device-metadata-enable}\n\nDevice metadata is a driver-side feature. It has no Kubernetes feature gate and\nis disabled by default in the DRA kubelet plugin library. A driver must enable\nthe feature and explicitly select the versions that it writes:\n\n```go\nkubeletplugin.EnableDeviceMetadata(true, []schema.GroupVersion{\nmetadatav1beta1.SchemeGroupVersion,\nmetadatav1alpha1.SchemeGroupVersion,\n})\n```\n\nThe `v1beta1` version is required. A driver can also write `v1alpha1` for\ncompatibility with older consumers. The order in the slice is the order in the\nmetadata stream; the framework does not sort the versions. Drivers should put\nthe newest version first. Enabling device metadata with no versions, without\n`v1beta1`, or with an unknown version causes the plugin to fail during startup.\n\nFor each prepared device, the driver can populate\n[`Device.Metadata`](https://pkg.go.dev/k8s.io/dynamic-resource-allocation/kubeletplugin#Device)\nwith\n[`kubeletplugin.DeviceMetadata`](https://pkg.go.dev/k8s.io/dynamic-resource-allocation/kubeletplugin#DeviceMetadata).\nDrivers should include the attributes that they publish for that device in its\nResourceSlice, so workloads see the same information at runtime. Drivers can\nalso include attributes that are only relevant at runtime. For network devices,\ndrivers can add interface names, IP addresses, and hardware addresses after CNI\nconfiguration by calling\n[`UpdateRequestMetadata`](https://pkg.go.dev/k8s.io/dynamic-resource-allocation/kubeletplugin#Helper.UpdateRequestMetadata).\n\nThe kubelet plugin API links above describe integration for driver authors.\nThe DRA framework does not define a universal command-line flag, so cluster\noperators enable the feature through the deployment configuration provided by\ntheir driver.\n\nWhen enabled, the DRA kubelet plugin library writes metadata files while\npreparing allocated devices. It also writes CDI specifications to `/var/run/cdi`\nby default. The container runtime must be configured to discover CDI\nspecifications from that directory. The library determines the minimum CDI\nspecification version required for each generated specification.\n\nWhen one request allocates devices from multiple DRA drivers, each driver writes\nits own metadata file. Consumers that know the driver name should construct the\nexact path from the claim, request, and driver names. Go consumers can use\n[`ReadResourceClaimMetadata`](https://pkg.go.dev/k8s.io/dynamic-resource-allocation/devicemetadata#ReadResourceClaimMetadata)\nor\n[`ReadResourceClaimTemplateMetadata`](https://pkg.go.dev/k8s.io/dynamic-resource-allocation/devicemetadata#ReadResourceClaimTemplateMetadata)\nto read and merge all per-driver files for a request.\n\n### Metadata schema {#device-metadata-schema}\n\nEach object in a metadata file conforms to the\n[`DeviceMetadata`](https://pkg.go.dev/k8s.io/dynamic-resource-allocation/api/metadata/v1beta1#DeviceMetadata)\nAPI (`metadata.resource.k8s.io/v1beta1`).\n\nThe schema contains:\n\n- Standard object metadata for the ResourceClaim, including its name,\nnamespace, UID, and metadata generation.\n- The optional `podClaimName` for a claim generated from a\nResourceClaimTemplate.\n- A list of requests. Each request has a required name and a list of allocated\ndevices.\n- The driver, pool, and name for each device.\n- Optional device attributes and network data.\n\nAttribute values use the same representation as ResourceSlice device\nattributes. Each attribute has exactly one scalar value (`int`, `bool`,\n`string`, or `version`) or list value (`ints`, `bools`, `strings`, or\n`versions`). Device capacity values are not included in device metadata.\n\nNetwork data can contain `interfaceName`, `ips`, and `hardwareAddress`.\nFor field constraints, see the\n[`DeviceMetadata` API documentation](https://pkg.go.dev/k8s.io/dynamic-resource-allocation/api/metadata/v1beta1#DeviceMetadata).\n\nThe following example shows one object in a metadata stream for a GPU device\nallocated through a ResourceClaimTemplate:\n\n```json\n{\n\"kind\": \"DeviceMetadata\",\n\"apiVersion\": \"metadata.resource.k8s.io/v1beta1\",\n\"metadata\": {\n\"name\": \"pod0-gpu-2kqrd\",\n\"namespace\": \"gpu-test1\",\n\"uid\": \"c7e7b22e-239b-4498-b27c-7f1344481e14\",\n\"generation\": 1\n},\n\"podClaimName\": \"gpu\",\n\"requests\": [\n{\n\"name\": \"gpu\",\n\"devices\": [\n{\n\"driver\": \"gpu.example.com\",\n\"pool\": \"worker-0\",\n\"name\": \"gpu-0\",\n\"attributes\": {\n\"driverVersion\": {\n\"version\": \"1.0.0\"\n},\n\"index\": {\n\"int\": 0\n},\n\"model\": {\n\"string\": \"LATEST-GPU-MODEL\"\n},\n\"uuid\": {\n\"string\": \"gpu-18db0e85-99e9-c746-8531-ffeb86328b39\"\n}\n}\n}\n]\n}\n]\n}\n```\n\nThe DRA kubelet plugin does not validate metadata before writing it. Go\nconsumers can opt in to generated validation when decoding a stream. Decoding\nand validation have separate results: a validation error does not prevent a\nsuccessfully decoded object from being returned. For usage, see\n[Access DRA device metadata](/docs/tasks/configure-pod-container/assign-resources/access-dra-device-metadata/#read-metadata-application).\n\n### Immediate and deferred metadata {#device-metadata-lifecycle}\n\nFor immediate metadata, the driver supplies attributes or network data while it\nprepares the claim. The DRA kubelet plugin writes the file with generation `1`\nbefore the consuming container starts.\n\nFor deferred metadata, the driver can prepare a device without attributes or\nnetwork data. The initial generation `1` file contains the device identity. The\ndriver later calls `UpdateRequestMetadata` to replace the complete stream\natomically and increment the generation. An update requires the initial file to\nexist. If device preparation returns no devices for a request, the framework\ncreates neither a metadata file nor a metadata CDI device for that request.\n\nMetadata remains available to each consuming container for the lifetime of that\ncontainer. The framework removes the metadata files and CDI specifications\nafter the claim is unprepared.\n\nTo learn how to use device metadata in your workloads, see\n[Access DRA device metadata](/docs/tasks/configure-pod-container/assign-resources/access-dra-device-metadata/).\n\n### Custom drivers {#device-metadata-custom-drivers}\n\nCustom drivers that do not use the DRA kubelet plugin library must implement the\n[device metadata protocol](#device-metadata-protocol) themselves. This includes\nwriting the versioned `DeviceMetadata` stream at the correct paths, incrementing\n`metadata.generation` on every update, and exposing files read-only through CDI\nor an equivalent mechanism.", "source": "content/en/docs/concepts/resource-management/dynamic-resource-allocation/dra-observability.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page explains the _effective request_ and _effective limit_ of a\nPod, and how Kubernetes calculates them\nfrom the [resource requests and limits](/docs/concepts/configuration/manage-resources-containers/)\nthat you specify for the containers in that Pod.\nKubernetes uses these values for the Pod as a whole, for example when it schedules the Pod,\nenforces resource quota, or sizes the Pod-level cgroup on Linux.\n\nThe kube-scheduler\nplaces the Pod only on a node that has enough resources for the effective request,\nand the node keeps the effective request reserved for the Pod,\neven after initialization finishes.\nThe effective values are not always a simple sum of the container values,\nbecause init containers run one at a time,\nwhile sidecar containers keep running during and after initialization.\nUnderstanding this calculation helps you set requests on init and sidecar containers\nwithout reserving more node resources than the Pod needs.\n\n## Calculating effective requests and limits\n\nFor each resource, Kubernetes calculates a request/limit for two phases:\n\n* During initialization: init containers run one at a time, alongside any\nsidecar containers that have already started. The request/limit for this phase\nis the *effective init request/limit*, which is the highest amount needed at any\npoint during initialization:\n* For each init container, take its request/limit for the resource and add the\nrequests/limits of all sidecar containers that are listed before it in the\n`initContainers` field.\n* The highest of these values is the effective init request/limit.\n\nIf any resource has no resource limit specified this is considered as the highest limit.\n* After initialization: all sidecar containers and app containers run at the\nsame time. The request/limit for this phase is the sum of the requests/limits of\nall non-init containers (app and sidecar containers).\n\nThe Pod's *effective request/limit* for a resource is the higher of the value during\ninitialization (the effective init request/limit) and the value after initialization\n(the sum for all non-init containers), plus the\n[pod overhead](/docs/concepts/scheduling-eviction/pod-overhead/).\nSee [Examples of effective requests](#examples-of-effective-requests) to learn how\nthis calculation works for specific Pods.\n\nThe following rules also apply:\n\n* Scheduling is done based on effective requests/limits, which means\ninit containers can reserve resources for initialization that are not used\nduring the life of the Pod.\n* The QoS (quality of service) tier of the Pod's *effective QoS tier* is the\nQoS tier for all init, sidecar and app containers alike.\n\nQuota and limits are applied based on the effective Pod request and\nlimit.\n\n## Examples of effective requests\n\nThe following examples show how the effective CPU request of a Pod is calculated.\nNone of these Pods has any pod overhead.\n\nIn this Pod, the sidecar container is listed before the init container:\n\n```yaml\napiVersion: v1\nkind: Pod\nmetadata:\nname: sidecar-before-init\nspec:\ninitContainers:\n- name: sidecar\nimage: busybox:1.38\ncommand: [\"sleep\", \"infinity\"]\nrestartPolicy: Always # make this container a sidecar\nresources:\nrequests:\ncpu: 100m\n- name: init\nimage: busybox:1.38\ncommand: [\"sleep\", \"5\"]\nresources:\nrequests:\ncpu: 200m\ncontainers:\n- name: app\nimage: busybox:1.38\ncommand: [\"sleep\", \"infinity\"]\nresources:\nrequests:\ncpu: 50m\n```\n\n* During initialization, the `sidecar` container is already running when the `init`\ncontainer starts, so the effective init request is 100m + 200m = 300m.\n* After initialization, the `sidecar` and `app` containers run at the same time,\nso the sum of their requests is 100m + 50m = 150m.\n* The effective CPU request of the Pod is the higher of the two values\n(300m and 150m), which is 300m.\n\nThis Pod has the same containers, but the init container is listed before the\nsidecar container:\n\n```yaml\napiVersion: v1\nkind: Pod\nmetadata:\nname: init-before-sidecar\nspec:\ninitContainers:\n- name: init\nimage: busybox:1.38\ncommand: [\"sleep\", \"5\"]\nresources:\nrequests:\ncpu: 200m\n- name: sidecar\nimage: busybox:1.38\ncommand: [\"sleep\", \"infinity\"]\nrestartPolicy: Always # make this container a sidecar\nresources:\nrequests:\ncpu: 100m\ncontainers:\n- name: app\nimage: busybox:1.38\ncommand: [\"sleep\", \"infinity\"]\nresources:\nrequests:\ncpu: 50m\n```\n\n* During initialization, no sidecar container is running when the `init` container\nstarts, so the effective init request is 200m.\n* After initialization, the `sidecar` and `app` containers run at the same time,\nso the sum of their requests is 100m + 50m = 150m.\n* The effective CPU request of the Pod is the higher of the two values\n(200m and 150m), which is 200m.\n\nIn this Pod, the sidecar container is again listed before the init container, but this\ntime the app container requests more CPU:\n\n```yaml\napiVersion: v1\nkind: Pod\nmetadata:\nname: large-app\nspec:\ninitContainers:\n- name: sidecar\nimage: busybox:1.38\ncommand: [\"sleep\", \"infinity\"]\nrestartPolicy: Always # make this container a sidecar\nresources:\nrequests:\ncpu: 100m\n- name: init\nimage: busybox:1.38\ncommand: [\"sleep\", \"5\"]\nresources:\nrequests:\ncpu: 200m\ncontainers:\n- name: app\nimage: busybox:1.38\ncommand: [\"sleep\", \"infinity\"]\nresources:\nrequests:\ncpu: 400m\n```\n\n* During initialization, the effective init request is 100m + 200m = 300m.\n* After initialization, the `sidecar` and `app` containers run at the same time,\nso the sum of their requests is 100m + 400m = 500m.\n* The effective CPU request of the Pod is the higher of the two values\n(300m and 500m), which is 500m.\n\n## Linux cgroups {#cgroups}\n\nOn Linux, resource allocations for Pod level control groups (cgroups) are based on the effective Pod\nrequest and limit, the same as the scheduler.\n\n##\n\n* Read about [resource management for Pods and containers](/docs/concepts/configuration/manage-resources-containers/).\n* Learn about [init containers](/docs/concepts/workloads/pods/init-containers/).\n* Learn about [sidecar containers](/docs/concepts/workloads/pods/sidecar-containers/).\n* Learn about [resource quotas](/docs/concepts/policy/resource-quotas/).\n* Learn about [Pod Quality of Service classes](/docs/concepts/workloads/pods/pod-qos/).", "source": "content/en/docs/concepts/resource-management/effective-pod-requests-limits.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Gang scheduling ensures that a group of Pods are scheduled on an \"all-or-nothing\" basis.\nIf the cluster cannot accommodate the entire group (or a defined minimum number of Pods, specified by `minCount`),\nnone of the Pods are bound to a node.\n\nWhile the scheduler never admits fewer Pods than the configured `minCount` during initial placement, the actual runtime\ncount of scheduled Pods can drop below this threshold if running Pods are later deleted or evicted, or if the\n`minCount` requirement increases. When this happens, the scheduler will only place additional Pods if the\ncombined total of already scheduled Pods and newly feasible unscheduled Pods reaches or exceeds `minCount`.\n\nThis feature depends on the [PodGroup API](/docs/concepts/workloads/podgroup-api/).\nEnsure the [`GenericWorkload`](/docs/reference/command-line-tools-reference/feature-gates/#GenericWorkload)\nfeature gate and the `scheduling.k8s.io/v1beta1`\nAPI group are enabled in the cluster.\n\n## How it works\n\nWhen the `GangScheduling` plugin is enabled, the scheduler alters the lifecycle for Pods belonging\nto a [PodGroup](/docs/concepts/workloads/podgroup-api/) that has a `gang`\n[scheduling policy](/docs/concepts/workloads/workload-api/policies/).\nThe process follows these steps for each PodGroup:\n\n1. The scheduler holds Pods in the `PreEnqueue` phase until:\n* The referenced PodGroup object exists.\n* The number of Pods created for the PodGroup (both already scheduled and unscheduled) is at least equal to `minCount`.\n\nThe PodGroup does not enter the active scheduling queue until both conditions are met.\n\n2. Once the quorum is met, the scheduler attempts to find placements for all unscheduled Pods in the group.\nIt utilizes the [PodGroup scheduling](/docs/concepts/scheduling-eviction/podgroup-scheduling/) cycle to make a single,\natomic scheduling decision. The `GangScheduling` plugin implements a `PlacementFeasible` extension point that is invoked for each\nevaluated Pod during the cycle. This is used to determine whether the `minCount` constraint is satisfied\nby comparing the number of successfully placed Pods (including those already scheduled in previous cycles) against the `minCount` value.\n\n3. If the scheduler finds valid placements for at least the `minCount` number of Pods,\nit allows those successfully placed Pods to be bound to their assigned nodes.\nIf it cannot find enough placements to satisfy the `minCount` requirement, none of the Pods are scheduled.\nInstead, they are moved to the unschedulable queue to wait for cluster resources to free up,\nallowing other workloads to be scheduled in the meantime.\n\n## Hierarchical gang scheduling with CompositePodGroups\n\nWhen the [`CompositePodGroup`](/docs/reference/command-line-tools-reference/feature-gates/#CompositePodGroup)\nfeature gate and the `scheduling.k8s.io/v1alpha3` API group\nare enabled, gang scheduling extends its support to `CompositePodGroups`.\n\nContrary to `PodGroups` that group Pods, `CompositePodGroups` group child groups together - either\n`PodGroups` or other `CompositePodGroups`. `CompositePodGroup` specifies a scheduling policy that\napplies to its child groups during scheduling:\n\n* `gang` policy with a `minGroupCount` field, specifying the minimum number of child groups (either\n`CompositePodGroup` or `PodGroup` objects) that must be scheduled together as a single unit\natomically.\n* `basic` policy which indicates that child groups can be scheduled independently.\n\n`gang` policy is useful for multi-component workloads that require all-or-nothing scheduling across\nmultiple child groups, ensuring that a minimum number of child groups are scheduled together. An\nexample workload with such needs is replicated AI training.\n\n`basic` policy can be used for workloads that comprise multiple groups of Pods each of which can be\nscheduled as an independent gang, e.g. for AI inference workloads.\n\n### Hierarchical quorum\n\nThe `GangScheduling` plugin holds the root `CompositePodGroup` from entering the active scheduling\nqueue in the `PreEnqueue` phase until it satisfies the **hierarchical quorum**. This quorum is\nevaluated bottom-up, from leaf `PodGroup` objects up to the root `CompositePodGroup`:\n\n- A leaf `PodGroup` **satisfies quorum** if and only if the `PodGroup` object exists and can\npotentially meet its scheduling policy criteria:\n- For a `gang` policy: at least `minCount` of its constituent Pods have been created.\n- For a `basic` policy: at least one of its constituent Pods has been created.\n- A `CompositePodGroup` **satisfies quorum** if and only if the `CompositePodGroup` object exists\nand can potentially meet its scheduling policy criteria:\n- For a `gang` policy: at least `minGroupCount` of its direct child groups satisfy quorum.\n- For a `basic` policy: at least one of its direct child groups satisfies quorum.\n- The overall **hierarchical quorum** is satisfied if and only if the root `CompositePodGroup`\nsatisfies the quorum.\n\nUltimately, a root `CompositePodGroup` is admitted into the active scheduling queue if and only if\nit satisfies the hierarchical quorum and there is at least one pending Pod that belongs to one of\nits descendant `PodGroups`.\n\n### Placement feasibility\n\nThe `GangScheduling` plugin's `PlacementFeasible` method supports evaluation for both\n`PodGroups` and `CompositePodGroups`. It is invoked by the scheduling cycle before starting child\nevaluation and after evaluating each child group of a `CompositePodGroup`.\n\nBy taking into account the number of child groups that were successfully scheduled and the child\ngroups that were not evaluated in the scheduling cycle just yet, `PlacementFeasible` determines\nwhether the group's policy constraint is still achievable, allowing the scheduling cycle to abort\nthe evaluation of the `CompositePodGroup` early if its underlying scheduling policy cannot be\nsatisfied anymore.\n\n##\n\n* Learn about the [PodGroup API](/docs/concepts/workloads/podgroup-api/) and its [lifecycle](/docs/concepts/workloads/podgroup-api/lifecycle/).\n* Read about the [CompositePodGroup API](/docs/concepts/workloads/compositepodgroup-api/).\n* Read about [PodGroup scheduling policies](/docs/concepts/workloads/workload-api/policies/).\n* Read about [PodGroup scheduling](/docs/concepts/scheduling-eviction/podgroup-scheduling/).", "source": "content/en/docs/concepts/scheduling-eviction/gang-scheduling.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "*Topology-Aware Scheduling* (TAS) is a [placement scheduling algorithm](/docs/concepts/scheduling-eviction/podgroup-scheduling/#placement-scheduling-algorithm)\nthat allows finding the optimal placement for the considered PodGroup, guaranteeing that all pods\nwill be collocated within the same topology domain. Users can adapt TAS to their specific\nneeds by changing TAS plugins configuration.\n\n## Scheduling framework: TAS plugins configuration\n\nThe scheduler includes new and extended in-tree plugins that implement the TAS extension points:\n\n* `TopologyPlacement`: Implements the `PlacementGeneratePlugin` interface. It generates candidate\nplacements by grouping nodes based on the distinct values of the requested topology `key` (defined\nin the PodGroup).\n\n* `NodeResourcesFit`: Extended to implement the `PlacementScorePlugin` interface. Following\nsimilar logic to standard pod bin-packing, it scores placements based on the allocation ratio\nacross all nodes within the placement. It uses the `MostAllocated` strategy to maximize resource\nutilization within a placement, and it inherits resource weights from the standard pod-by-pod\nplugin settings.\n\n* `PodGroupPodsCount`: Implements the `PlacementScorePlugin` interface. It scores candidate\nplacements based on the total number of pods in the PodGroup that you can successfully schedule.\n\n### Customizing plugin weights and bin-packing resource weights\n\nBy default, the `NodeResourcesFit` and `PodGroupPodsCount` plugins are configured with equal\nweights (both default to 1) to maintain a good balance between bin-packing logic and scheduling as\nmany pods as possible.\n\nYou can adjust these weights, or the resource weights in the bin-packing strategy in your\nKubeSchedulerConfiguration. Here is an example snippet showing how to change the weights for both\nplugins, and how to override the `NodeResourcesFit` resource weights. The latter change will apply\nboth to pod-by-pod and placement scoring algorithms:\n\n```yaml\napiVersion: kubescheduler.config.k8s.io/v1\nkind: KubeSchedulerConfiguration\nprofiles:\n- schedulerName: default-scheduler\nplugins:\nplacementScore:\nenabled:\n# 1) Change the default weights of the placement score plugins\n- name: NodeResourcesFit\nweight: 2\n- name: PodGroupPodsCount\nweight: 5\npluginConfig:\n- name: NodeResourcesFit\nargs:\n# 2) Changing the scoring resource weights for both pod-by-pod and placement scoring\n# algorithms\nscoringStrategy:\n# The type will only be considered in pod-by-pod scheduling. Placement scoring always\n# uses MostAllocated strategy\ntype: LeastAllocated\n# Resource weights will be used in both pod-by-pod and placement scoring algorithms\nresources:\n- name: cpu\nweight: 2\n- name: memory\nweight: 3\n```\n\n## Multi-level topology placements\n\nWhen the [`CompositePodGroup`](/docs/reference/command-line-tools-reference/feature-gates/#CompositePodGroup)\nfeature gate and the `scheduling.k8s.io/v1alpha3` API group\nare enabled, the Topology-Aware Scheduling plugins extend their support to multi-level\n`CompositePodGroup` hierarchies. These plugins are called for `CompositePodGroups` during\n[hierarchical scheduling](/docs/concepts/scheduling-eviction/podgroup-scheduling).\n\n### Candidate placement generation\n\nFor workloads defined with a `CompositePodGroup` hierarchy, the `TopologyPlacement` plugin generates\ncandidate placements top-down across the group hierarchy by successive subdivision:\n\n* For a root `CompositePodGroup`, `TopologyPlacement` generates candidate placements across all\navailable cluster nodes by grouping nodes based on the distinct values of the requested topology\n`key`.\n* For a child `CompositePodGroup` or leaf `PodGroup`, `TopologyPlacement` generates candidate\nplacements confined in the placement assumed by the parent group. It subdivides the set of nodes\nfrom the parent group's placement by grouping those nodes based on the child group's requested\ntopology `key`.\n\nIf a topology constraint is not specified, the `TopologyPlacement` plugin generates a single\ncandidate placement equivalent to the parent placement.\n\nSimilarly, if the root group does not specify any topology constraint, the plugin generates a single\ncandidate placement corresponding to all available nodes in the cluster. This is also true for\nsingle-level workloads using the `PodGroup` API where no topology constraint is specified.\n\n### Placement scoring\n\nWhen scoring a candidate placement for a `CompositePodGroup`, the scoring plugins apply similar\nlogic to the single-level `PodGroup` case:\n\n* `PodGroupPodsCount`: Scores candidate placements based on the total number of Pods (both\nalready scheduled and newly assumed) across all descendant leaf `PodGroups` of that\n`CompositePodGroup`. Candidate placements capable of accommodating a higher total number of Pods\nacross the subhierarchy receive higher scores.\n* `NodeResourcesFit`: Aggregates the resource requests of all proposed Pods across all descendant\n`PodGroups` of that `CompositePodGroup` and evaluates resource utilization across all nodes within\nthe candidate placement's domain.\n\n##\n\n* Learn more about [Topology-aware scheduling API](/docs/concepts/workloads/workload-api/topology-aware-scheduling/).\n* Read about [pod group scheduling](/docs/concepts/scheduling-eviction/podgroup-scheduling/).\n* Read about [pod group policies](/docs/concepts/workloads/workload-api/policies/).", "source": "content/en/docs/concepts/scheduling-eviction/topology-aware-scheduling.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Kubernetes creates DNS records for Services and Pods. You can contact\nServices with consistent DNS names instead of IP addresses.\n\nKubernetes publishes information about Pods and Services which is used\nto program DNS. kubelet configures Pods' DNS so that running containers\ncan look up Services by name rather than IP.\n\nServices defined in the cluster are assigned DNS names. By default, a\nclient Pod's DNS search list includes the Pod's own namespace and the\ncluster's default domain.\n\n### Namespaces of Services\n\nA DNS query may return different results based on the namespace of the Pod making\nit. DNS queries that don't specify a namespace are limited to the Pod's\nnamespace. Access Services in other namespaces by specifying it in the DNS query.\n\nFor example, consider a Pod in a `test` namespace. A `data` Service is in\nthe `prod` namespace.\n\nA query for `data` returns no results, because it uses the Pod's `test` namespace.\n\nA query for `data.prod` returns the intended result, because it specifies the\nnamespace.\n\nDNS queries may be expanded using the Pod's `/etc/resolv.conf`. kubelet\nconfigures this file for each Pod. For example, a query for just `data` may be\nexpanded to `data.test.svc.cluster.local`. The values of the `search` option\nare used to expand queries. To learn more about DNS queries, see\n[the `resolv.conf` manual page](https://www.man7.org/linux/man-pages/man5/resolv.conf.5.html).\n\n```\nnameserver 10.32.0.10\nsearch .svc.cluster.local svc.cluster.local cluster.local\noptions ndots:5\n```\n\nIn summary, a Pod in the _test_ namespace can successfully resolve either\n`data.prod` or `data.prod.svc.cluster.local`.\n\n### DNS Records\n\nWhat objects get DNS records?\n\n1. Services\n1. Pods\n\nThe following sections detail the supported DNS record types and layout that is\nsupported. Any other layout or names or queries that happen to work are\nconsidered implementation details and are subject to change without warning.\nFor more up-to-date specification, see\n[Kubernetes DNS-Based Service Discovery](https://github.com/kubernetes/dns/blob/master/docs/specification.md).\n\n## Services\n\n### A/AAAA records\n\n\"Normal\" (not headless) Services are assigned DNS A and/or AAAA records,\ndepending on the IP family or families of the Service, with a name of the form\n`my-svc.my-namespace.svc.cluster-domain.example`. This resolves to the cluster IP\nof the Service.\n\n[Headless Services](/docs/concepts/services-networking/service/#headless-services)\n(without a cluster IP) are also assigned DNS A and/or AAAA records,\nwith a name of the form `my-svc.my-namespace.svc.cluster-domain.example`. Unlike normal\nServices, this resolves to the set of IPs of all of the Pods selected by the Service.\nClients are expected to consume the set or else use standard round-robin\nselection from the set.\n\n### SRV records\n\nSRV Records are created for named ports that are part of normal or headless\nservices.\n\n- For each named port, the SRV record has the form\n`_port-name._port-protocol.my-svc.my-namespace.svc.cluster-domain.example`.\n- For a regular Service, this resolves to the port number and the domain name:\n`my-svc.my-namespace.svc.cluster-domain.example`.\n- For a headless Service, this resolves to multiple answers, one for each Pod\nthat is backing the Service, and contains the port number and the domain name of the Pod\nof the form `hostname.my-svc.my-namespace.svc.cluster-domain.example`.\n\n## Pods\n\n### A/AAAA records\n\nKube-DNS versions, prior to the implementation of the\n[DNS specification](https://github.com/kubernetes/dns/blob/master/docs/specification.md),\nhad the following DNS resolution:\n\n```\n. .pod.\n```\n\nFor example, if a Pod in the `default` namespace has the IP address 172.17.0.3,\nand the domain name for your cluster is `cluster.local`, then the Pod has a DNS name:\n\n```\n172-17-0-3.default.pod.cluster.local\n```\n\nSome cluster DNS mechanisms, like [CoreDNS](https://coredns.io/), also provide `A` records for:\n\n```\n. . .svc.\n```\n\nFor example, if a Pod in the `cafe` namespace has the IP address 172.17.0.3,\nis an endpoint of a Service named `barista`, and the domain name for your cluster is\n`cluster.local`, then the Pod would have this service-scoped DNS `A` record.\n\n```\n172-17-0-3.barista.cafe.svc.cluster.local\n```\n\n### Pod's hostname and subdomain fields {#pod-hostname-and-subdomain-field}\n\nCurrently when a Pod is created, its hostname (as observed from within the Pod)\nis the Pod's `metadata.name` value.\n\nThe Pod spec has an optional `hostname` field, which can be used to specify a\ndifferent hostname. When specified, it takes precedence over the Pod's name to be\nthe hostname of the Pod (again, as observed from within the Pod). For example,\ngiven a Pod with `spec.hostname` set to `\"my-host\"`, the Pod will have its\nhostname set to `\"my-host\"`.\n\nThe Pod spec also has an optional `subdomain` field which can be used to indicate\nthat the pod is part of sub-group of the namespace. For example, a Pod with `spec.hostname`\nset to `\"foo\"`, and `spec.subdomain` set to `\"bar\"`, in namespace `\"my-namespace\"`, will\nhave its hostname set to `\"foo\"` and its fully qualified domain name (FQDN) set to\n`\"foo.bar.my-namespace.svc.cluster.local\"` (once more, as observed from within\nthe Pod).\n\nIf there exists a headless Service in the same namespace as the Pod, with\nthe same name as the subdomain, the cluster's DNS Server also returns A and/or AAAA\nrecords for the Pod's fully qualified hostname.\n\nExample:\n\n```yaml\napiVersion: v1\nkind: Service\nmetadata:\nname: busybox-subdomain\nspec:\nselector:\nname: busybox\nclusterIP: None\nports:\n- name: foo # name is not required for single-port Services\nport: 1234\n---\napiVersion: v1\nkind: Pod\nmetadata:\nname: busybox1\nlabels:\nname: busybox\nspec:\nhostname: busybox-1\nsubdomain: busybox-subdomain\ncontainers:\n- image: busybox:1.28\ncommand:\n- sleep\n- \"3600\"\nname: busybox\n---\napiVersion: v1\nkind: Pod\nmetadata:\nname: busybox2\nlabels:\nname: busybox\nspec:\nhostname: busybox-2\nsubdomain: busybox-subdomain\ncontainers:\n- image: busybox:1.28\ncommand:\n- sleep\n- \"3600\"\nname: busybox\n```\n\nGiven the above Service `\"busybox-subdomain\"` and the Pods which set `spec.subdomain`\nto `\"busybox-subdomain\"`, the first Pod will see its own FQDN as\n`\"busybox-1.busybox-subdomain.my-namespace.svc.cluster-domain.example\"`. DNS serves\nA and/or AAAA records at that name, pointing to the Pod's IP. Both Pods \"`busybox1`\" and\n\"`busybox2`\" will have their own address records.\n\nAn EndpointSlice can specify\nthe DNS hostname for any endpoint addresses, along with its IP.\n\nA and AAAA records are not created for Pod names since `hostname` is missing for the Pod.\nA Pod with no `hostname` but with `subdomain` will only create the\nA or AAAA record for the headless Service (`busybox-subdomain.my-namespace.svc.cluster-domain.example`),\npointing to the Pods' IP addresses. Also, the Pod needs to be ready in order to have a\nrecord unless `publishNotReadyAddresses=True` is set on the Service.\n\n### Pod's setHostnameAsFQDN field {#pod-sethostnameasfqdn-field}\n\nWhen a Pod is configured to have fully qualified domain name (FQDN), its\nhostname is the short hostname. For example, if you have a Pod with the fully\nqualified domain name `busybox-1.busybox-subdomain.my-namespace.svc.cluster-domain.example`,\nthen by default the `hostname` command inside that Pod returns `busybox-1` and the\n`hostname --fqdn` command returns the FQDN.\n\nWhen you set `setHostnameAsFQDN: true` in the Pod spec, the kubelet writes the Pod's FQDN\ninto the hostname for that Pod's namespace. In this case, both `hostname` and `hostname --fqdn`\nreturn the Pod's FQDN.\n\nIn Linux, the hostname field of the kernel (the `nodename` field of `struct utsname`) is limited to 64 characters.\n\nIf a Pod enables this feature and its FQDN is longer than 64 character, it will fail to start.\nThe Pod will remain in `Pending` status (`ContainerCreating` as seen by `kubectl`) generating\nerror events, such as Failed to construct FQDN from Pod hostname and cluster domain,\nFQDN `long-FQDN` is too long (64 characters is the max, 70 characters requested).\nOne way of improving user experience for this scenario is to create an\n[admission webhook controller](/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks)\nto control FQDN size when users create top level objects, for example, Deployment.\n\n### Pod's DNS Policy\n\nDNS policies can be set on a per-Pod basis. Currently Kubernetes supports the\nfollowing Pod-specific DNS policies. These policies are specified in the\n`dnsPolicy` field of a Pod Spec.\n\n- \"`Default`\": The Pod inherits the name resolution configuration from the node\nthat the Pods run on.\nSee [related discussion](/docs/tasks/administer-cluster/dns-custom-nameservers)\nfor more details.\n- \"`ClusterFirst`\": Any DNS query that does not match the configured cluster\ndomain suffix, such as \"`www.kubernetes.io`\", is forwarded to an upstream\nnameserver by the DNS server. Cluster administrators may have extra\nstub-domain and upstream DNS servers configured.\nSee [related discussion](/docs/tasks/administer-cluster/dns-custom-nameservers)\nfor details on how DNS queries are handled in those cases.\n- \"`ClusterFirstWithHostNet`\": For Pods running with hostNetwork, you should\nexplicitly set its DNS policy to \"`ClusterFirstWithHostNet`\". Otherwise, Pods\nrunning with hostNetwork and `\"ClusterFirst\"` will fallback to the behavior\nof the `\"Default\"` policy.\n\nThis is not supported on Windows. See [below](#dns-windows) for details.\n\n- \"`None`\": It allows a Pod to ignore DNS settings from the Kubernetes\nenvironment. All DNS settings are supposed to be provided using the\n`dnsConfig` field in the Pod Spec.\nSee [Pod's DNS config](#pod-dns-config) subsection below.\n\n\"Default\" is not the default DNS policy. If `dnsPolicy` is not\nexplicitly specified, then \"ClusterFirst\" is used.\n\nThe example below shows a Pod with its DNS policy set to\n\"`ClusterFirstWithHostNet`\" because it has `hostNetwork` set to `true`.\n\n```yaml\napiVersion: v1\nkind: Pod\nmetadata:\nname: busybox\nnamespace: default\nspec:\ncontainers:\n- image: busybox:1.28\ncommand:\n- sleep\n- \"3600\"\nimagePullPolicy: IfNotPresent\nname: busybox\nrestartPolicy: Always\nhostNetwork: true\ndnsPolicy: ClusterFirstWithHostNet\n```\n\n### Pod's DNS Config {#pod-dns-config}\n\nPod's DNS Config allows users more control on the DNS settings for a Pod.\n\nThe `dnsConfig` field is optional and it can work with any `dnsPolicy` settings.\nHowever, when a Pod's `dnsPolicy` is set to \"`None`\", the `dnsConfig` field has\nto be specified.\n\nBelow are the properties a user can specify in the `dnsConfig` field:\n\n- `nameservers`: a list of IP addresses that will be used as DNS servers for the\nPod. There can be at most 3 IP addresses specified. When the Pod's `dnsPolicy`\nis set to \"`None`\", the list must contain at least one IP address, otherwise\nthis property is optional.\nThe servers listed will be combined to the base nameservers generated from the\nspecified DNS policy with duplicate addresses removed.\n- `searches`: a list of DNS search domains for hostname lookup in the Pod.\nThis property is optional. When specified, the provided list will be merged\ninto the base search domain names generated from the chosen DNS policy.\nDuplicate domain names are removed.\nKubernetes allows up to 32 search domains.\n- `options`: an optional list of objects where each object may have a `name`\nproperty (required) and a `value` property (optional). The contents in this\nproperty will be merged to the options generated from the specified DNS policy.\nDuplicate entries are removed.\n\nThe following is an example Pod with custom DNS settings:\n\nWhen the Pod above is created, the container `test` gets the following contents\nin its `/etc/resolv.conf` file:\n\n```\nnameserver 192.0.2.1\nsearch ns1.svc.cluster-domain.example my.dns.search.suffix\noptions ndots:2 edns0\n```\n\nFor IPv6 setup, search path and name server should be set up like this:\n\n```shell\nkubectl exec -it dns-example -- cat /etc/resolv.conf\n```\n\nThe output is similar to this:\n\n```\nnameserver 2001:db8:30::a\nsearch default.svc.cluster-domain.example svc.cluster-domain.example cluster-domain.example\noptions ndots:5\n```\n\n## DNS search domain list limits\n\nKubernetes itself does not limit the DNS Config until the length of the search\ndomain list exceeds 32 or the total length of all search domains exceeds 2048.\nThis limit applies to the node's resolver configuration file, the Pod's DNS\nConfig, and the merged DNS Config respectively.\n\nSome container runtimes of earlier versions may have their own restrictions on\nthe number of DNS search domains. Depending on the container runtime\nenvironment, the pods with a large number of DNS search domains may get stuck in\nthe pending state.\n\nIt is known that containerd v1.5.5 or earlier and CRI-O v1.21 or earlier have\nthis problem.\n\n## DNS resolution on Windows nodes {#dns-windows}\n\n- `ClusterFirstWithHostNet` is not supported for Pods that run on Windows nodes.\nWindows treats all names with a `.` as a FQDN and skips FQDN resolution.\n- On Windows, there are multiple DNS resolvers that can be used. As these come with\nslightly different behaviors, using the\n[`Resolve-DNSName`](https://docs.microsoft.com/powershell/module/dnsclient/resolve-dnsname)\npowershell cmdlet for name query resolutions is recommended.\n- On Linux, you have a DNS suffix list, which is used after resolution of a name as fully\nqualified has failed.\nOn Windows, you can only have 1 DNS suffix, which is the DNS suffix associated with that\nPod's namespace (example: `mydns.svc.cluster.local`). Windows can resolve FQDNs, Services,\nor network name which can be resolved with this single suffix. For example, a Pod spawned\nin the `default` namespace, will have the DNS suffix `default.svc.cluster.local`.\nInside a Windows Pod, you can resolve both `kubernetes.default.svc.cluster.local`\nand `kubernetes`, but not the partially qualified names (`kubernetes.default` or\n`kubernetes.default.svc`).\n\n##\n\nFor guidance on administering DNS configurations, check\n[Configure DNS Service](/docs/tasks/administer-cluster/dns-custom-nameservers/).", "source": "content/en/docs/concepts/services-networking/dns-pod-service.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "IPv4/IPv6 dual-stack networking enables the allocation of both IPv4 and IPv6 addresses to\nPods and Services.\n\nIPv4/IPv6 dual-stack networking is enabled by default for your Kubernetes cluster starting in\n1.21, allowing the simultaneous assignment of both IPv4 and IPv6 addresses.\n\n## Supported Features\n\nIPv4/IPv6 dual-stack on your Kubernetes cluster provides the following features:\n\n* Dual-stack Pod networking (a single IPv4 and IPv6 address assignment per Pod)\n* IPv4 and IPv6 enabled Services\n* Pod off-cluster egress routing (eg. the Internet) via both IPv4 and IPv6 interfaces\n\n## Prerequisites\n\nThe following prerequisites are needed in order to utilize IPv4/IPv6 dual-stack Kubernetes clusters:\n\n* Kubernetes 1.20 or later\n\nFor information about using dual-stack services with earlier\nKubernetes versions, refer to the documentation for that version\nof Kubernetes.\n\n* Provider support for dual-stack networking (Cloud provider or otherwise must be able to provide\nKubernetes nodes with routable IPv4/IPv6 network interfaces)\n* A [network plugin](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/) that\nsupports dual-stack networking.\n\n## Configure IPv4/IPv6 dual-stack\n\nTo configure IPv4/IPv6 dual-stack, set dual-stack cluster network assignments:\n\n* kube-apiserver:\n* `--service-cluster-ip-range= , `\n* kube-controller-manager:\n* `--cluster-cidr= , `\n* `--service-cluster-ip-range= , `\n* `--node-cidr-mask-size-ipv4|--node-cidr-mask-size-ipv6` defaults to /24 for IPv4 and /64 for IPv6\n* kube-proxy:\n* `--cluster-cidr= , `\n* kubelet:\n* `--node-ip= , `\n* This option is required for bare metal dual-stack nodes (nodes that do not define a\ncloud provider with the `--cloud-provider` flag). If you are using a cloud provider\nand choose to override the node IPs chosen by the cloud provider, set the\n`--node-ip` option.\n* (The legacy built-in cloud providers do not support dual-stack `--node-ip`.)\n\nAn example of an IPv4 CIDR: `10.244.0.0/16` (though you would supply your own address range)\n\nAn example of an IPv6 CIDR: `fdXY:IJKL:MNOP:15::/64` (this shows the format but is not a valid\naddress - see [RFC 4193](https://tools.ietf.org/html/rfc4193))\n\n## Services\n\nYou can create Services which can use IPv4, IPv6, or both.\n\nThe address family of a Service defaults to the address family of the first service cluster IP\nrange (configured via the `--service-cluster-ip-range` flag to the kube-apiserver).\n\nWhen you define a Service you can optionally configure it as dual stack. To specify the behavior you want, you\nset the `.spec.ipFamilyPolicy` field to one of the following values:\n\n* `SingleStack`: Single-stack service. The control plane allocates a cluster IP for the Service,\nusing the first configured service cluster IP range.\n* `PreferDualStack`: Allocates both IPv4 and IPv6 cluster IPs for the Service when dual-stack is enabled. If dual-stack is not enabled or supported, it falls back to single-stack behavior.\n* `RequireDualStack`: Allocates Service `.spec.clusterIPs` from both IPv4 and IPv6 address ranges when dual-stack is enabled. If dual-stack is not enabled or supported, the Service API object creation fails.\n* Selects the `.spec.clusterIP` from the list of `.spec.clusterIPs` based on the address family\nof the first element in the `.spec.ipFamilies` array.\n\nIf you would like to define which IP family to use for single stack or define the order of IP\nfamilies for dual-stack, you can choose the address families by setting an optional field,\n`.spec.ipFamilies`, on the Service.\n\nThe `.spec.ipFamilies` field is conditionally mutable: you can add or remove a secondary\nIP address family, but you cannot change the primary IP address family of an existing Service.\n\nYou can set `.spec.ipFamilies` to any of the following array values:\n\n- `[\"IPv4\"]`\n- `[\"IPv6\"]`\n- `[\"IPv4\",\"IPv6\"]` (dual stack)\n- `[\"IPv6\",\"IPv4\"]` (dual stack)\n\nThe first family you list is used for the legacy `.spec.clusterIP` field.\n\n### Dual-stack Service configuration scenarios\n\nThese examples demonstrate the behavior of various dual-stack Service configuration scenarios.\n\n#### Dual-stack options on new Services\n\n1. This Service specification does not explicitly define `.spec.ipFamilyPolicy`. When you create\nthis Service, Kubernetes assigns a cluster IP for the Service from the first configured\n`service-cluster-ip-range` and sets the `.spec.ipFamilyPolicy` to `SingleStack`. ([Services\nwithout selectors](/docs/concepts/services-networking/service/#services-without-selectors) and\n[headless Services](/docs/concepts/services-networking/service/#headless-services) with selectors\nwill behave in this same way.)\n\n1. This Service specification explicitly defines `PreferDualStack` in `.spec.ipFamilyPolicy`. When\nyou create this Service on a dual-stack cluster, Kubernetes assigns both IPv4 and IPv6\naddresses for the service. The control plane updates the `.spec` for the Service to record the IP\naddress assignments. The field `.spec.clusterIPs` is the primary field, and contains both assigned\nIP addresses; `.spec.clusterIP` is a secondary field with its value calculated from\n`.spec.clusterIPs`.\n\n* For the `.spec.clusterIP` field, the control plane records the IP address that is from the\nsame address family as the first service cluster IP range.\n* On a single-stack cluster, the `.spec.clusterIPs` and `.spec.clusterIP` fields both only list\none address.\n* On a cluster with dual-stack enabled, specifying `RequireDualStack` in `.spec.ipFamilyPolicy`\nbehaves the same as `PreferDualStack`.\n\n1. This Service specification explicitly defines `IPv6` and `IPv4` in `.spec.ipFamilies` as well\nas defining `PreferDualStack` in `.spec.ipFamilyPolicy`. When Kubernetes assigns an IPv6 and\nIPv4 address in `.spec.clusterIPs`, `.spec.clusterIP` is set to the IPv6 address because that is\nthe first element in the `.spec.clusterIPs` array, overriding the default.\n\n#### Dual-stack defaults on existing Services\n\nThese examples demonstrate the default behavior when dual-stack is newly enabled on a cluster\nwhere Services already exist. (Upgrading an existing cluster to 1.21 or beyond will enable\ndual-stack.)\n\n1. When dual-stack is enabled on a cluster, existing Services (whether `IPv4` or `IPv6`) are\nconfigured by the control plane to set `.spec.ipFamilyPolicy` to `SingleStack` and set\n`.spec.ipFamilies` to the address family of the existing Service. The existing Service cluster IP\nwill be stored in `.spec.clusterIPs`.\n\nYou can validate this behavior by using kubectl to inspect an existing service.\n\n```shell\nkubectl get svc my-service -o yaml\n```\n\n```yaml\napiVersion: v1\nkind: Service\nmetadata:\nlabels:\napp.kubernetes.io/name: MyApp\nname: my-service\nspec:\nclusterIP: 10.0.197.123\nclusterIPs:\n- 10.0.197.123\nipFamilies:\n- IPv4\nipFamilyPolicy: SingleStack\nports:\n- port: 80\nprotocol: TCP\ntargetPort: 80\nselector:\napp.kubernetes.io/name: MyApp\ntype: ClusterIP\nstatus:\nloadBalancer: {}\n```\n\n1. When dual-stack is enabled on a cluster, existing\n[headless Services](/docs/concepts/services-networking/service/#headless-services) with selectors are\nconfigured by the control plane to set `.spec.ipFamilyPolicy` to `SingleStack` and set\n`.spec.ipFamilies` to the address family of the first service cluster IP range (configured via the\n`--service-cluster-ip-range` flag to the kube-apiserver) even though `.spec.clusterIP` is set to\n`None`.\n\nYou can validate this behavior by using kubectl to inspect an existing headless service with selectors.\n\n```shell\nkubectl get svc my-service -o yaml\n```\n\n```yaml\napiVersion: v1\nkind: Service\nmetadata:\nlabels:\napp.kubernetes.io/name: MyApp\nname: my-service\nspec:\nclusterIP: None\nclusterIPs:\n- None\nipFamilies:\n- IPv4\nipFamilyPolicy: SingleStack\nports:\n- port: 80\nprotocol: TCP\ntargetPort: 80\nselector:\napp.kubernetes.io/name: MyApp\n```\n\n#### Switching Services between single-stack and dual-stack\n\nServices can be changed from single-stack to dual-stack and from dual-stack to single-stack.\n\n1. To change a Service from single-stack to dual-stack, change `.spec.ipFamilyPolicy` from\n`SingleStack` to `PreferDualStack` or `RequireDualStack` as desired. When you change this\nService from single-stack to dual-stack, Kubernetes assigns the missing address family so that the\nService now has IPv4 and IPv6 addresses.\n\nEdit the Service specification updating the `.spec.ipFamilyPolicy` from `SingleStack` to `PreferDualStack`.\n\nBefore:\n\n```yaml\nspec:\nipFamilyPolicy: SingleStack\n```\n\nAfter:\n\n```yaml\nspec:\nipFamilyPolicy: PreferDualStack\n```\n\n1. To change a Service from dual-stack to single-stack, change `.spec.ipFamilyPolicy` from\n`PreferDualStack` or `RequireDualStack` to `SingleStack`. When you change this Service from\ndual-stack to single-stack, Kubernetes retains only the first element in the `.spec.clusterIPs`\narray, and sets `.spec.clusterIP` to that IP address and sets `.spec.ipFamilies` to the address\nfamily of `.spec.clusterIPs`.\n\n### Headless Services without selector\n\nFor [Headless Services without selectors](/docs/concepts/services-networking/service/#without-selectors)\nand without `.spec.ipFamilyPolicy` explicitly set, the `.spec.ipFamilyPolicy` field defaults to\n`RequireDualStack`.\n\n### Service type LoadBalancer\n\nTo provision a dual-stack load balancer for your Service:\n\n* Set the `.spec.type` field to `LoadBalancer`\n* Set `.spec.ipFamilyPolicy` field to `PreferDualStack` or `RequireDualStack`\n\nTo use a dual-stack `LoadBalancer` type Service, your cloud provider must support IPv4 and IPv6\nload balancers.\n\n## Egress traffic\n\nIf you want to enable egress traffic in order to reach off-cluster destinations (eg. the public\nInternet) from a Pod that uses non-publicly routable IPv6 addresses, you need to enable the Pod to\nuse a publicly routed IPv6 address via a mechanism such as transparent proxying or IP\nmasquerading. The [ip-masq-agent](https://github.com/kubernetes-sigs/ip-masq-agent) project\nsupports IP masquerading on dual-stack clusters.\n\nEnsure your CNI provider supports IPv6.\n\n## Windows support\n\nKubernetes on Windows does not support single-stack \"IPv6-only\" networking. However,\ndual-stack IPv4/IPv6 networking for pods and nodes with single-family services\nis supported.\n\nYou can use IPv4/IPv6 dual-stack networking with `l2bridge` networks.\n\nOverlay (VXLAN) networks on Windows **do not** support dual-stack networking.\n\nYou can read more about the different network modes for Windows within the\n[Networking on Windows](/docs/concepts/services-networking/windows-networking#network-modes) topic.\n\n##\n\n* [Validate IPv4/IPv6 dual-stack](/docs/tasks/network/validate-dual-stack) networking\n* [Enable dual-stack networking using kubeadm](/docs/setup/production-environment/tools/kubeadm/dual-stack-support/)", "source": "content/en/docs/concepts/services-networking/dual-stack.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Nodes have local ephemeral storage, backed by\nlocally-attached writeable devices or, sometimes, by RAM.\n\"Ephemeral\" means that there is no long-term guarantee about durability.\n\nPods use ephemeral local storage for scratch space, caching, and for logs.\nThe kubelet can provide scratch space to Pods using local ephemeral storage to\nmount [`emptyDir`](/docs/reference/storage/volume-types/#emptydir)\nvolumes into containers.\n\nThe kubelet also uses this kind of storage to hold\n[node-level container logs](/docs/concepts/cluster-administration/logging/#logging-at-the-node-level),\ncontainer images, and the writable layers of running containers.\n\nIf a node fails, the data in its ephemeral storage can be lost.\nYour applications cannot expect any performance SLAs (disk IOPS for example)\nfrom local ephemeral storage.\n\nTo make the resource quota work on ephemeral-storage, two things need to be done:\n\n* An admin sets the resource quota for ephemeral-storage in a namespace.\n* A user needs to specify limits for the ephemeral-storage resource in the Pod spec.\n\nIf the user doesn't specify the ephemeral-storage resource limit in the Pod spec,\nthe resource quota is not enforced on ephemeral-storage.\n\nKubernetes lets you track, reserve and limit the amount\nof ephemeral local storage a Pod can consume.\n\n## Configurations for local ephemeral storage {#configurations}\n\nKubernetes supports the following ways to configure local ephemeral storage on a\nnode:\n\nIn this configuration, you place all different kinds of ephemeral local data\n(`emptyDir` volumes, writeable layers, container images, logs) into one filesystem.\n\nThe kubelet also writes\n[node-level container logs](/docs/concepts/cluster-administration/logging/#logging-at-the-node-level)\nand treats these similarly to ephemeral local storage.\n\nThe kubelet writes logs to files inside its configured log directory (`/var/log`\nby default); and has a base directory for other locally stored data\n(`/var/lib/kubelet` by default).\n\nTypically, both `/var/lib/kubelet` and `/var/log` are on the system root filesystem,\nand the kubelet is designed with that layout in mind.\n\nYour node can have as many other filesystems, not used for Kubernetes,\nas you like.\n\nYou use one filesystem on the node for ephemeral data from running Pods, such as\nlogs and `emptyDir` volumes. You can also use this filesystem for other data,\nsuch as system logs that are not related to Kubernetes; it can even be the root\nfilesystem.\n\nThe kubelet also writes\n[node-level container logs](/docs/concepts/cluster-administration/logging/#logging-at-the-node-level)\ninto the first filesystem, and treats these similarly to ephemeral local storage.\n\nYou also use a separate filesystem, backed by a different logical storage device.\nIn this configuration, the container runtime stores both container image layers\nand writeable layers on this second filesystem. Configure this storage location\nin your container runtime, not in the kubelet.\n\nThe first filesystem does not hold any image layers or writeable layers.\n\nYour node can have as many other filesystems, not used for Kubernetes,\nas you like.\n\nIn this configuration, container image layers are on a separate filesystem, and\ncontainer writeable layers are on the same filesystem as the kubelet's ephemeral\ndata, such as logs and `emptyDir` volumes.\n\nThis layout requires support for the `containerfs` eviction signals. For details\nabout the feature gate and the container runtimes that support this layout, see\n[node-pressure eviction](/docs/concepts/scheduling-eviction/node-pressure-eviction/#filesystem-signals).\n\nThe [node-pressure eviction](/docs/concepts/scheduling-eviction/node-pressure-eviction/#filesystem-signals)\npage refers to these observed filesystems as `nodefs`, `imagefs`, and\n`containerfs`. Those names do not always mean separate mount points.\n\nThe kubelet can measure local storage use when you set up the node using one of\nthe supported configurations for local ephemeral storage.\n\nIf you have a different configuration, then the kubelet does not apply resource\nlimits for ephemeral local storage.\n\nThe kubelet tracks `tmpfs` emptyDir volumes as container memory use, rather\nthan as local ephemeral storage.\n\nThe kubelet can only track ephemeral storage on the filesystems it observes\nthrough the supported layouts. If you mount extra filesystems under paths such as\n`/var/lib/kubelet`, `/var/log`, or the container runtime storage directory\noutside those layouts, the kubelet might not report ephemeral storage correctly.\n\n## Setting requests and limits for local ephemeral storage {#requests-limits}\n\nYou can specify `ephemeral-storage` for managing local ephemeral storage. Each\ncontainer of a Pod can specify either or both of the following:\n\n* `spec.containers[].resources.limits.ephemeral-storage`\n* `spec.containers[].resources.requests.ephemeral-storage`\n\nLimits and requests for `ephemeral-storage` are measured in byte quantities.\nYou can express storage as a plain integer or as a fixed-point number using one of these suffixes:\nE, P, T, G, M, k. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi,\nMi, Ki. For example, the following quantities all represent roughly the same value:\n\n- `128974848`\n- `129e6`\n- `129M`\n- `123Mi`\n\nPay attention to the case of the suffixes. If you request `400m` of ephemeral-storage, this is a request\nfor 0.4 bytes. Someone who types that probably meant to ask for 400 mebibytes (`400Mi`)\nor 400 megabytes (`400M`).\n\nIn the following example, the Pod has two containers. Each container has a request of\n2GiB of local ephemeral storage. Each container has a limit of 4GiB of local ephemeral\nstorage. Therefore, the Pod has a request of 4GiB of local ephemeral storage, and\na limit of 8GiB of local ephemeral storage. 500Mi of that limit could be\nconsumed by the `emptyDir` volume.\n\n```yaml\napiVersion: v1\nkind: Pod\nmetadata:\nname: frontend\nspec:\ncontainers:\n- name: app\nimage: images.my-company.example/app:v4\nresources:\nrequests:\nephemeral-storage: \"2Gi\"\nlimits:\nephemeral-storage: \"4Gi\"\nvolumeMounts:\n- name: ephemeral\nmountPath: \"/tmp\"\n- name: log-aggregator\nimage: images.my-company.example/log-aggregator:v6\nresources:\nrequests:\nephemeral-storage: \"2Gi\"\nlimits:\nephemeral-storage: \"4Gi\"\nvolumeMounts:\n- name: ephemeral\nmountPath: \"/tmp\"\nvolumes:\n- name: ephemeral\nemptyDir:\nsizeLimit: 500Mi\n```\n\n## How Pods with ephemeral-storage requests are scheduled\n\nWhen you create a Pod, the Kubernetes scheduler selects a node for the Pod to\nrun on. Each node has a maximum amount of local ephemeral storage it can provide for Pods.\nFor more information, see\n[Node Allocatable](/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable).\n\nThe scheduler ensures that the sum of the resource requests of the scheduled containers is less than the capacity of the node.\n\n## Ephemeral storage consumption management {#resource-emphemeralstorage-consumption}\n\nIf the kubelet is managing local ephemeral storage as a resource, then the\nkubelet measures storage use in:\n\n- `emptyDir` volumes, except _tmpfs_ `emptyDir` volumes\n- directories holding node-level logs\n- writeable container layers\n\nIf a Pod is using more ephemeral storage than you allow it to, the kubelet\nsets an eviction signal that triggers Pod eviction.\n\nFor container-level isolation, if a container's writable layer and log\nusage exceeds its storage limit, the kubelet marks the Pod for eviction.\n\nFor pod-level isolation the kubelet works out an overall Pod storage limit by\nsumming the limits for the containers in that Pod. In this case, if the sum of\nthe local ephemeral storage usage from all containers and also the Pod's `emptyDir`\nvolumes exceeds the overall Pod storage limit, then the kubelet also marks the Pod\nfor eviction.\n\nIf the kubelet is not measuring local ephemeral storage, then a Pod\nthat exceeds its local storage limit will not be evicted for breaching\nlocal storage resource limits.\n\nHowever, if the filesystem space for writeable container layers, node-level logs,\nor `emptyDir` volumes falls low, the node\ntaints itself as short on local storage\nand this taint triggers eviction for any Pods that don't specifically tolerate the taint.\n\nSee the supported [configurations](#configurations) for ephemeral local storage.\n\nThe kubelet supports different ways to measure Pod storage use:\n\nThe kubelet performs regular, scheduled checks that scan each `emptyDir` volume,\ncontainer log directory, and writeable container layer.\n\nThe scan measures how much space is used.\n\nIn this mode, the kubelet does not track open file descriptors\nfor deleted files.\n\nIf you (or a container) create a file inside an `emptyDir` volume,\nsomething then opens that file, and you delete the file while it is still open,\nthen the inode for the deleted file stays until you close that file\nbut the kubelet does not categorize the space as in use.\n\nProject quotas are an operating-system level feature for managing\nstorage use on filesystems. With Kubernetes, you can enable project\nquotas for monitoring storage use. Make sure that the filesystem\nbacking the `emptyDir` volumes, on the node, provides project quota support.\nFor example, XFS and ext4fs offer project quotas.\n\nProject quotas let you monitor storage use; they do not enforce limits.\n\nKubernetes uses project IDs starting from `1048576`. The IDs in use are\nregistered in `/etc/projects` and `/etc/projid`. If project IDs in\nthis range are used for other purposes on the system, those project\nIDs must be registered in `/etc/projects` and `/etc/projid` so that\nKubernetes does not use them.\n\nQuotas are faster and more accurate than directory scanning.\nWhen a directory is assigned to a project, all files created under a directory\nare created in that project, and the kernel merely has to keep track of\nhow many blocks are in use by files in that project.\nIf a file is created and deleted, but has an open file descriptor,\nit continues to consume space. Quota tracking records that space accurately\nwhereas directory scans overlook the storage used by deleted files.\n\nTo use quotas to track a pod's resource usage, the pod must be in\na user namespace. Within user namespaces, the kernel restricts changes\nto projectIDs on the filesystem, ensuring the reliability of storage\nmetrics calculated by quotas.\n\nIf you want to use project quotas, you should:\n\n* Enable the `LocalStorageCapacityIsolationFSQuotaMonitoring=true`\n[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)\nusing the `featureGates` field in the\n[kubelet configuration](/docs/reference/config-api/kubelet-config.v1beta1/).\n\n* Ensure the `UserNamespacesSupport`\n[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)\nis enabled, and that the kernel, CRI implementation and OCI runtime support user namespaces.\n\n* Ensure that the root filesystem (or optional runtime filesystem)\nhas project quotas enabled. All XFS filesystems support project quotas.\nFor ext4 filesystems, you need to enable the project quota tracking feature\nwhile the filesystem is not mounted.\n\n```bash\n# For ext4, with /dev/block-device not mounted\nsudo tune2fs -O project -Q prjquota /dev/block-device\n```\n\n* Ensure that the root filesystem (or optional runtime filesystem) is\nmounted with project quotas enabled. For both XFS and ext4fs, the\nmount option is named `prjquota`.\n\nIf you don't want to use project quotas, you should:\n\n* Disable the `LocalStorageCapacityIsolationFSQuotaMonitoring`\n[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)\nusing the `featureGates` field in the\n[kubelet configuration](/docs/reference/config-api/kubelet-config.v1beta1/).\n\n##\n\n* Read about [project quotas](https://www.linux.org/docs/man8/xfs_quota.html) in XFS", "source": "content/en/docs/concepts/storage/ephemeral-storage.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This document describes _ephemeral volumes_ in Kubernetes. Familiarity\nwith [volumes](/docs/concepts/storage/volumes/) is suggested, in\nparticular PersistentVolumeClaim and PersistentVolume.\n\nSome applications need additional storage but don't care whether that\ndata is stored persistently across restarts. For example, caching\nservices are often limited by memory size and can move infrequently\nused data into storage that is slower than memory with little impact\non overall performance.\n\nOther applications expect some read-only input data to be present in\nfiles, like configuration data or secret keys.\n\n_Ephemeral volumes_ are designed for these use cases. Because volumes\nfollow the Pod's lifetime and get created and deleted along with the\nPod, Pods can be stopped and restarted without being limited to where\nsome persistent volume is available.\n\nEphemeral volumes are specified _inline_ in the Pod spec, which\nsimplifies application deployment and management.\n\n### Types of ephemeral volumes\n\nKubernetes supports several different kinds of ephemeral volumes for\ndifferent purposes:\n- [emptyDir](/docs/reference/storage/volume-types/#emptydir): empty at Pod startup,\nwith storage coming locally from the kubelet base directory (usually\nthe root disk) or RAM\n- [configMap](/docs/reference/storage/volume-types/#configmap),\n[downwardAPI](/docs/reference/storage/volume-types/#downwardapi),\n[secret](/docs/reference/storage/volume-types/#secret): inject different\nkinds of Kubernetes data into a Pod\n- [image](/docs/reference/storage/volume-types/#image): allows mounting container image files or artifacts,\ndirectly to a Pod.\n- [CSI ephemeral volumes](#csi-ephemeral-volumes):\nsimilar to the previous volume kinds, but provided by special CSI drivers\nwhich specifically [support this feature](https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html)\n- [generic ephemeral volumes](#generic-ephemeral-volumes), which\ncan be provided by all storage drivers that also support persistent volumes\n\n`emptyDir`, `configMap`, `downwardAPI`, `secret` are provided as\n[local ephemeral storage](/docs/concepts/storage/ephemeral-storage/).\nThey are managed by kubelet on each node.\n\nCSI ephemeral volumes *must* be provided by third-party CSI storage\ndrivers.\n\nGeneric ephemeral volumes *can* be provided by third-party CSI storage\ndrivers, but also by any other storage driver that supports dynamic\nprovisioning. Some CSI drivers are written specifically for CSI\nephemeral volumes and do not support dynamic provisioning: those then\ncannot be used for generic ephemeral volumes.\n\nThe advantage of using third-party drivers is that they can offer\nfunctionality that Kubernetes itself does not support, for example\nstorage with different performance characteristics than the disk that\nis managed by kubelet, or injecting different data.\n\n### CSI ephemeral volumes\n\nCSI ephemeral volumes are only supported by a subset of CSI drivers.\nThe Kubernetes CSI [Drivers list](https://kubernetes-csi.github.io/docs/drivers.html)\nshows which drivers support ephemeral volumes.\n\nConceptually, CSI ephemeral volumes are similar to `configMap`,\n`downwardAPI` and `secret` volume types: the storage is managed locally on each\nnode and is created together with other local resources after a Pod has been\nscheduled onto a node. Kubernetes has no concept of rescheduling Pods\nanymore at this stage. Volume creation has to be unlikely to fail,\notherwise Pod startup gets stuck. In particular, [storage capacity\naware Pod scheduling](/docs/concepts/storage/storage-capacity/) is *not*\nsupported for these volumes. They are currently also not covered by\nthe storage resource usage limits of a Pod, because that is something\nthat kubelet can only enforce for storage that it manages itself.\n\nHere's an example manifest for a Pod that uses CSI ephemeral storage:\n\n```yaml\nkind: Pod\napiVersion: v1\nmetadata:\nname: my-csi-app\nspec:\ncontainers:\n- name: my-frontend\nimage: busybox:1.28\nvolumeMounts:\n- mountPath: \"/data\"\nname: my-csi-inline-vol\ncommand: [ \"sleep\", \"1000000\" ]\nvolumes:\n- name: my-csi-inline-vol\ncsi:\ndriver: inline.storage.kubernetes.io\nvolumeAttributes:\nfoo: bar\n```\n\nThe `volumeAttributes` determine what volume is prepared by the\ndriver. These attributes are specific to each driver and not\nstandardized. See the documentation of each CSI driver for further\ninstructions.\n\n### CSI driver restrictions\n\nCSI ephemeral volumes allow users to provide `volumeAttributes`\ndirectly to the CSI driver as part of the Pod spec. A CSI driver\nallowing `volumeAttributes` that are typically restricted to\nadministrators is NOT suitable for use in an inline ephemeral volume.\nFor example, parameters that are normally defined in the StorageClass\nshould not be exposed to users through the use of inline ephemeral volumes.\n\nCluster administrators who need to restrict the CSI drivers that are\nallowed to be used as inline volumes within a Pod spec may do so by:\n\n- Removing `Ephemeral` from `volumeLifecycleModes` in the CSIDriver spec, which prevents the\ndriver from being used as an inline ephemeral volume.\n- Using an [admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/)\nto restrict how this driver is used.\n\n### Generic ephemeral volumes\n\nGeneric ephemeral volumes are similar to `emptyDir` volumes in the\nsense that they provide a per-pod directory for scratch data that is\nusually empty after provisioning. But they may also have additional\nfeatures:\n\n- Storage can be local or network-attached.\n- Volumes can have a fixed size that Pods are not able to exceed.\n- Volumes may have some initial data, depending on the driver and\nparameters.\n- Typical operations on volumes are supported assuming that the driver\nsupports them, including\n[snapshotting](/docs/concepts/storage/volume-snapshots/),\n[cloning](/docs/concepts/storage/volume-pvc-datasource/),\n[resizing](/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims),\nand [storage capacity tracking](/docs/concepts/storage/storage-capacity/).\n\nExample:\n\n```yaml\nkind: Pod\napiVersion: v1\nmetadata:\nname: my-app\nspec:\ncontainers:\n- name: my-frontend\nimage: busybox:1.28\nvolumeMounts:\n- mountPath: \"/scratch\"\nname: scratch-volume\ncommand: [ \"sleep\", \"1000000\" ]\nvolumes:\n- name: scratch-volume\nephemeral:\nvolumeClaimTemplate:\nmetadata:\nlabels:\ntype: my-frontend-volume\nspec:\naccessModes: [ \"ReadWriteOnce\" ]\nstorageClassName: \"scratch-storage-class\"\nresources:\nrequests:\nstorage: 1Gi\n```\n\n### Lifecycle and PersistentVolumeClaim\n\nThe key design idea is that the\n[parameters for a volume claim](/docs/reference/generated/kubernetes-api//#ephemeralvolumesource-v1-core)\nare allowed inside a volume source of the Pod. Labels, annotations and\nthe whole set of fields for a PersistentVolumeClaim are supported. When such a Pod gets\ncreated, the ephemeral volume controller then creates an actual PersistentVolumeClaim\nobject in the same namespace as the Pod and ensures that the PersistentVolumeClaim\ngets deleted when the Pod gets deleted.\n\nThat triggers volume binding and/or provisioning, either immediately if\nthe StorageClass uses immediate volume binding or when the Pod is\ntentatively scheduled onto a node (`WaitForFirstConsumer` volume\nbinding mode). The latter is recommended for generic ephemeral volumes\nbecause then the scheduler is free to choose a suitable node for\nthe Pod. With immediate binding, the scheduler is forced to select a node that has\naccess to the volume once it is available.\n\nIn terms of [resource ownership](/docs/concepts/architecture/garbage-collection/#owners-dependents),\na Pod that has generic ephemeral storage is the owner of the PersistentVolumeClaim(s)\nthat provide that ephemeral storage. When the Pod is deleted,\nthe Kubernetes garbage collector deletes the PVC, which then usually\ntriggers deletion of the volume because the default reclaim policy of\nstorage classes is to delete volumes. You can create quasi-ephemeral local storage\nusing a StorageClass with a reclaim policy of `retain`: the storage outlives the Pod,\nand in this case you need to ensure that volume clean up happens separately.\n\nWhile these PVCs exist, they can be used like any other PVC. In\nparticular, they can be referenced as data source in volume cloning or\nsnapshotting. The PVC object also holds the current status of the\nvolume.\n\n### PersistentVolumeClaim naming\n\nNaming of the automatically created PVCs is deterministic: the name is\na combination of the Pod name and volume name, with a hyphen (`-`) in the\nmiddle. In the example above, the PVC name will be\n`my-app-scratch-volume`. This deterministic naming makes it easier to\ninteract with the PVC because one does not have to search for it once\nthe Pod name and volume name are known.\n\nThe deterministic naming also introduces a potential conflict between different\nPods (a Pod \"pod-a\" with volume \"scratch\" and another Pod with name\n\"pod\" and volume \"a-scratch\" both end up with the same PVC name\n\"pod-a-scratch\") and between Pods and manually created PVCs.\n\nSuch conflicts are detected: a PVC is only used for an ephemeral\nvolume if it was created for the Pod. This check is based on the\nownership relationship. An existing PVC is not overwritten or\nmodified. But this does not resolve the conflict because without the\nright PVC, the Pod cannot start.\n\nTake care when naming Pods and volumes inside the\nsame namespace, so that these conflicts can't occur.\n\n### Security\n\nUsing generic ephemeral volumes allows users to create PVCs indirectly\nif they can create Pods, even if they do not have permission to create PVCs directly.\nCluster administrators must be aware of this. If this does not fit their security model,\nthey should use an [admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/)\nthat rejects objects like Pods that have a generic ephemeral volume.\n\nThe normal [namespace quota for PVCs](/docs/concepts/policy/resource-quotas/#storage-resource-quota)\nstill applies, so even if users are allowed to use this new mechanism, they cannot use\nit to circumvent other policies.\n\n##\n\n### Ephemeral volumes managed by kubelet\n\nSee [local ephemeral storage](/docs/concepts/storage/ephemeral-storage/).\n\n### CSI ephemeral volumes\n\n- For more information on the design, see the\n[Ephemeral Inline CSI volumes KEP](https://github.com/kubernetes/enhancements/blob/ad6021b3d61a49040a3f835e12c8bb5424db2bbb/keps/sig-storage/20190122-csi-inline-volumes.md).\n- For more information on further development of this feature, see the\n[enhancement tracking issue #596](https://github.com/kubernetes/enhancements/issues/596).\n\n### Generic ephemeral volumes\n\n- For more information on the design, see the\n[Generic ephemeral inline volumes KEP](https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/1698-generic-ephemeral-volumes/README.md).", "source": "content/en/docs/concepts/storage/ephemeral-volumes.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This document describes _projected volumes_ in Kubernetes. Familiarity with [volumes](/docs/concepts/storage/volumes/) is suggested.\n\n## Introduction\n\nA `projected` volume maps several existing volume sources into the same directory.\n\nCurrently, the following types of volume sources can be projected:\n\n* [`secret`](/docs/reference/storage/volume-types/#secret)\n* [`downwardAPI`](/docs/reference/storage/volume-types/#downwardapi)\n* [`configMap`](/docs/reference/storage/volume-types/#configmap)\n* [`serviceAccountToken`](#serviceaccounttoken)\n* [`clusterTrustBundle`](#clustertrustbundle)\n* [`podCertificate`](#podcertificate)\n\nAll sources are required to be in the same namespace as the Pod. For more details,\nsee the [all-in-one volume](https://git.k8s.io/design-proposals-archive/node/all-in-one-volume.md) design document.\n\n### Example configuration with a secret, a downwardAPI, and a configMap {#example-configuration-secret-downwardapi-configmap}\n\n### Example configuration: secrets with a non-default permission mode set {#example-configuration-secrets-nondefault-permission-mode}\n\nEach projected volume source is listed in the spec under `sources`. The\nparameters are nearly the same with two exceptions:\n\n* For secrets, the `secretName` field has been changed to `name` to be consistent\nwith ConfigMap naming.\n* The `defaultMode` can only be specified at the projected level and not for each\nvolume source. However, as illustrated above, you can explicitly set the `mode`\nfor each individual projection.\n\n## serviceAccountToken projected volumes {#serviceaccounttoken}\nYou can inject the token for the current [service account](/docs/reference/access-authn-authz/authentication/#service-account-tokens)\ninto a Pod at a specified path. For example:\n\nThe example Pod has a projected volume containing the injected service account\ntoken. Containers in this Pod can use that token to access the Kubernetes API\nserver, authenticating with the identity of [the pod's ServiceAccount](/docs/tasks/configure-pod-container/configure-service-account/).\nThe `audience` field contains the intended audience of the\ntoken. A recipient of the token must identify itself with an identifier specified\nin the audience of the token, and otherwise should reject the token. This field\nis optional and it defaults to the identifier of the API server.\n\nThe `expirationSeconds` is the expected duration of validity of the service account\ntoken. It defaults to 1 hour and must be at least 10 minutes (600 seconds). An administrator\ncan also limit its maximum value by specifying the `--service-account-max-token-expiration`\noption for the API server. The `path` field specifies a relative path to the mount point\nof the projected volume.\n\nA container using a projected volume source as a [`subPath`](/docs/concepts/storage/volumes/#using-subpath)\nvolume mount will not receive updates for those volume sources.\n\n## clusterTrustBundle projected volumes {#clustertrustbundle}\n\nThe `clusterTrustBundle` projected volume source injects the contents of one or more\n[ClusterTrustBundle](/docs/reference/access-authn-authz/certificate-signing-requests#cluster-trust-bundles)\nobjects as an automatically-updating file in the container filesystem.\n\nClusterTrustBundles can be selected either by [name](/docs/reference/access-authn-authz/certificate-signing-requests#ctb-signer-unlinked)\nor by [signer name](/docs/reference/access-authn-authz/certificate-signing-requests#ctb-signer-linked).\n\nTo select by name, use the `name` field to designate a single ClusterTrustBundle object.\n\nTo select by signer name, use the `signerName` field (and optionally the\n`labelSelector` field) to designate a set of ClusterTrustBundle objects that use\nthe given signer name. If `labelSelector` is not present, then all\nClusterTrustBundles for that signer are selected.\n\nThe kubelet deduplicates the certificates in the selected ClusterTrustBundle objects,\nnormalizes the PEM representations (discarding comments and headers), reorders the certificates,\nand writes them into the file named by `path`.\nAs the set of selected ClusterTrustBundles or their content changes, kubelet keeps the file up-to-date.\n\nBy default, the kubelet will prevent the pod from starting if the named ClusterTrustBundle is not found,\nor if `signerName` / `labelSelector` do not match any ClusterTrustBundles.\nIf this behavior is not what you want, then set the `optional` field to `true`,\nand the pod will start up with an empty file at `path`.\n\n## podCertificate projected volumes {#podcertificate}\n\nThe `podCertificate` projected volumes source securely provisions a private key\nand X.509 certificate chain for pod to use as client or server credentials.\nKubelet will then handle refreshing the private key and certificate chain when\nthey get close to expiration. The application just has to make sure that it\nreloads the file promptly when it changes, with a mechanism like `inotify` or\npolling.\n\nEach `podCertificate` projection supports the following configuration fields:\n* `signerName`: The\n[signer](/docs/reference/access-authn-authz/certificate-signing-requests#signers)\nyou want to issue the certificate. Note that signers may have their own\naccess requirements, and may refuse to issue certificates to your pod.\n* `keyType`: The type of private key that should be generated. Valid values are\n`ED25519`, `ECDSAP256`, `ECDSAP384`, `ECDSAP521`, `RSA3072`, and `RSA4096`.\n* `maxExpirationSeconds`: The maximum lifetime you will accept for the\ncertificate issued to the pod. If not set, will be defaulted to `86400` (24\nhours). Must be at least `3600` (1 hour), and at most `7862400` (91 days).\nKubernetes built-in signers are restricted to a max lifetime of `86400` (1\nday). The signer is allowed to issue a certificate with a lifetime shorter\nthan what you've specified.\n* `credentialBundlePath`: Relative path within the projection where the\ncredential bundle should be written. The credential bundle is a PEM-formatted\nfile, where the first block is a \"PRIVATE KEY\" block that contains a\nPKCS#8-serialized private key, and the remaining blocks are \"CERTIFICATE\"\nblocks that comprise the certificate chain (leaf certificate and any\nintermediates).\n* `keyPath` and `certificateChainPath`: Separate paths where Kubelet should\nwrite *just* the private key or certificate chain.\n* `userAnnotations`: a map that allows you to pass additional information to\nthe signer implementation. It is copied verbatim into the\n`spec.unverifiedUserAnnotations` field of the\n[PodCertificateRequest](/docs/reference/access-authn-authz/certificate-signing-requests#pod-certificate-requests) objects\nthat Kubelet creates. Entries are subject to the same validation as object\nmetadata annotations, with the addition that all keys must be domain-prefixed.\nNo restrictions are placed on values, except an overall size limitation on the\nentire field. Other than these basic validations, the API server does not\nconduct any extra validations. The signer implementations should be very\ncareful when consuming this data. Signers must not inherently trust this data\nwithout first performing the appropriate verification steps. Signers should\ndocument the keys and values they support. Signers should deny requests that\ncontain keys they do not recognize.\n\nMost applications should prefer using `credentialBundlePath` unless they need\nthe key and certificates in separate files for compatibility reasons. Kubelet\nuses an atomic writing strategy based on symlinks to make sure that when you\nopen the files it projects, you read either the old content or the new content.\nHowever, if you read the key and certificate chain from separate files, Kubelet\nmay rotate the credentials after your first read and before your second read,\nresulting in your application loading a mismatched key and certificate.\n\n## SecurityContext interactions\n\nThe [proposal](https://git.k8s.io/enhancements/keps/sig-storage/2451-service-account-token-volumes#proposal)\nfor file permission handling in projected service account volume enhancement\nintroduced the projected files having the correct owner permissions set.\n\n### Linux\n\nIn Linux pods that have a projected volume and `RunAsUser` set in the Pod\n[`SecurityContext`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context),\nthe projected files have the correct ownership set including container user\nownership.\n\nWhen all containers in a pod have the same `runAsUser` set in their\n[`PodSecurityContext`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context)\nor container\n[`SecurityContext`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1),\nthen the kubelet ensures that the contents of the `serviceAccountToken` volume are owned by that user,\nand the token file has its permission mode set to `0600`.\n\nEphemeral containers\nadded to a Pod after it is created do *not* change volume permissions that were\nset when the pod was created.\n\nIf a Pod's `serviceAccountToken` volume permissions were set to `0600` because\nall other containers in the Pod have the same `runAsUser`, ephemeral\ncontainers must use the same `runAsUser` to be able to read the token.\n\n### Windows\n\nIn Windows pods that have a projected volume and `RunAsUsername` set in the\nPod `SecurityContext`, the ownership is not enforced due to the way user\naccounts are managed in Windows. Windows stores and manages local user and group\naccounts in a database file called Security Account Manager (SAM). Each\ncontainer maintains its own instance of the SAM database, to which the host has\nno visibility into while the container is running. Windows containers are\ndesigned to run the user mode portion of the OS in isolation from the host,\nhence the maintenance of a virtual SAM database. As a result, the kubelet running\non the host does not have the ability to dynamically configure host file\nownership for virtualized container accounts. It is recommended that if files on\nthe host machine are to be shared with the container then they should be placed\ninto their own volume mount outside of `C:\\`.\n\nBy default, the projected files will have the following ownership as shown for\nan example projected volume file:\n\n```powershell\nPS C:\\> Get-Acl C:\\var\\run\\secrets\\kubernetes.io\\serviceaccount\\..2021_08_31_22_22_18.318230061\\ca.crt | Format-List\n\nPath : Microsoft.PowerShell.Core\\FileSystem::C:\\var\\run\\secrets\\kubernetes.io\\serviceaccount\\..2021_08_31_22_22_18.318230061\\ca.crt\nOwner : BUILTIN\\Administrators\nGroup : NT AUTHORITY\\SYSTEM\nAccess : NT AUTHORITY\\SYSTEM Allow FullControl\nBUILTIN\\Administrators Allow FullControl\nBUILTIN\\Users Allow ReadAndExecute, Synchronize\nAudit :\nSddl : O:BAG:SYD:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;0x1200a9;;;BU)\n```\n\nThis implies all administrator users like `ContainerAdministrator` will have\nread, write and execute access while, non-administrator users will have read and\nexecute access.\n\nIn general, granting the container access to the host is discouraged as it can\nopen the door for potential security exploits.\n\nCreating a Windows Pod with `RunAsUser` in it's `SecurityContext` will result in\nthe Pod being stuck at `ContainerCreating` forever. So it is advised to not use\nthe Linux only `RunAsUser` option with Windows Pods.", "source": "content/en/docs/concepts/storage/projected-volumes.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page describes the maximum number of volumes that can be attached\nto a Node for various cloud providers.\n\nCloud providers like Google, Amazon, and Microsoft typically have a limit on\nhow many volumes can be attached to a Node. It is important for Kubernetes to\nrespect those limits. Otherwise, Pods scheduled on a Node could get stuck\nwaiting for volumes to attach.\n\n## Kubernetes default limits\n\nThe Kubernetes scheduler has default limits on the number of volumes\nthat can be attached to a Node:\n\nCloud service Maximum volumes per Node\nAmazon Elastic Block Store (EBS) 39\nGoogle Persistent Disk 16\nMicrosoft Azure Disk Storage 16\n\n## Dynamic volume limits\n\nDynamic volume limits are supported for following volume types.\n\n- Amazon EBS\n- Google Persistent Disk\n- Azure Disk\n- CSI\n\nFor volumes managed by in-tree volume plugins, Kubernetes automatically determines the Node\ntype and enforces the appropriate maximum number of volumes for the node. For example:\n\n* On\nGoogle Compute Engine ,\nup to 127 volumes can be attached to a node, [depending on the node\ntype](https://cloud.google.com/compute/docs/disks/#pdnumberlimits).\n\n* For Amazon EBS disks on M5,C5,R5,T3 and Z1D instance types, Kubernetes allows only 25\nvolumes to be attached to a Node. For other instance types on\nAmazon Elastic Compute Cloud (EC2) ,\nKubernetes allows 39 volumes to be attached to a Node.\n\n* On Azure, up to 64 disks can be attached to a node, depending on the node type. For more details, refer to [Sizes for virtual machines in Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes).\n\n* If a CSI storage driver advertises a maximum number of volumes for a Node (using `NodeGetInfo`), the kube-scheduler honors that limit.\nRefer to the [CSI specifications](https://github.com/container-storage-interface/spec/blob/master/spec.md#nodegetinfo) for details.\n\n* For volumes managed by in-tree plugins that have been migrated to a CSI driver, the maximum number of volumes will be the one reported by the CSI driver.\n\n### Mutable CSI Node Allocatable Count\n\nCSI drivers can dynamically adjust the maximum number of volumes that can be attached to a Node at runtime. This enhances scheduling accuracy and reduces pod scheduling failures due to changes in resource availability.\n\nTo use this feature, you must enable the `MutableCSINodeAllocatableCount` feature gate on the following components:\n\n- `kube-apiserver`\n- `kubelet`\n\n#### Periodic Updates\n\nWhen enabled, CSI drivers can request periodic updates to their volume limits by setting the `nodeAllocatableUpdatePeriodSeconds` field in the `CSIDriver` specification. For example:\n\n```yaml\napiVersion: storage.k8s.io/v1\nkind: CSIDriver\nmetadata:\nname: hostpath.csi.k8s.io\nspec:\nnodeAllocatableUpdatePeriodSeconds: 60\n```\n\nKubelet will periodically call the corresponding CSI driver’s `NodeGetInfo` endpoint to refresh the maximum number of attachable volumes, using the interval specified in `nodeAllocatableUpdatePeriodSeconds`. The minimum allowed value for this field is 10 seconds.\n\nIf a volume attachment operation fails with a `ResourceExhausted` error (gRPC code 8), Kubernetes triggers an immediate update to the allocatable volume count for that Node. Additionally, kubelet marks affected pods as Failed, allowing their controllers to handle recreation. This prevents pods from getting stuck indefinitely in the `ContainerCreating` state.\n\n### Preventing Pod placement without CSI driver\n\nThe `VolumeLimitScaling`\n[feature gate](/docs/reference/command-line-tools-reference/feature-gates#VolumeLimitScaling)\nis enabled by default in Kubernetes v1.37.\n\nHowever, preventing pod placement on nodes without a CSI driver requires explicit opt-in\nvia the `spec.preventPodSchedulingIfMissing` field of the `CSIDriver` object.\n\nThe `preventPodSchedulingIfMissing` field defaults to `false` and must be set to `true`\nif you do not want pods to be scheduled on nodes without a CSI driver. This decision\nto default to `false` was made for backward compatibility reasons and compatibility\nwith [Cluster AutoScaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler)\nwhich may not be aware of CSI volume limits during the autoscaling\nphase (see section below).\n\n```yaml\napiVersion: storage.k8s.io/v1\nkind: CSIDriver\nmetadata:\nname: hostpath.csi.k8s.io\nspec:\npreventPodSchedulingIfMissing: true\n```\n\n### CSI volume attach limits and cluster autoscaler\n\n[Cluster autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler) can account for CSI\nvolume limits when\n`--enable-csi-node-aware-scheduling=true`. This option is independent of the\n`VolumeLimitScaling` feature gate.\n\nIf you use cluster autoscaler, only set `spec.preventPodSchedulingIfMissing` to\n`true` when cluster autoscaler is configured with\n`--enable-csi-node-aware-scheduling=true`. Otherwise, its scheduling simulations\ndo not include the required `CSINode` information for new nodes, and cluster\nautoscaler might fail to scale up for pending Pods that use CSI volumes.", "source": "content/en/docs/concepts/storage/storage-limits.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Whether your workload is a single component or several that work together, on Kubernetes you run\nit inside a set of [_pods_](/docs/concepts/workloads/pods).\nIn Kubernetes, a Pod represents a set of one or more running\ncontainers on your cluster.\n\nKubernetes pods have a [defined lifecycle](/docs/concepts/workloads/pods/pod-lifecycle/).\nFor example, once a pod is running in your cluster then a critical fault on the\nnode where that pod is running means that\nall the pods on that node fail. Kubernetes treats that level of failure as final: you\nwould need to create a new Pod to recover, even if the node later becomes healthy.\n\nHowever, to make life considerably easier, you don't need to manage each Pod directly.\nInstead, you can use _workload resources_ that manage a set of pods on your behalf.\nThese resources configure controllers\nthat make sure the right number of the right kind of pod are running, to match the state\nyou specified.\n\nKubernetes provides several built-in workload resources:\n\n* [Deployment](/docs/concepts/workloads/controllers/deployment/) and [ReplicaSet](/docs/concepts/workloads/controllers/replicaset/)\n(replacing the legacy resource\nReplicationController).\nDeployment is a good fit for managing a stateless application workload on your cluster,\nwhere any Pod in the Deployment is interchangeable and can be replaced if needed.\n* [StatefulSet](/docs/concepts/workloads/controllers/statefulset/) lets you\nrun one or more related Pods that do track state somehow. For example, if your workload\nrecords data persistently, you can run a StatefulSet that matches each Pod with a\n[PersistentVolume](/docs/concepts/storage/persistent-volumes/). Your code, running in the\nPods for that StatefulSet, can replicate data to other Pods in the same StatefulSet\nto improve overall resilience.\n* [DaemonSet](/docs/concepts/workloads/controllers/daemonset/) defines Pods that provide\nfacilities that are local to nodes.\nEvery time you add a node to your cluster that matches the specification in a DaemonSet,\nthe control plane schedules a Pod for that DaemonSet onto the new node.\nEach pod in a DaemonSet performs a job similar to a system daemon on a classic Unix / POSIX\nserver. A DaemonSet might be fundamental to the operation of your cluster, such as\na plugin to run [cluster networking](/docs/concepts/cluster-administration/networking/#how-to-implement-the-kubernetes-network-model),\nit might help you to manage the node,\nor it could provide optional behavior that enhances the container platform you are running.\n* [Job](/docs/concepts/workloads/controllers/job/) and\n[CronJob](/docs/concepts/workloads/controllers/cron-jobs/) provide different ways to\ndefine tasks that run to completion and then stop.\nYou can use a [Job](/docs/concepts/workloads/controllers/job/) to\ndefine a task that runs to completion, just once. You can use a\n[CronJob](/docs/concepts/workloads/controllers/cron-jobs/) to run\nthe same Job multiple times according a schedule.\n\nIn the wider Kubernetes ecosystem, you can find third-party workload resources that provide\nadditional behaviors. Using a\n[custom resource definition](/docs/concepts/extend-kubernetes/api-extension/custom-resources/),\nyou can add in a third-party workload resource if you want a specific behavior that's not part\nof Kubernetes' core. For example, if you wanted to run a group of Pods for your application but\nstop work unless _all_ the Pods are available (perhaps for some high-throughput distributed task),\nthen you can implement or install an extension that does provide that feature.\n\n## Workload placement\n\nWhile standard workload resources (like Deployments and Jobs) manage the lifecycle of Pods,\nyou may have complex scheduling requirements where groups of Pods must be treated as a single unit.\n\nThe [Workload API](/docs/concepts/workloads/workload-api/) allows you to define `PodGroupTemplates` to group Pods and apply advanced scheduling policies to them,\nsuch as [gang scheduling](/docs/concepts/scheduling-eviction/gang-scheduling/).\nControllers create [PodGroup](/docs/concepts/workloads/podgroup-api/) objects from these templates at runtime,\nand `Pods` reference their `PodGroup` via the\n`spec.schedulingGroup` field. This is particularly useful for batch processing and machine\nlearning workloads where \"all-or-nothing\" placement is required.\n\n##\n\nAs well as reading about each API kind for workload management, you can read how to\ndo specific tasks:\n\n* [Run a stateless application using a Deployment](/docs/tasks/run-application/run-stateless-application-deployment/)\n* Run a stateful application either as a [single instance](/docs/tasks/run-application/run-single-instance-stateful-application/)\nor as a [replicated set](/docs/tasks/run-application/run-replicated-stateful-application/)\n* [Run automated tasks with a CronJob](/docs/tasks/job/automated-tasks-with-cron-jobs/)\n\nTo learn about Kubernetes' mechanisms for separating code from configuration,\nvisit [Configuration](/docs/concepts/configuration/).\n\nThere are two supporting concepts that provide backgrounds about how Kubernetes manages pods\nfor applications:\n* [Garbage collection](/docs/concepts/architecture/garbage-collection/) tidies up objects\nfrom your cluster after their _owning resource_ has been removed.\n* The [_time-to-live after finished_ controller](/docs/concepts/workloads/controllers/ttlafterfinished/)\nremoves Jobs once a defined time has passed since they completed.\n\nOnce your application is running, you might want to make it available on the internet as\na [Service](/docs/concepts/services-networking/service/) or, for web application only,\nusing an [Ingress](/docs/concepts/services-networking/ingress).", "source": "content/en/docs/concepts/workloads/_index.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "A Job creates one or more Pods and will continue to retry execution of the Pods until a specified number of them successfully terminate.\nAs pods successfully complete, the Job tracks the successful completions. When a specified number\nof successful completions is reached, the task (ie, Job) is complete. Deleting a Job will clean up\nthe Pods it created. Suspending a Job will delete its active Pods until the Job\nis resumed again.\n\nA simple case is to create one Job object in order to reliably run one Pod to completion.\nThe Job object will start a new Pod if the first Pod fails or is deleted (for example\ndue to a node hardware failure or a node reboot).\n\nYou can also use a Job to run multiple Pods in parallel.\n\nIf you want to run a Job (either a single task, or several in parallel) on a schedule,\nsee [CronJob](/docs/concepts/workloads/controllers/cron-jobs/).\n\n## Running an example Job\n\nHere is an example Job config. It computes π to 2000 places and prints it out.\nIt takes around 10s to complete.\n\nYou can run the example with this command:\n\n```shell\nkubectl apply -f https://kubernetes.io/examples/controllers/job.yaml\n```\n\nThe output is similar to this:\n\n```\njob.batch/pi created\n```\n\nCheck on the status of the Job with `kubectl`:\n\nName: pi\nNamespace: default\nSelector: batch.kubernetes.io/controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c\nLabels: batch.kubernetes.io/controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c\nbatch.kubernetes.io/job-name=pi\n...\nAnnotations: batch.kubernetes.io/job-tracking: \"\"\nParallelism: 1\nCompletions: 1\nStart Time: Mon, 02 Dec 2019 15:20:11 +0200\nCompleted At: Mon, 02 Dec 2019 15:21:16 +0200\nDuration: 65s\nPods Statuses: 0 Running / 1 Succeeded / 0 Failed\nPod Template:\nLabels: batch.kubernetes.io/controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c\nbatch.kubernetes.io/job-name=pi\nContainers:\npi:\nImage: perl:5.34.0\nPort:\nHost Port:\nCommand:\nperl\n-Mbignum=bpi\n-wle\nprint bpi(2000)\nEnvironment:\nMounts:\nVolumes:\nEvents:\nType Reason Age From Message\n---- ------ ---- ---- -------\nNormal SuccessfulCreate 21s job-controller Created pod: pi-xf9p4\nNormal Completed 18s job-controller Job completed\n\napiVersion: batch/v1\nkind: Job\nmetadata:\nannotations: batch.kubernetes.io/job-tracking: \"\"\n...\ncreationTimestamp: \"2022-11-10T17:53:53Z\"\ngeneration: 1\nlabels:\nbatch.kubernetes.io/controller-uid: 863452e6-270d-420e-9b94-53a54146c223\nbatch.kubernetes.io/job-name: pi\nname: pi\nnamespace: default\nresourceVersion: \"4751\"\nuid: 204fb678-040b-497f-9266-35ffa8716d14\nspec:\nbackoffLimit: 4\ncompletionMode: NonIndexed\ncompletions: 1\nparallelism: 1\nselector:\nmatchLabels:\nbatch.kubernetes.io/controller-uid: 863452e6-270d-420e-9b94-53a54146c223\nsuspend: false\ntemplate:\nmetadata:\ncreationTimestamp: null\nlabels:\nbatch.kubernetes.io/controller-uid: 863452e6-270d-420e-9b94-53a54146c223\nbatch.kubernetes.io/job-name: pi\nspec:\ncontainers:\n- command:\n- perl\n- -Mbignum=bpi\n- -wle\n- print bpi(2000)\nimage: perl:5.34.0\nimagePullPolicy: IfNotPresent\nname: pi\nresources: {}\nterminationMessagePath: /dev/termination-log\nterminationMessagePolicy: File\ndnsPolicy: ClusterFirst\nrestartPolicy: Never\nschedulerName: default-scheduler\nsecurityContext: {}\nterminationGracePeriodSeconds: 30\nstatus:\nactive: 1\nready: 0\nstartTime: \"2022-11-10T17:53:57Z\"\nuncountedTerminatedPods: {}\n\nTo view completed Pods of a Job, use `kubectl get pods`.\n\nTo list all the Pods that belong to a Job in a machine readable form, you can use a command like this:\n\n```shell\npods=$(kubectl get pods --selector=batch.kubernetes.io/job-name=pi --output=jsonpath='{.items[*].metadata.name}')\necho $pods\n```\n\nThe output is similar to this:\n\n```\npi-5rwd7\n```\n\nHere, the selector is the same as the selector for the Job. The `--output=jsonpath` option specifies an expression\nwith the name from each Pod in the returned list.\n\nView the standard output of one of the pods:\n\n```shell\nkubectl logs $pods\n```\n\nAnother way to view the logs of a Job:\n\n```shell\nkubectl logs jobs/pi\n```\n\nThe output is similar to this:\n\n```\n3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632788659361533818279682303019520353018529689957736225994138912497217752834791315155748572424541506959508295331168617278558890750983817546374649393192550604009277016711390098488240128583616035637076601047101819429555961989467678374494482553797747268471040475346462080466842590694912933136770289891521047521620569660240580381501935112533824300355876402474964732639141992726042699227967823547816360093417216412199245863150302861829745557067498385054945885869269956909272107975093029553211653449872027559602364806654991198818347977535663698074265425278625518184175746728909777727938000816470600161452491921732172147723501414419735685481613611573525521334757418494684385233239073941433345477624168625189835694855620992192221842725502542568876717904946016534668049886272327917860857843838279679766814541009538837863609506800642251252051173929848960841284886269456042419652850222106611863067442786220391949450471237137869609563643719172874677646575739624138908658326459958133904780275901\n```\n\n## Writing a Job spec\n\nAs with all other Kubernetes config, a Job needs `apiVersion`, `kind`, and `metadata` fields.\n\nWhen the control plane creates new Pods for a Job, the `.metadata.name` of the\nJob is part of the basis for naming those Pods. The name of a Job must be a valid\n[DNS subdomain](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names)\nvalue, but this can produce unexpected results for the Pod hostnames. For best compatibility,\nthe name should follow the more restrictive rules for a\n[DNS label](/docs/concepts/overview/working-with-objects/names#dns-label-names).\nEven when the name is a DNS subdomain, the name must be no longer than 63\ncharacters.\n\nA Job also needs a [`.spec` section](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status).\n\n### Job Labels\n\nJob labels will have `batch.kubernetes.io/` prefix for `job-name` and `controller-uid`.\n\n### Pod Template\n\nThe `.spec.template` is the only required field of the `.spec`.\n\nThe `.spec.template` is a [pod template](/docs/concepts/workloads/pods/#pod-templates).\nIt has exactly the same schema as a Pod,\nexcept it is nested and does not have an `apiVersion` or `kind`.\n\nIn addition to required fields for a Pod, a pod template in a Job must specify appropriate\nlabels (see [pod selector](#pod-selector)) and an appropriate restart policy.\n\nOnly a [`RestartPolicy`](/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy)\nequal to `Never` or `OnFailure` is allowed.\n\n### Pod selector\n\nThe `.spec.selector` field is optional. In almost all cases you should not specify it.\nSee section [specifying your own pod selector](#specifying-your-own-pod-selector).\n\n### Parallel execution for Jobs {#parallel-jobs}\n\nThere are three main types of task suitable to run as a Job:\n\n1. Non-parallel Jobs\n- normally, only one Pod is started, unless the Pod fails.\n- the Job is complete as soon as its Pod terminates successfully.\n1. Parallel Jobs with a *fixed completion count*:\n- specify a non-zero positive value for `.spec.completions`.\n- the Job represents the overall task, and is complete when there are `.spec.completions` successful Pods.\n- when using `.spec.completionMode=\"Indexed\"`, each Pod gets a different index in the range 0 to `.spec.completions-1`.\n1. Parallel Jobs with a *work queue*:\n- do not specify `.spec.completions`, default to `.spec.parallelism`.\n- the Pods must coordinate amongst themselves or an external service to determine\nwhat each should work on. For example, a Pod might fetch a batch of up to N items from the work queue.\n- each Pod is independently capable of determining whether or not all its peers are done,\nand thus that the entire Job is done.\n- when _any_ Pod from the Job terminates with success, no new Pods are created.\n- once at least one Pod has terminated with success and all Pods are terminated,\nthen the Job is completed with success.\n- once any Pod has exited with success, no other Pod should still be doing any work\nfor this task or writing any output. They should all be in the process of exiting.\n\nFor a _non-parallel_ Job, you can leave both `.spec.completions` and `.spec.parallelism` unset.\nWhen both are unset, both are defaulted to 1.\n\nFor a _fixed completion count_ Job, you should set `.spec.completions` to the number of completions needed.\nYou can set `.spec.parallelism`, or leave it unset and it will default to 1.\n\nFor a _work queue_ Job, you must leave `.spec.completions` unset, and set `.spec.parallelism` to\na non-negative integer.\n\nFor more information about how to make use of the different types of job,\nsee the [job patterns](#job-patterns) section.\n\n#### Controlling parallelism\n\nThe requested parallelism (`.spec.parallelism`) can be set to any non-negative value.\nIf it is unspecified, it defaults to 1.\nIf it is specified as 0, then the Job is effectively paused until it is increased.\n\nActual parallelism (number of pods running at any instant) may be more or less than requested\nparallelism, for a variety of reasons:\n\n- For _fixed completion count_ Jobs, the actual number of pods running in parallel will not exceed the number of\nremaining completions. Higher values of `.spec.parallelism` are effectively ignored.\n- For _work queue_ Jobs, no new Pods are started after any Pod has succeeded -- remaining Pods are allowed to complete, however.\n- If the Job has not had time to react.\n- If the Job controller failed to create Pods for any reason (lack of `ResourceQuota`, lack of permission, etc.),\nthen there may be fewer pods than requested.\n- The Job controller may throttle new Pod creation due to excessive previous pod failures in the same Job.\n- When a Pod is gracefully shut down, it takes time to stop.\n\n### Completion mode\n\nJobs with _fixed completion count_ - that is, jobs that have non null\n`.spec.completions` - can have a completion mode that is specified in `.spec.completionMode`:\n\n- `NonIndexed` (default): the Job is considered complete when there have been\n`.spec.completions` successfully completed Pods. In other words, each Pod\ncompletion is homologous to each other. Note that Jobs that have null\n`.spec.completions` are implicitly `NonIndexed`.\n- `Indexed`: the Pods of a Job get an associated completion index from 0 to\n`.spec.completions-1`. The index is available through four mechanisms:\n- The Pod annotation `batch.kubernetes.io/job-completion-index`.\n- The Pod label `batch.kubernetes.io/job-completion-index` (for v1.28 and later). Note\nthe feature gate `PodIndexLabel` must be enabled to use this label, and it is enabled\nby default.\n- As part of the Pod hostname, following the pattern `$(job-name)-$(index)`.\nWhen you use an Indexed Job in combination with a\n, Pods within the Job can use\nthe deterministic hostnames to address each other via DNS. For more information about\nhow to configure this, see [Job with Pod-to-Pod Communication](/docs/tasks/job/job-with-pod-to-pod-communication/).\n- From the containerized task, in the environment variable `JOB_COMPLETION_INDEX`.\n\nThe Job is considered complete when there is one successfully completed Pod\nfor each index. For more information about how to use this mode, see\n[Indexed Job for Parallel Processing with Static Work Assignment](/docs/tasks/job/indexed-parallel-processing-static/).\n\nAlthough rare, more than one Pod could be started for the same index (due to various reasons such as node failures,\nkubelet restarts, or Pod evictions). In this case, only the first Pod that completes successfully will\ncount towards the completion count and update the status of the Job. The other Pods that are running\nor completed for the same index will be deleted by the Job controller once they are detected.\n\n## Integrate with Workload APIs\n\nWhen the [`WorkloadWithJob`](/docs/reference/command-line-tools-reference/feature-gates/)\nfeature gate is enabled, the Job controller compiles a Job's `.spec.scheduling`\nconfiguration into [Workload](/docs/concepts/workloads/workload-api/) and\n[PodGroup](/docs/concepts/workloads/podgroup-api/) objects (`scheduling.k8s.io/v1beta1`)\nbefore it creates any Pods. This lets you express explicit scheduling intent for a Job,\nsuch as [gang scheduling](/docs/concepts/scheduling-eviction/gang-scheduling/) (all Pods\nscheduled together or none), topology co-location, and disruption behavior.\n\nWhen you omit `.spec.scheduling`, the Job defaults to the `Basic` scheduling\npolicy, which preserves the standard pod-by-pod scheduling outcome of an ordinary\nJob. The controller still creates a `Workload` and `PodGroup` for every\neligible Job (including `Basic` ones), so the observable objects are consistent\nregardless of the policy.\n\n### Scheduling configuration\n\nThe `.spec.scheduling` field accepts the following fields:\n\n- `schedulingPolicy`: exactly one of `basic` or `gang` must be specified. With `gang`,\nall Pods must be schedulable together before any of them are bound. An omitted\n`gang.minCount` defaults to the Job's `.spec.parallelism`. See\n[PodGroup scheduling policies](/docs/concepts/workloads/workload-api/policies/).\n- `schedulingConstraints`:\n[topology](/docs/concepts/workloads/workload-api/topology-aware-scheduling/)\nco-location constraints for the Job's Pods.\n- `disruptionMode`: whether the Pods are disrupted individually (`single`) or as a\ngroup (`all`). See\n[disruption and priority](/docs/concepts/workloads/workload-api/disruption-and-priority/).\n- `resourceClaims`: dynamic resource claims shared across the Job's Pods.\n\nAll `.spec.scheduling` fields are immutable after the Job is created, except for\n`schedulingPolicy.gang.minCount`, which you can change to\n[scale a gang elastically](#elastic-indexed-jobs).\n\n### Gang scheduling\n\nThe following Job requests gang scheduling for its 8 Pods, co-located within a\nsingle zone, and disrupted together:\n\n```yaml\napiVersion: batch/v1\nkind: Job\nmetadata:\nname: distributed-training\nnamespace: training\nspec:\nparallelism: 8\ncompletions: 8\ncompletionMode: Indexed\nscheduling:\nschedulingPolicy:\ngang: {} # minCount omitted -> defaults to parallelism (8)\nschedulingConstraints:\nkey:\n- level: topology.kubernetes.io/zone\ndisruptionMode:\nall: {} # the entire group is disrupted together\ntemplate:\nspec:\nrestartPolicy: Never\ncontainers:\n- name: trainer\nimage: training-image:latest\nresources:\nlimits:\nnvidia.com/gpu: 1\n```\n\nWhen the Job controller processes this Job, it:\n\n1. Creates a [Workload](/docs/concepts/workloads/workload-api/) object in the same\nnamespace, containing a `podGroupTemplate` compiled from `.spec.scheduling`\n(here, a [gang policy](/docs/concepts/workloads/workload-api/policies/) with\n`minCount: 8`).\n1. Creates a PodGroup object from that template. The PodGroup is the runtime\nscheduling unit and carries an inline copy of the policy.\n1. Creates Pods with `.spec.schedulingGroup.podGroupName` set to the PodGroup's\nname, linking each Pod to its scheduling group.\n\nThe controller discovers these objects through spec references\n(`Workload.spec.controllerRef` and `PodGroup.spec.workloadRef`), not by\nname. Objects the controller creates carry an `ownerReferences` entry pointing to\nthe Job, so they are garbage collected when the Job is deleted.\n\n### Default (Basic) scheduling\n\nA Job that omits `.spec.scheduling` defaults to `Basic`, which acts as an implicit\nopt-out of gang scheduling. Its Pods schedule the same way as an ordinary Job,\nwhile a `Basic` `Workload` and `PodGroup` are still created:\n\n```yaml\napiVersion: batch/v1\nkind: Job\nmetadata:\nname: batch-processor\nnamespace: batch\nspec:\nparallelism: 10\ncompletions: 10\n# .spec.scheduling omitted -> defaults to Basic scheduling.\ntemplate:\nspec:\nrestartPolicy: Never\ncontainers:\n- name: processor\nimage: processor-image:v1\n```\n\n### Higher-level controllers\n\nFor a standalone Job, the Job controller owns both the `Workload` and the\n`PodGroup`. When a Job instead carries an `ownerReference` to a parent controller\nthat compiles the `Workload` (for example, `JobSet`), the Job controller defers\n`Workload` ownership to that parent. Whether the Job controller still creates the\nruntime `PodGroup` depends on what the parent delegates:\n\n- If the parent sets the `scheduling.k8s.io/group-template-name` annotation on the\nJob, the Job controller creates and owns the `PodGroup`, mapped to the parent's\nnamed `PodGroupTemplate`.\n- Otherwise, the parent owns both objects and the Job controller creates neither;\nit discovers the existing objects and uses them when creating Pods.\n\nIf a Job's Pod template already has `.spec.template.spec.schedulingGroup` set, the\nJob controller creates neither object, letting you (or a higher-level controller)\nmanage the `Workload`/`PodGroup` lifecycle yourself.\n\n### CronJob behavior\n\nJobs created by a `CronJob` are standalone; the `CronJob` does not create or manage\n`Workload` objects. If a `CronJob`'s `jobTemplate` sets `.spec.scheduling`, the Job\ncontroller creates a separate `Workload` and `PodGroup` for each Job instance,\ncompiled from that Job's `.spec.scheduling` (defaulting to `Basic` when omitted).\nThese objects are garbage collected when each Job completes or is deleted.\n\n### Limitations for Alpha release {#workload-integration-limitations}\n\n- Each Job maps to exactly one `PodGroup`; all Pods in the Job share a single\nscheduling policy.\n- Only `schedulingPolicy.gang.minCount` is mutable; all other `.spec.scheduling`\nfields are immutable after creation.\n- Suspended Jobs retain their `Workload` and `PodGroup` objects; they are not deleted\non suspend or recreated on resume.\n\n## Handling Pod and container failures\n\nA container in a Pod may fail for a number of reasons, such as because the process in it exited with\na non-zero exit code, or the container was killed for exceeding a memory limit, etc. If this\nhappens, and the `.spec.template.spec.restartPolicy = \"OnFailure\"`, then the Pod stays\non the node, but the container is re-run. Therefore, your program needs to handle the case when it is\nrestarted locally, or else specify `.spec.template.spec.restartPolicy = \"Never\"`.\nSee [pod lifecycle](/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy) for more information on `restartPolicy`.\n\nAn entire Pod can also fail, for a number of reasons, such as when the pod is kicked off the node\n(node is upgraded, rebooted, deleted, etc.), or if a container of the Pod fails and the\n`.spec.template.spec.restartPolicy = \"Never\"`. When a Pod fails, then the Job controller\nstarts a new Pod. This means that your application needs to handle the case when it is restarted in a new\npod. In particular, it needs to handle temporary files, locks, incomplete output and the like\ncaused by previous runs.\n\nBy default, each pod failure is counted towards the `.spec.backoffLimit` limit,\nsee [pod backoff failure policy](#pod-backoff-failure-policy). However, you can\ncustomize handling of pod failures by setting the Job's [pod failure policy](#pod-failure-policy).\n\nAdditionally, you can choose to count the pod failures independently for each\nindex of an [Indexed](#completion-mode) Job by setting the `.spec.backoffLimitPerIndex` field\n(for more information, see [backoff limit per index](#backoff-limit-per-index)).\n\nNote that even if you specify `.spec.parallelism = 1` and `.spec.completions = 1` and\n`.spec.template.spec.restartPolicy = \"Never\"`, the same program may\nsometimes be started twice.\n\nIf you do specify `.spec.parallelism` and `.spec.completions` both greater than 1, then there may be\nmultiple pods running at once. Therefore, your pods must also be tolerant of concurrency.\n\nIf you specify the `.spec.podFailurePolicy` field, the Job controller does not consider a terminating\nPod (a pod that has a `.metadata.deletionTimestamp` field set) as a failure until that Pod is\nterminal (its `.status.phase` is `Failed` or `Succeeded`). However, the Job controller\ncreates a replacement Pod as soon as the termination becomes apparent. Once the\npod terminates, the Job controller evaluates `.backoffLimit` and `.podFailurePolicy`\nfor the relevant Job, taking this now-terminated Pod into consideration.\n\nIf either of these requirements is not satisfied, the Job controller counts\na terminating Pod as an immediate failure, even if that Pod later terminates\nwith `phase: \"Succeeded\"`.\n\n### Pod backoff failure policy\n\nThere are situations where you want to fail a Job after some amount of retries\ndue to a logical error in configuration etc.\nTo do so, set `.spec.backoffLimit` to specify the number of retries before\nconsidering a Job as failed.\n\nThe `.spec.backoffLimit` is set by default to 6, unless the\n[backoff limit per index](#backoff-limit-per-index) (only Indexed Job) is specified.\nWhen `.spec.backoffLimitPerIndex` is specified, then `.spec.backoffLimit` defaults\nto 2147483647 (MaxInt32).\n\nFailed Pods associated with the Job are recreated by the Job controller with an\nexponential back-off delay (10s, 20s, 40s ...) capped at ten minutes.\n\nThe number of retries is calculated in two ways:\n\n- The number of Pods with `.status.phase = \"Failed\"`.\n- When using `restartPolicy = \"OnFailure\"`, the number of retries in all the\ncontainers of Pods with `.status.phase` equal to `Pending` or `Running`.\n\nIf either of the calculations reaches the `.spec.backoffLimit`, the Job is\nconsidered failed.\n\nIf your Job has `restartPolicy = \"OnFailure\"`, keep in mind that your Pod running the job\nwill be terminated once the job backoff limit has been reached. This can make debugging\nthe Job's executable more difficult. We suggest setting\n`restartPolicy = \"Never\"` when debugging the Job or using a logging system to ensure output\nfrom failed Jobs is not lost inadvertently.\n\n### Backoff limit per index {#backoff-limit-per-index}\n\nWhen you run an [indexed](#completion-mode) Job, you can choose to handle retries\nfor pod failures independently for each index. To do so, set the\n`.spec.backoffLimitPerIndex` to specify the maximal number of pod failures\nper index.\n\nWhen the per-index backoff limit is exceeded for an index, Kubernetes considers the index as failed and adds it to the\n`.status.failedIndexes` field. The succeeded indexes, those with a successfully\nexecuted pods, are recorded in the `.status.completedIndexes` field, regardless of whether you set\nthe `backoffLimitPerIndex` field.\n\nNote that a failing index does not interrupt execution of other indexes.\nOnce all indexes finish for a Job where you specified a backoff limit per index,\nif at least one of those indexes did fail, the Job controller marks the overall\nJob as failed, by setting the Failed condition in the status. The Job gets\nmarked as failed even if some, potentially nearly all, of the indexes were\nprocessed successfully.\n\nYou can additionally limit the maximal number of indexes marked failed by\nsetting the `.spec.maxFailedIndexes` field.\nWhen the number of failed indexes exceeds the `maxFailedIndexes` field, the\nJob controller triggers termination of all remaining running Pods for that Job.\nOnce all pods are terminated, the entire Job is marked failed by the Job\ncontroller, by setting the Failed condition in the Job status.\n\nHere is an example manifest for a Job that defines a `backoffLimitPerIndex`:\n\nIn the example above, the Job controller allows for one restart for each\nof the indexes. When the total number of failed indexes exceeds 5, then\nthe entire Job is terminated.\n\nOnce the job is finished, the Job status looks as follows:\n\n```sh\nkubectl get -o yaml job job-backoff-limit-per-index-example\n```\n\n```yaml\nstatus:\ncompletedIndexes: 1,3,5,7,9\nfailedIndexes: 0,2,4,6,8\nsucceeded: 5 # 1 succeeded pod for each of 5 succeeded indexes\nfailed: 10 # 2 failed pods (1 retry) for each of 5 failed indexes\nconditions:\n- message: Job has failed indexes\nreason: FailedIndexes\nstatus: \"True\"\ntype: FailureTarget\n- message: Job has failed indexes\nreason: FailedIndexes\nstatus: \"True\"\ntype: Failed\n```\n\nThe Job controller adds the `FailureTarget` Job condition to trigger\n[Job termination and cleanup](#job-termination-and-cleanup). When all of the\nJob Pods are terminated, the Job controller adds the `Failed` condition\nwith the same values for `reason` and `message` as the `FailureTarget` Job\ncondition. For details, see [Termination of Job Pods](#termination-of-job-pods).\n\nAdditionally, you may want to use the per-index backoff along with a\n[pod failure policy](#pod-failure-policy). When using\nper-index backoff, there is a new `FailIndex` action available which allows you to\navoid unnecessary retries within an index.\n\n### Pod failure policy {#pod-failure-policy}\n\nA Pod failure policy, defined with the `.spec.podFailurePolicy` field, enables\nyour cluster to handle Pod failures based on the container exit codes and the\nPod conditions.\n\nIn some situations, you may want to have a better control when handling Pod\nfailures than the control provided by the [Pod backoff failure policy](#pod-backoff-failure-policy),\nwhich is based on the Job's `.spec.backoffLimit`. These are some examples of use cases:\n\n* To optimize costs of running workloads by avoiding unnecessary Pod restarts,\nyou can terminate a Job as soon as one of its Pods fails with an exit code\nindicating a software bug.\n* To guarantee that your Job finishes even if there are disruptions, you can\nignore Pod failures caused by disruptions (such as preemption,\nAPI-initiated eviction\nor taint-based eviction) so\nthat they don't count towards the `.spec.backoffLimit` limit of retries.\n\nYou can configure a Pod failure policy, in the `.spec.podFailurePolicy` field,\nto meet the above use cases. This policy can handle Pod failures based on the\ncontainer exit codes and the Pod conditions.\n\nHere is a manifest for a Job that defines a `podFailurePolicy`:\n\nIn the example above, the first rule of the Pod failure policy specifies that\nthe Job should be marked failed if the `main` container fails with the 42 exit\ncode. The following are the rules for the `main` container specifically:\n\n- an exit code of 0 means that the container succeeded\n- an exit code of 42 means that the **entire Job** failed\n- any other exit code represents that the container failed, and hence the entire\nPod. The Pod will be re-created if the total number of restarts is\nbelow `backoffLimit`. If the `backoffLimit` is reached the **entire Job** failed.\n\nBecause the Pod template specifies a `restartPolicy: Never`,\nthe kubelet does not restart the `main` container in that particular Pod.\n\nThe second rule of the Pod failure policy, specifying the `Ignore` action for\nfailed Pods with condition `DisruptionTarget` excludes Pod disruptions from\nbeing counted towards the `.spec.backoffLimit` limit of retries.\n\nIf the Job failed, either by the Pod failure policy or Pod backoff\nfailure policy, and the Job is running multiple Pods, Kubernetes terminates all\nthe Pods in that Job that are still Pending or Running.\n\nThese are some requirements and semantics of the API:\n\n- if you want to use a `.spec.podFailurePolicy` field for a Job, you must\nalso define that Job's pod template with `.spec.restartPolicy` set to `Never`.\n- the Pod failure policy rules you specify under `spec.podFailurePolicy.rules`\nare evaluated in order. Once a rule matches a Pod failure, the remaining rules\nare ignored. When no rule matches the Pod failure, the default\nhandling applies.\n- you may want to restrict a rule to a specific container by specifying its name\nin`spec.podFailurePolicy.rules[*].onExitCodes.containerName`. When not specified the rule\napplies to all containers. When specified, it should match one the container\nor `initContainer` names in the Pod template.\n- you may specify the action taken when a Pod failure policy is matched by\n`spec.podFailurePolicy.rules[*].action`. Possible values are:\n- `FailJob`: use to indicate that the Pod's job should be marked as Failed and\nall running Pods should be terminated.\n- `Ignore`: use to indicate that the counter towards the `.spec.backoffLimit`\nshould not be incremented and a replacement Pod should be created.\n- `Count`: use to indicate that the Pod should be handled in the default way.\nThe counter towards the `.spec.backoffLimit` should be incremented.\n- `FailIndex`: use this action along with [backoff limit per index](#backoff-limit-per-index)\nto avoid unnecessary retries within the index of a failed pod.\n\nWhen you use a `podFailurePolicy`, the job controller only matches Pods in the\n`Failed` phase. Pods with a deletion timestamp that are not in a terminal phase\n(`Failed` or `Succeeded`) are considered still terminating. This implies that\nterminating pods retain a [tracking finalizer](#job-tracking-with-finalizers)\nuntil they reach a terminal phase.\nSince Kubernetes 1.27, Kubelet transitions deleted pods to a terminal phase\n(see: [Pod Phase](/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase)). This\nensures that deleted pods have their finalizers removed by the Job controller.\n\nStarting with Kubernetes v1.28, when Pod failure policy is used, the Job controller recreates\nterminating Pods only once these Pods reach the terminal `Failed` phase. This behavior is similar\nto `podReplacementPolicy: Failed`. For more information, see [Pod replacement policy](#pod-replacement-policy).\n\nWhen you use the `podFailurePolicy`, and the Job fails due to the pod\nmatching the rule with the `FailJob` action, then the Job controller triggers\nthe Job termination process by adding the `FailureTarget` condition.\nFor more details, see [Job termination and cleanup](#job-termination-and-cleanup).\n\n## Success policy {#success-policy}\n\nWhen creating an Indexed Job, you can define when a Job can be declared as succeeded using a `.spec.successPolicy`,\nbased on the pods that succeeded.\n\nBy default, a Job succeeds when the number of succeeded Pods equals `.spec.completions`.\nThese are some situations where you might want additional control for declaring a Job succeeded:\n\n* When running simulations with different parameters,\nyou might not need all the simulations to succeed for the overall Job to be successful.\n* When following a leader-worker pattern, only the success of the leader determines the success or\nfailure of a Job. Examples of this are frameworks like MPI and PyTorch etc.\n\nYou can configure a success policy, in the `.spec.successPolicy` field,\nto meet the above use cases. This policy can handle Job success based on the\nsucceeded pods. After the Job meets the success policy, the job controller terminates the lingering Pods.\nA success policy is defined by rules. Each rule can take one of the following forms:\n\n* When you specify the `succeededIndexes` only,\nonce all indexes specified in the `succeededIndexes` succeed, the job controller marks the Job as succeeded.\nThe `succeededIndexes` must be a list of intervals between 0 and `.spec.completions-1`.\n* When you specify the `succeededCount` only,\nonce the number of succeeded indexes reaches the `succeededCount`, the job controller marks the Job as succeeded.\n* When you specify both `succeededIndexes` and `succeededCount`,\nonce the number of succeeded indexes from the subset of indexes specified in the `succeededIndexes` reaches the `succeededCount`,\nthe job controller marks the Job as succeeded.\n\nNote that when you specify multiple rules in the `.spec.successPolicy.rules`,\nthe job controller evaluates the rules in order. Once the Job meets a rule, the job controller ignores remaining rules.\n\nHere is a manifest for a Job with `successPolicy`:\n\nIn the example above, both `succeededIndexes` and `succeededCount` have been specified.\nTherefore, the job controller will mark the Job as succeeded and terminate the lingering Pods\nwhen either of the specified indexes, 0, 2, or 3, succeed.\nThe Job that meets the success policy gets the `SuccessCriteriaMet` condition with a `SuccessPolicy` reason.\nAfter the removal of the lingering Pods is issued, the Job gets the `Complete` condition.\n\nNote that the `succeededIndexes` is represented as intervals separated by a hyphen.\nThe number are listed in represented by the first and last element of the series, separated by a hyphen.\n\nWhen you specify both a success policy and some terminating policies such as `.spec.backoffLimit` and `.spec.podFailurePolicy`,\nonce the Job meets either policy, the job controller respects the terminating policy and ignores the success policy.\n\n## Job termination and cleanup\n\nWhen a Job completes, no more Pods are created, but the Pods are [usually](#pod-backoff-failure-policy) not deleted either.\nKeeping them around allows you to still view the logs of completed pods to check for errors, warnings, or other diagnostic output.\nThe job object also remains after it is completed so that you can view its status. It is up to the user to delete\nold jobs after noting their status. Delete the job with `kubectl` (e.g. `kubectl delete jobs/pi` or `kubectl delete -f ./job.yaml`).\nWhen you delete the job using `kubectl`, all the pods it created are deleted too.\n\nBy default, a Job will run uninterrupted unless a Pod fails (`restartPolicy=Never`)\nor a Container exits in error (`restartPolicy=OnFailure`), at which point the Job defers to the\n`.spec.backoffLimit` described above. Once `.spec.backoffLimit` has been reached the Job will\nbe marked as failed and any running Pods will be terminated.\n\nAnother way to terminate a Job is by setting an active deadline.\nDo this by setting the `.spec.activeDeadlineSeconds` field of the Job to a number of seconds.\nThe `activeDeadlineSeconds` applies to the duration of the job, no matter how many Pods are created.\nOnce a Job reaches `activeDeadlineSeconds`, all of its running Pods are terminated and the Job status\nwill become `type: Failed` with `reason: DeadlineExceeded`.\n\nNote that a Job's `.spec.activeDeadlineSeconds` takes precedence over its `.spec.backoffLimit`.\nTherefore, a Job that is retrying one or more failed Pods will not deploy additional Pods once\nit reaches the time limit specified by `activeDeadlineSeconds`, even if the `backoffLimit` is not yet reached.\n\nExample:\n\n```yaml\napiVersion: batch/v1\nkind: Job\nmetadata:\nname: pi-with-timeout\nspec:\nbackoffLimit: 5\nactiveDeadlineSeconds: 100\ntemplate:\nspec:\ncontainers:\n- name: pi\nimage: perl:5.34.0\ncommand: [\"perl\", \"-Mbignum=bpi\", \"-wle\", \"print bpi(2000)\"]\nrestartPolicy: Never\n```\n\nNote that both the Job spec and the [Pod template spec](/docs/concepts/workloads/pods/init-containers/#detailed-behavior)\nwithin the Job have an `activeDeadlineSeconds` field. Ensure that you set this field at the proper level.\n\nKeep in mind that the `restartPolicy` applies to the Pod, and not to the Job itself:\nthere is no automatic Job restart once the Job status is `type: Failed`.\nThat is, the Job termination mechanisms activated with `.spec.activeDeadlineSeconds`\nand `.spec.backoffLimit` result in a permanent Job failure that requires manual intervention to resolve.\n\n### Terminal Job conditions\n\nA Job has two possible terminal states, each of which has a corresponding Job\ncondition:\n* Succeeded: Job condition `Complete`\n* Failed: Job condition `Failed`\n\nJobs fail for the following reasons:\n- The number of Pod failures exceeded the specified `.spec.backoffLimit` in the Job\nspecification. For details, see [Pod backoff failure policy](#pod-backoff-failure-policy).\n- The Job runtime exceeded the specified `.spec.activeDeadlineSeconds`\n- An indexed Job that used `.spec.backoffLimitPerIndex` has failed indexes.\nFor details, see [Backoff limit per index](#backoff-limit-per-index).\n- The number of failed indexes in the Job exceeded the specified\n`spec.maxFailedIndexes`. For details, see [Backoff limit per index](#backoff-limit-per-index)\n- A failed Pod matches a rule in `.spec.podFailurePolicy` that has the `FailJob`\naction. For details about how Pod failure policy rules might affect failure\nevaluation, see [Pod failure policy](#pod-failure-policy).\n\nJobs succeed for the following reasons:\n- The number of succeeded Pods reached the specified `.spec.completions`\n- The criteria specified in `.spec.successPolicy` are met. For details, see\n[Success policy](#success-policy).\n\nIn Kubernetes v1.31 and later the Job controller delays the addition of the\nterminal conditions,`Failed` or `Complete`, until all of the Job Pods are terminated.\n\nIn Kubernetes v1.30 and earlier, the Job controller added the `Complete` or the\n`Failed` Job terminal conditions as soon as the Job termination process was\ntriggered and all Pod finalizers were removed. However, some Pods would still\nbe running or terminating at the moment that the terminal condition was added.\n\nIn Kubernetes v1.31 and later, the controller only adds the Job terminal conditions\n_after_ all of the Pods are terminated. You can control this behavior by using the\n`JobManagedBy` and the `JobPodReplacementPolicy` (both enabled by default)\n[feature gates](/docs/reference/command-line-tools-reference/feature-gates/).\n\n### Termination of Job pods\n\nThe Job controller adds the `FailureTarget` condition or the `SuccessCriteriaMet`\ncondition to the Job to trigger Pod termination after a Job meets either the\nsuccess or failure criteria.\n\nFactors like `terminationGracePeriodSeconds` might increase the amount of time\nfrom the moment that the Job controller adds the `FailureTarget` condition or the\n`SuccessCriteriaMet` condition to the moment that all of the Job Pods terminate\nand the Job controller adds a [terminal condition](#terminal-job-conditions)\n(`Failed` or `Complete`).\n\nYou can use the `FailureTarget` or the `SuccessCriteriaMet` condition to evaluate\nwhether the Job has failed or succeeded without having to wait for the controller\nto add a terminal condition.\n\nFor example, you might want to decide when to create a replacement Job\nthat replaces a failed Job. If you replace the failed Job when the `FailureTarget`\ncondition appears, your replacement Job runs sooner, but could result in Pods\nfrom the failed and the replacement Job running at the same time, using\nextra compute resources.\n\nAlternatively, if your cluster has limited resource capacity, you could choose to\nwait until the `Failed` condition appears on the Job, which would delay your\nreplacement Job but would ensure that you conserve resources by waiting\nuntil all of the failed Pods are removed.\n\n## Clean up finished jobs automatically\n\nFinished Jobs are usually no longer needed in the system. Keeping them around in\nthe system will put pressure on the API server. If the Jobs are managed directly\nby a higher level controller, such as\n[CronJobs](/docs/concepts/workloads/controllers/cron-jobs/), the Jobs can be\ncleaned up by CronJobs based on the specified capacity-based cleanup policy.\n\n### TTL mechanism for finished Jobs\n\nAnother way to clean up finished Jobs (either `Complete` or `Failed`)\nautomatically is to use a TTL mechanism provided by a\n[TTL controller](/docs/concepts/workloads/controllers/ttlafterfinished/) for\nfinished resources, by specifying the `.spec.ttlSecondsAfterFinished` field of\nthe Job.\n\nWhen the TTL controller cleans up the Job, it will delete the Job cascadingly,\ni.e. delete its dependent objects, such as Pods, together with the Job. Note\nthat when the Job is deleted, its lifecycle guarantees, such as finalizers, will\nbe honored.\n\nFor example:\n\n```yaml\napiVersion: batch/v1\nkind: Job\nmetadata:\nname: pi-with-ttl\nspec:\nttlSecondsAfterFinished: 100\ntemplate:\nspec:\ncontainers:\n- name: pi\nimage: perl:5.34.0\ncommand: [\"perl\", \"-Mbignum=bpi\", \"-wle\", \"print bpi(2000)\"]\nrestartPolicy: Never\n```\n\nThe Job `pi-with-ttl` will be eligible to be automatically deleted, `100`\nseconds after it finishes.\n\nIf the field is set to `0`, the Job will be eligible to be automatically deleted\nimmediately after it finishes. If the field is unset, this Job won't be cleaned\nup by the TTL controller after it finishes.\n\nIt is recommended to set `ttlSecondsAfterFinished` field because unmanaged jobs\n(Jobs that you created directly, and not indirectly through other workload APIs\nsuch as CronJob) have a default deletion\npolicy of `orphanDependents` causing Pods created by an unmanaged Job to be left around\nafter that Job is fully deleted.\nEven though the control plane eventually\n[garbage collects](/docs/concepts/workloads/pods/pod-termination/#pod-garbage-collection)\nthe Pods from a deleted Job after they either fail or complete, sometimes those\nlingering pods may cause cluster performance degradation or in worst case cause the\ncluster to go offline due to this degradation.\n\nYou can use [LimitRanges](/docs/concepts/policy/limit-range/) and\n[ResourceQuotas](/docs/concepts/policy/resource-quotas/) to place a\ncap on the amount of resources that a particular namespace can\nconsume.\n\n## Job patterns\n\nThe Job object can be used to process a set of independent but related *work items*.\nThese might be emails to be sent, frames to be rendered, files to be transcoded,\nranges of keys in a NoSQL database to scan, and so on.\n\nIn a complex system, there may be multiple different sets of work items. Here we are just\nconsidering one set of work items that the user wants to manage together — a *batch job*.\n\nThere are several different patterns for parallel computation, each with strengths and weaknesses.\nThe tradeoffs are:\n\n- One Job object for each work item, versus a single Job object for all work items.\nOne Job per work item creates some overhead for the user and for the system to manage\nlarge numbers of Job objects.\nA single Job for all work items is better for large numbers of items.\n- Number of Pods created equals number of work items, versus each Pod can process multiple work items.\nWhen the number of Pods equals the number of work items, the Pods typically\nrequires less modification to existing code and containers. Having each Pod\nprocess multiple work items is better for large numbers of items.\n- Several approaches use a work queue. This requires running a queue service,\nand modifications to the existing program or container to make it use the work queue.\nOther approaches are easier to adapt to an existing containerised application.\n- When the Job is associated with a\n[headless Service](/docs/concepts/services-networking/service/#headless-services),\nyou can enable the Pods within a Job to communicate with each other to\ncollaborate in a computation.\n\nThe tradeoffs are summarized here, with columns 2 to 4 corresponding to the above tradeoffs.\nThe pattern names are also links to examples and more detailed description.\n\n| Pattern | Single Job object | Fewer pods than work items? | Use app unmodified? |\n| ----------------------------------------------- |:-----------------:|:---------------------------:|:-------------------:|\n| [Queue with Pod Per Work Item] | ✓ | | sometimes |\n| [Queue with Variable Pod Count] | ✓ | ✓ | |\n| [Indexed Job with Static Work Assignment] | ✓ | | ✓ |\n| [Job with Pod-to-Pod Communication] | ✓ | sometimes | sometimes |\n| [Job Template Expansion] | | | ✓ |\n\nWhen you specify completions with `.spec.completions`, each Pod created by the Job controller\nhas an identical [`spec`](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status).\nThis means that all pods for a task will have the same command line and the same\nimage, the same volumes, and (almost) the same environment variables. These patterns\nare different ways to arrange for pods to work on different things.\n\nThis table shows the required settings for `.spec.parallelism` and `.spec.completions` for each of the patterns.\nHere, `W` is the number of work items.\n\n| Pattern | `.spec.completions` | `.spec.parallelism` |\n| ----------------------------------------------- |:-------------------:|:--------------------:|\n| [Queue with Pod Per Work Item] | W | any |\n| [Queue with Variable Pod Count] | null | any |\n| [Indexed Job with Static Work Assignment] | W | any |\n| [Job with Pod-to-Pod Communication] | W | W |\n| [Job Template Expansion] | 1 | should be 1 |\n\n## Advanced usage\n\n### Suspending a Job\n\nWhen a Job is created, the Job controller will immediately begin creating Pods\nto satisfy the Job's requirements and will continue to do so until the Job is\ncomplete. However, you may want to temporarily suspend a Job's execution and\nresume it later, or start Jobs in suspended state and have a custom controller\ndecide later when to start them.\n\nTo suspend a Job, you can update the `.spec.suspend` field of\nthe Job to true; later, when you want to resume it again, update it to false.\nCreating a Job with `.spec.suspend` set to true will create it in the suspended\nstate.\n\nIn Kubernetes 1.35 or later the `.status.startTime` field is cleared on Job suspension\nwhen the [MutableSchedulingDirectivesForSuspendedJobs](#mutable-scheduling-directives-for-suspended-jobs)\nfeature gate is enabled.\n\nWhen a Job is resumed from suspension, its `.status.startTime` field will be\nreset to the current time. This means that the `.spec.activeDeadlineSeconds`\ntimer will be stopped and reset when a Job is suspended and resumed.\n\nWhen you suspend a Job, any running Pods that don't have a status of `Completed`\nwill be [terminated](/docs/concepts/workloads/pods/pod-termination/)\nwith a SIGTERM signal. The Pod's graceful termination period will be honored and\nyour Pod must handle this signal in this period. This may involve saving\nprogress for later or undoing changes. Pods terminated this way will not count\ntowards the Job's `completions` count.\n\nAn example Job definition in the suspended state can be like so:\n\n```shell\nkubectl get job myjob -o yaml\n```\n\n```yaml\napiVersion: batch/v1\nkind: Job\nmetadata:\nname: myjob\nspec:\nsuspend: true\nparallelism: 1\ncompletions: 5\ntemplate:\nspec:\n...\n```\n\nYou can also toggle Job suspension by patching the Job using the command line.\n\nSuspend an active Job:\n\n```shell\nkubectl patch job/myjob --type=strategic --patch '{\"spec\":{\"suspend\":true}}'\n```\n\nResume a suspended Job:\n\n```shell\nkubectl patch job/myjob --type=strategic --patch '{\"spec\":{\"suspend\":false}}'\n```\n\nThe Job's status can be used to determine if a Job is suspended or has been\nsuspended in the past:\n\n```shell\nkubectl get jobs/myjob -o yaml\n```\n\n```yaml\napiVersion: batch/v1\nkind: Job\n# .metadata and .spec omitted\nstatus:\nconditions:\n- lastProbeTime: \"2021-02-05T13:14:33Z\"\nlastTransitionTime: \"2021-02-05T13:14:33Z\"\nstatus: \"True\"\ntype: Suspended\nstartTime: \"2021-02-05T13:13:48Z\"\n```\n\nThe Job condition of type \"Suspended\" with status \"True\" means the Job is\nsuspended; the `lastTransitionTime` field can be used to determine how long the\nJob has been suspended for. If the status of that condition is \"False\", then the\nJob was previously suspended and is now running. If such a condition does not\nexist in the Job's status, the Job has never been stopped.\n\nEvents are also created when the Job is suspended and resumed:\n\n```shell\nkubectl describe jobs/myjob\n```\n\n```\nName: myjob\n...\nEvents:\nType Reason Age From Message\n---- ------ ---- ---- -------\nNormal SuccessfulCreate 12m job-controller Created pod: myjob-hlrpl\nNormal SuccessfulDelete 11m job-controller Deleted pod: myjob-hlrpl\nNormal Suspended 11m job-controller Job suspended\nNormal SuccessfulCreate 3s job-controller Created pod: myjob-jvb44\nNormal Resumed 3s job-controller Job resumed\n```\n\nThe last four events, particularly the \"Suspended\" and \"Resumed\" events, are\ndirectly a result of toggling the `.spec.suspend` field. In the time between\nthese two events, we see that no Pods were created, but Pod creation restarted\nas soon as the Job was resumed.\n\n### Mutable Scheduling Directives\n\nIn most cases, a parallel job will want the pods to run with constraints,\nlike all in the same zone, or all either on GPU model x or y but not a mix of both.\n\nThe [suspend](#suspending-a-job) field is the first step towards achieving those semantics. Suspend allows a\ncustom queue controller to decide when a job should start; However, once a job is unsuspended,\na custom queue controller has no influence on where the pods of a job will actually land.\n\nThis feature allows updating a Job's scheduling directives before it starts, which gives custom queue\ncontrollers the ability to influence pod placement while at the same time offloading actual\npod-to-node assignment to kube-scheduler.\n\nThe fields in a Job's pod template that can be updated are node affinity, node selector,\ntolerations, labels, annotations and [scheduling gates](/docs/concepts/scheduling-eviction/pod-scheduling-readiness/).\n\n#### Mutable Scheduling Directives for suspended Jobs\n\nIn Kubernetes 1.34 or earlier mutating of Pod's scheduling directives is allowed only for\nsuspended Jobs that have never been unsuspended before. In Kubernetes 1.35, this is allowed\nfor any suspended Jobs when the `MutableSchedulingDirectivesForSuspendedJobs` feature gate is enabled.\n\nAdditionally, this feature gate enables clearing of the `.status.startTime` field on [Job suspension](#suspending-a-job).\n\n### Mutable Pod resources for suspended Jobs\n\nA cluster administrator can define admission controls in Kubernetes, modifying the resource requests or limits for a Job, based on policy rules.\n\nWith this feature, Kubernetes also lets you modify the pod template of a [suspended job](#suspending-a-job), to change the resource requirements of the Pods in the Job.\nThis is different from _in-place Pod resize_ which lets you update resources, one Pod at a time, for Pods that are already running.\n\nThe client that sets the new resource requests or limits can be different from the client that initially created the Job, and does not need to be a cluster administrator.\n\n### Specifying your own Pod selector\n\nNormally, when you create a Job object, you do not specify `.spec.selector`.\nThe system defaulting logic adds this field when the Job is created.\nIt picks a selector value that will not overlap with any other jobs.\n\nHowever, in some cases, you might need to override this automatically set selector.\nTo do this, you can specify the `.spec.selector` of the Job.\n\nBe very careful when doing this. If you specify a label selector which is not\nunique to the pods of that Job, and which matches unrelated Pods, then pods of the unrelated\njob may be deleted, or this Job may count other Pods as completing it, or one or both\nJobs may refuse to create Pods or run to completion. If a non-unique selector is\nchosen, then other controllers (e.g. ReplicationController) and their Pods may behave\nin unpredictable ways too. Kubernetes will not stop you from making a mistake when\nspecifying `.spec.selector`.\n\nHere is an example of a case when you might want to use this feature.\n\nSay Job `old` is already running. You want existing Pods\nto keep running, but you want the rest of the Pods it creates\nto use a different pod template and for the Job to have a new name.\nYou cannot update the Job because these fields are not updatable.\nTherefore, you delete Job `old` but _leave its pods\nrunning_, using `kubectl delete jobs/old --cascade=orphan`.\nBefore deleting it, you make a note of what selector it uses:\n\n```shell\nkubectl get job old -o yaml\n```\n\nThe output is similar to this:\n\n```yaml\nkind: Job\nmetadata:\nname: old\n...\nspec:\nselector:\nmatchLabels:\nbatch.kubernetes.io/controller-uid: a8f3d00d-c6d2-11e5-9f87-42010af00002\n...\n```\n\nThen you create a new Job with name `new` and you explicitly specify the same selector.\nSince the existing Pods have label `batch.kubernetes.io/controller-uid=a8f3d00d-c6d2-11e5-9f87-42010af00002`,\nthey are controlled by Job `new` as well.\n\nYou need to specify `manualSelector: true` in the new Job since you are not using\nthe selector that the system normally generates for you automatically.\n\n```yaml\nkind: Job\nmetadata:\nname: new\n...\nspec:\nmanualSelector: true\nselector:\nmatchLabels:\nbatch.kubernetes.io/controller-uid: a8f3d00d-c6d2-11e5-9f87-42010af00002\n...\n```\n\nThe new Job itself will have a different uid from `a8f3d00d-c6d2-11e5-9f87-42010af00002`. Setting\n`manualSelector: true` tells the system that you know what you are doing and to allow this\nmismatch.\n\n### Job tracking with finalizers\n\nThe control plane keeps track of the Pods that belong to any Job and notices if\nany such Pod is removed from the API server. To do that, the Job controller\ncreates Pods with the finalizer `batch.kubernetes.io/job-tracking`. The\ncontroller removes the finalizer only after the Pod has been accounted for in\nthe Job status, allowing the Pod to be removed by other controllers or users.\n\nSee [My pod stays terminating](/docs/tasks/debug/debug-application/debug-pods/) if you\nobserve that pods from a Job are stuck with the tracking finalizer.\n\n### Elastic Indexed Jobs {#elastic-indexed-jobs}\n\nYou can scale Indexed Jobs up or down by mutating both `.spec.parallelism`\nand `.spec.completions` together such that `.spec.parallelism == .spec.completions`.\nWhen scaling down, Kubernetes removes the Pods with higher indexes.\n\nUse cases for elastic Indexed Jobs include batch workloads which require\nscaling an indexed Job, such as MPI, Horovod, Ray, and PyTorch training jobs.\n\nWhen the [`WorkloadWithJob`](/docs/reference/command-line-tools-reference/feature-gates/)\nfeature gate is enabled and a Job uses [gang scheduling](#integrate-with-workload-apis),\nthe gang size follows the mutable `schedulingPolicy.gang.minCount` (or\n`.spec.parallelism` when `minCount` is unset).\nYou can scale the gang in one of two ways:\n\n- set `.spec.scheduling.schedulingPolicy.gang.minCount` directly, or\n- change `.spec.parallelism` when `minCount` is unset.\n\nOn either change, the controller recompiles the `Workload` and re-syncs the\n`PodGroup` size, rescaling the gang in place without recreating the Job. Updates\napply only to Pods evaluated in future scheduling cycles and do not affect\nalready-scheduled Pods. A `gang.minCount` greater than `.spec.parallelism` is\nrejected, since such a gang can never be satisfied.\n\n### Delayed creation of replacement pods {#pod-replacement-policy}\n\nBy default, the Job controller recreates Pods as soon they either fail or are terminating (have a deletion timestamp).\nThis means that, at a given time, when some of the Pods are terminating, the number of running Pods for a Job\ncan be greater than `parallelism` or greater than one Pod per index (if you are using an Indexed Job).\n\nYou may choose to create replacement Pods only when the terminating Pod is fully terminal (has `status.phase: Failed`).\nTo do this, set the `.spec.podReplacementPolicy: Failed`.\nThe default replacement policy depends on whether the Job has a `podFailurePolicy` set.\nWith no Pod failure policy defined for a Job, omitting the `podReplacementPolicy` field selects the\n`TerminatingOrFailed` replacement policy:\nthe control plane creates replacement Pods immediately upon Pod deletion\n(as soon as the control plane sees that a Pod for this Job has `deletionTimestamp` set).\nFor Jobs with a Pod failure policy set, the default `podReplacementPolicy` is `Failed`, and no other\nvalue is permitted.\nSee [Pod failure policy](#pod-failure-policy) to learn more about Pod failure policies for Jobs.\n\n```yaml\nkind: Job\nmetadata:\nname: new\n...\nspec:\npodReplacementPolicy: Failed\n...\n```\n\nProvided your cluster has the feature gate enabled, you can inspect the `.status.terminating` field of a Job.\nThe value of the field is the number of Pods owned by the Job that are currently terminating.\n\n```shell\nkubectl get jobs/myjob -o yaml\n```\n\n```yaml\napiVersion: batch/v1\nkind: Job\n# .metadata and .spec omitted\nstatus:\nterminating: 3 # three Pods are terminating and have not yet reached the Failed phase\n```\n\n### Delegation of managing a Job object to external controller\n\nThis feature allows you to disable the built-in Job controller, for a specific\nJob, and delegate reconciliation of the Job to an external controller.\n\nYou indicate the controller that reconciles the Job by setting a custom value\nfor the `spec.managedBy` field - any value\nother than `kubernetes.io/job-controller`. The value of the field is immutable.\n\nWhen using this feature, make sure the controller indicated by the field is\ninstalled, otherwise the Job may not be reconciled at all.\n\nWhen developing an external Job controller be aware that your controller needs\nto operate in a fashion conformant with the definitions of the API spec and\nstatus fields of the Job object.\n\nPlease review these in detail in the [Job API](/docs/reference/kubernetes-api/workload-resources/job-v1/).\nWe also recommend that you run the e2e conformance tests for the Job object to\nverify your implementation.\n\nFinally, when developing an external Job controller make sure it does not use the\n`batch.kubernetes.io/job-tracking` finalizer, reserved for the built-in controller.\n\n## Alternatives\n\n### Bare Pods\n\nWhen the node that a Pod is running on reboots or fails, the pod is terminated\nand will not be restarted. However, a Job will create new Pods to replace terminated ones.\nFor this reason, we recommend that you use a Job rather than a bare Pod, even if your application\nrequires only a single Pod.\n\n### Replication Controller\n\nJobs are complementary to [Replication Controllers](/docs/concepts/workloads/controllers/replicationcontroller/).\nA Replication Controller manages Pods which are not expected to terminate (e.g. web servers), and a Job\nmanages Pods that are expected to terminate (e.g. batch tasks).\n\nAs discussed in [Pod Lifecycle](/docs/concepts/workloads/pods/pod-lifecycle/), `Job` is *only* appropriate\nfor pods with `RestartPolicy` equal to `OnFailure` or `Never`.\n\nIf `RestartPolicy` is not set, the default value is `Always`.\n\n### Single Job starts controller Pod\n\nAnother pattern is for a single Job to create a Pod which then creates other Pods, acting as a sort\nof custom controller for those Pods. This allows the most flexibility, but may be somewhat\ncomplicated to get started with and offers less integration with Kubernetes.\n\nAn advantage of this approach is that the overall process gets the completion guarantee of a Job\nobject, but maintains complete control over what Pods are created and how work is assigned to them.\n\n##\n\n* Learn about [Pods](/docs/concepts/workloads/pods).\n* Read about different ways of running Jobs:\n* [Coarse Parallel Processing Using a Work Queue](/docs/tasks/job/coarse-parallel-processing-work-queue/)\n* [Fine Parallel Processing Using a Work Queue](/docs/tasks/job/fine-parallel-processing-work-queue/)\n* Use an [indexed Job for parallel processing with static work assignment](/docs/tasks/job/indexed-parallel-processing-static/)\n* Create multiple Jobs based on a template: [Parallel Processing using Expansions](/docs/tasks/job/parallel-processing-expansion/)\n* Follow the links within [Clean up finished jobs automatically](#clean-up-finished-jobs-automatically)\nto learn more about how your cluster can clean up completed and / or failed tasks.\n* `Job` is part of the Kubernetes REST API.\nRead the\nobject definition to understand the API for jobs.\n* Read about [`CronJob`](/docs/concepts/workloads/controllers/cron-jobs/), which you\ncan use to define a series of Jobs that will run based on a schedule, similar to\nthe UNIX tool `cron`.\n* Practice how to configure handling of retriable and non-retriable pod failures\nusing `podFailurePolicy`, based on the step-by-step [examples](/docs/tasks/job/pod-failure-policy/).\n* Learn about [gang scheduling](/docs/concepts/scheduling-eviction/gang-scheduling/)\nfor all-or-nothing scheduling of parallel Jobs.\n\n[Indexed Job with Static Work Assignment]: /docs/tasks/job/indexed-parallel-processing-static/\n[Job Template Expansion]: /docs/tasks/job/parallel-processing-expansion/\n[Job with Pod-to-Pod Communication]: /docs/tasks/job/job-with-pod-to-pod-communication/\n[Queue with Pod Per Work Item]: /docs/tasks/job/coarse-parallel-processing-work-queue/\n[Queue with Variable Pod Count]: /docs/tasks/job/fine-parallel-processing-work-queue/", "source": "content/en/docs/concepts/workloads/controllers/job.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "A [`Deployment`](/docs/concepts/workloads/controllers/deployment/) that configures a [`ReplicaSet`](/docs/concepts/workloads/controllers/replicaset/) is now the recommended way to set up replication.\n\nA _ReplicationController_ ensures that a specified number of pod replicas are running at any one\ntime. In other words, a ReplicationController makes sure that a pod or a homogeneous set of pods is\nalways up and available.\n\n## How a ReplicationController works\n\nIf there are too many pods, the ReplicationController terminates the extra pods. If there are too few, the\nReplicationController starts more pods. Unlike manually created pods, the pods maintained by a\nReplicationController are automatically replaced if they fail, are deleted, or are terminated.\nFor example, your pods are re-created on a node after disruptive maintenance such as a kernel upgrade.\nFor this reason, you should use a ReplicationController even if your application requires\nonly a single pod. A ReplicationController is similar to a process supervisor,\nbut instead of supervising individual processes on a single node, the ReplicationController supervises multiple pods\nacross multiple nodes.\n\nReplicationController is often abbreviated to \"rc\" in discussion, and as a shortcut in\nkubectl commands.\n\nA simple case is to create one ReplicationController object to reliably run one instance of\na Pod indefinitely. A more complex use case is to run several identical replicas of a replicated\nservice, such as web servers.\n\n## Running an example ReplicationController\n\nThis example ReplicationController config runs three copies of the nginx web server.\n\nRun the example job by downloading the example file and then running this command:\n\n```shell\nkubectl apply -f https://k8s.io/examples/controllers/replication.yaml\n```\n\nThe output is similar to this:\n\n```\nreplicationcontroller/nginx created\n```\n\nCheck on the status of the ReplicationController using this command:\n\n```shell\nkubectl describe replicationcontrollers/nginx\n```\n\nThe output is similar to this:\n\n```\nName: nginx\nNamespace: default\nSelector: app=nginx\nLabels: app=nginx\nAnnotations:\nReplicas: 3 current / 3 desired\nPods Status: 0 Running / 3 Waiting / 0 Succeeded / 0 Failed\nPod Template:\nLabels: app=nginx\nContainers:\nnginx:\nImage: nginx\nPort: 80/TCP\nEnvironment:\nMounts:\nVolumes:\nEvents:\nFirstSeen LastSeen Count From SubobjectPath Type Reason Message\n--------- -------- ----- ---- ------------- ---- ------ -------\n20s 20s 1 {replication-controller } Normal SuccessfulCreate Created pod: nginx-qrm3m\n20s 20s 1 {replication-controller } Normal SuccessfulCreate Created pod: nginx-3ntk0\n20s 20s 1 {replication-controller } Normal SuccessfulCreate Created pod: nginx-4ok8v\n```\n\nHere, three pods are created, but none is running yet, perhaps because the image is being pulled.\nA little later, the same command may show:\n\n```shell\nPods Status: 3 Running / 0 Waiting / 0 Succeeded / 0 Failed\n```\n\nTo list all the pods that belong to the ReplicationController in a machine readable form, you can use a command like this:\n\n```shell\npods=$(kubectl get pods --selector=app=nginx --output=jsonpath={.items..metadata.name})\necho $pods\n```\n\nThe output is similar to this:\n\n```\nnginx-3ntk0 nginx-4ok8v nginx-qrm3m\n```\n\nHere, the selector is the same as the selector for the ReplicationController (seen in the\n`kubectl describe` output), and in a different form in `replication.yaml`. The `--output=jsonpath` option\nspecifies an expression with the name from each pod in the returned list.\n\n## Writing a ReplicationController Manifest\n\nAs with all other Kubernetes config, a ReplicationController needs `apiVersion`, `kind`, and `metadata` fields.\n\nWhen the control plane creates new Pods for a ReplicationController, the `.metadata.name` of the\nReplicationController is part of the basis for naming those Pods. The name of a ReplicationController must be a valid\n[DNS subdomain](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names)\nvalue, but this can produce unexpected results for the Pod hostnames. For best compatibility,\nthe name should follow the more restrictive rules for a\n[DNS label](/docs/concepts/overview/working-with-objects/names#dns-label-names).\n\nFor general information about working with configuration files, see [object management](/docs/concepts/overview/working-with-objects/object-management/).\n\nA ReplicationController also needs a [`.spec` section](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status).\n\n### Pod Template\n\nThe `.spec.template` is the only required field of the `.spec`.\n\nThe `.spec.template` is a [pod template](/docs/concepts/workloads/pods/#pod-templates). It has exactly the same schema as a Pod, except it is nested and does not have an `apiVersion` or `kind`.\n\nIn addition to required fields for a Pod, a pod template in a ReplicationController must specify appropriate\nlabels and an appropriate restart policy. For labels, make sure not to overlap with other controllers. See [pod selector](#pod-selector).\n\nOnly a [`.spec.template.spec.restartPolicy`](/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy) equal to `Always` is allowed, which is the default if not specified.\n\nFor local container restarts, ReplicationControllers delegate to an agent on the node,\nfor example the [Kubelet](/docs/reference/command-line-tools-reference/kubelet/).\n\n### Labels on the ReplicationController\n\nThe ReplicationController can itself have labels (`.metadata.labels`). Typically, you\nwould set these the same as the `.spec.template.metadata.labels`; if `.metadata.labels` is not specified\nthen it defaults to `.spec.template.metadata.labels`. However, they are allowed to be\ndifferent, and the `.metadata.labels` do not affect the behavior of the ReplicationController.\n\n### Pod Selector\n\nThe `.spec.selector` field is a [label selector](/docs/concepts/overview/working-with-objects/labels/#label-selectors). A ReplicationController\nmanages all the pods with labels that match the selector. It does not distinguish\nbetween pods that it created or deleted and pods that another person or process created or\ndeleted. This allows the ReplicationController to be replaced without affecting the running pods.\n\nIf specified, the `.spec.template.metadata.labels` must be equal to the `.spec.selector`, or it will\nbe rejected by the API. If `.spec.selector` is unspecified, it will be defaulted to\n`.spec.template.metadata.labels`.\n\nAlso you should not normally create any pods whose labels match this selector, either directly, with\nanother ReplicationController, or with another controller such as Job. If you do so, the\nReplicationController thinks that it created the other pods. Kubernetes does not stop you\nfrom doing this.\n\nIf you do end up with multiple controllers that have overlapping selectors, you\nwill have to manage the deletion yourself (see [below](#working-with-replicationcontrollers)).\n\n### Multiple Replicas\n\nYou can specify how many pods should run concurrently by setting `.spec.replicas` to the number\nof pods you would like to have running concurrently. The number running at any time may be higher\nor lower, such as if the replicas were just increased or decreased, or if a pod is gracefully\nshutdown, and a replacement starts early.\n\nIf you do not specify `.spec.replicas`, then it defaults to 1.\n\n## Working with ReplicationControllers\n\n### Deleting a ReplicationController and its Pods\n\nTo delete a ReplicationController and all its pods, use [`kubectl\ndelete`](/docs/reference/generated/kubectl/kubectl-commands#delete). Kubectl will scale the ReplicationController to zero and wait\nfor it to delete each pod before deleting the ReplicationController itself. If this kubectl\ncommand is interrupted, it can be restarted.\n\nWhen using the REST API or [client library](/docs/reference/using-api/client-libraries), you need to do the steps explicitly (scale replicas to\n0, wait for pod deletions, then delete the ReplicationController).\n\n### Deleting only a ReplicationController\n\nYou can delete a ReplicationController without affecting any of its pods.\n\nUsing kubectl, specify the `--cascade=orphan` option to [`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete).\n\nWhen using the REST API or [client library](/docs/reference/using-api/client-libraries), you can delete the ReplicationController object.\n\nOnce the original is deleted, you can create a new ReplicationController to replace it. As long\nas the old and new `.spec.selector` are the same, then the new one will adopt the old pods.\nHowever, it will not make any effort to make existing pods match a new, different pod template.\nTo update pods to a new spec in a controlled way, use a [rolling update](#rolling-updates).\n\n### Isolating pods from a ReplicationController\n\nPods may be removed from a ReplicationController's target set by changing their labels. This technique may be used to remove pods from service for debugging and data recovery. Pods that are removed in this way will be replaced automatically (assuming that the number of replicas is not also changed).\n\n## Common usage patterns\n\n### Rescheduling\n\nAs mentioned above, whether you have 1 pod you want to keep running, or 1000, a ReplicationController will ensure that the specified number of pods exists, even in the event of node failure or pod termination (for example, due to an action by another control agent).\n\n### Scaling\n\nThe ReplicationController enables scaling the number of replicas up or down, either manually or by an auto-scaling control agent, by updating the `replicas` field.\n\n### Rolling updates\n\nThe ReplicationController is designed to facilitate rolling updates to a service by replacing pods one-by-one.\n\nAs explained in [#1353](https://issue.k8s.io/1353), the recommended approach is to create a new ReplicationController with 1 replica, scale the new (+1) and old (-1) controllers one by one, and then delete the old controller after it reaches 0 replicas. This predictably updates the set of pods regardless of unexpected failures.\n\nIdeally, the rolling update controller would take application readiness into account, and would ensure that a sufficient number of pods were productively serving at any given time.\n\nThe two ReplicationControllers would need to create pods with at least one differentiating label, such as the image tag of the primary container of the pod, since it is typically image updates that motivate rolling updates.\n\n### Multiple release tracks\n\nIn addition to running multiple releases of an application while a rolling update is in progress, it's common to run multiple releases for an extended period of time, or even continuously, using multiple release tracks. The tracks would be differentiated by labels.\n\nFor instance, a service might target all pods with `tier in (frontend), environment in (prod)`. Now say you have 10 replicated pods that make up this tier. But you want to be able to 'canary' a new version of this component. You could set up a ReplicationController with `replicas` set to 9 for the bulk of the replicas, with labels `tier=frontend, environment=prod, track=stable`, and another ReplicationController with `replicas` set to 1 for the canary, with labels `tier=frontend, environment=prod, track=canary`. Now the service is covering both the canary and non-canary pods. But you can mess with the ReplicationControllers separately to test things out, monitor the results, etc.\n\n### Using ReplicationControllers with Services\n\nMultiple ReplicationControllers can sit behind a single service, so that, for example, some traffic\ngoes to the old version, and some goes to the new version.\n\nA ReplicationController will never terminate on its own, but it isn't expected to be as long-lived as services. Services may be composed of pods controlled by multiple ReplicationControllers, and it is expected that many ReplicationControllers may be created and destroyed over the lifetime of a service (for instance, to perform an update of pods that run the service). Both services themselves and their clients should remain oblivious to the ReplicationControllers that maintain the pods of the services.\n\n## Writing programs for Replication\n\nPods created by a ReplicationController are intended to be fungible and semantically identical, though their configurations may become heterogeneous over time. This is an obvious fit for replicated stateless servers, but ReplicationControllers can also be used to maintain availability of master-elected, sharded, and worker-pool applications. Such applications should use dynamic work assignment mechanisms, such as the [RabbitMQ work queues](https://www.rabbitmq.com/tutorials/tutorial-two-python.html), as opposed to static/one-time customization of the configuration of each pod, which is considered an anti-pattern. Any pod customization performed, such as vertical auto-sizing of resources (for example, cpu or memory), should be performed by another online controller process, not unlike the ReplicationController itself.\n\n## Responsibilities of the ReplicationController\n\nThe ReplicationController ensures that the desired number of pods matches its label selector and are operational. Currently, only terminated pods are excluded from its count. In the future, [readiness](https://issue.k8s.io/620) and other information available from the system may be taken into account, we may add more controls over the replacement policy, and we plan to emit events that could be used by external clients to implement arbitrarily sophisticated replacement and/or scale-down policies.\n\nThe ReplicationController is forever constrained to this narrow responsibility. It itself will not perform readiness nor liveness probes. Rather than performing auto-scaling, it is intended to be controlled by an external auto-scaler (as discussed in [#492](https://issue.k8s.io/492)), which would change its `replicas` field. We will not add scheduling policies (for example, [spreading](https://issue.k8s.io/367#issuecomment-48428019)) to the ReplicationController. Nor should it verify that the pods controlled match the currently specified template, as that would obstruct auto-sizing and other automated processes. Similarly, completion deadlines, ordering dependencies, configuration expansion, and other features belong elsewhere. We even plan to factor out the mechanism for bulk pod creation ([#170](https://issue.k8s.io/170)).\n\nThe ReplicationController is intended to be a composable building-block primitive. We expect higher-level APIs and/or tools to be built on top of it and other complementary primitives for user convenience in the future. The \"macro\" operations currently supported by kubectl (run, scale) are proof-of-concept examples of this. For instance, we could imagine something like [Asgard](https://netflixtechblog.com/asgard-web-based-cloud-management-and-deployment-2c9fc4e4d3a1) managing ReplicationControllers, auto-scalers, services, scheduling policies, canaries, etc.\n\n## API Object\n\nReplication controller is a top-level resource in the Kubernetes REST API. More details about the\nAPI object can be found at:\n[ReplicationController API object](/docs/reference/generated/kubernetes-api//#replicationcontroller-v1-core).\n\n## Alternatives to ReplicationController\n\n### ReplicaSet\n\n[`ReplicaSet`](/docs/concepts/workloads/controllers/replicaset/) is the next-generation ReplicationController that supports the new [set-based label selector](/docs/concepts/overview/working-with-objects/labels/#set-based-requirement).\nIt's mainly used by [Deployment](/docs/concepts/workloads/controllers/deployment/) as a mechanism to orchestrate pod creation, deletion and updates.\nNote that we recommend using Deployments instead of directly using Replica Sets, unless you require custom update orchestration or don't require updates at all.\n\n### Deployment (Recommended)\n\n[`Deployment`](/docs/concepts/workloads/controllers/deployment/) is a higher-level API object that updates its underlying Replica Sets and their Pods. Deployments are recommended if you want the rolling update functionality, because they are declarative, server-side, and have additional features.\n\n### Bare Pods\n\nUnlike in the case where a user directly created pods, a ReplicationController replaces pods that are deleted or terminated for any reason, such as in the case of node failure or disruptive node maintenance, such as a kernel upgrade. For this reason, we recommend that you use a ReplicationController even if your application requires only a single pod. Think of it similarly to a process supervisor, only it supervises multiple pods across multiple nodes instead of individual processes on a single node. A ReplicationController delegates local container restarts to some agent on the node, such as the kubelet.\n\n### Job\n\nUse a [`Job`](/docs/concepts/workloads/controllers/job/) instead of a ReplicationController for pods that are expected to terminate on their own\n(that is, batch jobs).\n\n### DaemonSet\n\nUse a [`DaemonSet`](/docs/concepts/workloads/controllers/daemonset/) instead of a ReplicationController for pods that provide a\nmachine-level function, such as machine monitoring or machine logging. These pods have a lifetime that is tied\nto a machine lifetime: the pod needs to be running on the machine before other pods start, and are\nsafe to terminate when the machine is otherwise ready to be rebooted/shutdown.\n\n##\n\n* Learn about [Pods](/docs/concepts/workloads/pods).\n* Learn about [Deployment](/docs/concepts/workloads/controllers/deployment/), the replacement\nfor ReplicationController.\n* `ReplicationController` is part of the Kubernetes REST API.\nRead the\nobject definition to understand the API for replication controllers.", "source": "content/en/docs/concepts/workloads/controllers/replicationcontroller.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Workload management in Kubernetes covers how you organize, deploy, update,\nscale, and maintain your applications. After you deploy an application and\nexpose it through a Service, you need strategies for keeping it running\nreliably: updating to new versions without disrupting users, scaling to\nmeet changing demand, and recovering from failures. This page explains\nthe key concepts and strategies behind these activities, and links to\ntask pages for step-by-step procedures.\n\n## Organizing resource configurations\n\nMost applications require multiple Kubernetes resources working together.\nA typical web application might need a Deployment, a Service, a ConfigMap,\na PersistentVolumeClaim, and a Gateway (using the Gateway API add-on). Organizing these resources effectively makes\nyour applications easier to deploy, update, and troubleshoot.\n\nKubernetes supports several approaches to resource organization:\n\n- **Single-file grouping**: combine related resources in one (YAML) _manifest_,\nseparated by `---`. You can define resources in any order.\n- **Directory-based organization**: group all manifests for an application\nin the same directory, organized by microservice or application tier.\n- **URL-based configuration**: deploy directly from manifests hosted in\nsource control systems.\n\nFor details on `kubectl` commands that support these approaches, see\n[Command line tool (kubectl)](/docs/reference/kubectl/).\n\n### External tools\n\nSeveral tools extend Kubernetes object management beyond what `kubectl`\nprovides natively.\n\n#### Helm {#external-tool-helm}\n\n[Helm](https://helm.sh/) is a tool for managing packages of pre-configured\nKubernetes resources. These packages are known as _Helm charts_.\n\n#### Kustomize {#external-tool-kustomize}\n\n[Kustomize](https://kustomize.io/) traverses a Kubernetes manifest to add,\nremove, or update configuration options. It is available both as a standalone\nbinary and as a\n[native feature](/docs/tasks/manage-kubernetes-objects/kustomization/) of\n`kubectl`.\n\n## Update strategies\n\nWhen you release a new version of your application, how Kubernetes transitions\nfrom the old version to the new one determines whether users experience\ndowntime and how much risk the update carries. Kubernetes supports several\nupdate strategies, each suited to different scenarios.\n\n### Rolling updates\n\nA rolling update gradually replaces old Pods with new ones. At any point\nduring the update, a mix of old and new Pods serves traffic, so the\napplication remains available throughout. This is the default strategy for\nDeployments.\n\nTwo parameters control the pace of a rolling update:\n\n- **`maxUnavailable`**: the maximum number of Pods that can be unavailable\nduring the update (default: 25%).\n- **`maxSurge`**: the maximum number of extra Pods that can exist above the\ndesired count during the update (default: 25%).\n\nRolling updates also support pausing and resuming, which allows you to\ninspect a partial update or batch multiple changes into a single rollout.\nIf a new version introduces problems, you can roll back to a previous\nrevision.\n\nFor step-by-step instructions, see\n[Update a Deployment Without Downtime](/docs/tasks/run-application/update-deployment-rolling/).\nFor configuration details, see the\n[Deployment](/docs/concepts/workloads/controllers/deployment/#strategy)\nconcept page.\n\n### Recreate\n\nThe Recreate strategy terminates all existing Pods before creating new ones.\nThis causes a brief period of downtime but ensures that only one version of\nthe application runs at a time.\n\nUse the Recreate strategy when:\n\n- Your application cannot tolerate running two versions simultaneously\n(for example, due to database schema incompatibilities).\n- You need a clean switchover with no overlap between old and new Pods.\n\nFor details, see the\n[Deployment strategy](/docs/concepts/workloads/controllers/deployment/#strategy)\ndocumentation.\n\nYou can also apply a Recreate strategy for a StatefulSet. Because these workloads\n(or workload components) very often do manage some durable state, you need to\nadd your own mechanism to ensure that the application remains durable even if\nyou replace all of the Pods.\n\n### Canary deployments\n\nA canary deployment runs a new version of your application alongside the\nexisting stable version, routing only a small fraction of traffic to the new\nversion. This allows you to monitor the new version under real production\nconditions before committing to a full rollout.\n\nThe canary pattern in Kubernetes uses labels to differentiate between stable\nand canary Pods. Both Deployments share a common label (for example,\n`app: my-app`) that allows a single Service to route traffic to both sets\nof Pods. A `track` label (`stable` or `canary`) distinguishes the two\nreleases. By adjusting the replica counts, you control the traffic ratio\nbetween stable and canary Pods.\n\nFor a hands-on walkthrough, see\n[Deploy a Release Using a Canary Deployment](/docs/tutorials/stateless-application/canary-deployment/).\n\nIf you want to use canarying with a StatefulSet, you will typically need to add your\nown mechanism to do that. One detail that's relevant is that a StatefulSet doesn't\nhave to have an ordinal (Pod number) that starts at zero.\nFor example, you have a main StatefulSet with starting ordinal zero and 7 replicas (pod number 0 to pod number 6), and a canary StatefulSet with starting ordinal 7 (pod number 7). By managing how much traffic or work the canary Pod picks up,\nyou can gradually increase your confidence that the new code or configuration is\ncorrect.\n\nFully developing this pattern for a stateful app is outside the scope of core Kubernetes.\n\n### Comparing update strategies\n\n| Strategy | Downtime | Risk level | Best for |\n|----------|----------|------------|----------|\n| Rolling update | None | Low — gradual rollout | Most workloads |\n| Recreate | Yes | Low — clean switchover | Incompatible versions |\n| Canary | None | Lowest — small traffic percentage | High-risk changes requiring production validation |\n\n## Scaling workloads\n\nScaling adjusts the number of Pod replicas running your application to match\ndemand. Kubernetes supports two approaches:\n\n- **Manual scaling**: you set the replica count directly. This works well for\npredictable, scheduled, or one-off capacity changes where you know the\nrequired number of replicas in advance.\n- **Automatic scaling**: a HorizontalPodAutoscaler (HPA) monitors metrics\nsuch as CPU utilization, memory usage, or custom metrics, and adjusts the\nreplica count automatically. This suits workloads with variable or\nunpredictable demand.\n\nIf a HorizontalPodAutoscaler manages a Deployment or StatefulSet, do not set\nthe `replicas` field\nmanually. The HPA continuously reconciles the replica count and overrides\nany manual changes.\n\nFor step-by-step instructions on manual scaling, see\n[Scale a Deployment Manually](/docs/tasks/run-application/scale-deployment/).\nFor automatic scaling, see the\n[HorizontalPodAutoscaler walkthrough](/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/).\n\n## Updating resources in place\n\nAfter deploying resources, you often need to make changes without replacing\nthe entire object. Kubernetes provides several approaches for in-place\nupdates, each suited to different workflows:\n\n- **Declarative management** (`kubectl apply`): compares your configuration\nfile against the live state and applies only the differences. This approach\nworks well when you maintain configuration as code in source control. For\ndetails, see\n[server-side apply](/docs/reference/using-api/server-side-apply/).\n- **Interactive editing** (`kubectl edit`): opens the live resource in a text\neditor, allowing you to make changes directly. Useful for one-off\nadjustments or exploration.\n- **Patch operations** (`kubectl patch`): updates specific fields using JSON\npatch, JSON merge patch, or strategic merge patch. Best for scripted or\nautomated changes. For details, see\n[Update API Objects in Place Using kubectl patch](/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/).\n\n## Disruptive updates\n\nSome resource fields are immutable after creation (for example, a Pod's\ncontainer name or a Service's `clusterIP`). When you need to change an\nimmutable field, you must delete and recreate the resource. The\n`kubectl replace --force` command performs this operation in a single step.\n\nDisruptive updates cause downtime because Kubernetes deletes the existing\nresource before creating the replacement. Use this approach only when\nin-place updates are not possible.\n\n## Cluster administrator considerations\n\nAs a cluster administrator, you can set guardrails that influence how\napplication teams manage their workloads:\n\n- [**ResourceQuotas**](/docs/concepts/policy/resource-quotas/): limit the\ntotal compute resources a namespace can consume, preventing any single team\nfrom overusing cluster capacity.\n- [**PodDisruptionBudgets**](/docs/concepts/workloads/pods/disruptions/):\nensure a minimum number of Pods remain available during voluntary\ndisruptions such as node maintenance or Deployment rollouts. See also\n[Specifying a PodDisruptionBudget](/docs/tasks/run-application/configure-pdb/).\n- [**Topology spread constraints**](/docs/concepts/scheduling-eviction/topology-spread-constraints/):\nencourage or require Pods to spread across failure domains (zones, nodes)\nfor higher availability.\n- [**Taints and tolerations**](/docs/concepts/scheduling-eviction/taint-and-toleration/):\ncontrol which Pods can schedule onto specific nodes, useful for dedicating\nhardware or isolating workloads.\n\n##\n\n- [Scale a Deployment Manually](/docs/tasks/run-application/scale-deployment/)\n- [Update a Deployment Without Downtime](/docs/tasks/run-application/update-deployment-rolling/)\n- [Deploy a Release Using a Canary Deployment](/docs/tutorials/stateless-application/canary-deployment/)\n- [Horizontal Pod Autoscaling](/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/)\n- [Deployments](/docs/concepts/workloads/controllers/deployment/)\n- [Application introspection and debugging](/docs/tasks/debug/debug-application/debug-running-pod/)", "source": "content/en/docs/concepts/workloads/management.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This guide is for application owners who want to build\nhighly available applications, and thus need to understand\nwhat types of disruptions can happen to Pods.\n\nIt is also for cluster administrators who want to perform automated\ncluster actions, like upgrading and autoscaling clusters.\n\n## Voluntary and involuntary disruptions\n\nPods do not disappear until someone (a person or a controller) destroys them, or\nthere is an unavoidable hardware or system software error.\n\nWe call these unavoidable cases *involuntary disruptions* to\nan application. Examples are:\n\n- a hardware failure of the physical machine backing the node\n- cluster administrator deletes VM (instance) by mistake\n- cloud provider or hypervisor failure makes VM disappear\n- a kernel panic\n- the node disappears from the cluster due to cluster network partition\n- eviction of a pod due to the node being [out-of-resources](/docs/concepts/scheduling-eviction/node-pressure-eviction/).\n\nExcept for the out-of-resources condition, all these conditions\nshould be familiar to most users; they are not specific\nto Kubernetes.\n\nWe call other cases *voluntary disruptions*. These include both\nactions initiated by the application owner and those initiated by a Cluster\nAdministrator. Typical application owner actions include:\n\n- deleting the deployment or other controller that manages the pod\n- updating a deployment's pod template causing a restart\n- directly deleting a pod (e.g. by accident)\n\nCluster administrator actions include:\n\n- [Draining a node](/docs/tasks/administer-cluster/safely-drain-node/) for repair or upgrade.\n- Draining a node from a cluster to scale the cluster down (learn about\n[Node Autoscaling](/docs/concepts/cluster-administration/node-autoscaling/)).\n- Removing a pod from a node to permit something else to fit on that node.\n\nThese actions might be taken directly by the cluster administrator, or by automation\nrun by the cluster administrator, or by your cluster hosting provider.\n\nAsk your cluster administrator or consult your cloud provider or distribution documentation\nto determine if any sources of voluntary disruptions are enabled for your cluster.\nIf none are enabled, you can skip creating Pod Disruption Budgets.\n\nNot all voluntary disruptions are constrained by Pod Disruption Budgets. For example,\ndeleting deployments or pods bypasses Pod Disruption Budgets.\n\n## Dealing with disruptions\n\nHere are some ways to mitigate involuntary disruptions:\n\n- Ensure your pod [requests the resources](/docs/tasks/configure-pod-container/assign-memory-resource) it needs.\n- Replicate your application if you need higher availability. (Learn about running replicated\n[stateless](/docs/tasks/run-application/run-stateless-application-deployment/)\nand [stateful](/docs/tasks/run-application/run-replicated-stateful-application/) applications.)\n- For even higher availability when running replicated applications,\nspread applications across racks (using\n[anti-affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity))\nor across zones (if using a\n[multi-zone cluster](/docs/setup/multiple-zones).)\n\nThe frequency of voluntary disruptions varies. On a basic Kubernetes cluster, there are\nno automated voluntary disruptions (only user-triggered ones). However, your cluster administrator or hosting provider\nmay run some additional services which cause voluntary disruptions. For example,\nrolling out node software updates can cause voluntary disruptions. Also, some implementations\nof cluster (node) autoscaling may cause voluntary disruptions to defragment and compact nodes.\nYour cluster administrator or hosting provider should have documented what level of voluntary\ndisruptions, if any, to expect. Certain configuration options, such as\n[using PriorityClasses](/docs/concepts/scheduling-eviction/pod-priority-preemption/)\nin your pod spec can also cause voluntary (and involuntary) disruptions.\n\n## Pod disruption budgets\n\nKubernetes offers features to help you run highly available applications even when you\nintroduce frequent voluntary disruptions.\n\nAs an application owner, you can create a PodDisruptionBudget (PDB) for each application.\nA PDB limits the number of Pods of a replicated application that are down simultaneously from\nvoluntary disruptions. For example, a quorum-based application would\nlike to ensure that the number of replicas running is never brought below the\nnumber needed for a quorum. A web front end might want to\nensure that the number of replicas serving load never falls below a certain\npercentage of the total.\n\nCluster managers and hosting providers should use tools which\nrespect PodDisruptionBudgets by calling the [Eviction API](/docs/tasks/administer-cluster/safely-drain-node/#eviction-api)\ninstead of directly deleting pods or deployments.\n\nFor example, the `kubectl drain` subcommand lets you mark a node as going out of\nservice. When you run `kubectl drain`, the tool tries to evict all of the Pods on\nthe Node you're taking out of service. The eviction request that `kubectl` submits on\nyour behalf may be temporarily rejected, so the tool periodically retries all failed\nrequests until all Pods on the target node are terminated, or until a configurable timeout\nis reached.\n\nA PDB specifies the number of replicas that an application can tolerate having, relative to how\nmany it is intended to have. For example, a Deployment which has a `.spec.replicas: 5` is\nsupposed to have 5 pods at any given time. If its PDB allows for there to be 4 at a time,\nthen the Eviction API will allow voluntary disruption of one (but not two) pods at a time.\n\nThe group of pods that comprise the application is specified using a label selector, the same\nas the one used by the application's controller (deployment, stateful-set, etc).\n\nThe \"intended\" number of pods is computed from the `.spec.replicas` of the workload resource\nthat is managing those pods. The control plane discovers the owning workload resource by\nexamining the `.metadata.ownerReferences` of the Pod.\n\n[Involuntary disruptions](#voluntary-and-involuntary-disruptions) cannot be prevented by PDBs; however they\ndo count against the budget.\n\nPods which are deleted or unavailable due to a rolling upgrade to an application do count\nagainst the disruption budget, but workload resources (such as Deployment and StatefulSet)\nare not limited by PDBs when doing rolling upgrades. Instead, the handling of failures\nduring application updates is configured in the spec for the specific workload resource.\n\nIt is recommended to set `AlwaysAllow` [Unhealthy Pod Eviction Policy](/docs/tasks/run-application/configure-pdb/#unhealthy-pod-eviction-policy)\nto your PodDisruptionBudgets to support eviction of misbehaving applications during a node drain.\nThe default behavior is to wait for the application pods to become [healthy](/docs/tasks/run-application/configure-pdb/#healthiness-of-a-pod)\nbefore the drain can proceed.\n\nWhen a pod is evicted using the eviction API, it is gracefully\n[terminated](/docs/concepts/workloads/pods/pod-termination/), honoring the\n`terminationGracePeriodSeconds` setting in its [PodSpec](/docs/reference/generated/kubernetes-api//#podspec-v1-core).\n\n## PodDisruptionBudget example {#pdb-example}\n\nConsider a cluster with 3 nodes, `node-1` through `node-3`.\nThe cluster is running several applications. One of them has 3 replicas initially called\n`pod-a`, `pod-b`, and `pod-c`. Another, unrelated pod without a PDB, called `pod-x`, is also shown.\nInitially, the pods are laid out as follows:\n\n| node-1 | node-2 | node-3 |\n|:--------------------:|:-------------------:|:------------------:|\n| pod-a *available* | pod-b *available* | pod-c *available* |\n| pod-x *available* | | |\n\nAll 3 pods are part of a deployment, and they collectively have a PDB which requires\nthere be at least 2 of the 3 pods to be available at all times.\n\nFor example, assume the cluster administrator wants to reboot into a new kernel version to fix a bug in the kernel.\nThe cluster administrator first tries to drain `node-1` using the `kubectl drain` command.\nThat tool tries to evict `pod-a` and `pod-x`. This succeeds immediately.\nBoth pods go into the `terminating` state at the same time.\nThis puts the cluster in this state:\n\n| node-1 *draining* | node-2 | node-3 |\n|:--------------------:|:-------------------:|:------------------:|\n| pod-a *terminating* | pod-b *available* | pod-c *available* |\n| pod-x *terminating* | | |\n\nThe deployment notices that one of the pods is terminating, so it creates a replacement\ncalled `pod-d`. Since `node-1` is cordoned, it lands on another node. Something has\nalso created `pod-y` as a replacement for `pod-x`.\n\n(Note: for a StatefulSet, `pod-a`, which would be called something like `pod-0`, would need\nto terminate completely before its replacement, which is also called `pod-0` but has a\ndifferent UID, could be created. Otherwise, the example applies to a StatefulSet as well.)\n\nNow the cluster is in this state:\n\n| node-1 *draining* | node-2 | node-3 |\n|:--------------------:|:-------------------:|:------------------:|\n| pod-a *terminating* | pod-b *available* | pod-c *available* |\n| pod-x *terminating* | pod-d *starting* | pod-y |\n\nAt some point, the pods terminate, and the cluster looks like this:\n\n| node-1 *drained* | node-2 | node-3 |\n|:--------------------:|:-------------------:|:------------------:|\n| | pod-b *available* | pod-c *available* |\n| | pod-d *starting* | pod-y |\n\nAt this point, if an impatient cluster administrator tries to drain `node-2` or\n`node-3`, the drain command will block, because there are only 2 available\npods for the deployment, and its PDB requires at least 2. After some time passes, `pod-d` becomes available.\n\nThe cluster state now looks like this:\n\n| node-1 *drained* | node-2 | node-3 |\n|:--------------------:|:-------------------:|:------------------:|\n| | pod-b *available* | pod-c *available* |\n| | pod-d *available* | pod-y |\n\nNow, the cluster administrator tries to drain `node-2`.\nThe drain command will try to evict the two pods in some order, say\n`pod-b` first and then `pod-d`. It will succeed at evicting `pod-b`.\nBut, when it tries to evict `pod-d`, it will be refused because that would leave only\none pod available for the deployment.\n\nThe deployment creates a replacement for `pod-b` called `pod-e`.\nBecause there are not enough resources in the cluster to schedule\n`pod-e` the drain will again block. The cluster may end up in this\nstate:\n\n| node-1 *drained* | node-2 | node-3 | *no node* |\n|:--------------------:|:-------------------:|:------------------:|:------------------:|\n| | pod-b *terminating* | pod-c *available* | pod-e *pending* |\n| | pod-d *available* | pod-y | |\n\nAt this point, the cluster administrator needs to\nadd a node back to the cluster to proceed with the upgrade.\n\nYou can see how Kubernetes varies the rate at which disruptions\ncan happen, according to:\n\n- how many replicas an application needs\n- how long it takes to gracefully shutdown an instance\n- how long it takes a new instance to start up\n- the type of controller\n- the cluster's resource capacity\n\n## Pod disruption conditions {#pod-disruption-conditions}\n\nA dedicated Pod `DisruptionTarget` [condition](/docs/concepts/workloads/pods/pod-lifecycle/#pod-conditions)\nis added to indicate\nthat the Pod is about to be deleted due to a disruption.\nThe `reason` field of the condition additionally\nindicates one of the following reasons for the Pod termination:\n\n`PreemptionByScheduler`\n: Pod is due to be preempted by a scheduler in order to accommodate a new Pod with a higher priority. For more information, see [Pod priority preemption](/docs/concepts/scheduling-eviction/pod-priority-preemption/).\n\n`DeletionByTaintManager`\n: Pod is due to be deleted by Taint Manager (which is part of the node lifecycle controller within `kube-controller-manager`) due to a `NoExecute` taint that the Pod does not tolerate; see taint-based evictions.\n\n`EvictionByEvictionAPI`\n: Pod has been marked for eviction using the Kubernetes API .\n\n`DeletionByPodGC`\n: Pod, that is bound to a no longer existing Node, is due to be deleted by [Pod garbage collection](/docs/concepts/workloads/pods/pod-termination/#pod-garbage-collection).\n\n`TerminationByKubelet`\n: Pod has been terminated by the kubelet, because of either node pressure eviction,\nthe [graceful node shutdown](/docs/concepts/cluster-administration/node-shutdown/#graceful-node-shutdown),\nor preemption for [system critical pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/).\n\nIn all other disruption scenarios, like eviction due to exceeding\n[Pod container limits](/docs/concepts/configuration/manage-resources-containers/),\nPods don't receive the `DisruptionTarget` condition because the disruptions were\nprobably caused by the Pod and would reoccur on retry.\n\nA Pod disruption might be interrupted. The control plane might re-attempt to\ncontinue the disruption of the same Pod, but it is not guaranteed. As a result,\nthe `DisruptionTarget` condition might be added to a Pod, but that Pod might then not actually be\ndeleted. In such a situation, after some time, the\nPod disruption condition will be cleared.\n\nAlong with cleaning up the pods, the Pod garbage collector (PodGC) will also mark them as failed if they are in a non-terminal\nphase (see also [Pod garbage collection](/docs/concepts/workloads/pods/pod-termination/#pod-garbage-collection)).\n\nWhen using a Job (or CronJob), you may want to use these Pod disruption conditions as part of your Job's\n[Pod failure policy](/docs/concepts/workloads/controllers/job#pod-failure-policy).\n\n## Separating Cluster Owner and Application Owner Roles\n\nOften, it is useful to think of the Cluster Manager\nand Application Owner as separate roles with limited knowledge\nof each other. This separation of responsibilities\nmay make sense in these scenarios:\n\n- when there are many application teams sharing a Kubernetes cluster, and\nthere is natural specialization of roles\n- when third-party tools or services are used to automate cluster management\n\nPod Disruption Budgets support this separation of roles by providing an\ninterface between the roles.\n\nIf you do not have such a separation of responsibilities in your organization,\nyou may not need to use Pod Disruption Budgets.\n\n## How to perform Disruptive Actions on your Cluster\n\nIf you are a Cluster Administrator, and you need to perform a disruptive action on all\nthe nodes in your cluster, such as a node or system software upgrade, here are some options:\n\n- Accept downtime during the upgrade.\n- Failover to another complete replica cluster.\n- No downtime, but may be costly both for the duplicated nodes\nand for human effort to orchestrate the switchover.\n- Write disruption tolerant applications and use PDBs.\n- No downtime.\n- Minimal resource duplication.\n- Allows more automation of cluster administration.\n- Writing disruption-tolerant applications is tricky, but the work to tolerate voluntary\ndisruptions largely overlaps with work to support autoscaling and tolerating\ninvoluntary disruptions.\n\n##\n\n* Follow steps to protect your application by [configuring a Pod Disruption Budget](/docs/tasks/run-application/configure-pdb/).\n\n* Learn more about [draining nodes](/docs/tasks/administer-cluster/safely-drain-node/)\n\n* Learn about [updating a deployment](/docs/concepts/workloads/controllers/deployment/#updating-a-deployment)\nincluding steps to maintain its availability during the rollout.", "source": "content/en/docs/concepts/workloads/pods/disruptions.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page introduces _Quality of Service (QoS) classes_ in Kubernetes, and explains\nhow Kubernetes assigns a QoS class to each Pod as a consequence of the resource\nconstraints that you specify for the containers in that Pod. Kubernetes relies on this\nclassification to make decisions about which Pods to evict when there are not enough\navailable resources on a Node.\n\n## Quality of Service classes\n\nKubernetes classifies the Pods that you run and allocates each Pod into a specific\n_quality of service (QoS) class_. Kubernetes uses that classification to influence how different\npods are handled. Kubernetes does this classification based on the\n[resource requests](/docs/concepts/configuration/manage-resources-containers/)\nof the Containers in that Pod, along with\nhow those requests relate to resource limits.\nThis is known as Quality of Service\n(QoS) class. Kubernetes assigns every Pod a QoS class based on the resource requests\nand limits of its component Containers. QoS classes are used by Kubernetes to decide\nwhich Pods to evict from a Node experiencing\n[Node Pressure](/docs/concepts/scheduling-eviction/node-pressure-eviction/). The possible\nQoS classes are `Guaranteed`, `Burstable`, and `BestEffort`. When a Node runs out of resources,\nKubernetes will first evict `BestEffort` Pods running on that Node, followed by `Burstable` and\nfinally `Guaranteed` Pods. When this eviction is due to resource pressure, only Pods exceeding\nresource requests are candidates for eviction.\n\n### Guaranteed\n\nPods that are `Guaranteed` have the strictest resource limits and are least likely\nto face eviction. They are guaranteed not to be killed until they exceed their limits\nor there are no lower-priority Pods that can be preempted from the Node. They may\nnot acquire resources beyond their specified limits. These Pods can also make\nuse of exclusive CPUs using the\n[`static`](/docs/tasks/administer-cluster/cpu-management-policies/#static-policy-configuration) CPU management policy.\n\n#### Criteria\n\nFor a Pod to be given a QoS class of `Guaranteed`:\n\n* Every Container in the Pod must have a memory limit and a memory request, both greater than zero.\n* For every Container in the Pod, the memory limit must equal the memory request.\n* Every Container in the Pod must have a CPU limit and a CPU request, both greater than zero.\n* For every Container in the Pod, the CPU limit must equal the CPU request.\n\nIf instead the Pod uses [Pod-level resources](/docs/concepts/configuration/manage-resources-containers/#pod-level-resource-specification):\n\n* The Pod must have a Pod-level memory limit and memory request, and their values must be equal.\n* The Pod must have a Pod-level CPU limit and CPU request, and their values must be equal.\n\n### Burstable\n\nPods that are `Burstable` have some lower-bound resource guarantees based on the request, but\ndo not require a specific limit. If a limit is not specified, it defaults to a\nlimit equivalent to the capacity of the Node, which allows the Pods to flexibly increase\ntheir resources if resources are available. In the event of Pod eviction due to Node\nresource pressure, these Pods are evicted only after all `BestEffort` Pods are evicted.\nBecause a `Burstable` Pod can include a Container that has no resource limits or requests, a Pod\nthat is `Burstable` can try to use any amount of node resources.\n\n#### Criteria\n\nA Pod is given a QoS class of `Burstable` if:\n\n* The Pod does not meet the criteria for QoS class `Guaranteed`.\n* At least one Container in the Pod has a memory or CPU request or limit,\nor the Pod has a Pod-level memory or CPU request or limit.\n\n### BestEffort\n\nPods in the `BestEffort` QoS class can use node resources that aren't specifically assigned\nto Pods in other QoS classes. For example, if you have a node with 16 CPU cores available to the\nkubelet, and you assign 4 CPU cores to a `Guaranteed` Pod, then a Pod in the `BestEffort`\nQoS class can try to use any amount of the remaining 12 CPU cores.\n\nThe kubelet prefers to evict `BestEffort` Pods if the node comes under resource pressure.\n\n#### Criteria\n\nA Pod has a QoS class of `BestEffort` if it doesn't meet the criteria for either `Guaranteed`\nor `Burstable`. In other words, a Pod is `BestEffort` only if none of the Containers in the Pod have a\nmemory limit or a memory request, and none of the Containers in the Pod have a\nCPU limit or a CPU request, and the Pod does not have any Pod-level memory or CPU limits or requests.\nContainers in a Pod can request other resources (not CPU or memory) and still be classified as\n`BestEffort`.\n\n## Memory QoS with cgroup v2\n\n[Memory QoS](/docs/reference/command-line-tools-reference/feature-gates/#memoryqos) uses the memory controller of cgroup v2 to manage memory throttling\nand protection in Kubernetes. It uses the Pod's QoS class to decide which cgroup\nsettings to apply, but it does not change how Pods are classified.\n\nThe default `kubelet` configuration does not enable memory\nthrottling or memory protection. To enable either behavior, [configure](/docs/reference/config-api/kubelet-config.v1beta1/)\n`memoryThrottlingFactor` or `memoryReservationPolicy`, respectively.\n\n### Memory throttling\n\nMemory throttling is controlled by the `kubelet` configuration field\n`memoryThrottlingFactor`. Its default value is `nil`, which means that the\n`kubelet` does not set `memory.high`. To enable memory throttling, set\n`memoryThrottlingFactor` to a value greater than 0 and less than or equal to 1.\n\nFor Burstable Pods, the kubelet uses `memory.high` to throttle memory allocation\nbefore the workload hits its hard limit (`memory.max`). The throttling threshold\nfor a container is calculated as:\n\n```\nmemory.high = requests + memoryThrottlingFactor * (limits - requests)\n```\n\nFor example, with `memoryThrottlingFactor` set to `0.9`, a container with a\n`256 MiB` request and a `1 GiB` limit gets `memory.high` set to roughly `947 MiB`.\nIf a Burstable container has no memory limit, the kubelet uses node allocatable\nmemory in place of the limit.\n\nFor BestEffort containers, which have no memory request or limit, the kubelet\ncalculates `memory.high` using a request of zero and node allocatable memory in\nplace of the limit. Guaranteed containers do not get `memory.high` because\ntheir requests equal their limits.\n\n### Configuring memory reservation\n\nMemory reservation is controlled via the kubelet configuration field\n`memoryReservationPolicy`:\n\n- `None` (default): the kubelet does not set `memory.min` or `memory.low` for\ncontainers and pods. No memory is hard-locked by the kernel.\n- `TieredReservation`: the kubelet sets tiered memory protection based on the\nPod's QoS class:\n- **Guaranteed** pods: `memory.min` is set to memory requests. The kernel\nwill not reclaim this memory under any circumstances.\n- **Burstable** pods: `memory.low` is set to memory requests. The kernel\npreferentially retains this memory but may reclaim it under extreme pressure.\n- **BestEffort** pods: no memory protection is set.\n\nFor example, the following kubelet configuration enables memory throttling with\na factor of `0.9` and tiered memory protection:\n\n```yaml\napiVersion: kubelet.config.k8s.io/v1beta1\nkind: KubeletConfiguration\nmemoryThrottlingFactor: 0.9\nmemoryReservationPolicy: TieredReservation\n```\n\nYou can configure either field independently. Omit `memoryThrottlingFactor` so\nthat the kubelet does not set `memory.high`, or set\n`memoryReservationPolicy: None` to disable memory protection.\n\nBecause cgroup v2 memory protection is hierarchical, the kubelet also configures\nthe ancestor cgroups. It sets `memory.min` on the kubepods root cgroup to the sum\nof the memory requests for Guaranteed and Burstable Pods. It sets `memory.low`\non the kubepods root cgroup and the Burstable QoS cgroup to the sum of the\nmemory requests for Burstable Pods. Without this ancestor coverage, the\nper-Pod and per-container protection would be ineffective.\n\nFor a Guaranteed Pod, memory requests equal memory limits. With\n`memoryReservationPolicy: TieredReservation`, `memory.min` therefore equals\n`memory.max`. For a workload that uses a large page cache, the kernel might be\nunable to reclaim enough page cache before the cgroup reaches `memory.max`,\nwhich can result in an OOM kill. Size the memory limit to include sufficient\nheadroom for page cache.\n\n### Disabling or rolling back Memory QoS\n\nTo disable Memory QoS, set the `MemoryQoS` feature gate to `false`, ensure that\n`memoryReservationPolicy` is unset or set to `None`, and restart the kubelet.\nAt startup, the kubelet resets `memory.min` and `memory.low` on the kubepods\nroot cgroup, and `memory.low` on the Burstable QoS cgroup, to zero. Pod-level\nand container-level `memory.min` and `memory.low` values can remain, but they\nare ineffective because the corresponding ancestor protection is zero.\n\nWhen Memory QoS is disabled, the kubelet sets `memory.high` to `max` whenever\nthe container runtime applies a resource configuration to a new, restarted, or\nin-place resized container. An already running container that is not restarted\nor resized can retain its previous `memory.high` value until the next restart or\nin-place resize.\n\n### System requirements\n\nMemory QoS requires Linux with cgroup v2. Kernel 5.9 or higher is recommended\nbecause `memory.high` throttling on older kernels can trigger a known\n[livelock bug](https://lore.kernel.org/all/20200710012662.GA29679@chep.ntu.edu.tw/).\nIf the `MemoryQoS` feature gate is enabled on an older kernel, the kubelet logs\na warning at startup.\n\n## Some behavior is independent of QoS class {#class-independent-behavior}\n\nCertain behavior is independent of the QoS class assigned by Kubernetes. For example:\n\n* Any Container exceeding a resource limit will be killed and restarted by the kubelet without\naffecting other Containers in that Pod.\n\n* If a Container exceeds its resource request and the node it runs on faces\nresource pressure, the Pod it is in becomes a candidate for [eviction](/docs/concepts/scheduling-eviction/node-pressure-eviction/).\nIf this occurs, all Containers in the Pod will be terminated. Kubernetes may create a\nreplacement Pod, usually on a different node.\n\n* The resource request of a Pod is equal to the sum of the resource requests of\nits component Containers, and the resource limit of a Pod is equal to the sum of\nthe resource limits of its component Containers.\n\n* The kube-scheduler does not consider QoS class when selecting which Pods to\n[preempt](/docs/concepts/scheduling-eviction/pod-priority-preemption/#preemption).\nPreemption can occur when a cluster does not have enough resources to run all the Pods\nyou defined.\n\n* The QoS class is determined when the Pod is created and remains unchanged for the\nlifetime of the Pod. If you later attempt an\n[in-place resize](/docs/concepts/workloads/pods/pod-lifecycle/#pod-resize)\nthat would result in a different QoS class, the resize is rejected by admission.\n\n##\n\n* Learn about [resource management for Pods and Containers](/docs/concepts/configuration/manage-resources-containers/).\n* Learn about [Node-pressure eviction](/docs/concepts/scheduling-eviction/node-pressure-eviction/).\n* Learn about [Pod priority and preemption](/docs/concepts/scheduling-eviction/pod-priority-preemption/).\n* Learn about [Pod disruptions](/docs/concepts/workloads/pods/disruptions/).\n* Learn how to [assign memory resources to containers and pods](/docs/tasks/configure-pod-container/assign-memory-resource/).\n* Learn how to [assign CPU resources to containers and pods](/docs/tasks/configure-pod-container/assign-cpu-resource/).\n* Learn how to [configure Quality of Service for Pods](/docs/tasks/configure-pod-container/quality-service-pod/).", "source": "content/en/docs/concepts/workloads/pods/pod-qos.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "PodGroup can declare a disruption mode. This mode dictates how\nthe scheduler can disrupt a running PodGroup, for example to accommodate\na higher priority PodGroup. A PodGroup also has a priority,\nwhich overrides the priority of the individual pods from the group\nfor [workload-aware preemption](/docs/concepts/scheduling-eviction/workload-aware-preemption/) events.\n\n## Disruption mode types\n\nIn v1.36, the `priority` or `disruptionMode` fields of the PodGroup are only respected\nby [workload-aware preemption](/docs/concepts/scheduling-eviction/workload-aware-preemption/).\nDuring the pod scheduling phase, the scheduler does not take into account\nthe `priority` or `disruptionMode` fields of the PodGroup. This limitation no longer\napplies in v1.37.\n\nThe API supports two disruption modes: `Single` and `All`.\nThe default one is `Single`.\n\n### Single\n\nThe `Single` mode instructs the scheduler to treat all Pods in the group as separate entities,\nallowing independent disruption of a single pod from a PodGroup.\n\n### All\n\nThe `All` mode emphasizes \"all-or-nothing\" semantics for disruption.\nIt instructs the scheduler that all pods from the PodGroup have to be disrupted together.\n\n## CompositePodGroup\n\nA `CompositePodGroup` can also declare a `disruptionMode` in its specification, which controls\nhow the scheduler disrupts child groups within the composite group during preemption events.\n\nThe API supports two disruption modes for `CompositePodGroups`:\n\n- **`Single`**: Allows individual child groups within the `CompositePodGroup` to be disrupted\nindependently during preemption.\n- **`All`**: Enforces all-or-nothing disruption semantics across the `CompositePodGroup` hierarchy.\nIf any Pod contained in the hierarchy below this `CompositePodGroup` has to be preempted, all of\nthe Pods from the entire hierarchy must be preempted.\n\nIf not specified, the mode defaults to `Single`.\n\nIn v1.37, a group can set its disruption mode to `All` and have child groups that have a mode set to\n`Single`. In such case, the top-level `All` mode overrides the descendant `Single` modes.\n\nThis configuration is discouraged due to unclear semantics.\n\n## Pod group priority\n\nPodGroup uses the same concept of [PriorityClass](/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass) as single Pods.\nOnce you have created one or more PriorityClasses,\nyou can create a PodGroup that specifies one of those PriorityClass names in its specification.\nThe priority admission controller uses the `priorityClassName` field and populates the integer value of the priority.\nIf the priority class is not found, the PodGroup is rejected.\nWhen `priorityClassName` is not set for a PodGroup, Kubernetes looks for a default (a PriorityClass with `globalDefault` set true)\nIf there is no PriorityClass with `globalDefault` set true, a PodGroup with no `priorityClassName` has priority zero.\n\nThe priority of the PodGroup is an authoritative priority for all pods in the group during [workload-aware preemption](/docs/concepts/scheduling-eviction/workload-aware-preemption/) events.\nThis value is also used for the ordering of PodGroups in the scheduling queue.\nWhen the priorities of individual pods forming this PodGroup differ from PodGroup priority\nthe PodGroup will not be scheduled with `all pods in a single pod group should have the same priority as the pod group` error.\n\nWhen the [PodGroupPreemptionPolicy](/docs/reference/command-line-tools-reference/feature-gates/#PodGroupPreemptionPolicy/)\nfeature gate is enabled, PodGroup has also `preemptionPolicy` field. This field is also taken from the PriorityClass.\nIt is an authoritative field for all pods in the group and it decides whether the PodGroup can perform a preemption of\nlower priority pods and pod groups to accommodate a place for itself. When the feature gate is enabled all pods in the PodGroup\nmust have the same `preemptionPolicy` as PodGroup. Otherwise the PodGroup will not be scheduled with\n`all pods in a single pod group should have the same preemption policy as the pod group's preemption policy` error.\nWhen PodGroup has `preemptionPolicy: Never` it will not perform workload aware preemption.\nIf the feature flag is disabled, all pods forming PodGroup must have the same `preemptionPolicy`.\nOtherwise the PodGroup will not be scheduled with\n`all pods in a single pod group should have the same preemption policy` error.\n\nThe following YAML is an example of a PodGroup configuration that uses the `high-priority` PriorityClass,\nwhich maps to the integer priority value of 1000000.\nThe priority admission controller checks the specification and resolves the priority of the PodGroup to 1000000.\n\n```yaml\napiVersion: scheduling.k8s.io/v1beta1\nkind: PodGroup\nmetadata:\nnamespace: ns-1\nname: job-1\nspec:\npriorityClassName: high-priority\n```\n\n### CompositePodGroup priority\n\n`CompositePodGroup` API has `priorityClassName` and `priority` fields as well and their resolution\nis performed in the same way as for the `PodGroups`, through the priority admission controller.\n\nThe priority of a root `CompositePodGroup` acts as the authoritative priority for all child groups\nand Pods within its hierarchy during\n[workload-aware preemption](/docs/concepts/scheduling-eviction/workload-aware-preemption/) events.\nAll Pods within a single group hierarchy must share the exact same priority and must be equal to the\npriority of the root `CompositePodGroup`.\n\nThe value of priority is also used for the ordering of root `CompositePodGroups` in the scheduling\nactive queue.\n\nIn v1.37, the scheduler doesn't validate if the non-root groups have priority value that is equal to\nthe priority of the root `CompositePodGroup`.\n\n### PreemptionPolicy in CompositePodGroup\n\nThe `CompositePodGroup` API has the `preemptionPolicy` field as well and its resolution is performed\nin the exact same way as for the `PodGroup` API.\n\nThe value of `preemptionPolicy` of the root `CompositePodGroup` determines whether\n[workload-aware preemption](/docs/concepts/scheduling-eviction/workload-aware-preemption/) can be\ninvoked to fit its Pods during scheduling if needed:\n\n- `PreemptLowerPriority` policy allows preempting victims with lower priority,\n- `Never` policy disables workload-aware preemption for that root `CompositePodGroup`.\n\nAll Pods within a single group hierarchy must share the exact same preemption policy which must be\nequal to the preemption policy of the root `CompositePodGroup`.\n\nIf the feature flag is disabled, the root `CompositePodGroup` will be allowed to perform preemption\nunless one of the Pods that belongs to the group hierarchy has `preemptionPolicy` set to `Never`.\n\nIn v1.37, when the feature gate is enabled, the scheduler doesn't validate if the non-root groups\nhave preemption policy that is equal to the preemption policy of the root `CompositePodGroup`.\n\n##\n\n* Read about [Workload-Aware Preemption](/docs/concepts/scheduling-eviction/workload-aware-preemption/) algorithm.\n* Learn about the [Workload API](/docs/concepts/workloads/workload-api/).\n* Learn about the [scheduling building blocks and the workloadbuilder library](/docs/concepts/workloads/workload-api/workloadbuilder/), including the disruption mode building block.", "source": "content/en/docs/concepts/workloads/workload-api/disruption-and-priority.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "There are two official Kubernetes blogs, and the CNCF has its own blog where you can cover Kubernetes too.\nFor the main Kubernetes blog, we (the Kubernetes project) like to publish articles with different perspectives and special focuses, that have a link to Kubernetes.\n\nSome articles appear on both blogs: there is a primary version of the article, and\na _mirror article_ on the other blog.\n\nThis page describes the criteria for mirroring, the motivation for mirroring, and\nexplains what you should do to ensure that an article publishes to both blogs.\n\n#\n\nMake sure you are familiar with the introduction sections of\n[contributing to Kubernetes blogs](/docs/contribute/blog/), not just to learn about\nthe two official blogs and the differences between them, but also to get an overview\nof the process.\n\n## Why we mirror\n\nMirroring is nearly always from the contributor blog to the main blog. The project does this\nfor articles that are about the contributor community, or a part of it, but are also relevant\nto the wider set of readers for Kubernetes' main blog.\n\nAs an author (or reviewer), consider the target audience and whether the blog post is appropriate for the [main blog](/docs/contribute/blog/#main-blog).\nFor example: if the target audience are Kubernetes contributors only, then the\n[contributor blog](/docs/contribute/blog/#contributor-blog).\nmay be more appropriate;\nif the blog post is about open source in general then it may be more suitable on another site outside the Kubernetes project.\n\nThis consideration about target audience applies to original and mirrored articles equally.\n\nThe Kubernetes project is willing to mirror any blog article that was published to https://kubernetes.dev/blog/\n(the contributor blog), provided that all of the following criteria are met:\n\n- the mirrored article has the same publication date as the original (it should have the same publication time too,\nbut you can also set a time stamp up to 12 hours later for special cases)\n\n- For PRs that add a mirrored article to the main blog *after* the original article has merged into the contributor blog, ensure that all of the following criteria are met:\n- No articles were published to the main blog after the original article was published to the contributor blog.\n- There are no main blog articles scheduled for publication between the publication time of the original article and the publication time of your mirrored article.\n\nThis is because the Kubernetes project doesn't want to add articles to people's feeds, such as RSS, except at the very end of their feed.\n\n- the original article doesn't contravene any strongly recommended review guidelines or community norms\n\n- the mirrored article will have `canonicalUrl` set correctly in its\n[front matter](https://gohugo.io/content-management/front-matter/)\n\n- the audience for the original article would find it relevant\n\n- the article content is not off-topic for the target blog where the mirror article would\nappear\n\nMirroring from the main blog to the contributor blog is rare, but could feasibly happen.\n\n## How to mirror\n\nYou make a PR against the other Git repository (usually,\n[https://github.com/kubernetes/website](https://github.com/kubernetes/website)) that adds\nthe article. You do this _before_ the articles merge.\n\nAs the article author, you should set the canonical URL for the mirrored article, to the URL of the original article\n(you can use a preview to predict the URL and fill this in ahead of actual publication). Use the `canonicalUrl`\nfield in [front matter](https://gohugo.io/content-management/front-matter/) for this.", "source": "content/en/docs/contribute/blog/mirroring.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page gives writing style guidelines for the Kubernetes documentation.\nThese are guidelines, not rules. Use your best judgment, and feel free to\npropose changes to this document in a pull request.\n\nFor additional information on creating new content for the Kubernetes\ndocumentation, read the [Documentation Content Guide](/docs/contribute/style/content-guide/).\n\nChanges to the style guide are made by SIG Docs as a group. To propose a change\nor addition, [add it to the agenda](https://bit.ly/sig-docs-agenda) for an upcoming\nSIG Docs meeting, and attend the meeting to participate in the discussion.\n\nKubernetes documentation uses\n[Goldmark Markdown Renderer](https://github.com/yuin/goldmark)\nwith some adjustments along with a few\n[Hugo Shortcodes](/docs/contribute/style/hugo-shortcodes/) to support\nglossary entries, tabs, and representing feature state.\n\n## Language\n\nKubernetes documentation has been translated into multiple languages\n(see [Localization READMEs](https://github.com/kubernetes/website/blob/main/README.md#localization-readmemds)).\n\nThe way of localizing the docs for a different language is described in [Localizing Kubernetes Documentation](/docs/contribute/localization/).\n\nThe English-language documentation uses U.S. English spelling and grammar.\n\n[If you're localizing this page, you can omit the point about US English.]\n\n## Documentation formatting standards\n\n### Use upper camel case for API objects\n\nWhen you refer specifically to interacting with an API object, use\n[UpperCamelCase](https://en.wikipedia.org/wiki/Camel_case), also known as\nPascal case. You may see different capitalization, such as \"configMap\",\nin the [API Reference](/docs/reference/kubernetes-api/). When writing\ngeneral documentation, it's better to use upper camel case, calling it \"ConfigMap\" instead.\n\nWhen you are generally discussing an API object, use\n[sentence-style capitalization](https://docs.microsoft.com/en-us/style-guide/text-formatting/using-type/use-sentence-style-capitalization).\n\nThe following examples focus on capitalization. For more information about formatting\nAPI object names, review the related guidance on [Code Style](#code-style-inline-code).\n\nDo | Don't\n:--| :-----\nThe HorizontalPodAutoscaler resource is responsible for ... | The Horizontal pod autoscaler is responsible for ...\nA PodList object is a list of pods. | A Pod List object is a list of pods.\nThe Volume object contains a `hostPath` field. | The volume object contains a hostPath field.\nEvery ConfigMap object is part of a namespace. | Every configMap object is part of a namespace.\nFor managing confidential data, consider using the Secret API. | For managing confidential data, consider using the secret API.\n\n### Use angle brackets for placeholders\n\nUse angle brackets for placeholders. Tell the reader what a placeholder\nrepresents, for example:\n\nDisplay information about a pod:\n\n```shell\nkubectl describe pod -n\n```\n\nIf the namespace of the pod is `default`, you can omit the '-n' parameter.\n\n### Use bold for user interface elements\n\nDo | Don't\n:--| :-----\nClick **Fork**. | Click \"Fork\".\nSelect **Other**. | Select \"Other\".\n\n### Use italics to define or introduce new terms\n\nDo | Don't\n:--| :-----\nA _cluster_ is a set of nodes ... | A \"cluster\" is a set of nodes ...\nThese components form the _control plane_. | These components form the **control plane**.\n\n### Use code style for filenames, directories, and paths\n\nDo | Don't\n:--| :-----\nOpen the `envars.yaml` file. | Open the envars.yaml file.\nGo to the `/docs/tutorials` directory. | Go to the /docs/tutorials directory.\nOpen the `/_data/concepts.yaml` file. | Open the /\\_data/concepts.yaml file.\n\n### Use the international standard for punctuation inside quotes\n\nDo | Don't\n:--| :-----\nevents are recorded with an associated \"stage\". | events are recorded with an associated \"stage.\"\nThe copy is called a \"fork\". | The copy is called a \"fork.\"\n\n### Use start case for enhancement graduation phases\n\nDo | Don't\n:--| :-----\nDynamic Resource Allocation (DRA) is Beta. | Dynamic Resource Allocation (DRA) is beta.\n\n## Inline code formatting\n\n### Use code style for inline code, commands {#code-style-inline-code}\n\nFor inline code in an HTML document, use the ` ` tag. In a Markdown\ndocument, use the backtick (`` ` ``). However, API kinds such as StatefulSet\nor ConfigMap are written verbatim (no backticks); this allows using possessive\napostrophes.\n\nDo | Don't\n:--| :-----\nThe `kubectl run` command creates a Pod. | The \"kubectl run\" command creates a Pod.\nThe kubelet on each node acquires a Lease… | The kubelet on each node acquires a `Lease`…\nA PersistentVolume represents durable storage… | A `PersistentVolume` represents durable storage…\nThe CustomResourceDefinition's `.spec.group` field… | The `CustomResourceDefinition.spec.group` field…\nFor declarative management, use `kubectl apply`. | For declarative management, use \"kubectl apply\".\nEnclose code samples with triple backticks. (\\`\\`\\`)| Enclose code samples with any other syntax.\nUse single backticks to enclose inline code. For example, `var example = true`. | Use two asterisks (`**`) or an underscore (`_`) to enclose inline code. For example, **var example = true**.\nUse triple backticks before and after a multi-line block of code for fenced code blocks. | Use multi-line blocks of code to create diagrams, flowcharts, or other illustrations.\nUse meaningful variable names that have a context. | Use variable names such as 'foo','bar', and 'baz' that are not meaningful and lack context.\nRemove trailing spaces in the code. | Add trailing spaces in the code, where these are important, because the screen reader will read out the spaces as well.\n\nThe website supports syntax highlighting for code samples, but specifying a language\nis optional. Syntax highlighting in the code block should conform to the\n[contrast guidelines.](https://www.w3.org/WAI/WCAG21/quickref/?versions=2.0&showtechniques=141%2C143#contrast-minimum)\n\n### Use code style for object field names and namespaces\n\nDo | Don't\n:--| :-----\nSet the value of the `replicas` field in the configuration file. | Set the value of the \"replicas\" field in the configuration file.\nThe value of the `exec` field is an ExecAction object. | The value of the \"exec\" field is an ExecAction object.\nRun the process as a DaemonSet in the `kube-system` namespace. | Run the process as a DaemonSet in the kube-system namespace.\n\n### Use code style for Kubernetes command tool and component names\n\nDo | Don't\n:--| :-----\nThe `kubelet` preserves node stability. | The kubelet preserves node stability.\nThe `kubectl` handles locating and authenticating to the API server. | The kubectl handles locating and authenticating to the apiserver.\nRun the process with the certificate, `kube-apiserver --client-ca-file=FILENAME`. | Run the process with the certificate, kube-apiserver --client-ca-file=FILENAME. |\n\n### Starting a sentence with a component tool or component name\n\nDo | Don't\n:--| :-----\nThe `kubeadm` tool bootstraps and provisions machines in a cluster. | `kubeadm` tool bootstraps and provisions machines in a cluster.\nThe kube-scheduler is the default scheduler for Kubernetes. | kube-scheduler is the default scheduler for Kubernetes.\n\n### Use a general descriptor over a component name\n\nDo | Don't\n:--| :-----\nThe Kubernetes API server offers an OpenAPI spec. | The apiserver offers an OpenAPI spec.\nAggregated APIs are subordinate API servers. | Aggregated APIs are subordinate APIServers.\n\n### Use normal style for string and integer field values\n\nFor field values of type string or integer, use normal style without quotation marks.\n\nDo | Don't\n:--| :-----\nSet the value of `imagePullPolicy` to Always. | Set the value of `imagePullPolicy` to \"Always\".\nSet the value of `image` to nginx:1.16. | Set the value of `image` to `nginx:1.16`.\nSet the value of the `replicas` field to 2. | Set the value of the `replicas` field to `2`.\n\nHowever, consider quoting values where there is a risk that readers might confuse the value\nwith an API kind.\n\n## Referring to Kubernetes API resources\n\nThis section talks about how we reference API resources in the documentation.\n\n### Clarification about \"resource\"\n\nKubernetes uses the word _resource_ to refer to API resources. For example,\nthe URL path `/apis/apps/v1/namespaces/default/deployments/my-app` represents a\nDeployment named \"my-app\" in the \"default\"\nnamespace. In HTTP jargon,\nnamespace is a resource -\nthe same way that all web URLs identify a resource.\n\nKubernetes documentation also uses \"resource\" to talk about CPU and memory\nrequests and limits. It's very often a good idea to refer to API resources\nas \"API resources\"; that helps to avoid confusion with CPU and memory resources,\nor with other kinds of resource.\n\nIf you are using the lowercase plural form of a resource name, such as\n`deployments` or `configmaps`, provide extra written context to help readers\nunderstand what you mean. If you are using the term in a context where the\nUpperCamelCase name could work too, and there is a risk of ambiguity,\nconsider using the API kind in UpperCamelCase.\n\n### When to use Kubernetes API terminologies\n\nThe different Kubernetes API terminologies are:\n\n- _API kinds_: the name used in the API URL (such as `pods`, `namespaces`).\nAPI kinds are sometimes also called _resource types_.\n- _API resource_: a single instance of an API kind (such as `pod`, `secret`).\n- _Object_: a resource that serves as a \"record of intent\". An object is a desired\nstate for a specific part of your cluster, which the Kubernetes control plane tries to maintain.\nAll objects in the Kubernetes API are also resources.\n\nFor clarity, you can add \"resource\" or \"object\" when referring to an API resource in Kubernetes\ndocumentation.\nAn example: write \"a Secret object\" instead of \"a Secret\".\nIf it is clear just from the capitalization, you don't need to add the extra word.\n\nConsider rephrasing when that change helps avoid misunderstandings. A common situation is\nwhen you want to start a sentence with an API kind, such as “Secret”; because English\nand other languages capitalize at the start of sentences, readers cannot tell whether you\nmean the API kind or the general concept. Rewording can help.\n\n### API resource names\n\nAlways format API resource names using [UpperCamelCase](https://en.wikipedia.org/wiki/Camel_case),\nalso known as PascalCase. Do not write API kinds with code formatting.\n\nDon't split an API object name into separate words. For example, use PodTemplateList, not Pod Template List.\n\nFor more information about PascalCase and code formatting, review the related guidance on\n[Use upper camel case for API objects](/docs/contribute/style/style-guide/#use-upper-camel-case-for-api-objects)\nand [Use code style for inline code, commands, and API objects](/docs/contribute/style/style-guide/#code-style-inline-code).\n\nFor more information about Kubernetes API terminologies, review the related\nguidance on [Kubernetes API terminology](/docs/reference/using-api/api-concepts/#standard-api-terminology).\n\n## Code snippet formatting\n\n### Don't include the command prompt\n\nDo | Don't\n:--| :-----\n`kubectl get pods` | `$ kubectl get pods`\n\n### Separate commands from output\n\nVerify that the pod is running on your chosen node:\n\n```shell\nkubectl get pods --output=wide\n```\n\nThe output is similar to this:\n\n```console\nNAME READY STATUS RESTARTS AGE IP NODE\nnginx 1/1 Running 0 13s 10.200.0.4 worker0\n```\n\n### Versioning Kubernetes examples\n\nCode examples and configuration examples that include version information should\nbe consistent with the accompanying text.\n\nIf the information is version specific, the Kubernetes version needs to be defined\nin the `prerequisites` section of the [Task template](/docs/contribute/style/page-content-types/#task)\nor the [Tutorial template](/docs/contribute/style/page-content-types/#tutorial).\nOnce the page is saved, the `prerequisites` section is shown as **Before you begin**.\n\nTo specify the Kubernetes version for a task or tutorial page, include\n`min-kubernetes-server-version` in the front matter of the page.\n\nIf the example YAML is in a standalone file, find and review the topics that include it as a reference.\nVerify that any topics using the standalone YAML have the appropriate version information defined.\nIf a stand-alone YAML file is not referenced from any topics, consider deleting it instead of updating it.\n\nFor example, if you are writing a tutorial that is relevant to Kubernetes version 1.8,\nthe front-matter of your markdown file should look something like:\n\n```yaml\n---\ntitle:\nmin-kubernetes-server-version: v1.8\n---\n```\n\nIn code and configuration examples, do not include comments about alternative versions.\nBe careful to not include incorrect statements in your examples as comments, such as:\n\n```yaml\napiVersion: v1 # earlier versions use...\nkind: Pod\n...\n```\n\n## Formulae and equations\n\nYou can use the Docsy support for [diagrams and formulae](https://www.docsy.dev/docs/adding-content/diagrams-and-formulae/#latex-support-with-katex).\n\nFor example: `\\\\(\\frac{7}{9} \\sqrt{K^8 s}\\\\)`, which renders as \\\\(\\frac{7}{9} \\sqrt{K^8 s}\\\\).\n\nPrefer inline formulae where reasonable, but you can use a `math` block if that's likely to help readers.\n\nRead the Docsy guide to find out what you need to change in your page to activate support;\nif you have problems, add `math: true` to the page [front matter](https://gohugo.io/content-management/front-matter/)\n(you can do this even if you think the automatic activation should be enough).\n\n## Kubernetes.io word list\n\nA list of Kubernetes-specific terms and words to be used consistently across the site.\n\nTerm | Usage\n:--- | :----\nKubernetes | Kubernetes should always be capitalized.\nDocker | Docker should always be capitalized.\nSIG Docs | SIG Docs rather than SIG-DOCS or other variations.\nOn-premises | On-premises or On-prem rather than On-premise or other variations.\ncloud native | Cloud native or cloud native as appropriate for sentence structure rather than cloud-native or Cloud Native.\nopen source | Open source or open source as appropriate for sentence structure rather than open-source or Open Source.\n\n## Shortcodes\n\nHugo [Shortcodes](https://gohugo.io/content-management/shortcodes) help create\ndifferent rhetorical appeal levels. Our documentation supports three variants of\nthe Docsy [`alert`](https://www.docsy.dev/docs/adding-content/shortcodes/#alert)\nshortcode in this category: **Note**, **Caution**, and **Warning**.\n\n1. Surround the text with an opening and closing `alert` shortcode, choosing the\n`color` and `title` attributes for the variant you need.\n\n2. Use the following syntax to apply a style:\n\n```none\n{{ }}\nThe shortcode renders the title as a heading, so do not repeat it inside the body.\n{{ }}\n```\n\nThe output is:\n\nThe shortcode renders the title as a heading, so do not repeat it inside the body.\n\nMany existing pages still use the legacy `{{ }}`, `{{ }}`,\nand `{{ }}` shortcodes. These still work — prefer the `alert`\nshortcode for new content and when editing existing pages.\n\n### Note\n\nUse `{{ }}` to highlight a tip or a piece of information that may be helpful to know.\n\nFor example:\n\n```\n{{ }}\nYou can _still_ use Markdown inside these callouts.\n{{ }}\n```\n\nThe output is:\n\nYou can _still_ use Markdown inside these callouts.\n\nYou can use an `alert` shortcode in a list:\n\n```\n1. Use the alert shortcode in a list\n\n1. A second item with an embedded note\n\n{{ }}\nWarning, Caution, and Note shortcodes, embedded in lists, need to be indented four spaces. See [Common Shortcode Issues](#common-shortcode-issues).\n{{ }}\n\n1. A third item in a list\n\n1. A fourth item in a list\n```\n\nThe output is:\n\n1. Use the alert shortcode in a list\n\n1. A second item with an embedded note\n\nWarning, Caution, and Note shortcodes, embedded in lists, need to be indented four spaces. See [Common Shortcode Issues](#common-shortcode-issues).\n\n1. A third item in a list\n\n1. A fourth item in a list\n\n### Caution\n\nUse `{{ }}` to call attention to an important piece of information to avoid pitfalls.\n\nFor example:\n\n```\n{{ }}\nThe callout style only applies to the line directly above the tag.\n{{ }}\n```\n\nThe output is:\n\nThe callout style only applies to the line directly above the tag.\n\n### Warning\n\nUse `{{ }}` to indicate danger or a piece of information that is crucial to follow.\n\nFor example:\n\n```\n{{ }}\nBeware.\n{{ }}\n```\n\nThe output is:\n\nBeware.\n\n## Common Shortcode Issues\n\n### Ordered Lists\n\nShortcodes will interrupt numbered lists unless you indent four spaces before the notice and the tag.\n\nFor example:\n\n1. Preheat oven to 350˚F\n\n1. Prepare the batter, and pour into springform pan.\n{{ }}Grease the pan for best results.{{ }}\n\n1. Bake for 20-25 minutes or until set.\n\nThe output is:\n\n1. Preheat oven to 350˚F\n\n1. Prepare the batter, and pour into springform pan.\n\nGrease the pan for best results.\n\n1. Bake for 20-25 minutes or until set.\n\n### Include Statements\n\nShortcodes inside include statements will break the build. You must insert them\nin the parent document, before and after you call the include. For example:\n\n```\n{{ }}\n{{ }}\n{{ }}\n```\n\n## Markdown elements\n\n### Line breaks\n\nUse a single newline to separate block-level content like headings, lists, images,\ncode blocks, and others. The exception is second-level headings, where it should\nbe two newlines. Second-level headings follow the first-level (or the title) without\nany preceding paragraphs or texts. A two line spacing helps visualize the overall\nstructure of content in a code editor better.\n\nManually wrap paragraphs in the Markdown source when appropriate. Since the git\ntool and the GitHub website generate file diffs on a line-by-line basis,\nmanually wrapping long lines helps the reviewers to easily find out the changes\nmade in a PR and provide feedback. It also helps the downstream localization\nteams where people track the upstream changes on a per-line basis. Line\nwrapping can happen at the end of a sentence or a punctuation character, for\nexample. One exception to this is that a Markdown link or a shortcode is\nexpected to be in a single line.\n\n### Headings and titles {#headings}\n\nPeople accessing this documentation may use a screen reader or other assistive technology (AT).\n[Screen readers](https://en.wikipedia.org/wiki/Screen_reader) are linear output devices,\nthey output items on a page one at a time. If there is a lot of content on a page, you can\nuse headings to give the page an internal structure. A good page structure helps all readers\nto easily navigate the page or filter topics of interest.\n\nDo | Don't\n:--| :-----\nUpdate the title in the front matter of the page or blog post. | Use first level heading, as Hugo automatically converts the title in the front matter of the page into a first-level heading.\nUse ordered headings to provide a meaningful high-level outline of your content. | Use headings level 4 through 6, unless it is absolutely necessary. If your content is that detailed, it may need to be broken into separate articles.\nUse pound or hash signs (`#`) for non-blog post content. | Use underlines (`---` or `===`) to designate first-level headings.\nUse sentence case for headings in the page body. For example, **Extend kubectl with plugins** | Use title case for headings in the page body. For example, **Extend Kubectl With Plugins**\nUse title case for the page title in the front matter. For example, `title: Kubernetes API Server Bypass Risks` | Use sentence case for page titles in the front matter. For example, don't use `title: Kubernetes API server bypass risks`\nPlace relevant links in the body copy. | Include hyperlinks (` `) in headings.\nUse pound or hash signs (`#`) to indicate headings. | Use **bold** text or other indicators to split paragraphs.\n\n### Paragraphs\n\nDo | Don't\n:--| :-----\nTry to keep paragraphs under 6 sentences. | Indent the first paragraph with space characters. For example, ⋅⋅⋅Three spaces before a paragraph will indent it.\nUse three hyphens (`---`) to create a horizontal rule. Use horizontal rules for breaks in paragraph content. For example, a change of scene in a story, or a shift of topic within a section. | Use horizontal rules for decoration.\n\n### Links\n\nDo | Don't\n:--| :-----\nWrite hyperlinks that give you context for the content they link to. For example: Certain ports are open on your machines. See Check required ports for more details. | Use ambiguous terms such as \"click here\". For example: Certain ports are open on your machines. See here for more details.\nWrite Markdown-style links: `[link text](URL)`. For example: `[Hugo shortcodes](/docs/contribute/style/hugo-shortcodes/#table-captions)` and the output is [Hugo shortcodes](/docs/contribute/style/hugo-shortcodes/#table-captions). | Write HTML-style links: ` Visit our tutorial! `, or create links that open in new tabs or windows. For example: `[example website](https://example.com){target=\"_blank\"}`\n\n### Lists\n\nGroup items in a list that are related to each other and need to appear in a specific\norder or to indicate a correlation between multiple items. When a screen reader comes\nacross a list—whether it is an ordered or unordered list—it will be announced to the\nuser that there is a group of list items. The user can then use the arrow keys to move\nup and down between the various items in the list. Website navigation links can also be\nmarked up as list items; after all they are nothing but a group of related links.\n\n- End each item in a list with a period if one or more items in the list are complete\nsentences. For the sake of consistency, normally either all items or none should be complete sentences.\n\nOrdered lists that are part of an incomplete introductory sentence can be in lowercase\nand punctuated as if each item was a part of the introductory sentence.\n\n- Use the number one (`1.`) for ordered lists.\n\n- Use (`+`), (`*`), or (`-`) for unordered lists.\n\n- Leave a blank line after each list.\n\n- Indent nested lists with four spaces (for example, ⋅⋅⋅⋅).\n\n- List items may consist of multiple paragraphs. Each subsequent paragraph in a list\nitem must be indented by either four spaces or one tab.\n\n### Tables\n\nThe semantic purpose of a data table is to present tabular data. Sighted users can\nquickly scan the table but a screen reader goes through line by line. A table caption\nis used to create a descriptive title for a data table. Assistive technologies (AT)\nuse the HTML table caption element to identify the table contents to the user within the page structure.\n\n- Add table captions using [Hugo shortcodes](/docs/contribute/style/hugo-shortcodes/#table-captions) for tables.\n\n## Content best practices\n\nThis section contains suggested best practices for clear, concise, and consistent content.\n\n### Use present tense\n\nDo | Don't\n:--| :-----\nThis command starts a proxy. | This command will start a proxy.\n\nException: Use future or past tense if it is required to convey the correct\nmeaning.\n\n### Use active voice\n\nDo | Don't\n:--| :-----\nYou can explore the API using a browser. | The API can be explored using a browser.\nThe YAML file specifies the replica count. | The replica count is specified in the YAML file.\n\nException: Use passive voice if active voice leads to an awkward construction.\n\n### Use simple and direct language\n\nUse simple and direct language. Avoid using unnecessary phrases, such as saying \"please.\"\n\nDo | Don't\n:--| :-----\nTo create a ReplicaSet, ... | In order to create a ReplicaSet, ...\nSee the configuration file. | Please see the configuration file.\nView the pods. | With this next command, we'll view the pods.\n\n### Address the reader as \"you\"\n\nDo | Don't\n:--| :-----\nYou can create a Deployment by ... | We'll create a Deployment by ...\nIn the preceding output, you can see... | In the preceding output, we can see ...\n\n### Avoid Latin phrases\n\nPrefer English terms over Latin abbreviations.\n\nDo | Don't\n:--| :-----\nFor example, ... | e.g., ...\nThat is, ...| i.e., ...\n\nException: Use \"etc.\" for et cetera.\n\n## Patterns to avoid\n\n### Avoid using \"we\"\n\nUsing \"we\" in a sentence can be confusing, because the reader might not know\nwhether they're part of the \"we\" you're describing.\n\nDo | Don't\n:--| :-----\nVersion 1.4 includes ... | In version 1.4, we have added ...\nKubernetes provides a new feature for ... | We provide a new feature ...\nThis page teaches you how to use pods. | In this page, we are going to learn about pods.\n\n### Avoid jargon and idioms\n\nSome readers speak English as a second language. Avoid jargon and idioms to help them understand better.\n\nDo | Don't\n:--| :-----\nInternally, ... | Under the hood, ...\nCreate a new cluster. | Turn up a new cluster.\n\n### Avoid statements about the future\n\nAvoid making promises or giving hints about the future. If you need to talk about\nan alpha feature, put the text under a heading that identifies it as alpha\ninformation.\n\nAn exception to this rule is documentation about announced deprecations\ntargeting removal in future versions. One example of documentation like this\nis the [Deprecated API migration guide](/docs/reference/using-api/deprecation-guide/).\n\n### Avoid statements that will soon be out of date\n\nAvoid words like \"currently\" and \"new.\" A feature that is new today might not be\nconsidered new in a few months.\n\nDo | Don't\n:--| :-----\nIn version 1.4, ... | In the current version, ...\nThe Federation feature provides ... | The new Federation feature provides ...\n\n### Avoid words that assume a specific level of understanding\n\nAvoid words such as \"just\", \"simply\", \"easy\", \"easily\", or \"simple\". These words do not add value.\n\nDo | Don't\n:--| :-----\nInclude one command in ... | Include just one command in ...\nRun the container ... | Simply run the container ...\nYou can remove ... | You can easily remove ...\nThese steps ... | These simple steps ...\n\n### EditorConfig file\nThe Kubernetes project maintains an EditorConfig file that sets common style preferences in text editors\nsuch as VS Code. You can use this file if you want to ensure that your contributions are consistent with\nthe rest of the project. To view the file, refer to\n[`.editorconfig`](https://github.com/kubernetes/website/blob/main/.editorconfig) in the repository root.\n\n##\n\n* Learn about [writing a new topic](/docs/contribute/style/write-new-topic/).\n* Learn about [using page templates](/docs/contribute/style/page-content-types/).\n* Learn about [custom hugo shortcodes](/docs/contribute/style/hugo-shortcodes/).\n* Learn about [creating a pull request](/docs/contribute/new-content/open-a-pr/).", "source": "content/en/docs/contribute/style/style-guide.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page provides an overview of _admission controllers_.\n\nAn admission controller is a piece of code that intercepts requests to the\nKubernetes API server prior to persistence of the resource, but after the request\nis authenticated and authorized.\n\nSeveral important features of Kubernetes require an admission controller to be enabled in order\nto properly support the feature. As a result, a Kubernetes API server that is not properly\nconfigured with the right set of admission controllers is an incomplete server that will not\nsupport all the features you expect.\n\n## What are they?\n\nAdmission controllers are code within the Kubernetes\nAPI server that check the\ndata arriving in a request to modify a resource.\n\nAdmission controllers apply to requests that create, delete, or modify objects.\nAdmission controllers can also block custom verbs, such as a request to connect to a\npod via an API server proxy. Admission controllers do _not_ (and cannot) block requests\nto read (**get**, **watch** or **list**) objects, because reads bypass the admission\ncontrol layer.\n\nAdmission control mechanisms may be _validating_, _mutating_, or both. Mutating\ncontrollers may modify the data for the resource being modified; validating controllers may not.\n\nThe admission controllers in Kubernetes consist of the\n[list](#what-does-each-admission-controller-do) below, are compiled into the\n`kube-apiserver` binary, and may only be configured by the cluster\nadministrator.\n\n### Admission control extension points\n\nWithin the full [list](#what-does-each-admission-controller-do), there are four\nspecial controllers:\n[MutatingAdmissionWebhook](#mutatingadmissionwebhook),\n[MutatingAdmissionPolicy](#mutatingadmissionpolicy),\n[ValidatingAdmissionWebhook](#validatingadmissionwebhook), and\n[ValidatingAdmissionPolicy](#validatingadmissionpolicy).\nThe two webhook controllers execute the mutating and validating (respectively)\n[admission control webhooks](/docs/reference/access-authn-authz/extensible-admission-controllers/#admission-webhooks)\nwhich are configured in the API. MutatingAdmissionPolicy and ValidatingAdmissionPolicy provides a way to embed\ndeclarative mutation/validation code within the API, without relying on any external HTTP\ncallouts.\n\nYou can use these four admission controllers to customize cluster behavior at\nadmission time.\n\n### Admission control phases\n\nThe admission control process proceeds in two phases. In the first phase,\nmutating admission controllers are run. In the second phase, validating\nadmission controllers are run. Note again that some of the controllers are\nboth.\n\nIf any of the controllers in either phase reject the request, the entire\nrequest is rejected immediately and an error is returned to the end-user.\n\nFinally, in addition to sometimes mutating the object in question, admission\ncontrollers may sometimes have side effects, that is, mutate related\nresources as part of request processing. Incrementing quota usage is the\ncanonical example of why this is necessary. Any such side-effect needs a\ncorresponding reclamation or reconciliation process, as a given admission\ncontroller does not know for sure that a given request will pass all of the\nother admission controllers.\n\nThe ordering of these calls can be seen below.\n\n## Why do I need them?\n\nSeveral important features of Kubernetes require an admission controller to be enabled in order\nto properly support the feature. As a result, a Kubernetes API server that is not properly\nconfigured with the right set of admission controllers is an incomplete server and will not\nsupport all the features you expect.\n\n## How do I turn on an admission controller?\n\nThe Kubernetes API server flag `enable-admission-plugins` takes a comma-delimited list of admission control plugins to invoke prior to modifying objects in the cluster.\nFor example, the following command line enables the `NamespaceLifecycle` and the `LimitRanger`\nadmission control plugins:\n\n```shell\nkube-apiserver --enable-admission-plugins=NamespaceLifecycle,LimitRanger ...\n```\n\nDepending on the way your Kubernetes cluster is deployed and how the API server is\nstarted, you may need to apply the settings in different ways. For example, you may\nhave to modify the systemd unit file if the API server is deployed as a systemd\nservice, you may modify the manifest file for the API server if Kubernetes is deployed\nin a self-hosted way.\n\n## How do I turn off an admission controller?\n\nThe Kubernetes API server flag `disable-admission-plugins` takes a comma-delimited list of admission control plugins to be disabled, even if they are in the list of plugins enabled by default.\n\n```shell\nkube-apiserver --disable-admission-plugins=PodNodeSelector,AlwaysDeny ...\n```\n\n## Which plugins are enabled by default?\n\nTo see which admission plugins are enabled:\n\n```shell\nkube-apiserver -h | grep enable-admission-plugins\n```\n\nIn Kubernetes , the default ones are:\n\n```shell\nCertificateApproval, CertificateSigning, CertificateSubjectRestriction, DefaultIngressClass, DefaultStorageClass, DefaultTolerationSeconds, LimitRanger, MutatingAdmissionPolicy, MutatingAdmissionWebhook, NamespaceLifecycle, PersistentVolumeClaimResize, PodSecurity, Priority, ResourceQuota, RuntimeClass, ServiceAccount, StorageObjectInUseProtection, TaintNodesByCondition, ValidatingAdmissionPolicy, ValidatingAdmissionWebhook\n```\n\n## What does each admission controller do?\n\n### AlwaysAdmit {#alwaysadmit}\n\n**Type**: Validating.\n\nThis admission controller allows all pods into the cluster. It is **deprecated** because\nits behavior is the same as if there were no admission controller at all.\n\n### AlwaysDeny {#alwaysdeny}\n\n**Type**: Validating.\n\nRejects all requests. AlwaysDeny is **deprecated** as it has no real meaning.\n\n### AlwaysPullImages {#alwayspullimages}\n\n**Type**: Mutating and Validating.\n\nThis admission controller modifies every new Pod to force the image pull policy to `Always`. This is useful in a\nmultitenant cluster so that users can be assured that their private images can only be used by those\nwho have the credentials to pull them. Without this admission controller, once an image has been pulled to a\nnode, any pod from any user can use it by knowing the image's name (assuming the Pod is\nscheduled onto the right node), without any authorization check against the image. When this admission controller\nis enabled, images are always pulled prior to starting containers, which means valid credentials are\nrequired.\n\n### CertificateApproval {#certificateapproval}\n\n**Type**: Validating.\n\nThis admission controller observes requests to approve CertificateSigningRequest resources and performs additional\nauthorization checks to ensure the approving user has permission to **approve** certificate requests with the\n`spec.signerName` requested on the CertificateSigningRequest resource.\n\nSee [Certificate Signing Requests](/docs/reference/access-authn-authz/certificate-signing-requests/) for more\ninformation on the permissions required to perform different actions on CertificateSigningRequest resources.\n\n### CertificateSigning {#certificatesigning}\n\n**Type**: Validating.\n\nThis admission controller observes updates to the `status.certificate` field of CertificateSigningRequest resources\nand performs an additional authorization checks to ensure the signing user has permission to **sign** certificate\nrequests with the `spec.signerName` requested on the CertificateSigningRequest resource.\n\nSee [Certificate Signing Requests](/docs/reference/access-authn-authz/certificate-signing-requests/) for more\ninformation on the permissions required to perform different actions on CertificateSigningRequest resources.\n\n### CertificateSubjectRestriction {#certificatesubjectrestriction}\n\n**Type**: Validating.\n\nThis admission controller observes creation of CertificateSigningRequest resources that have a `spec.signerName`\nof `kubernetes.io/kube-apiserver-client`. It rejects any request that specifies a 'group' (or 'organization attribute')\nof `system:masters`.\n\n### DefaultIngressClass {#defaultingressclass}\n\n**Type**: Mutating.\n\nThis admission controller observes creation of `Ingress` objects that do not request any specific\ningress class and automatically adds a default ingress class to them. This way, users that do not\nrequest any special ingress class do not need to care about them at all and they will get the\ndefault one.\n\nThis admission controller does not do anything when no default ingress class is configured. When more than one ingress\nclass is marked as default, it rejects any creation of `Ingress` with an error and an administrator\nmust revisit their `IngressClass` objects and mark only one as default (with the annotation\n\"ingressclass.kubernetes.io/is-default-class\"). This admission controller ignores any `Ingress`\nupdates; it acts only on creation.\n\nSee the [Ingress](/docs/concepts/services-networking/ingress/) documentation for more about ingress\nclasses and how to mark one as default.\n\n### DefaultStorageClass {#defaultstorageclass}\n\n**Type**: Mutating.\n\nThis admission controller observes creation of `PersistentVolumeClaim` objects that do not request any specific storage class\nand automatically adds a default storage class to them.\nThis way, users that do not request any special storage class do not need to care about them at all and they\nwill get the default one.\n\nThis admission controller does nothing when no default `StorageClass` exists. When more than one storage\nclass is marked as default, and you then create a `PersistentVolumeClaim` with no `storageClassName` set,\nKubernetes uses the most recently created default `StorageClass`.\nWhen a `PersistentVolumeClaim` is created with a specified `volumeName`, it remains in a pending state\nif the static volume's `storageClassName` does not match the `storageClassName` on the `PersistentVolumeClaim`\nafter any default StorageClass is applied to it.\nThis admission controller ignores any `PersistentVolumeClaim` updates; it acts only on creation.\n\nSee [persistent volume](/docs/concepts/storage/persistent-volumes/) documentation about persistent volume claims and\nstorage classes and how to mark a storage class as default.\n\n### DefaultTolerationSeconds {#defaulttolerationseconds}\n\n**Type**: Mutating.\n\nThis admission controller sets the default forgiveness toleration for pods to tolerate\nthe taints `notready:NoExecute` and `unreachable:NoExecute` based on the k8s-apiserver input parameters\n`default-not-ready-toleration-seconds` and `default-unreachable-toleration-seconds` if the pods don't already\nhave toleration for taints `node.kubernetes.io/not-ready:NoExecute` or\n`node.kubernetes.io/unreachable:NoExecute`.\nThe default value for `default-not-ready-toleration-seconds` and `default-unreachable-toleration-seconds` is 5 minutes.\n\n### DenyServiceExternalIPs\n\n**Type**: Validating.\n\nThis admission controller rejects all net-new usage of the `Service` field `externalIPs`. This\nfeature is very powerful (allows network traffic interception) and not well\ncontrolled by policy. When enabled, users of the cluster may not create new\nServices which use `externalIPs` and may not add new values to `externalIPs` on\nexisting `Service` objects. Existing uses of `externalIPs` are not affected,\nand users may remove values from `externalIPs` on existing `Service` objects.\n\nMost users do not need this feature at all, and cluster admins should consider disabling it.\nClusters that do need to use this feature should consider using some custom policy to manage usage\nof it.\n\nThis admission controller is disabled by default.\n\n### EventRateLimit {#eventratelimit}\n\n**Type**: Validating.\n\nThis admission controller mitigates the problem where the API server gets flooded by\nrequests to store new Events. The cluster admin can specify event rate limits by:\n\n* Enabling the `EventRateLimit` admission controller;\n* Referencing an `EventRateLimit` configuration file from the file provided to the API\nserver's command line flag `--admission-control-config-file`:\n\n```yaml\napiVersion: apiserver.config.k8s.io/v1\nkind: AdmissionConfiguration\nplugins:\n- name: EventRateLimit\npath: eventconfig.yaml\n...\n```\n\nThere are four types of limits that can be specified in the configuration:\n\n* `Server`: All Event requests (creation or modifications) received by the API server share a single bucket.\n* `Namespace`: Each namespace has a dedicated bucket.\n* `User`: Each user is allocated a bucket.\n* `SourceAndObject`: A bucket is assigned by each combination of source and\ninvolved object of the event.\n\nBelow is a sample `eventconfig.yaml` for such a configuration:\n\n```yaml\napiVersion: eventratelimit.admission.k8s.io/v1alpha1\nkind: Configuration\nlimits:\n- type: Namespace\nqps: 50\nburst: 100\ncacheSize: 2000\n- type: User\nqps: 10\nburst: 50\n```\n\nSee the [EventRateLimit Config API (v1alpha1)](/docs/reference/config-api/apiserver-eventratelimit.v1alpha1/)\nfor more details.\n\nThis admission controller is disabled by default.\n\n### ExtendedResourceToleration {#extendedresourcetoleration}\n\n**Type**: Mutating.\n\nThis plug-in facilitates creation of dedicated nodes with extended resources.\nIf operators want to create dedicated nodes with extended resources (like GPUs, FPGAs etc.), they are expected to\n[taint the node](/docs/concepts/scheduling-eviction/taint-and-toleration/#example-use-cases) with the extended resource\nname as the key. This admission controller, if enabled, automatically\nadds tolerations for such taints to pods requesting extended resources, so users don't have to manually\nadd these tolerations.\n\nThis admission controller is disabled by default.\n\n### ImagePolicyWebhook {#imagepolicywebhook}\n\n**Type**: Validating.\n\nThe ImagePolicyWebhook admission controller allows a backend webhook to make admission decisions.\n\nThis admission controller is disabled by default.\n\n#### Configuration file format {#imagereview-config-file-format}\n\nImagePolicyWebhook uses a configuration file to set options for the behavior of the backend.\nThis file may be json or yaml and has the following format:\n\n```yaml\nimagePolicy:\nkubeConfigFile: /path/to/kubeconfig/for/backend\n# time in s to cache approval\nallowTTL: 50\n# time in s to cache denial\ndenyTTL: 50\n# time in ms to wait between retries\nretryBackoff: 500\n# determines behavior if the webhook backend fails\ndefaultAllow: true\n```\n\nReference the ImagePolicyWebhook configuration file from the file provided to the API server's command line flag `--admission-control-config-file`:\n\n```yaml\napiVersion: apiserver.config.k8s.io/v1\nkind: AdmissionConfiguration\nplugins:\n- name: ImagePolicyWebhook\npath: imagepolicyconfig.yaml\n...\n```\n\nAlternatively, you can embed the configuration directly in the file:\n\n```yaml\napiVersion: apiserver.config.k8s.io/v1\nkind: AdmissionConfiguration\nplugins:\n- name: ImagePolicyWebhook\nconfiguration:\nimagePolicy:\nkubeConfigFile:\nallowTTL: 50\ndenyTTL: 50\nretryBackoff: 500\ndefaultAllow: true\n```\n\nThe ImagePolicyWebhook config file must reference a\n[kubeconfig](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)\nformatted file which sets up the connection to the backend.\nIt is required that the backend communicate over TLS.\n\nThe kubeconfig file's `cluster` field must point to the remote service, and the `user` field\nmust contain the returned authorizer.\n\n```yaml\n# clusters refers to the remote service.\nclusters:\n- name: name-of-remote-imagepolicy-service\ncluster:\ncertificate-authority: /path/to/ca.pem # CA for verifying the remote service.\nserver: https://images.example.com/policy # URL of remote service to query. Must use 'https'.\n\n# users refers to the API server's webhook configuration.\nusers:\n- name: name-of-api-server\nuser:\nclient-certificate: /path/to/cert.pem # cert for the webhook admission controller to use\nclient-key: /path/to/key.pem # key matching the cert\n```\n\nFor additional HTTP configuration, refer to the\n[kubeconfig](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) documentation.\n\n#### Request payloads\n\nWhen faced with an admission decision, the API Server POSTs a JSON serialized\n`imagepolicy.k8s.io/v1alpha1` `ImageReview` object describing the action.\nThis object contains fields describing the containers being admitted, as well as\nany pod annotations that match `*.image-policy.k8s.io/*`.\n\nThe webhook API objects are subject to the same versioning compatibility rules\nas other Kubernetes API objects. Implementers should be aware of looser compatibility\npromises for alpha objects and check the `apiVersion` field of the request to\nensure correct deserialization.\nAdditionally, the API Server must enable the `imagepolicy.k8s.io/v1alpha1` API extensions\ngroup (`--runtime-config=imagepolicy.k8s.io/v1alpha1=true`).\n\nAn example request body:\n\n```json\n{\n\"apiVersion\": \"imagepolicy.k8s.io/v1alpha1\",\n\"kind\": \"ImageReview\",\n\"spec\": {\n\"containers\": [\n{\n\"image\": \"myrepo/myimage:v1\"\n},\n{\n\"image\": \"myrepo/myimage@sha256:beb6bd6a68f114c1dc2ea4b28db81bdf91de202a9014972bec5e4d9171d90ed\"\n}\n],\n\"annotations\": {\n\"mycluster.image-policy.k8s.io/ticket-1234\": \"break-glass\"\n},\n\"namespace\": \"mynamespace\"\n}\n}\n```\n\nThe remote service is expected to fill the `status` field of the request and\nrespond to either allow or disallow access. The response body's `spec` field is ignored, and\nmay be omitted. A permissive response would return:\n\n```json\n{\n\"apiVersion\": \"imagepolicy.k8s.io/v1alpha1\",\n\"kind\": \"ImageReview\",\n\"status\": {\n\"allowed\": true\n}\n}\n```\n\nTo disallow access, the service would return:\n\n```json\n{\n\"apiVersion\": \"imagepolicy.k8s.io/v1alpha1\",\n\"kind\": \"ImageReview\",\n\"status\": {\n\"allowed\": false,\n\"reason\": \"image currently blacklisted\"\n}\n}\n```\n\n`ImageReview` objects will include all images in Pods intended to be executed as\ncontainers. This covers images specified as part of the containers,\ninitContainers, or ephemeralContainers fields in a Pod specification. As a\nresult, images included under image volumes are not in scope for the\nImagePolicyWebhook.\n\nFor further documentation refer to the\n[`imagepolicy.v1alpha1` API](/docs/reference/config-api/imagepolicy.v1alpha1/).\n\n#### Extending with Annotations\n\nAll annotations on a Pod that match `*.image-policy.k8s.io/*` are sent to the webhook.\nSending annotations allows users who are aware of the image policy backend to\nsend extra information to it, and for different backends implementations to\naccept different information.\n\nExamples of information you might put here are:\n\n* request to \"break glass\" to override a policy, in case of emergency.\n* a ticket number from a ticket system that documents the break-glass request\n* provide a hint to the policy server as to the imageID of the image being provided, to save it a lookup\n\nIn any case, the annotations are provided by the user and are not validated by Kubernetes in any way.\n\n### LimitPodHardAntiAffinityTopology {#limitpodhardantiaffinitytopology}\n\n**Type**: Validating.\n\nThis admission controller denies any pod that defines an `AntiAffinity` topology key other than\n`kubernetes.io/hostname` in `requiredDuringSchedulingIgnoredDuringExecution`.\n\nThis admission controller is disabled by default.\n\n### LimitRanger {#limitranger}\n\n**Type**: Mutating and Validating.\n\nThis admission controller will observe the incoming request and ensure that it does not violate\nany of the constraints enumerated in the `LimitRange` object in a `Namespace`. If you are using\n`LimitRange` objects in your Kubernetes deployment, you MUST use this admission controller to\nenforce those constraints. LimitRanger can also be used to apply default resource requests to Pods\nthat don't specify any; currently, the default LimitRanger applies a 0.1 CPU requirement to all\nPods in the `default` namespace.\n\nSee the [LimitRange API reference](/docs/reference/kubernetes-api/core/limit-range-v1/)\nand the [example of LimitRange](/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/)\nfor more details.\n\n### MutatingAdmissionPolicy {#mutatingadmissionpolicy}\n\n**Type**: Mutating.\n\n[This admission controller](/docs/reference/access-authn-authz/mutating-admission-policy/) uses the Common Expression Language (CEL) to declare mutations to resources. Mutations can be defined either with an apply configuration that is merged using the server side apply merge strategy, or a JSON patch.\nIt is enabled when both feature gate `mutatingadmissionpolicy` and `admissionregistration.k8s.io/v1alpha1` group/version are enabled.\nIf any of the MutatingAdmissionPolicy fails, the request fails.\n\n### MutatingAdmissionWebhook {#mutatingadmissionwebhook}\n\n**Type**: Mutating.\n\nThis admission controller calls any mutating webhooks which match the request. Matching\nwebhooks are called in serial; each one may modify the object if it desires.\n\nThis admission controller (as implied by the name) only runs in the mutating phase.\n\nIf a webhook called by this has side effects (for example, decrementing quota) it\n*must* have a reconciliation system, as it is not guaranteed that subsequent\nwebhooks or validating admission controllers will permit the request to finish.\n\nIf you disable the MutatingAdmissionWebhook, you must also disable the\n`MutatingWebhookConfiguration` object in the `admissionregistration.k8s.io/v1`\ngroup/version via the `--runtime-config` flag, both are on by default.\n\n#### Use caution when authoring and installing mutating webhooks\n\n* Users may be confused when the objects they try to create are different from\nwhat they get back.\n* Built in control loops may break when the objects they try to create are\ndifferent when read back.\n* Setting originally unset fields is less likely to cause problems than\noverwriting fields set in the original request. Avoid doing the latter.\n* Future changes to control loops for built-in resources or third-party resources\nmay break webhooks that work well today. Even when the webhook installation API\nis finalized, not all possible webhook behaviors will be guaranteed to be supported\nindefinitely.\n\n### NamespaceAutoProvision {#namespaceautoprovision}\n\n**Type**: Mutating.\n\nThis admission controller examines all incoming requests on namespaced resources and checks\nif the referenced namespace does exist.\nIt creates a namespace if it cannot be found.\nThis admission controller is useful in deployments that do not want to restrict creation of\na namespace prior to its usage.\n\n### NamespaceExists {#namespaceexists}\n\n**Type**: Validating.\n\nThis admission controller checks all requests on namespaced resources other than `Namespace` itself.\nIf the namespace referenced from a request doesn't exist, the request is rejected.\n\n### NamespaceLifecycle {#namespacelifecycle}\n\n**Type**: Validating.\n\nThis admission controller enforces that a `Namespace` that is undergoing termination cannot have\nnew objects created in it, and ensures that requests in a non-existent `Namespace` are rejected.\nThis admission controller also prevents deletion of three system reserved namespaces `default`,\n`kube-system`, `kube-public`.\n\nA `Namespace` deletion kicks off a sequence of operations that remove all objects (pods, services,\netc.) in that namespace. In order to enforce integrity of that process, we strongly recommend\nrunning this admission controller.\n\n### NodeDeclaredFeatureValidator {#nodedeclaredfeaturevalidator}\n\n**Type**: Validating.\n\nThis admission controller intercepts writes to bound Pods, to ensure that the\nchanges are compatible with the features declared by the node where the Pod is\ncurrently running. It uses the `.status.declaredFeatures` field of the Node to\ndetermine the set of enabled features. If a Pod update requires a feature that\nis not listed in the features of its current node, the admission controller\nwill reject the update request. This prevents runtime failures due to feature\nmismatch after a Pod has been scheduled.\n\nThis admission controller is enabled by\ndefault if the [`NodeDeclaredFeatures`](/docs/reference/command-line-tools-reference/feature-gates/#NodeDeclaredFeatures) feature gate is enabled.\n\n### NodeRestriction {#noderestriction}\n\n**Type**: Validating.\n\nThis admission controller limits the `Node` and `Pod` objects a kubelet can modify. In order to be limited by this admission controller,\nkubelets must use credentials in the `system:nodes` group, with a username in the form `system:node: `.\nSuch kubelets will only be allowed to modify their own `Node` API object, and only modify `Pod` API objects that are bound to their node.\nkubelets are not allowed to update or remove taints from their `Node` API object.\n\nThe `NodeRestriction` admission plugin prevents kubelets from deleting their `Node` API object,\nand enforces kubelet modification of labels under the `kubernetes.io/` or `k8s.io/` prefixes as follows:\n\n* **Forbidden** (Kubelets are blocked from modifying these):\n* Labels with a `node-restriction.kubernetes.io/` prefix. This prefix is reserved for administrators to label `Node` objects for workload isolation.\n* Labels with a `node-role.kubernetes.io/` prefix (for example: `node-role.kubernetes.io/control-plane`). These are restricted to prevent unprivileged nodes from self-declaring cluster roles.\n* **Allowed** (Kubelets can add/remove/update these):\n* `kubernetes.io/hostname`\n* `kubernetes.io/arch`\n* `kubernetes.io/os`\n* `beta.kubernetes.io/instance-type`\n* `node.kubernetes.io/instance-type`\n* `failure-domain.beta.kubernetes.io/region` (deprecated)\n* `failure-domain.beta.kubernetes.io/zone` (deprecated)\n* `topology.kubernetes.io/region`\n* `topology.kubernetes.io/zone`\n* `kubelet.kubernetes.io/`-prefixed labels\n* `node.kubernetes.io/`-prefixed labels\n* **Reserved**:\nUse of any other labels under the `kubernetes.io` or `k8s.io` prefixes by kubelets is reserved.\nThe `NodeRestriction` admission plugin generally disallows these to prevent unauthorized self-labeling,\nbut may allow additional labels under these prefixes in the future as part of future features.\n\nWhen the `ServiceAccountNodeAudienceRestriction` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)\nis enabled, this admission plugin also restricts the audiences for which a kubelet can\nrequest service account tokens via the `TokenRequest` API. The kubelet can only request\ntokens for audiences already referenced by pods on that node (through projected service\naccount token volumes or CSI driver token requests), or for audiences explicitly granted\nthrough RBAC using the `request-serviceaccounts-token-audience` verb. For more details,\nsee [Service account token audience restriction](/docs/reference/access-authn-authz/node/#service-account-token-audience-restriction).\n\nFuture versions may add additional restrictions to ensure kubelets have the minimal set of\npermissions required to operate correctly.\n\n### OwnerReferencesPermissionEnforcement {#ownerreferencespermissionenforcement}\n\n**Type**: Validating.\n\nThis admission controller protects the access to the `metadata.ownerReferences` of an object\nso that only users with **delete** permission to the object can change it.\nThis admission controller also protects the access to `metadata.ownerReferences[x].blockOwnerDeletion`\nof an object, so that only users with **update** permission to the `finalizers`\nsubresource of the referenced *owner* can change it.\n\n### PersistentVolumeClaimResize {#persistentvolumeclaimresize}\n\n**Type**: Validating.\n\nThis admission controller implements additional validations for checking incoming\n`PersistentVolumeClaim` resize requests.\n\nEnabling the `PersistentVolumeClaimResize` admission controller is recommended.\nThis admission controller prevents resizing of all claims by default unless a claim's `StorageClass`\nexplicitly enables resizing by setting `allowVolumeExpansion` to `true`.\n\nFor example: all `PersistentVolumeClaim`s created from the following `StorageClass` support volume expansion:\n\n```yaml\napiVersion: storage.k8s.io/v1\nkind: StorageClass\nmetadata:\nname: gluster-vol-default\nprovisioner: kubernetes.io/glusterfs\nparameters:\nresturl: \"http://192.168.10.100:8080\"\nrestuser: \"\"\nsecretNamespace: \"\"\nsecretName: \"\"\nallowVolumeExpansion: true\n```\n\nFor more information about persistent volume claims, see [PersistentVolumeClaims](/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims).\n\n### PodNodeSelector {#podnodeselector}\n\n**Type**: Validating.\n\nThis admission controller defaults and limits what node selectors may be used within a namespace\nby reading a namespace annotation and a global configuration.\n\nThis admission controller is disabled by default.\n\n#### Configuration file format\n\n`PodNodeSelector` uses a configuration file to set options for the behavior of the backend.\nNote that the configuration file format will move to a versioned file in a future release.\nThis file may be json or yaml and has the following format:\n\n```yaml\npodNodeSelectorPluginConfig:\nclusterDefaultNodeSelector: name-of-node-selector\nnamespace1: name-of-node-selector\nnamespace2: name-of-node-selector\n```\n\nReference the `PodNodeSelector` configuration file from the file provided to the API server's\ncommand line flag `--admission-control-config-file`:\n\n```yaml\napiVersion: apiserver.config.k8s.io/v1\nkind: AdmissionConfiguration\nplugins:\n- name: PodNodeSelector\npath: podnodeselector.yaml\n...\n```\n\n#### Configuration Annotation Format\n\n`PodNodeSelector` uses the annotation key `scheduler.alpha.kubernetes.io/node-selector` to assign\nnode selectors to namespaces.\n\n```yaml\napiVersion: v1\nkind: Namespace\nmetadata:\nannotations:\nscheduler.alpha.kubernetes.io/node-selector: name-of-node-selector\nname: namespace3\n```\n\n#### Internal Behavior\n\nThis admission controller has the following behavior:\n\n1. If the `Namespace` has an annotation with a key `scheduler.alpha.kubernetes.io/node-selector`,\nuse its value as the node selector.\n2. If the namespace lacks such an annotation, use the `clusterDefaultNodeSelector` defined in the\n`PodNodeSelector` plugin configuration file as the node selector.\n3. Evaluate the pod's node selector against the namespace node selector for conflicts. Conflicts\nresult in rejection.\n4. Evaluate the pod's node selector against the namespace-specific allowed selector defined the\nplugin configuration file. Conflicts result in rejection.\n\nPodNodeSelector allows forcing pods to run on specifically labeled nodes. Also see the PodTolerationRestriction\nadmission plugin, which allows preventing pods from running on specifically tainted nodes.\n\n### PodSecurity {#podsecurity}\n\n**Type**: Validating.\n\nThe PodSecurity admission controller checks new Pods before they are\nadmitted, determines if it should be admitted based on the requested security context and the restrictions on permitted\n[Pod Security Standards](/docs/concepts/security/pod-security-standards/)\nfor the namespace that the Pod would be in.\n\nSee the [Pod Security Admission](/docs/concepts/security/pod-security-admission/)\ndocumentation for more information.\n\nPodSecurity replaced an older admission controller named PodSecurityPolicy.\n\n### PodTolerationRestriction {#podtolerationrestriction}\n\n**Type**: Mutating and Validating.\n\nThe PodTolerationRestriction admission controller verifies any conflict between tolerations of a\npod and the tolerations of its namespace.\nIt rejects the pod request if there is a conflict.\nIt then merges the tolerations annotated on the namespace into the tolerations of the pod.\nThe resulting tolerations are checked against a list of allowed tolerations annotated to the namespace.\nIf the check succeeds, the pod request is admitted otherwise it is rejected.\n\nIf the namespace of the pod does not have any associated default tolerations or allowed\ntolerations annotated, the cluster-level default tolerations or cluster-level list of allowed tolerations are used\ninstead if they are specified.\n\nTolerations to a namespace are assigned via the `scheduler.alpha.kubernetes.io/defaultTolerations` annotation key.\nThe list of allowed tolerations can be added via the `scheduler.alpha.kubernetes.io/tolerationsWhitelist` annotation key.\n\nExample for namespace annotations:\n\n```yaml\napiVersion: v1\nkind: Namespace\nmetadata:\nname: apps-that-need-nodes-exclusively\nannotations:\nscheduler.alpha.kubernetes.io/defaultTolerations: '[{\"operator\": \"Exists\", \"effect\": \"NoSchedule\", \"key\": \"dedicated-node\"}]'\nscheduler.alpha.kubernetes.io/tolerationsWhitelist: '[{\"operator\": \"Exists\", \"effect\": \"NoSchedule\", \"key\": \"dedicated-node\"}]'\n```\n\nThis admission controller is disabled by default.\n\n### PodTopologyLabels {#podtopologylabels}\n\n**Type**: Mutating\n\nThe PodTopologyLabels admission controller mutates the `pods/binding` subresources\nfor all pods bound to a Node, adding topology labels matching those of the bound Node.\nThis allows Node topology labels to be available as pod labels,\nwhich can be surfaced to running containers using the\n[Downward API](/docs/concepts/workloads/pods/downward-api/).\nThe labels available as a result of this controller are the\n[topology.kubernetes.io/region](/docs/reference/labels-annotations-taints/#topologykubernetesioregion) and\n[topology.kubernetes.io/zone](/docs/reference/labels-annotations-taints/#topologykubernetesiozone) labels.\n\nIf any mutating admission webhook adds or modifies labels of the `pods/binding` subresource,\nthese changes will propagate to pod labels as a result of this controller,\noverwriting labels with conflicting keys.\n\nThis admission controller is enabled when the `PodTopologyLabelsAdmission` feature gate is enabled.\n\n### Priority {#priority}\n\n**Type**: Mutating and Validating.\n\nThe priority admission controller uses the `priorityClassName` field and populates the integer\nvalue of the priority.\nIf the priority class is not found, the Pod is rejected.\n\n### ResourceQuota {#resourcequota}\n\n**Type**: Validating.\n\nThis admission controller will observe the incoming request and ensure that it does not violate\nany of the constraints enumerated in the `ResourceQuota` object in a `Namespace`. If you are\nusing `ResourceQuota` objects in your Kubernetes deployment, you MUST use this admission\ncontroller to enforce quota constraints.\n\nSee the [ResourceQuota API reference](/docs/reference/kubernetes-api/core/resource-quota-v1/)\nand the [example of Resource Quota](/docs/concepts/policy/resource-quotas/) for more details.\n\n### RuntimeClass {#runtimeclass}\n\n**Type**: Mutating and Validating.\n\nIf you define a RuntimeClass with [Pod overhead](/docs/concepts/scheduling-eviction/pod-overhead/)\nconfigured, this admission controller checks incoming Pods.\nWhen enabled, this admission controller rejects any Pod create requests\nthat have the overhead already set.\nFor Pods that have a RuntimeClass configured and selected in their `.spec`,\nthis admission controller sets `.spec.overhead` in the Pod based on the value\ndefined in the corresponding RuntimeClass.\n\nSee also [Pod Overhead](/docs/concepts/scheduling-eviction/pod-overhead/)\nfor more information.\n\n### ServiceAccount {#serviceaccount}\n\n**Type**: Mutating and Validating.\n\nThis admission controller implements automation for\n[serviceAccounts](/docs/tasks/configure-pod-container/configure-service-account/).\nThe Kubernetes project strongly recommends enabling this admission controller.\nYou should enable this admission controller if you intend to make any use of Kubernetes\n`ServiceAccount` objects.\n\nTo enhance the security measures around Secrets, use separate namespaces to isolate access to mounted secrets.\n\n### StorageObjectInUseProtection\n\n**Type**: Mutating.\n\nThe `StorageObjectInUseProtection` plugin adds the `kubernetes.io/pvc-protection` or `kubernetes.io/pv-protection`\nfinalizers to newly created Persistent Volume Claims (PVCs) or Persistent Volumes (PV).\nIn case a user deletes a PVC or PV the PVC or PV is not removed until the finalizer is removed\nfrom the PVC or PV by PVC or PV Protection Controller.\nRefer to the\n[Storage Object in Use Protection](/docs/concepts/storage/persistent-volumes/#storage-object-in-use-protection)\nfor more detailed information.\n\n### TaintNodesByCondition {#taintnodesbycondition}\n\n**Type**: Mutating.\n\nThis admission controller taints newly created\nNodes as `NotReady` and `NoSchedule`. That tainting avoids a race condition that could cause Pods\nto be scheduled on new Nodes before their taints were updated to accurately reflect their reported\nconditions.\n\n### ValidatingAdmissionPolicy {#validatingadmissionpolicy}\n\n**Type**: Validating.\n\n[This admission controller](/docs/reference/access-authn-authz/validating-admission-policy/) implements the CEL validation for incoming matched requests.\nIt is enabled when both feature gate `validatingadmissionpolicy` and `admissionregistration.k8s.io/v1alpha1` group/version are enabled.\nIf any of the ValidatingAdmissionPolicy fails, the request fails.\n\n### ValidatingAdmissionWebhook {#validatingadmissionwebhook}\n\n**Type**: Validating.\n\nThis admission controller calls any validating webhooks which match the request. Matching\nwebhooks are called in parallel; if any of them rejects the request, the request\nfails. This admission controller only runs in the validation phase; the webhooks it calls may not\nmutate the object, as opposed to the webhooks called by the `MutatingAdmissionWebhook` admission controller.\n\nIf a webhook called by this has side effects (for example, decrementing quota) it\n*must* have a reconciliation system, as it is not guaranteed that subsequent\nwebhooks or other validating admission controllers will permit the request to finish.\n\nIf you disable the ValidatingAdmissionWebhook, you must also disable the\n`ValidatingWebhookConfiguration` object in the `admissionregistration.k8s.io/v1`\ngroup/version via the `--runtime-config` flag.\n\n## Is there a recommended set of admission controllers to use?\n\nYes. The recommended admission controllers are enabled by default\n(shown [here](/docs/reference/command-line-tools-reference/kube-apiserver/#options)),\nso you do not need to explicitly specify them.\nYou can enable additional admission controllers beyond the default set using the\n`--enable-admission-plugins` flag (**order doesn't matter**).", "source": "content/en/docs/reference/access-authn-authz/admission-controllers.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page provides an overview of _MutatingAdmissionPolicies_.\nMutatingAdmissionPolicies allow you to change what happens when someone writes a change to the Kubernetes API.\nIf you want to use declarative policies just to prevent a particular kind of change to resources (for example: protecting platform namespaces from deletion),\n[ValidatingAdmissionPolicy](/docs/reference/access-authn-authz/validating-admission-policy/)\nis\na simpler and more effective alternative.\n\n## What are MutatingAdmissionPolicies?\n\nMutating admission policies offer a declarative, in-process alternative to mutating admission webhooks.\n\nMutating admission policies use the Common Expression Language (CEL) to declare mutations to resources.\nMutations can be defined either with an *apply configuration* that is merged using the\n[server side apply merge strategy](/docs/reference/using-api/server-side-apply/#merge-strategy),\nor a [JSON patch](https://jsonpatch.com/).\n\nMutating admission policies are highly configurable, enabling policy authors to define policies\nthat can be parameterized and scoped to resources as needed by cluster administrators.\n\n## What resources make a policy\n\nA policy is generally made up of three resources:\n\n- The MutatingAdmissionPolicy describes the abstract logic of a policy\n(think: \"this policy sets a particular label to a particular value\").\n\n- A _parameter resource_ provides information to a MutatingAdmissionPolicy to make it a concrete\nstatement (think \"set the `owner` label to something like `company.example.com`\").\nParameter resources refer to Kubernetes resources, available in the Kubernetes API. They can be built-in types or extensions,\nsuch as a CustomResourceDefinition (CRD). For example, you can use a ConfigMap as a parameter.\n- A MutatingAdmissionPolicyBinding links the above (MutatingAdmissionPolicy and parameter) resources together and provides scoping.\nIf you only want to set an `owner` label for `Pods`, and not other API kinds, the binding is where you\nspecify this mutation.\n\nAt least a MutatingAdmissionPolicy and a corresponding MutatingAdmissionPolicyBinding\nmust be defined for a policy to have an effect.\n\nNames ending in `.static.k8s.io` are reserved for\n[manifest-based admission control](/docs/reference/access-authn-authz/manifest-admission-control/)\nand cannot be used for API-based policies or bindings. This reservation is\nenforced when the `ManifestBasedAdmissionControlConfig`\n[feature gate](/docs/reference/command-line-tools-reference/feature-gates/#ManifestBasedAdmissionControlConfig) is enabled.\n\nIf a MutatingAdmissionPolicy does not need to be configured via parameters, simply leave\n`spec.paramKind` in MutatingAdmissionPolicy not specified.\n\n## Getting Started with MutatingAdmissionPolicies\n\nMutating admission policy is part of the cluster control-plane. You should write\nand deploy them with great caution. The following describes how to quickly\nexperiment with Mutating admission policy.\n\n### Create a MutatingAdmissionPolicy\n\nThe following is an example of a MutatingAdmissionPolicy. This policy mutates newly created Pods to have a sidecar container if it does not exist.\n\nThe `.spec.mutations` field consists of a list of expressions that evaluate to resource patches.\nThe emitted patches may be either [apply configurations](#patch-type-apply-configuration) or [JSON Patch](#patch-type-json-patch)\npatches. You cannot specify an empty list of mutations. After evaluating all the\nexpressions, the API server applies those changes to the resource that is\npassing through admission.\n\nTo configure a mutating admission policy for use in a cluster, a binding is\nrequired. The MutatingAdmissionPolicy will only be active if a corresponding\nbinding exists with the referenced `spec.policyName` matching the `spec.name` of\na policy.\n\nOnce the binding and policy are created, any resource request that matches the\n`spec.matchConditions` of a policy will trigger the set of mutations defined.\n\nMatch conditions cannot use `namespaceObject` or `variables`. `namespaceObject` is not populated\nfor match conditions and always evaluates to null, and `variables` cannot be referenced because\nmatch conditions are evaluated before the rest of the policy. To select requests based on namespace\nlabels, use a `namespaceSelector` in the policy's `matchConstraints` or in the binding's\n`matchResources`.\n\nIn the example above, creating a Pod will add the `mesh-proxy` initContainer mutation:\n\n```yaml\napiVersion: v1\nkind: Pod\nmetadata:\nname: myapp\nnamespace: default\nspec:\n...\ninitContainers:\n- name: mesh-proxy\nimage: mesh/proxy:v1.0.0\nargs: [\"proxy\", \"sidecar\"]\nrestartPolicy: Always\n- name: myapp-initializer\nimage: example/initializer:v1.0.0\n...\n```\n\n#### Parameter resources\n\nParameter resources allow a policy configuration to be separate from its\ndefinition. A policy can define `paramKind`, which outlines GVK of the parameter\nresource, and then a policy binding ties a policy by name (via `policyName`) to a\nparticular parameter resource via `paramRef`.\n\nPlease refer to [parameter resources](/docs/reference/access-authn-authz/validating-admission-policy/#parameter-resources) for more information.\n\n#### `ApplyConfiguration` {#patch-type-apply-configuration}\n\nMutatingAdmissionPolicy expressions are always CEL. Each apply configuration\n`expression` must evaluate to a CEL object (declared using `Object()`\ninitialization).\n\nApply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of\nvalues not included in the apply configuration.\n\nCEL expressions have access to the object types needed to create apply configurations:\n\n- `Object` - CEL type of the resource object.\n- `Object. ` - CEL type of object field (such as `Object.spec`)\n- `Object. . ... ` - CEL type of nested field (such as `Object.spec.containers`)\n\nCEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:\n\n- `object` - The object from the incoming request. The value is null for DELETE requests.\n- `oldObject` - The existing object. The value is null for CREATE requests.\n- `request` - Attributes of the API request.\n- `params` - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.\n- `namespaceObject` - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.\n- `variables` - Map of composited variables, from its name to its lazily evaluated value.\nFor example, a variable named `foo` can be accessed as `variables.foo`.\n- `authorizer` - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\nSee https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- `authorizer.requestResource` - A CEL ResourceCheck constructed from the `authorizer` and configured with the\nrequest resource.\n\nThe `apiVersion`, `kind`, `metadata.name`, `metadata.generateName` and `metadata.labels` are always accessible from the root of the\nobject. No other metadata properties are accessible.\n\n#### `JSONPatch` {#patch-type-json-patch}\n\nThe same mutation can be written as a [JSON Patch](https://jsonpatch.com/) as follows:\n\nThe expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/).\nref: https://github.com/google/cel-spec\n\nEach evaluated `expression` must return an array of `JSONPatch` values. The\n`JSONPatch` type represents one operation from a JSON patch.\n\nFor example, this CEL expression returns a JSON patch to conditionally modify a value:\n\n```\n[\nJSONPatch{op: \"test\", path: \"/spec/example\", value: \"Red\"},\nJSONPatch{op: \"replace\", path: \"/spec/example\", value: \"Green\"}\n]\n```\n\nTo define a JSON object for the patch operation `value`, use CEL `Object` types. For example:\n\n```\n[\nJSONPatch{\nop: \"add\",\npath: \"/spec/selector\",\nvalue: Object.spec.selector{matchLabels: {\"environment\": \"test\"}}\n}\n]\n```\n\nTo use strings containing '/' and '~' as JSONPatch path keys, use `jsonpatch.escapeKey()`. For example:\n\n```\n[\nJSONPatch{\nop: \"add\",\npath: \"/metadata/labels/\" + jsonpatch.escapeKey(\"example.com/environment\"),\nvalue: \"test\"\n},\n]\n```\n\nCEL expressions have access to the types needed to create JSON patches and objects:\n\n- `JSONPatch` - CEL type of JSON Patch operations. JSONPatch has the fields `op`, `from`, `path` and `value`.\nSee [JSON patch](https://jsonpatch.com/) for more details. The `value` field may be set to any of: string,\ninteger, array, map or object. If set, the `path` and `from` fields must be set to a\n[JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the `jsonpatch.escapeKey()` CEL\nfunction may be used to escape path keys containing `/` and `~`.\n- `Object` - CEL type of the resource object.\n- `Object. ` - CEL type of object field (such as `Object.spec`)\n- `Object. . ... ` - CEL type of nested field (such as `Object.spec.containers`)\n\nCEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:\n\n- `object` - The object from the incoming request. The value is null for DELETE requests.\n- `oldObject` - The existing object. The value is null for CREATE requests.\n- `request` - Attributes of the API request.\n- `params` - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.\n- `namespaceObject` - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.\n- `variables` - Map of composited variables, from its name to its lazily evaluated value.\nFor example, a variable named `foo` can be accessed as `variables.foo`.\n- `authorizer` - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\nSee https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- `authorizer.requestResource` - A CEL ResourceCheck constructed from the `authorizer` and configured with the\nrequest resource.\n\nCEL expressions have access to [Kubernetes CEL function libraries](/docs/reference/using-api/cel/#cel-options-language-features-and-libraries)\nas well as:\n\n- `jsonpatch.escapeKey` - Performs JSONPatch key escaping. `~` and `/` are escaped as `~0` and `~1` respectively.\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.\n\n## API kinds exempt from mutating admission\n\nThere are certain API kinds that are exempt from admission-time mutation. For example, you can't create a MutatingAdmissionPolicy that changes a MutatingAdmissionPolicy.\n\nThe following admission configuration kinds are exempt from policies created\nvia the REST API, to prevent circular dependencies:\n\n* [ValidatingAdmissionPolicies]()\n* [ValidatingAdmissionPolicyBindings]()\n* MutatingAdmissionPolicies\n* MutatingAdmissionPolicyBindings\n\nWhen configured via\n[manifest-based admission control](/docs/reference/access-authn-authz/manifest-admission-control/),\na MutatingAdmissionPolicy can intercept the admission configuration kinds\nlisted above. This bypasses the restrictions usually applied to policies\ncreated via the REST API, allowing you to mutate even admission configuration\nand security-sensitive resources. Unlike the REST API, a bad manifest-based\nadmission policy intercepting these resources would not be unrecoverable since\nit is defined on disk rather than through the API.\n\nAdditionally, the following non-persisted (virtual) authentication and\nauthorization API kinds are exempt from all admission policies, including\nmanifest-based policies, because intercepting them could lock the cluster out\nof its own authentication and authorization path:\n\n* [TokenReviews]()\n* [SelfSubjectReviews]()\n* [LocalSubjectAccessReviews]()\n* [SelfSubjectAccessReviews]()\n* [SelfSubjectRulesReviews]()\n* [SubjectAccessReviews]()\n\nStarting with Kubernetes v1.37,\n[admission webhooks](/docs/reference/access-authn-authz/extensible-admission-controllers/#excluded-virtual-resources)\nalso exclude these virtual resources by default.", "source": "content/en/docs/reference/access-authn-authz/mutating-admission-policy.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Disable node admission validation of\n[CertificateSigningRequests](/docs/reference/access-authn-authz/certificate-signing-requests/#certificate-signing-requests)\nfor kubelet signers. Unless you disable this feature gate, Kubernetes enforces that new\nkubelet certificates have a `commonName` matching `system:node:$nodeName`.", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/AllowInsecureKubeletCertificateSigningRequests.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "A client-go implementation of a FIFO queue that uses atomic operations to ensure events that come in\nbatches, such as those from a ListAndWatch call, are processed in a single chunk. This is in contrast to\nthe previous implementation which would process these events one by one, potentially causing the internal\ncache to become temporarily inconsistent with the API server. This feature gate can be toggled in the\nkube-controller-manager and any client-go based controller.", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/AtomicFIFO.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Enables shims and translation logic to route volume\noperations from the AWS-EBS in-tree plugin to EBS CSI plugin. Supports\nfalling back to in-tree EBS plugin for mount operations to nodes that have\nthe feature disabled or that do not have EBS CSI plugin installed and\nconfigured. Does not support falling back for provision operations, for those\nthe CSI plugin must be installed and configured.", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/CSIMigrationAWS.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Enables shims and translation logic to route volume\noperations from the Azure-File in-tree plugin to AzureFile CSI plugin.\nSupports falling back to in-tree AzureFile plugin for mount operations to\nnodes that have the feature disabled or that do not have AzureFile CSI plugin\ninstalled and configured. Does not support falling back for provision\noperations, for those the CSI plugin must be installed and configured.\nRequires CSIMigration feature flag enabled.", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/CSIMigrationAzureFile.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Enables shims and translation logic to route volume\noperations from the GCE-PD in-tree plugin to PD CSI plugin. Supports falling\nback to in-tree GCE plugin for mount operations to nodes that have the\nfeature disabled or that do not have PD CSI plugin installed and configured.\nDoes not support falling back for provision operations, for those the CSI\nplugin must be installed and configured. Requires CSIMigration feature flag\nenabled.", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/CSIMigrationGCE.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Stops registering the vSphere in-tree plugin in kubelet\nand volume controllers and enables shims and translation logic to route volume operations\nfrom the vSphere in-tree plugin to vSphere CSI plugin. Requires CSIMigration and\nCSIMigrationvSphere feature flags enabled and vSphere CSI plugin installed and\nconfigured on all nodes in the cluster. This flag has been deprecated in favor\nof the `InTreePluginvSphereUnregister` feature flag which prevents the\nregistration of in-tree vsphere plugin.", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/CSIMigrationvSphereComplete.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Enables Leader Migration for\n[kube-controller-manager](/docs/tasks/administer-cluster/controller-manager-leader-migration/#initial-leader-migration-configuration) and\n[cloud-controller-manager](/docs/tasks/administer-cluster/controller-manager-leader-migration/#deploy-cloud-controller-manager)\nwhich allows a cluster operator to live migrate\ncontrollers from the kube-controller-manager into an external controller-manager\n(e.g. the cloud-controller-manager) in an HA cluster without downtime.", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/ControllerManagerLeaderMigration.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Enables `derivedAttributes` in Dynamic Resource Allocation (DRA), letting\nResourceClaim and ResourceClaimTemplate authors compute virtual device\nattributes with per-device CEL expressions, for use in `matchAttribute` and\n`distinctAttribute` constraints.\n\nFor more information, see\n[Derived attributes](/docs/concepts/resource-management/dynamic-resource-allocation/dra-api/#derived-attributes)\nin the DRA API Objects documentation.", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/DRADerivedAttributes.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "The global safety switch for Beta validation rules (`+k8s:beta`). Disable it to revert\nthose rules to shadow mode if regressions are found.\n\nIn shadow mode, declarative validation still runs and mismatches are logged and metered,\nbut they do not reject requests; hand-written validation stays authoritative.\n\nEnforcement for resources using `WithDeclarativeEnforcement()`:\n\n- No prefix: always enforced, regardless of this gate.\n- `+k8s:beta`: enforced when this gate is enabled (the default), otherwise shadowed.\n- `+k8s:alpha`: always shadowed.\n\nThis gate takes effect independently of the\n[`DeclarativeValidation` feature gate](/docs/reference/command-line-tools-reference/feature-gates/#DeclarativeValidation),\nwhich controls only mismatch reporting.", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/DeclarativeValidationBeta.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Enables the `defaultPodSysctls` field in [KubeletConfiguration](/docs/reference/config-api/kubelet-config.v1beta1/), allowing Node administrators to specify a default set of namespaced kernel parameters (sysctls) that the `kubelet` applies to all Pods on the Node. See [Setting Sysctls for All Pods](/docs/tasks/administer-cluster/sysctl-cluster/#setting-sysctls-for-all-pods) for more details.", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/DefaultPodSysctls.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "If supported by the CSI driver, delegates the\nrole of applying `fsGroup` from a Pod's `securityContext` to the driver by\npassing `fsGroup` through the NodeStageVolume and NodePublishVolume CSI calls.", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/DelegateFSGroupToCSIDriver.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Allow using the [`image`](/docs/concepts/storage/volumes/) volume source in a Pod.\nThis volume source lets you mount a container image as a read-only volume.", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/ImageVolume.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Enables the in-place vertical scaling of resources for a Pod (For example, changing a\nrunning Pod's pod-level CPU or memory requests/limits without needing to restart\nit). For details, see the documentation on [In-place Pod-level Resources Vertical Scaling](/docs/tasks/configure-pod-container/resize-pod-resources/).", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/InPlacePodLevelResourcesVerticalScaling.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Enable the kubelet to allocate swap memory for Kubernetes workloads on a node.\nMust be used with `KubeletConfiguration.failSwapOn` set to false.\nFor more details, please see [swap memory](/docs/concepts/architecture/nodes/#swap-memory)", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/NodeSwap.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "When enabled, the PVC protection controller adds an `Unused` condition to\nPersistentVolumeClaims that tracks whether the PVC is currently referenced by\nany non-terminal Pod. The condition's `lastTransitionTime` records when the PVC\nlast transitioned between being in use and being unused.", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/PersistentVolumeClaimUnusedSinceTime.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Configure the kubelet to gather container and pod stats from the CRI container runtime rather than gathering them from cAdvisor.\nAs of 1.26, this also includes gathering metrics from CRI and emitting them over `/metrics/cadvisor` (rather than having cAdvisor emit them directly).", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/PodAndContainerStatsFromCRI.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Enable the API server to accept UIDs (user IDs) via request header authentication.\nThis will also make the `kube-apiserver`'s API aggregator add UIDs via standard headers when\nforwarding requests to the servers serving the aggregated API.", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/RemoteRequestHeaderUID.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Enables scheduler [queueing hints](/docs/concepts/scheduling-eviction/scheduling-framework/#queueinghint),\nwhich benefits to reduce the useless requeuing.\nThe scheduler retries scheduling pods if something changes in the cluster that could make the pod scheduled.\nQueueing hints are internal signals that allow the scheduler to filter the changes in the cluster\nthat are relevant to the unscheduled pod, based on previous scheduling attempts.", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/SchedulerQueueingHints.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Allows the API server watch cache to create a watch on a dedicated RPC.\nThis prevents watch cache from being starved by other watches.", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/SeparateCacheWatchRPC.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Enable a mechanism to coordinate fine-grained hardware resource\nassignments for different components in Kubernetes. See\n[Control Topology Management Policies on a node](/docs/tasks/administer-cluster/topology-manager/).", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/TopologyManager.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Allow fine-tuning of topology manager policies,\nexperimental, Alpha-quality options.\nThis feature gate guards *a group* of topology manager options whose quality level is alpha.\nThis feature gate will never graduate to beta or stable.", "source": "content/en/docs/reference/command-line-tools-reference/feature-gates/TopologyManagerPolicyAlphaOptions.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "## Resource Types\n\n- [ExecCredential](#client-authentication-k8s-io-v1-ExecCredential)\n\n## `ExecCredential` {#client-authentication-k8s-io-v1-ExecCredential}\n\nExecCredential is used by exec-based plugins to communicate credentials to\nHTTP transports.\n\nField Description\n\napiVersion\nstring client.authentication.k8s.io/v1\nkind\nstring ExecCredential\n\nspec [Required]\n\nExecCredentialSpec\n\nSpec holds information passed to the plugin by the transport.\n\nstatus\n\nExecCredentialStatus\n\nStatus is filled in by the plugin and holds the credentials that the transport\nshould use to contact the API.\n\n## `Cluster` {#client-authentication-k8s-io-v1-Cluster}\n\n**Appears in:**\n\n- [ExecCredentialSpec](#client-authentication-k8s-io-v1-ExecCredentialSpec)\n\nCluster contains information to allow an exec plugin to communicate\nwith the kubernetes cluster being authenticated to.\nTo ensure that this struct contains everything someone would need to communicate\nwith a kubernetes cluster (just like they would via a kubeconfig), the fields\nshould shadow \"k8s.io/client-go/tools/clientcmd/api/v1\".Cluster, with the exception\nof CertificateAuthority, since CA data will always be passed to the plugin as bytes.\n\nField Description\n\nserver [Required]\n\nstring\n\nServer is the address of the kubernetes cluster (https://hostname:port).\n\ntls-server-name\n\nstring\n\nTLSServerName is passed to the server for SNI and is used in the client to\ncheck server certificates against. If ServerName is empty, the hostname\nused to contact the server is used.\n\ninsecure-skip-tls-verify\n\nbool\n\nInsecureSkipTLSVerify skips the validity check for the server's certificate.\nThis will make your HTTPS connections insecure.\n\ncertificate-authority-data\n\n[]byte\n\nCAData contains PEM-encoded certificate authority certificates.\nIf empty, system roots should be used.\n\nproxy-url\n\nstring\n\nProxyURL is the URL to the proxy to be used for all requests to this\ncluster.\n\ndisable-compression\n\nbool\n\nDisableCompression allows client to opt-out of response compression for all requests to the server. This is useful\nto speed up requests (specifically lists) when client-server network bandwidth is ample, by saving time on\ncompression (server-side) and decompression (client-side): https://github.com/kubernetes/kubernetes/issues/112296.\n\nconfig\n\nk8s.io/apimachinery/pkg/runtime.RawExtension\n\nConfig holds additional config data that is specific to the exec\nplugin with regards to the cluster being authenticated to.\nThis data is sourced from the clientcmd Cluster object's\nextensions[client.authentication.k8s.io/exec] field:\nclusters:\n\nname: my-cluster\ncluster:\n...\nextensions:\n\nname: client.authentication.k8s.io/exec # reserved extension name for per cluster exec config\nextension:\naudience: 06e3fbd18de8 # arbitrary config\n\nIn some environments, the user config may be exactly the same across many clusters\n(i.e. call this exec plugin) minus some details that are specific to each cluster\nsuch as the audience. This field allows the per cluster config to be directly\nspecified with the cluster info. Using this field to store secret data is not\nrecommended as one of the prime benefits of exec plugins is that no secrets need\nto be stored directly in the kubeconfig.\n\n## `ExecCredentialSpec` {#client-authentication-k8s-io-v1-ExecCredentialSpec}\n\n**Appears in:**\n\n- [ExecCredential](#client-authentication-k8s-io-v1-ExecCredential)\n\nExecCredentialSpec holds request and runtime specific information provided by\nthe transport.\n\nField Description\n\ncluster\n\nCluster\n\nCluster contains information to allow an exec plugin to communicate with the\nkubernetes cluster being authenticated to. Note that Cluster is non-nil only\nwhen provideClusterInfo is set to true in the exec provider config (i.e.,\nExecConfig.ProvideClusterInfo).\n\ninteractive [Required]\n\nbool\n\nInteractive declares whether stdin has been passed to this exec plugin.\n\n## `ExecCredentialStatus` {#client-authentication-k8s-io-v1-ExecCredentialStatus}\n\n**Appears in:**\n\n- [ExecCredential](#client-authentication-k8s-io-v1-ExecCredential)\n\nExecCredentialStatus holds credentials for the transport to use.\nToken and ClientKeyData are sensitive fields. This data should only be\ntransmitted in-memory between client and exec plugin process. Exec plugin\nitself should at least be protected via file permissions.\n\nField Description\n\nexpirationTimestamp\n\nmeta/v1.Time\n\nExpirationTimestamp indicates a time when the provided credentials expire.\n\ntoken [Required]\n\nstring\n\nToken is a bearer token used by the client for request authentication.\n\nclientCertificateData [Required]\n\nstring\n\nPEM-encoded client TLS certificates (including intermediates, if any).\n\nclientKeyData [Required]\n\nstring\n\nPEM-encoded private key for the above certificate.", "source": "content/en/docs/reference/config-api/client-authentication.v1.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "## Resource Types\n\n- [DefaultPreemptionArgs](#kubescheduler-config-k8s-io-v1-DefaultPreemptionArgs)\n- [DynamicResourcesArgs](#kubescheduler-config-k8s-io-v1-DynamicResourcesArgs)\n- [InterPodAffinityArgs](#kubescheduler-config-k8s-io-v1-InterPodAffinityArgs)\n- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1-KubeSchedulerConfiguration)\n- [NodeAffinityArgs](#kubescheduler-config-k8s-io-v1-NodeAffinityArgs)\n- [NodeResourcesBalancedAllocationArgs](#kubescheduler-config-k8s-io-v1-NodeResourcesBalancedAllocationArgs)\n- [NodeResourcesFitArgs](#kubescheduler-config-k8s-io-v1-NodeResourcesFitArgs)\n- [PodTopologySpreadArgs](#kubescheduler-config-k8s-io-v1-PodTopologySpreadArgs)\n- [VolumeBindingArgs](#kubescheduler-config-k8s-io-v1-VolumeBindingArgs)\n\n## `ClientConnectionConfiguration` {#ClientConnectionConfiguration}\n\n**Appears in:**\n\n- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1-KubeSchedulerConfiguration)\n\nClientConnectionConfiguration contains details for constructing a client.\n\nField Description\n\nkubeconfig [Required]\n\nstring\n\nkubeconfig is the path to a KubeConfig file.\n\nacceptContentTypes [Required]\n\nstring\n\nacceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the\ndefault value of 'application/json'. This field will control all connections to the server used by a particular\nclient.\n\ncontentType [Required]\n\nstring\n\ncontentType is the content type used when sending data to the server from this client.\n\nqps [Required]\n\nfloat32\n\nqps controls the number of queries per second allowed for this connection.\n\nburst [Required]\n\nint32\n\nburst allows extra queries to accumulate when a client is exceeding its rate.\n\n## `DebuggingConfiguration` {#DebuggingConfiguration}\n\n**Appears in:**\n\n- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1-KubeSchedulerConfiguration)\n\nDebuggingConfiguration holds configuration for Debugging related features.\n\nField Description\n\nenableProfiling [Required]\n\nbool\n\nenableProfiling enables profiling via web interface host:port/debug/pprof/\n\nenableContentionProfiling [Required]\n\nbool\n\nenableContentionProfiling enables block profiling, if\nenableProfiling is true.\n\n## `LeaderElectionConfiguration` {#LeaderElectionConfiguration}\n\n**Appears in:**\n\n- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1-KubeSchedulerConfiguration)\n\nLeaderElectionConfiguration defines the configuration of leader election\nclients for components that can run with leader election enabled.\n\nField Description\n\nleaderElect [Required]\n\nbool\n\nleaderElect enables a leader election client to gain leadership\nbefore executing the main loop. Enable this when running replicated\ncomponents for high availability.\n\nleaseDuration [Required]\n\nmeta/v1.Duration\n\nleaseDuration is the duration that non-leader candidates will wait\nafter observing a leadership renewal until attempting to acquire\nleadership of a led but unrenewed leader slot. This is effectively the\nmaximum duration that a leader can be stopped before it is replaced\nby another candidate. This is only applicable if leader election is\nenabled.\n\nrenewDeadline [Required]\n\nmeta/v1.Duration\n\nrenewDeadline is the interval between attempts by the acting master to\nrenew a leadership slot before it stops leading. This must be less\nthan or equal to the lease duration. This is only applicable if leader\nelection is enabled.\n\nretryPeriod [Required]\n\nmeta/v1.Duration\n\nretryPeriod is the duration the clients should wait between attempting\nacquisition and renewal of a leadership. This is only applicable if\nleader election is enabled.\n\nresourceLock [Required]\n\nstring\n\nresourceLock indicates the resource object type that will be used to lock\nduring leader election cycles.\n\nresourceName [Required]\n\nstring\n\nresourceName indicates the name of resource object that will be used to lock\nduring leader election cycles.\n\nresourceNamespace [Required]\n\nstring\n\nresourceName indicates the namespace of resource object that will be used to lock\nduring leader election cycles.\n\n## `DefaultPreemptionArgs` {#kubescheduler-config-k8s-io-v1-DefaultPreemptionArgs}\n\nDefaultPreemptionArgs holds arguments used to configure the\nDefaultPreemption plugin.\n\nField Description\n\napiVersion\nstring kubescheduler.config.k8s.io/v1\nkind\nstring DefaultPreemptionArgs\n\nminCandidateNodesPercentage [Required]\n\nint32\n\nMinCandidateNodesPercentage is the minimum number of candidates to\nshortlist when dry running preemption as a percentage of number of nodes.\nMust be in the range [0, 100]. Defaults to 10% of the cluster size if\nunspecified.\n\nminCandidateNodesAbsolute [Required]\n\nint32\n\nMinCandidateNodesAbsolute is the absolute minimum number of candidates to\nshortlist. The likely number of candidates enumerated for dry running\npreemption is given by the formula:\nnumCandidates = max(numNodes * minCandidateNodesPercentage, minCandidateNodesAbsolute)\nWe say \"likely\" because there are other factors such as PDB violations\nthat play a role in the number of candidates shortlisted. Must be at least\n0 nodes. Defaults to 100 nodes if unspecified.\n\n## `DynamicResourcesArgs` {#kubescheduler-config-k8s-io-v1-DynamicResourcesArgs}\n\nDynamicResourcesArgs holds arguments used to configure the DynamicResources plugin.\n\nField Description\n\napiVersion\nstring kubescheduler.config.k8s.io/v1\nkind\nstring DynamicResourcesArgs\n\nfilterTimeout [Required]\n\nmeta/v1.Duration\n\nFilterTimeout limits the amount of time that the filter operation may\ntake per node to search for devices that can be allocated to scheduler\na pod to that node.\nIn typical scenarios, this operation should complete in 10 to 200\nmilliseconds, but could also be longer depending on the number of\nrequests per ResourceClaim, number of ResourceClaims, number of\npublished devices in ResourceSlices, and the complexity of the\nrequests. Other checks besides CEL evaluation also take time (usage\nchecks, match attributes, etc.).\nTherefore the scheduler plugin applies this timeout. If the timeout\nis reached, the Pod is considered unschedulable for the node.\nIf filtering succeeds for some other node(s), those are picked instead.\nIf filtering fails for all of them, the Pod is placed in the\nunschedulable queue. It will get checked again if changes in\ne.g. ResourceSlices or ResourceClaims indicate that\nanother scheduling attempt might succeed. If this fails repeatedly,\nexponential backoff slows down future attempts.\nThe default is 10 seconds.\nThis is sufficient to prevent worst-case scenarios while not impacting normal\nusage of DRA. However, slow filtering can slow down Pod scheduling\nalso for Pods not using DRA. Administators can reduce the timeout\nafter checking the\nscheduler_framework_extension_point_duration_seconds metrics.\nSetting it to zero completely disables the timeout.\n\nbindingTimeout [Required]\n\nmeta/v1.Duration\n\nBindingTimeout limits how long the PreBind extension point may wait for\nResourceClaim device BindingConditions to become satisfied when such\nconditions are present. While waiting, the scheduler periodically checks\ndevice status. If the timeout elapses before all required conditions are\ntrue (or any bindingFailureConditions become true), the allocation is\ncleared and the Pod re-enters scheduling queue. Note that the same or other node may be\nchosen if feasible; otherwise the Pod is placed in the unschedulable queue and\nretried based on cluster changes and backoff.\nDefaults & feature gates:\n\nDefaults to 10 minutes when the DRADeviceBindingConditions feature gate is enabled.\nHas effect only when BOTH DRADeviceBindingConditions and\nDRAResourceClaimDeviceStatus are enabled; otherwise omit this field.\nWhen DRADeviceBindingConditions is disabled, setting this field is considered an error.\n\nValid values:\n\n=1s (non-zero). No upper bound is enforced.\n\nTuning guidance:\n\nLower values reduce time-to-retry when devices aren’t ready but can\nincrease churn if drivers typically need longer to report readiness.\nReview scheduler latency metrics (e.g. PreBind duration in\nscheduler_framework_extension_point_duration_seconds ) and driver\nreadiness behavior before tightening this timeout.\n\n## `InterPodAffinityArgs` {#kubescheduler-config-k8s-io-v1-InterPodAffinityArgs}\n\nInterPodAffinityArgs holds arguments used to configure the InterPodAffinity plugin.\n\nField Description\n\napiVersion\nstring kubescheduler.config.k8s.io/v1\nkind\nstring InterPodAffinityArgs\n\nhardPodAffinityWeight [Required]\n\nint32\n\nHardPodAffinityWeight is the scoring weight for existing pods with a\nmatching hard affinity to the incoming pod.\n\nignorePreferredTermsOfExistingPods [Required]\n\nbool\n\nIgnorePreferredTermsOfExistingPods configures the scheduler to ignore existing pods' preferred affinity\nrules when scoring candidate nodes, unless the incoming pod has inter-pod affinities.\n\n## `KubeSchedulerConfiguration` {#kubescheduler-config-k8s-io-v1-KubeSchedulerConfiguration}\n\nKubeSchedulerConfiguration configures a scheduler\n\nField Description\n\napiVersion\nstring kubescheduler.config.k8s.io/v1\nkind\nstring KubeSchedulerConfiguration\n\nparallelism [Required]\n\nint32\n\nParallelism defines the amount of parallelism in algorithms for scheduling a Pods. Must be greater than 0. Defaults to 16\n\nleaderElection [Required]\n\nLeaderElectionConfiguration\n\nLeaderElection defines the configuration of leader election client.\n\nclientConnection [Required]\n\nClientConnectionConfiguration\n\nClientConnection specifies the kubeconfig file and client connection\nsettings for the proxy server to use when communicating with the apiserver.\n\nDebuggingConfiguration [Required]\n\nDebuggingConfiguration\n\nDebuggingConfiguration holds configuration for Debugging related features\nTODO: We might wanna make this a substruct like Debugging componentbaseconfigv1alpha1.DebuggingConfiguration\n\npercentageOfNodesToScore [Required]\n\nint32\n\nPercentageOfNodesToScore is the percentage of all nodes that once found feasible\nfor running a pod, the scheduler stops its search for more feasible nodes in\nthe cluster. This helps improve scheduler's performance. Scheduler always tries to find\nat least \"minFeasibleNodesToFind\" feasible nodes no matter what the value of this flag is.\nExample: if the cluster size is 500 nodes and the value of this flag is 30,\nthen scheduler stops finding further feasible nodes once it finds 150 feasible ones.\nWhen the value is 0, default percentage (5%--50% based on the size of the cluster) of the\nnodes will be scored. It is overridden by profile level PercentageOfNodesToScore.\n\npodInitialBackoffSeconds [Required]\n\nint64\n\nPodInitialBackoffSeconds is the initial backoff for unschedulable pods.\nIf specified, it must be greater than 0. If this value is null, the default value (1s)\nwill be used.\n\npodMaxBackoffSeconds [Required]\n\nint64\n\nPodMaxBackoffSeconds is the max backoff for unschedulable pods.\nIf specified, it must be greater than podInitialBackoffSeconds. If this value is null,\nthe default value (10s) will be used.\n\nprofiles [Required]\n\n[]KubeSchedulerProfile\n\nProfiles are scheduling profiles that kube-scheduler supports. Pods can\nchoose to be scheduled under a particular profile by setting its associated\nscheduler name. Pods that don't specify any scheduler name are scheduled\nwith the \"default-scheduler\" profile, if present here.\n\nextenders [Required]\n\n[]Extender\n\nExtenders are the list of scheduler extenders, each holding the values of how to communicate\nwith the extender. These extenders are shared by all scheduler profiles.\n\ndelayCacheUntilActive [Required]\n\nbool\n\nDelayCacheUntilActive specifies when to start caching. If this is true and leader election is enabled,\nthe scheduler will wait to fill informer caches until it is the leader. Doing so will have slower\nfailover with the benefit of lower memory overhead while waiting to become leader.\nDefaults to false.\n\n## `NodeAffinityArgs` {#kubescheduler-config-k8s-io-v1-NodeAffinityArgs}\n\nNodeAffinityArgs holds arguments to configure the NodeAffinity plugin.\n\nField Description\n\napiVersion\nstring kubescheduler.config.k8s.io/v1\nkind\nstring NodeAffinityArgs\n\naddedAffinity\n\ncore/v1.NodeAffinity\n\nAddedAffinity is applied to all Pods additionally to the NodeAffinity\nspecified in the PodSpec. That is, Nodes need to satisfy AddedAffinity\nAND .spec.NodeAffinity. AddedAffinity is empty by default (all Nodes\nmatch).\nWhen AddedAffinity is used, some Pods with affinity requirements that match\na specific Node (such as Daemonset Pods) might remain unschedulable.\n\n## `NodeResourcesBalancedAllocationArgs` {#kubescheduler-config-k8s-io-v1-NodeResourcesBalancedAllocationArgs}\n\nNodeResourcesBalancedAllocationArgs holds arguments used to configure NodeResourcesBalancedAllocation plugin.\n\nField Description\n\napiVersion\nstring kubescheduler.config.k8s.io/v1\nkind\nstring NodeResourcesBalancedAllocationArgs\n\nresources [Required]\n\n[]ResourceSpec\n\nResources to be managed, the default is \"cpu\" and \"memory\" if not specified.\n\n## `NodeResourcesFitArgs` {#kubescheduler-config-k8s-io-v1-NodeResourcesFitArgs}\n\nNodeResourcesFitArgs holds arguments used to configure the NodeResourcesFit plugin.\n\nField Description\n\napiVersion\nstring kubescheduler.config.k8s.io/v1\nkind\nstring NodeResourcesFitArgs\n\nignoredResources [Required]\n\n[]string\n\nIgnoredResources is the list of resources that NodeResources fit filter\nshould ignore. This doesn't apply to scoring.\n\nignoredResourceGroups [Required]\n\n[]string\n\nIgnoredResourceGroups defines the list of resource groups that NodeResources fit filter should ignore.\ne.g. if group is [\"example.com\"], it will ignore all resource names that begin\nwith \"example.com\", such as \"example.com/aaa\" and \"example.com/bbb\".\nA resource group name can't contain '/'. This doesn't apply to scoring.\n\nscoringStrategy [Required]\n\nScoringStrategy\n\nScoringStrategy selects the node resource scoring strategy.\nThe default strategy is LeastAllocated with an equal \"cpu\" and \"memory\" weight.\n\n## `PodTopologySpreadArgs` {#kubescheduler-config-k8s-io-v1-PodTopologySpreadArgs}\n\nPodTopologySpreadArgs holds arguments used to configure the PodTopologySpread plugin.\n\nField Description\n\napiVersion\nstring kubescheduler.config.k8s.io/v1\nkind\nstring PodTopologySpreadArgs\n\ndefaultConstraints\n\n[]core/v1.TopologySpreadConstraint\n\nDefaultConstraints defines topology spread constraints to be applied to\nPods that don't define any in pod.spec.topologySpreadConstraints .\n.defaultConstraints[*].labelSelectors must be empty, as they are\ndeduced from the Pod's membership to Services, ReplicationControllers,\nReplicaSets or StatefulSets.\nWhen not empty, .defaultingType must be \"List\".\n\ndefaultingType\n\nPodTopologySpreadConstraintsDefaulting\n\nDefaultingType determines how .defaultConstraints are deduced. Can be one\nof \"System\" or \"List\".\n\n\"System\": Use kubernetes defined constraints that spread Pods among\nNodes and Zones.\n\"List\": Use constraints defined in .defaultConstraints.\n\nDefaults to \"System\".\n\n## `VolumeBindingArgs` {#kubescheduler-config-k8s-io-v1-VolumeBindingArgs}\n\nVolumeBindingArgs holds arguments used to configure the VolumeBinding plugin.\n\nField Description\n\napiVersion\nstring kubescheduler.config.k8s.io/v1\nkind\nstring VolumeBindingArgs\n\nbindTimeoutSeconds [Required]\n\nint64\n\nBindTimeoutSeconds is the timeout in seconds in volume binding operation.\nValue must be non-negative integer. The value zero indicates no waiting.\nIf this value is nil, the default value (600) will be used.\n\nshape\n\n[]UtilizationShapePoint\n\nShape specifies the points defining the score function shape, which is\nused to score nodes based on the utilization of provisioned PVs.\nThe utilization is calculated by dividing the total requested\nstorage of the pod by the total capacity of feasible PVs on each node.\nEach point contains utilization (ranges from 0 to 100) and its\nassociated score (ranges from 0 to 10). You can turn the priority by\nspecifying different scores for different utilization numbers.\nThe default shape points are:\n\n10 for 0 utilization\n0 for 100 utilization\nAll points must be sorted in increasing order by utilization.\n\n## `Extender` {#kubescheduler-config-k8s-io-v1-Extender}\n\n**Appears in:**\n\n- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1-KubeSchedulerConfiguration)\n\nExtender holds the parameters used to communicate with the extender. If a verb is unspecified/empty,\nit is assumed that the extender chose not to provide that extension.\n\nField Description\n\nurlPrefix [Required]\n\nstring\n\nURLPrefix at which the extender is available\n\nfilterVerb [Required]\n\nstring\n\nVerb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender.\n\npreemptVerb [Required]\n\nstring\n\nVerb for the preempt call, empty if not supported. This verb is appended to the URLPrefix when issuing the preempt call to extender.\n\nprioritizeVerb [Required]\n\nstring\n\nVerb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender.\n\nweight [Required]\n\nint64\n\nThe numeric multiplier for the node scores that the prioritize call generates.\nThe weight should be a positive integer\n\nbindVerb [Required]\n\nstring\n\nVerb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender.\nIf this method is implemented by the extender, it is the extender's responsibility to bind the pod to apiserver. Only one extender\ncan implement this function.\n\nenableHTTPS [Required]\n\nbool\n\nEnableHTTPS specifies whether https should be used to communicate with the extender\n\ntlsConfig [Required]\n\nExtenderTLSConfig\n\nTLSConfig specifies the transport layer security config\n\nhttpTimeout [Required]\n\nmeta/v1.Duration\n\nHTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize\ntimeout is ignored, k8s/other extenders priorities are used to select the node.\n\nnodeCacheCapable [Required]\n\nbool\n\nNodeCacheCapable specifies that the extender is capable of caching node information,\nso the scheduler should only send minimal information about the eligible nodes\nassuming that the extender already cached full details of all nodes in the cluster\n\nmanagedResources\n\n[]ExtenderManagedResource\n\nManagedResources is a list of extended resources that are managed by\nthis extender.\n\nA pod will be sent to the extender on the Filter, Prioritize and Bind\n(if the extender is the binder) phases iff the pod requests at least\none of the extended resources in this list. If empty or unspecified,\nall pods will be sent to this extender.\nIf IgnoredByScheduler is set to true for a resource, kube-scheduler\nwill skip checking the resource in predicates.\n\nignorable [Required]\n\nbool\n\nIgnorable specifies if the extender is ignorable, i.e. scheduling should not\nfail when the extender returns an error or is not reachable.\n\n## `ExtenderManagedResource` {#kubescheduler-config-k8s-io-v1-ExtenderManagedResource}\n\n**Appears in:**\n\n- [Extender](#kubescheduler-config-k8s-io-v1-Extender)\n\nExtenderManagedResource describes the arguments of extended resources\nmanaged by an extender.\n\nField Description\n\nname [Required]\n\nstring\n\nName is the extended resource name.\n\nignoredByScheduler [Required]\n\nbool\n\nIgnoredByScheduler indicates whether kube-scheduler should ignore this\nresource when applying predicates.\n\n## `ExtenderTLSConfig` {#kubescheduler-config-k8s-io-v1-ExtenderTLSConfig}\n\n**Appears in:**\n\n- [Extender](#kubescheduler-config-k8s-io-v1-Extender)\n\nExtenderTLSConfig contains settings to enable TLS with extender\n\nField Description\n\ninsecure [Required]\n\nbool\n\nServer should be accessed without verifying the TLS certificate. For testing only.\n\nserverName [Required]\n\nstring\n\nServerName is passed to the server for SNI and is used in the client to check server\ncertificates against. If ServerName is empty, the hostname used to contact the\nserver is used.\n\ncertFile [Required]\n\nstring\n\nServer requires TLS client certificate authentication\n\nkeyFile [Required]\n\nstring\n\nServer requires TLS client certificate authentication\n\ncaFile [Required]\n\nstring\n\nTrusted root certificates for server\n\ncertData [Required]\n\n[]byte\n\nCertData holds PEM-encoded bytes (typically read from a client certificate file).\nCertData takes precedence over CertFile\n\nkeyData [Required]\n\n[]byte\n\nKeyData holds PEM-encoded bytes (typically read from a client certificate key file).\nKeyData takes precedence over KeyFile\n\ncaData [Required]\n\n[]byte\n\nCAData holds PEM-encoded bytes (typically read from a root certificates bundle).\nCAData takes precedence over CAFile\n\n## `KubeSchedulerProfile` {#kubescheduler-config-k8s-io-v1-KubeSchedulerProfile}\n\n**Appears in:**\n\n- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1-KubeSchedulerConfiguration)\n\nKubeSchedulerProfile is a scheduling profile.\n\nField Description\n\nschedulerName [Required]\n\nstring\n\nSchedulerName is the name of the scheduler associated to this profile.\nIf SchedulerName matches with the pod's \"spec.schedulerName\", then the pod\nis scheduled with this profile.\n\npercentageOfNodesToScore [Required]\n\nint32\n\nPercentageOfNodesToScore is the percentage of all nodes that once found feasible\nfor running a pod, the scheduler stops its search for more feasible nodes in\nthe cluster. This helps improve scheduler's performance. Scheduler always tries to find\nat least \"minFeasibleNodesToFind\" feasible nodes no matter what the value of this flag is.\nExample: if the cluster size is 500 nodes and the value of this flag is 30,\nthen scheduler stops finding further feasible nodes once it finds 150 feasible ones.\nWhen the value is 0, default percentage (5%--50% based on the size of the cluster) of the\nnodes will be scored. It will override global PercentageOfNodesToScore. If it is empty,\nglobal PercentageOfNodesToScore will be used.\n\nplugins [Required]\n\nPlugins\n\nPlugins specify the set of plugins that should be enabled or disabled.\nEnabled plugins are the ones that should be enabled in addition to the\ndefault plugins. Disabled plugins are any of the default plugins that\nshould be disabled.\nWhen no enabled or disabled plugin is specified for an extension point,\ndefault plugins for that extension point will be used if there is any.\nIf a QueueSort plugin is specified, the same QueueSort Plugin and\nPluginConfig must be specified for all profiles.\n\npluginConfig [Required]\n\n[]PluginConfig\n\nPluginConfig is an optional set of custom plugin arguments for each plugin.\nOmitting config args for a plugin is equivalent to using the default config\nfor that plugin.\n\n## `Plugin` {#kubescheduler-config-k8s-io-v1-Plugin}\n\n**Appears in:**\n\n- [PluginSet](#kubescheduler-config-k8s-io-v1-PluginSet)\n\nPlugin specifies a plugin name and its weight when applicable. Weight is used only for Score and PlacementScore plugins.\n\nField Description\n\nname [Required]\n\nstring\n\nName defines the name of plugin\n\nweight [Required]\n\nint32\n\nWeight defines the weight of plugin, only used for Score and PlacementScore plugins.\n\n## `PluginConfig` {#kubescheduler-config-k8s-io-v1-PluginConfig}\n\n**Appears in:**\n\n- [KubeSchedulerProfile](#kubescheduler-config-k8s-io-v1-KubeSchedulerProfile)\n\nPluginConfig specifies arguments that should be passed to a plugin at the time of initialization.\nA plugin that is invoked at multiple extension points is initialized once. Args can have arbitrary structure.\nIt is up to the plugin to process these Args.\n\nField Description\n\nname [Required]\n\nstring\n\nName defines the name of plugin being configured\n\nargs [Required]\n\nk8s.io/apimachinery/pkg/runtime.RawExtension\n\nArgs defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure.\n\n## `PluginSet` {#kubescheduler-config-k8s-io-v1-PluginSet}\n\n**Appears in:**\n\n- [Plugins](#kubescheduler-config-k8s-io-v1-Plugins)\n\nPluginSet specifies enabled and disabled plugins for an extension point.\nIf an array is empty, missing, or nil, default plugins at that extension point will be used.\n\nField Description\n\nenabled [Required]\n\n[]Plugin\n\nEnabled specifies plugins that should be enabled in addition to default plugins.\nIf the default plugin is also configured in the scheduler config file, the weight of plugin will\nbe overridden accordingly.\nThese are called after default plugins and in the same order specified here.\n\ndisabled [Required]\n\n[]Plugin\n\nDisabled specifies default plugins that should be disabled.\nWhen all default plugins need to be disabled, an array containing only one \"*\" should be provided.\n\n## `Plugins` {#kubescheduler-config-k8s-io-v1-Plugins}\n\n**Appears in:**\n\n- [KubeSchedulerProfile](#kubescheduler-config-k8s-io-v1-KubeSchedulerProfile)\n\nPlugins include multiple extension points. When specified, the list of plugins for\na particular extension point are the only ones enabled. If an extension point is\nomitted from the config, then the default set of plugins is used for that extension point.\nEnabled plugins are called in the order specified here, after default plugins. If they need to\nbe invoked before default plugins, default plugins must be disabled and re-enabled here in desired order.\n\nField Description\n\npreEnqueue [Required]\n\nPluginSet\n\nPreEnqueue is a list of plugins that should be invoked before adding pods to the scheduling queue.\n\nqueueSort [Required]\n\nPluginSet\n\nQueueSort is a list of plugins that should be invoked when sorting pods in the scheduling queue.\n\npreFilter [Required]\n\nPluginSet\n\nPreFilter is a list of plugins that should be invoked at \"PreFilter\" extension point of the scheduling framework.\n\nfilter [Required]\n\nPluginSet\n\nFilter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod.\n\npostFilter [Required]\n\nPluginSet\n\nPostFilter is a list of plugins that are invoked after filtering phase, but only when no feasible nodes were found for the pod.\n\npreScore [Required]\n\nPluginSet\n\nPreScore is a list of plugins that are invoked before scoring.\n\nscore [Required]\n\nPluginSet\n\nScore is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase.\n\nreserve [Required]\n\nPluginSet\n\nReserve is a list of plugins invoked when reserving/unreserving resources\nafter a node is assigned to run the pod.\n\npermit [Required]\n\nPluginSet\n\nPermit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod.\n\npreBind [Required]\n\nPluginSet\n\nPreBind is a list of plugins that should be invoked before a pod is bound.\n\nbind [Required]\n\nPluginSet\n\nBind is a list of plugins that should be invoked at \"Bind\" extension point of the scheduling framework.\nThe scheduler call these plugins in order. Scheduler skips the rest of these plugins as soon as one returns success.\n\npostBind [Required]\n\nPluginSet\n\nPostBind is a list of plugins that should be invoked after a pod is successfully bound.\n\nmultiPoint [Required]\n\nPluginSet\n\nMultiPoint is a simplified config section to enable plugins for all valid extension points.\nPlugins enabled through MultiPoint will automatically register for every individual extension\npoint the plugin has implemented. Disabling a plugin through MultiPoint disables that behavior.\nThe same is true for disabling \"*\" through MultiPoint (no default plugins will be automatically registered).\nPlugins can still be disabled through their individual extension points.\nIn terms of precedence, plugin config follows this basic hierarchy\n\nSpecific extension points\nExplicitly configured MultiPoint plugins\nThe set of default plugins, as MultiPoint plugins\nThis implies that a higher precedence plugin will run first and overwrite any settings within MultiPoint.\nExplicitly user-configured plugins also take a higher precedence over default plugins.\nWithin this hierarchy, an Enabled setting takes precedence over Disabled. For example, if a plugin is\nset in both multiPoint.Enabled and multiPoint.Disabled , the plugin will be enabled. Similarly,\nincluding multiPoint.Disabled = '*' and multiPoint.Enabled = pluginA will still register that specific\nplugin through MultiPoint. This follows the same behavior as all other extension point configurations.\n\nplacementGenerate [Required]\n\nPluginSet\n\nPlacementGenerate is a list of plugins that should be invoked during pod group scheduling cycle when determining placements for a pod group.\n\nplacementScore [Required]\n\nPluginSet\n\nPlacementScore is a list of plugins that should be invoked during workload scheduling cycle when ranking pod group assignments.\n\npodGroupPostFilter [Required]\n\nPluginSet\n\nPodGroupPostFilter is a list of plugins that are invoked after the workload scheduling phase,\nbut only when the PodGroup cannot be scheduled (equivalent to PostFilter for single pods).\n\n## `PodTopologySpreadConstraintsDefaulting` {#kubescheduler-config-k8s-io-v1-PodTopologySpreadConstraintsDefaulting}\n\n(Alias of `string`)\n\n**Appears in:**\n\n- [PodTopologySpreadArgs](#kubescheduler-config-k8s-io-v1-PodTopologySpreadArgs)\n\nPodTopologySpreadConstraintsDefaulting defines how to set default constraints\nfor the PodTopologySpread plugin.\n\n## `RequestedToCapacityRatioParam` {#kubescheduler-config-k8s-io-v1-RequestedToCapacityRatioParam}\n\n**Appears in:**\n\n- [ScoringStrategy](#kubescheduler-config-k8s-io-v1-ScoringStrategy)\n\nRequestedToCapacityRatioParam define RequestedToCapacityRatio parameters\n\nField Description\n\nshape [Required]\n\n[]UtilizationShapePoint\n\nShape is a list of points defining the scoring function shape.\n\n## `ResourceSpec` {#kubescheduler-config-k8s-io-v1-ResourceSpec}\n\n**Appears in:**\n\n- [NodeResourcesBalancedAllocationArgs](#kubescheduler-config-k8s-io-v1-NodeResourcesBalancedAllocationArgs)\n\n- [ScoringStrategy](#kubescheduler-config-k8s-io-v1-ScoringStrategy)\n\nResourceSpec represents a single resource.\n\nField Description\n\nname [Required]\n\nstring\n\nName of the resource.\n\nweight [Required]\n\nint64\n\nWeight of the resource.\n\n## `ScoringStrategy` {#kubescheduler-config-k8s-io-v1-ScoringStrategy}\n\n**Appears in:**\n\n- [NodeResourcesFitArgs](#kubescheduler-config-k8s-io-v1-NodeResourcesFitArgs)\n\nScoringStrategy define ScoringStrategyType for node resource plugin\n\nField Description\n\ntype [Required]\n\nScoringStrategyType\n\nType selects which strategy to run.\n\nresources [Required]\n\n[]ResourceSpec\n\nResources to consider when scoring.\nThe default resource set includes \"cpu\" and \"memory\" with an equal weight.\nAllowed weights go from 1 to 100.\nWeight defaults to 1 if not specified or explicitly set to 0.\n\nrequestedToCapacityRatio [Required]\n\nRequestedToCapacityRatioParam\n\nArguments specific to RequestedToCapacityRatio strategy.\n\n## `ScoringStrategyType` {#kubescheduler-config-k8s-io-v1-ScoringStrategyType}\n\n(Alias of `string`)\n\n**Appears in:**\n\n- [ScoringStrategy](#kubescheduler-config-k8s-io-v1-ScoringStrategy)\n\nScoringStrategyType the type of scoring strategy used in NodeResourcesFit plugin.\n\n## `UtilizationShapePoint` {#kubescheduler-config-k8s-io-v1-UtilizationShapePoint}\n\n**Appears in:**\n\n- [VolumeBindingArgs](#kubescheduler-config-k8s-io-v1-VolumeBindingArgs)\n\n- [RequestedToCapacityRatioParam](#kubescheduler-config-k8s-io-v1-RequestedToCapacityRatioParam)\n\nUtilizationShapePoint represents single point of priority function shape.\n\nField Description\n\nutilization [Required]\n\nint32\n\nUtilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100.\n\nscore [Required]\n\nint32\n\nScore assigned to given utilization (y axis). Valid values are 0 to 10.", "source": "content/en/docs/reference/config-api/kube-scheduler-config.v1.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "In Kubernetes, _affinity_ is a set of rules that give hints to the scheduler about where to place pods.\n\nThere are two kinds of affinity:\n* [node affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity)\n* [pod-to-pod affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity)\n\nThe rules are defined using the Kubernetes labels,\nand selectors specified in pods,\nand they can be either required or preferred, depending on how strictly you want the scheduler to enforce them.", "source": "content/en/docs/reference/glossary/affinity.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "cAdvisor (Container Advisor) provides container users an understanding of the resource\nusage and performance characteristics of their running containers.\n\nIt is a running daemon that collects, aggregates, processes, and exports information about running containers. Specifically, for each container it keeps resource isolation parameters, historical resource usage, histograms of complete historical resource usage and network statistics. This data is exported by container and machine-wide.", "source": "content/en/docs/reference/glossary/cadvisor.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "CIDR (Classless Inter-Domain Routing) is a notation for describing blocks of IP addresses and is used heavily in various networking configurations.\n\nIn the context of Kubernetes, each Node is assigned a range of IP addresses through the start address and a subnet mask using CIDR. This allows Nodes to assign each Pod a unique IP address. Although originally a concept for IPv4, CIDR has also been expanded to include IPv6.", "source": "content/en/docs/reference/glossary/cidr.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Someone who donates code, documentation, or their time to help the Kubernetes project or community.\n\nContributions include pull requests (PRs), issues, feedback, special interest groups (SIG) participation, or organizing community events.", "source": "content/en/docs/reference/glossary/contributor.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "The main protocol for the communication between the kubelet and Container Runtime.\n\nThe Kubernetes Container Runtime Interface (CRI) defines the main\n[gRPC](https://grpc.io) protocol for the communication between the\n[node components](/docs/concepts/architecture/#node-components)\nkubelet and\ncontainer runtime.", "source": "content/en/docs/reference/glossary/cri.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "An API object that manages a replicated application, typically by running Pods with no local state.\n\nEach replica is represented by a , and the Pods are distributed among the\nnodes of a cluster.\nFor workloads that do require local state, consider using a .", "source": "content/en/docs/reference/glossary/deployment.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "The dockershim is a component of Kubernetes version 1.23 and earlier. It allows the kubelet\nto communicate with Docker Engine.\n\nStarting with version 1.24, dockershim has been removed from Kubernetes. For more information, see [Dockershim FAQ](/dockershim).", "source": "content/en/docs/reference/glossary/dockershim.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "May refer to: code in the Kubernetes ecosystem that depends upon the core Kubernetes codebase or a forked repo.\n\n* In the **Kubernetes Community**: Conversations often use *downstream* to mean the ecosystem, code, or third-party tools that rely on the core Kubernetes codebase. For example, a new feature in Kubernetes may be adopted by applications *downstream* to improve their functionality.\n* In **GitHub** or **git**: The convention is to refer to a forked repo as *downstream*, whereas the source repo is considered *upstream*.", "source": "content/en/docs/reference/glossary/downstream.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "A type that you can temporarily run inside a .\n\nIf you want to investigate a Pod that's running with problems, you can add an ephemeral container to that Pod and carry out diagnostics.\nEphemeral containers have no resource or scheduling guarantees,\nand you should not use them to run any part of the workload itself.\n\nEphemeral containers are not supported by static pods.", "source": "content/en/docs/reference/glossary/ephemeral-container.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "An object that automatically scales the number of replicas,\nbased on targeted resource utilization or custom metric targets.\n\nHorizontalPodAutoscaler (HPA) is typically used with Deployments, or ReplicaSets. It cannot be applied to objects that cannot be scaled, for example DaemonSets.", "source": "content/en/docs/reference/glossary/horizontal-pod-autoscaler.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Specification of a Kubernetes API object in [JSON](https://www.json.org/json-en.html)\nor [YAML](https://yaml.org/) format.\n\nA manifest specifies the desired state of an object that Kubernetes will maintain when you apply the manifest.\nFor YAML format, each file can contain multiple manifests.", "source": "content/en/docs/reference/glossary/manifest.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "A person who customizes the Kubernetes platform to fit the needs of their project.\n\nA platform developer may, for example, use [Custom Resources](/docs/concepts/extend-kubernetes/api-extension/custom-resources/) or\n[Extend the Kubernetes API with the aggregation layer](/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/)\nto add functionality to their instance of Kubernetes, specifically for their application.\nSome Platform Developers are also contributors and\ndevelop extensions which are contributed to the Kubernetes community.\nOthers develop closed-source commercial or site-specific extensions.", "source": "content/en/docs/reference/glossary/platform-developer.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "A former Kubernetes API that enforced security restrictions during creation and updates.\n\nPodSecurityPolicy was deprecated as of Kubernetes v1.21, and removed in v1.25.\nAs an alternative, use [Pod Security Admission](/docs/concepts/security/pod-security-admission/) or a 3rd party admission plugin.", "source": "content/en/docs/reference/glossary/pod-security-policy.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "A check that the kubelet periodically performs against a container that is\nrunning in a pod, that will define container's state and health and informing container's lifecycle.\n\nTo learn more, read [container probes](/docs/concepts/workloads/pods/pod-lifecycle/#container-probes).", "source": "content/en/docs/reference/glossary/probe.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Subject Alternative Name is an X.509 certificate\nextension that allows identities to be bound to the subject of the certificate.\n\nThe [standard](https://datatracker.ietf.org/doc/html/rfc4985) defines identities represented\nas an email address, a DNS name, an IP address or a Uniform Resource Identifier (URI).", "source": "content/en/docs/reference/glossary/san.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "The [kubelet](/docs/reference/command-line-tools-reference/kubelet/)\ngathers metric statistics at the node, volume, pod and container level,\nand emits this information in the\n[Summary API](/docs/reference/kubelet-api/stats.v1alpha1/).\n\nYou can send a proxied request to the stats summary API via the\nKubernetes API server.\n\nHere is an example of a Summary API request for a node named `minikube`:\n\n```shell\nkubectl get --raw \"/api/v1/nodes/minikube/proxy/stats/summary\"\n```\n\nHere is the same API call using `curl`:\n\n```shell\n# You need to run \"kubectl proxy\" first\n# Change 8080 to the port that \"kubectl proxy\" assigns\ncurl http://localhost:8080/api/v1/nodes/minikube/proxy/stats/summary\n```\n\nBeginning with `metrics-server` 0.6.x, `metrics-server` queries the `/metrics/resource`\nkubelet endpoint, and not `/stats/summary`.\n\n## Summary metrics API source {#summary-api-source}\n\nBy default, Kubernetes fetches node summary metrics data using an embedded\n[cAdvisor](https://github.com/google/cadvisor) that runs within the kubelet. If you\nenable the `PodAndContainerStatsFromCRI` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)\nin your cluster, and you use a container runtime that supports statistics access via\nContainer Runtime Interface (CRI), then\nthe kubelet [fetches Pod- and container-level metric data using CRI](/docs/reference/instrumentation/cri-pod-container-metrics), and not via cAdvisor.\n\n## Pressure Stall Information (PSI) {#psi}\n\nAs a stable feature, Kubernetes lets you configure kubelet to collect Linux kernel\n[Pressure Stall Information](https://docs.kernel.org/accounting/psi.html)\n(PSI) for CPU, memory, and I/O usage. The information is collected at node, pod and container level.\nSee [Summary API](/docs/reference/kubelet-api/stats.v1alpha1/) for detailed schema.\nStarting with Kubernetes v.1.36, the `KubeletPSI` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) is locked to true and cannot be disabled. The information is also exposed in\n[Prometheus metrics](/docs/concepts/cluster-administration/system-metrics#psi-metrics).\n\nYou can learn how to interpret the PSI metrics in [Understand PSI Metrics](/docs/reference/instrumentation/understand-psi-metrics/).\n\n### Requirements\n\nPressure Stall Information requires:\n\n- [Linux kernel versions 4.20 or later](/docs/reference/node/kernel-version-requirements#requirements-psi).\n- [cgroup v2](/docs/concepts/architecture/cgroups)\n\n##\n\nThe task pages for [Troubleshooting Clusters](/docs/tasks/debug/debug-cluster/) discuss\nhow to use a metrics pipeline that rely on these data.", "source": "content/en/docs/reference/instrumentation/node-metrics.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "##\n\nSet a user entry in kubeconfig.\n\nSpecifying a name that already exists will merge new fields on top of existing values.\n\nClient-certificate flags:\n--client-certificate=certfile --client-key=keyfile\n\nBearer token flags:\n--token=bearer_token\n\nBasic auth flags:\n--username=basic_user --password=basic_password\n\nBearer token and basic auth are mutually exclusive.\n\n```\nkubectl config set-credentials NAME [--client-certificate=path/to/certfile] [--client-key=path/to/keyfile] [--token=bearer_token] [--username=basic_user] [--password=basic_password] [--auth-provider=provider_name] [--auth-provider-arg=key=value] [--exec-command=exec_command] [--exec-api-version=exec_api_version] [--exec-arg=arg] [--exec-env=key=value]\n```\n\n##\n\n```\n# Set only the \"client-key\" field on the \"cluster-admin\"\n# entry, without touching other values\nkubectl config set-credentials cluster-admin --client-key=~/.kube/admin.key\n\n# Set basic auth for the \"cluster-admin\" entry\nkubectl config set-credentials cluster-admin --username=admin --password=uXFGweU9l35qcif\n\n# Embed client certificate data in the \"cluster-admin\" entry\nkubectl config set-credentials cluster-admin --client-certificate=~/.kube/admin.crt --embed-certs=true\n\n# Enable the Google Compute Platform auth provider for the \"cluster-admin\" entry\nkubectl config set-credentials cluster-admin --auth-provider=gcp\n\n# Enable the OpenID Connect auth provider for the \"cluster-admin\" entry with additional arguments\nkubectl config set-credentials cluster-admin --auth-provider=oidc --auth-provider-arg=client-id=foo --auth-provider-arg=client-secret=bar\n\n# Remove the \"client-secret\" config value for the OpenID Connect auth provider for the \"cluster-admin\" entry\nkubectl config set-credentials cluster-admin --auth-provider=oidc --auth-provider-arg=client-secret-\n\n# Enable new exec auth plugin for the \"cluster-admin\" entry\nkubectl config set-credentials cluster-admin --exec-command=/path/to/the/executable --exec-api-version=client.authentication.k8s.io/v1beta1\n\n# Enable new exec auth plugin for the \"cluster-admin\" entry with interactive mode\nkubectl config set-credentials cluster-admin --exec-command=/path/to/the/executable --exec-api-version=client.authentication.k8s.io/v1beta1 --exec-interactive-mode=Never\n\n# Define new exec auth plugin arguments for the \"cluster-admin\" entry\nkubectl config set-credentials cluster-admin --exec-arg=arg1 --exec-arg=arg2\n\n# Create or update exec auth plugin environment variables for the \"cluster-admin\" entry\nkubectl config set-credentials cluster-admin --exec-env=key1=val1 --exec-env=key2=val2\n\n# Remove exec auth plugin environment variables for the \"cluster-admin\" entry\nkubectl config set-credentials cluster-admin --exec-env=var-to-remove-\n```\n\n##\n\n--auth-provider string\n\nAuth provider for the user entry in kubeconfig\n\n--auth-provider-arg strings\n\n'key=value' arguments for the auth provider\n\n--client-certificate string\n\nPath to client-certificate file for the user entry in kubeconfig\n\n--client-key string\n\nPath to client-key file for the user entry in kubeconfig\n\n--embed-certs tristate[=true]\n\nEmbed client cert/key for the user entry in kubeconfig\n\n--exec-api-version string\n\nAPI version of the exec credential plugin for the user entry in kubeconfig\n\n--exec-arg strings\n\nNew arguments for the exec credential plugin command for the user entry in kubeconfig\n\n--exec-command string\n\nCommand for the exec credential plugin for the user entry in kubeconfig\n\n--exec-env strings\n\n'key=value' environment values for the exec credential plugin\n\n--exec-interactive-mode string\n\nInteractiveMode of the exec credentials plugin for the user entry in kubeconfig\n\n--exec-provide-cluster-info tristate[=true]\n\nProvideClusterInfo of the exec credentials plugin for the user entry in kubeconfig\n\n-h, --help\n\nhelp for set-credentials\n\n--password string\n\npassword for the user entry in kubeconfig\n\n--token string\n\ntoken for the user entry in kubeconfig\n\n--username string\n\nusername for the user entry in kubeconfig\n\n##\n\n--as string\n\nUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.\n\n--as-group strings\n\nGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.\n\n--as-uid string\n\nUID to impersonate for the operation.\n\n--as-user-extra strings\n\nUser extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key.\n\n--cache-dir string Default: \"$HOME/.kube/cache\"\n\nDefault cache directory\n\n--certificate-authority string\n\nPath to a cert file for the certificate authority\n\n--cluster string\n\nThe name of the kubeconfig cluster to use\n\n--context string\n\nThe name of the kubeconfig context to use\n\n--disable-compression\n\nIf true, opt-out of response compression for all requests to the server\n\n--insecure-skip-tls-verify\n\nIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure\n\n--kubeconfig string\n\nuse a particular kubeconfig file\n\n--kuberc string\n\nPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.\n\n--match-server-version\n\nRequire server version to match client version\n\n-n, --namespace string\n\nIf present, the namespace scope for this CLI request\n\n--profile string Default: \"none\"\n\nName of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex|trace)\n\n--profile-output string Default: \"profile.pprof\"\n\nName of the file to write the profile to\n\n--proxy-url string\n\nProxy URL to use for requests to the API server\n\n--request-timeout string Default: \"0\"\n\nThe length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.\n\n-s, --server string\n\nThe address and port of the Kubernetes API server\n\n--storage-driver-buffer-duration duration Default: 1m0s\n\nWrites in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction\n\n--storage-driver-db string Default: \"cadvisor\"\n\ndatabase name\n\n--storage-driver-host string Default: \"localhost:8086\"\n\ndatabase host:port\n\n--storage-driver-password string Default: \"root\"\n\ndatabase password\n\n--storage-driver-secure\n\nuse secure connection with database\n\n--storage-driver-table string Default: \"stats\"\n\ntable name\n\n--storage-driver-user string Default: \"root\"\n\ndatabase username\n\n--tls-server-name string\n\nServer name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used\n\n--user string\n\nThe name of the kubeconfig user to use\n\n--version version[=true]\n\n--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version\n\n--warnings-as-errors\n\nTreat warnings received from the server as errors and exit with a non-zero exit code\n\n##\n\n* [kubectl config](../) - Modify kubeconfig files", "source": "content/en/docs/reference/kubectl/generated/kubectl_config/kubectl_config_set-credentials.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "##\n\nUnset an individual value in a kubeconfig file.\n\nPROPERTY_NAME is a dot delimited name where each token represents either an attribute name or a map key. Map keys may not contain dots.\n\n```\nkubectl config unset PROPERTY_NAME\n```\n\n##\n\n```\n# Unset the current-context\nkubectl config unset current-context\n\n# Unset namespace in foo context\nkubectl config unset contexts.foo.namespace\n```\n\n##\n\n-h, --help\n\nhelp for unset\n\n##\n\n--as string\n\nUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.\n\n--as-group strings\n\nGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.\n\n--as-uid string\n\nUID to impersonate for the operation.\n\n--as-user-extra strings\n\nUser extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key.\n\n--cache-dir string Default: \"$HOME/.kube/cache\"\n\nDefault cache directory\n\n--certificate-authority string\n\nPath to a cert file for the certificate authority\n\n--client-certificate string\n\nPath to a client certificate file for TLS\n\n--client-key string\n\nPath to a client key file for TLS\n\n--cluster string\n\nThe name of the kubeconfig cluster to use\n\n--context string\n\nThe name of the kubeconfig context to use\n\n--disable-compression\n\nIf true, opt-out of response compression for all requests to the server\n\n--insecure-skip-tls-verify\n\nIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure\n\n--kubeconfig string\n\nuse a particular kubeconfig file\n\n--kuberc string\n\nPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.\n\n--match-server-version\n\nRequire server version to match client version\n\n-n, --namespace string\n\nIf present, the namespace scope for this CLI request\n\n--password string\n\nPassword for basic authentication to the API server\n\n--profile string Default: \"none\"\n\nName of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex|trace)\n\n--profile-output string Default: \"profile.pprof\"\n\nName of the file to write the profile to\n\n--proxy-url string\n\nProxy URL to use for requests to the API server\n\n--request-timeout string Default: \"0\"\n\nThe length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.\n\n-s, --server string\n\nThe address and port of the Kubernetes API server\n\n--storage-driver-buffer-duration duration Default: 1m0s\n\nWrites in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction\n\n--storage-driver-db string Default: \"cadvisor\"\n\ndatabase name\n\n--storage-driver-host string Default: \"localhost:8086\"\n\ndatabase host:port\n\n--storage-driver-password string Default: \"root\"\n\ndatabase password\n\n--storage-driver-secure\n\nuse secure connection with database\n\n--storage-driver-table string Default: \"stats\"\n\ntable name\n\n--storage-driver-user string Default: \"root\"\n\ndatabase username\n\n--tls-server-name string\n\nServer name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used\n\n--token string\n\nBearer token for authentication to the API server\n\n--user string\n\nThe name of the kubeconfig user to use\n\n--username string\n\nUsername for basic authentication to the API server\n\n--version version[=true]\n\n--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version\n\n--warnings-as-errors\n\nTreat warnings received from the server as errors and exit with a non-zero exit code\n\n##\n\n* [kubectl config](../) - Modify kubeconfig files", "source": "content/en/docs/reference/kubectl/generated/kubectl_config/kubectl_config_unset.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "##\n\nCreate a TLS secret from the given public/private key pair.\n\nThe public/private key pair must exist beforehand. The public key certificate must be .PEM encoded and match the given private key.\n\n```\nkubectl create secret tls NAME --cert=path/to/cert/file --key=path/to/key/file [--dry-run=server|client|none]\n```\n\n##\n\n```\n# Create a new TLS secret named tls-secret with the given key pair\nkubectl create secret tls tls-secret --cert=path/to/tls.crt --key=path/to/tls.key\n```\n\n##\n\n--allow-missing-template-keys Default: true\n\nIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.\n\n--append-hash\n\nAppend a hash of the secret to its name.\n\n--cert string\n\nPath to PEM encoded public key certificate.\n\n--dry-run string[=\"unchanged\"] Default: \"none\"\n\nMust be \"none\", \"server\", or \"client\". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.\n\n--field-manager string Default: \"kubectl-create\"\n\nName of the manager used to track field ownership.\n\n-h, --help\n\nhelp for tls\n\n--key string\n\nPath to private key associated with given certificate.\n\n-o, --output string\n\nOutput format. One of: (json, yaml, kyaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).\n\n--save-config\n\nIf true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.\n\n--show-managed-fields\n\nIf true, keep the managedFields when printing objects in JSON or YAML format.\n\n--template string\n\nTemplate string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].\n\n--validate string[=\"strict\"] Default: \"strict\"\n\nMust be one of: strict (or true), warn, ignore (or false). \"true\" or \"strict\" will use a schema to validate the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation is enabled on the api-server, but will fall back to less reliable client-side validation if not. \"warn\" will warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled on the API server, and behave as \"ignore\" otherwise. \"false\" or \"ignore\" will not perform any schema validation, silently dropping any unknown or duplicate fields.\n\n##\n\n--as string\n\nUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.\n\n--as-group strings\n\nGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.\n\n--as-uid string\n\nUID to impersonate for the operation.\n\n--as-user-extra strings\n\nUser extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key.\n\n--cache-dir string Default: \"$HOME/.kube/cache\"\n\nDefault cache directory\n\n--certificate-authority string\n\nPath to a cert file for the certificate authority\n\n--client-certificate string\n\nPath to a client certificate file for TLS\n\n--client-key string\n\nPath to a client key file for TLS\n\n--cluster string\n\nThe name of the kubeconfig cluster to use\n\n--context string\n\nThe name of the kubeconfig context to use\n\n--disable-compression\n\nIf true, opt-out of response compression for all requests to the server\n\n--insecure-skip-tls-verify\n\nIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure\n\n--kubeconfig string\n\nPath to the kubeconfig file to use for CLI requests.\n\n--kuberc string\n\nPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.\n\n--match-server-version\n\nRequire server version to match client version\n\n-n, --namespace string\n\nIf present, the namespace scope for this CLI request\n\n--password string\n\nPassword for basic authentication to the API server\n\n--profile string Default: \"none\"\n\nName of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex|trace)\n\n--profile-output string Default: \"profile.pprof\"\n\nName of the file to write the profile to\n\n--proxy-url string\n\nProxy URL to use for requests to the API server\n\n--request-timeout string Default: \"0\"\n\nThe length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.\n\n-s, --server string\n\nThe address and port of the Kubernetes API server\n\n--storage-driver-buffer-duration duration Default: 1m0s\n\nWrites in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction\n\n--storage-driver-db string Default: \"cadvisor\"\n\ndatabase name\n\n--storage-driver-host string Default: \"localhost:8086\"\n\ndatabase host:port\n\n--storage-driver-password string Default: \"root\"\n\ndatabase password\n\n--storage-driver-secure\n\nuse secure connection with database\n\n--storage-driver-table string Default: \"stats\"\n\ntable name\n\n--storage-driver-user string Default: \"root\"\n\ndatabase username\n\n--tls-server-name string\n\nServer name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used\n\n--token string\n\nBearer token for authentication to the API server\n\n--user string\n\nThe name of the kubeconfig user to use\n\n--username string\n\nUsername for basic authentication to the API server\n\n--version version[=true]\n\n--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version\n\n--warnings-as-errors\n\nTreat warnings received from the server as errors and exit with a non-zero exit code\n\n##\n\n* [kubectl create secret](../) - Create a secret using a specified subcommand", "source": "content/en/docs/reference/kubectl/generated/kubectl_create/kubectl_create_secret_tls.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "##\n\nCreate a service using a specified subcommand.\n\n```\nkubectl create service [flags]\n```\n\n##\n\n-h, --help\n\nhelp for service\n\n##\n\n--as string\n\nUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.\n\n--as-group strings\n\nGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.\n\n--as-uid string\n\nUID to impersonate for the operation.\n\n--as-user-extra strings\n\nUser extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key.\n\n--cache-dir string Default: \"$HOME/.kube/cache\"\n\nDefault cache directory\n\n--certificate-authority string\n\nPath to a cert file for the certificate authority\n\n--client-certificate string\n\nPath to a client certificate file for TLS\n\n--client-key string\n\nPath to a client key file for TLS\n\n--cluster string\n\nThe name of the kubeconfig cluster to use\n\n--context string\n\nThe name of the kubeconfig context to use\n\n--disable-compression\n\nIf true, opt-out of response compression for all requests to the server\n\n--insecure-skip-tls-verify\n\nIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure\n\n--kubeconfig string\n\nPath to the kubeconfig file to use for CLI requests.\n\n--kuberc string\n\nPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.\n\n--match-server-version\n\nRequire server version to match client version\n\n-n, --namespace string\n\nIf present, the namespace scope for this CLI request\n\n--password string\n\nPassword for basic authentication to the API server\n\n--profile string Default: \"none\"\n\nName of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex|trace)\n\n--profile-output string Default: \"profile.pprof\"\n\nName of the file to write the profile to\n\n--proxy-url string\n\nProxy URL to use for requests to the API server\n\n--request-timeout string Default: \"0\"\n\nThe length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.\n\n-s, --server string\n\nThe address and port of the Kubernetes API server\n\n--storage-driver-buffer-duration duration Default: 1m0s\n\nWrites in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction\n\n--storage-driver-db string Default: \"cadvisor\"\n\ndatabase name\n\n--storage-driver-host string Default: \"localhost:8086\"\n\ndatabase host:port\n\n--storage-driver-password string Default: \"root\"\n\ndatabase password\n\n--storage-driver-secure\n\nuse secure connection with database\n\n--storage-driver-table string Default: \"stats\"\n\ntable name\n\n--storage-driver-user string Default: \"root\"\n\ndatabase username\n\n--tls-server-name string\n\nServer name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used\n\n--token string\n\nBearer token for authentication to the API server\n\n--user string\n\nThe name of the kubeconfig user to use\n\n--username string\n\nUsername for basic authentication to the API server\n\n--version version[=true]\n\n--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version\n\n--warnings-as-errors\n\nTreat warnings received from the server as errors and exit with a non-zero exit code\n\n##\n\n* [kubectl create](../) - Create a resource from a file or from stdin\n* [kubectl create service clusterip](../kubectl_create_service_clusterip/) - Create a ClusterIP service\n* [kubectl create service externalname](../kubectl_create_service_externalname/) - Create an ExternalName service\n* [kubectl create service loadbalancer](../kubectl_create_service_loadbalancer/) - Create a LoadBalancer service\n* [kubectl create service nodeport](../kubectl_create_service_nodeport/) - Create a NodePort service", "source": "content/en/docs/reference/kubectl/generated/kubectl_create/kubectl_create_service.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "##\n\nCreate a LoadBalancer service with the specified name.\n\n```\nkubectl create service loadbalancer NAME [--tcp=port:targetPort] [--dry-run=server|client|none]\n```\n\n##\n\n```\n# Create a new LoadBalancer service named my-lbs\nkubectl create service loadbalancer my-lbs --tcp=5678:8080\n```\n\n##\n\n--allow-missing-template-keys Default: true\n\nIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.\n\n--dry-run string[=\"unchanged\"] Default: \"none\"\n\nMust be \"none\", \"server\", or \"client\". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.\n\n--field-manager string Default: \"kubectl-create\"\n\nName of the manager used to track field ownership.\n\n-h, --help\n\nhelp for loadbalancer\n\n-o, --output string\n\nOutput format. One of: (json, yaml, kyaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).\n\n--save-config\n\nIf true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.\n\n--show-managed-fields\n\nIf true, keep the managedFields when printing objects in JSON or YAML format.\n\n--tcp strings\n\nPort pairs can be specified as '<port>:<targetPort>'.\n\n--template string\n\nTemplate string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].\n\n--validate string[=\"strict\"] Default: \"strict\"\n\nMust be one of: strict (or true), warn, ignore (or false). \"true\" or \"strict\" will use a schema to validate the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation is enabled on the api-server, but will fall back to less reliable client-side validation if not. \"warn\" will warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled on the API server, and behave as \"ignore\" otherwise. \"false\" or \"ignore\" will not perform any schema validation, silently dropping any unknown or duplicate fields.\n\n##\n\n--as string\n\nUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.\n\n--as-group strings\n\nGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.\n\n--as-uid string\n\nUID to impersonate for the operation.\n\n--as-user-extra strings\n\nUser extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key.\n\n--cache-dir string Default: \"$HOME/.kube/cache\"\n\nDefault cache directory\n\n--certificate-authority string\n\nPath to a cert file for the certificate authority\n\n--client-certificate string\n\nPath to a client certificate file for TLS\n\n--client-key string\n\nPath to a client key file for TLS\n\n--cluster string\n\nThe name of the kubeconfig cluster to use\n\n--context string\n\nThe name of the kubeconfig context to use\n\n--disable-compression\n\nIf true, opt-out of response compression for all requests to the server\n\n--insecure-skip-tls-verify\n\nIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure\n\n--kubeconfig string\n\nPath to the kubeconfig file to use for CLI requests.\n\n--kuberc string\n\nPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.\n\n--match-server-version\n\nRequire server version to match client version\n\n-n, --namespace string\n\nIf present, the namespace scope for this CLI request\n\n--password string\n\nPassword for basic authentication to the API server\n\n--profile string Default: \"none\"\n\nName of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex|trace)\n\n--profile-output string Default: \"profile.pprof\"\n\nName of the file to write the profile to\n\n--proxy-url string\n\nProxy URL to use for requests to the API server\n\n--request-timeout string Default: \"0\"\n\nThe length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.\n\n-s, --server string\n\nThe address and port of the Kubernetes API server\n\n--storage-driver-buffer-duration duration Default: 1m0s\n\nWrites in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction\n\n--storage-driver-db string Default: \"cadvisor\"\n\ndatabase name\n\n--storage-driver-host string Default: \"localhost:8086\"\n\ndatabase host:port\n\n--storage-driver-password string Default: \"root\"\n\ndatabase password\n\n--storage-driver-secure\n\nuse secure connection with database\n\n--storage-driver-table string Default: \"stats\"\n\ntable name\n\n--storage-driver-user string Default: \"root\"\n\ndatabase username\n\n--tls-server-name string\n\nServer name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used\n\n--token string\n\nBearer token for authentication to the API server\n\n--user string\n\nThe name of the kubeconfig user to use\n\n--username string\n\nUsername for basic authentication to the API server\n\n--version version[=true]\n\n--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version\n\n--warnings-as-errors\n\nTreat warnings received from the server as errors and exit with a non-zero exit code\n\n##\n\n* [kubectl create service](../) - Create a service using a specified subcommand", "source": "content/en/docs/reference/kubectl/generated/kubectl_create/kubectl_create_service_loadbalancer.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "##\n\nDiff configurations specified by file name or stdin between the current online configuration, and the configuration as it would be if applied.\n\nThe output is always YAML.\n\nKUBECTL_EXTERNAL_DIFF environment variable can be used to select your own diff command. Users can use external commands with params too, example: KUBECTL_EXTERNAL_DIFF=\"colordiff -N -u\"\n\nBy default, the \"diff\" command available in your path will be run with the \"-u\" (unified diff) and \"-N\" (treat absent files as empty) options.\n\nExit status: 0 No differences were found. 1 Differences were found. >1 Kubectl or diff failed with an error.\n\nNote: KUBECTL_EXTERNAL_DIFF, if used, is expected to follow that convention.\n\n```\nkubectl diff -f FILENAME\n```\n\n##\n\n```\n# Diff resources included in pod.json\nkubectl diff -f pod.json\n\n# Diff file read from stdin\ncat service.yaml | kubectl diff -f -\n```\n\n##\n\n--concurrency int Default: 1\n\nNumber of objects to process in parallel when diffing against the live version. Larger number = faster, but more memory, I/O and CPU over that shorter period of time.\n\n--field-manager string Default: \"kubectl-client-side-apply\"\n\nName of the manager used to track field ownership.\n\n-f, --filename strings\n\nFilename, directory, or URL to files contains the configuration to diff\n\n--force-conflicts\n\nIf true, server-side apply will force the changes against conflicts.\n\n-h, --help\n\nhelp for diff\n\n-k, --kustomize string\n\nProcess the kustomization directory. This flag can't be used together with -f or -R.\n\n--prune\n\nInclude resources that would be deleted by pruning. Can be used with -l and default shows all resources would be pruned\n\n--prune-allowlist strings\n\nOverwrite the default allowlist with <group/version/kind> for --prune\n\n-R, --recursive\n\nProcess the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.\n\n-l, --selector string\n\nSelector (label query) to filter on, supports '=', '==', '!=', 'in', 'notin'.(e.g. -l key1=value1,key2=value2,key3 in (value3)). Matching objects must satisfy all of the specified label constraints.\n\n--server-side\n\nIf true, apply runs in the server instead of the client.\n\n--show-managed-fields\n\nIf true, include managed fields in the diff.\n\n--show-secrets\n\nIf true, do not mask secret values in the diff.\n\n##\n\n--as string\n\nUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.\n\n--as-group strings\n\nGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.\n\n--as-uid string\n\nUID to impersonate for the operation.\n\n--as-user-extra strings\n\nUser extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key.\n\n--cache-dir string Default: \"$HOME/.kube/cache\"\n\nDefault cache directory\n\n--certificate-authority string\n\nPath to a cert file for the certificate authority\n\n--client-certificate string\n\nPath to a client certificate file for TLS\n\n--client-key string\n\nPath to a client key file for TLS\n\n--cluster string\n\nThe name of the kubeconfig cluster to use\n\n--context string\n\nThe name of the kubeconfig context to use\n\n--disable-compression\n\nIf true, opt-out of response compression for all requests to the server\n\n--insecure-skip-tls-verify\n\nIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure\n\n--kubeconfig string\n\nPath to the kubeconfig file to use for CLI requests.\n\n--kuberc string\n\nPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.\n\n--match-server-version\n\nRequire server version to match client version\n\n-n, --namespace string\n\nIf present, the namespace scope for this CLI request\n\n--password string\n\nPassword for basic authentication to the API server\n\n--profile string Default: \"none\"\n\nName of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex|trace)\n\n--profile-output string Default: \"profile.pprof\"\n\nName of the file to write the profile to\n\n--proxy-url string\n\nProxy URL to use for requests to the API server\n\n--request-timeout string Default: \"0\"\n\nThe length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.\n\n-s, --server string\n\nThe address and port of the Kubernetes API server\n\n--storage-driver-buffer-duration duration Default: 1m0s\n\nWrites in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction\n\n--storage-driver-db string Default: \"cadvisor\"\n\ndatabase name\n\n--storage-driver-host string Default: \"localhost:8086\"\n\ndatabase host:port\n\n--storage-driver-password string Default: \"root\"\n\ndatabase password\n\n--storage-driver-secure\n\nuse secure connection with database\n\n--storage-driver-table string Default: \"stats\"\n\ntable name\n\n--storage-driver-user string Default: \"root\"\n\ndatabase username\n\n--tls-server-name string\n\nServer name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used\n\n--token string\n\nBearer token for authentication to the API server\n\n--user string\n\nThe name of the kubeconfig user to use\n\n--username string\n\nUsername for basic authentication to the API server\n\n--version version[=true]\n\n--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version\n\n--warnings-as-errors\n\nTreat warnings received from the server as errors and exit with a non-zero exit code\n\n##\n\n* [kubectl](../kubectl/) - kubectl controls the Kubernetes cluster manager", "source": "content/en/docs/reference/kubectl/generated/kubectl_diff/_index.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "##\n\nExpose a resource as a new Kubernetes service.\n\nLooks up a deployment, service, replica set, replication controller or pod by name and uses the selector for that resource as the selector for a new service on the specified port. A deployment or replica set will be exposed as a service only if its selector is convertible to a selector that service supports, i.e. when the selector contains only the matchLabels component. Note that if no port is specified via --port and the exposed resource has multiple ports, all will be re-used by the new service. Also if no labels are specified, the new service will re-use the labels from the resource it exposes.\n\nPossible resources include (case insensitive):\n\npod (po), service (svc), replicationcontroller (rc), deployment (deploy), replicaset (rs)\n\n```\nkubectl expose (-f FILENAME | TYPE NAME) [--port=port] [--protocol=TCP|UDP|SCTP] [--target-port=number-or-name] [--name=name] [--external-ip=external-ip-of-service] [--type=type]\n```\n\n##\n\n```\n# Create a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000\nkubectl expose rc nginx --port=80 --target-port=8000\n\n# Create a service for a replication controller identified by type and name specified in \"nginx-controller.yaml\", which serves on port 80 and connects to the containers on port 8000\nkubectl expose -f nginx-controller.yaml --port=80 --target-port=8000\n\n# Create a service for a pod valid-pod, which serves on port 444 with the name \"frontend\"\nkubectl expose pod valid-pod --port=444 --name=frontend\n\n# Create a second service based on the above service, exposing the container port 8443 as port 443 with the name \"nginx-https\"\nkubectl expose service nginx --port=443 --target-port=8443 --name=nginx-https\n\n# Create a service for a replicated streaming application on port 4100 balancing UDP traffic and named 'video-stream'.\nkubectl expose rc streamer --port=4100 --protocol=UDP --name=video-stream\n\n# Create a service for a replicated nginx using replica set, which serves on port 80 and connects to the containers on port 8000\nkubectl expose rs nginx --port=80 --target-port=8000\n\n# Create a service for an nginx deployment, which serves on port 80 and connects to the containers on port 8000\nkubectl expose deployment nginx --port=80 --target-port=8000\n```\n\n##\n\n--allow-missing-template-keys Default: true\n\nIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.\n\n--cluster-ip string\n\nClusterIP to be assigned to the service. Leave empty to auto-allocate, or set to 'None' to create a headless service.\n\n--dry-run string[=\"unchanged\"] Default: \"none\"\n\nMust be \"none\", \"server\", or \"client\". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.\n\n--external-ip string\n\nAdditional external IP address (not managed by Kubernetes) to accept for the service. If this IP is routed to a node, the service can be accessed by this IP in addition to its generated service IP.\n\n--field-manager string Default: \"kubectl-expose\"\n\nName of the manager used to track field ownership.\n\n-f, --filename strings\n\nFilename, directory, or URL to files identifying the resource to expose a service\n\n-h, --help\n\nhelp for expose\n\n-k, --kustomize string\n\nProcess the kustomization directory. This flag can't be used together with -f or -R.\n\n-l, --labels string\n\nLabels to apply to the service created by this call.\n\n--load-balancer-ip string\n\nIP to assign to the LoadBalancer. If empty, an ephemeral IP will be created and used (cloud-provider specific).\n\n--name string\n\nThe name for the newly created object.\n\n-o, --output string\n\nOutput format. One of: (json, yaml, kyaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).\n\n--override-type string Default: \"merge\"\n\nThe method used to override the generated object: json, merge, or strategic.\n\n--overrides string\n\nAn inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field.\n\n--port string\n\nThe port that the service should serve on. Copied from the resource being exposed, if unspecified\n\n--protocol string\n\nThe network protocol for the service to be created. Default is 'TCP'.\n\n-R, --recursive\n\nProcess the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.\n\n--save-config\n\nIf true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.\n\n--selector string\n\nA label selector to use for this service. Only equality-based selector requirements are supported. If empty (the default) infer the selector from the resource being exposed.\n\n--session-affinity string\n\nIf non-empty, set the session affinity for the service to this; legal values: 'None', 'ClientIP'\n\n--show-managed-fields\n\nIf true, keep the managedFields when printing objects in JSON or YAML format.\n\n--target-port string\n\nName or number for the port on the container that the service should direct traffic to. Optional.\n\n--template string\n\nTemplate string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].\n\n--type string\n\nType for this service: ClusterIP, NodePort, LoadBalancer, or ExternalName. Default is 'ClusterIP'.\n\n##\n\n--as string\n\nUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.\n\n--as-group strings\n\nGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.\n\n--as-uid string\n\nUID to impersonate for the operation.\n\n--as-user-extra strings\n\nUser extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key.\n\n--cache-dir string Default: \"$HOME/.kube/cache\"\n\nDefault cache directory\n\n--certificate-authority string\n\nPath to a cert file for the certificate authority\n\n--client-certificate string\n\nPath to a client certificate file for TLS\n\n--client-key string\n\nPath to a client key file for TLS\n\n--cluster string\n\nThe name of the kubeconfig cluster to use\n\n--context string\n\nThe name of the kubeconfig context to use\n\n--disable-compression\n\nIf true, opt-out of response compression for all requests to the server\n\n--insecure-skip-tls-verify\n\nIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure\n\n--kubeconfig string\n\nPath to the kubeconfig file to use for CLI requests.\n\n--kuberc string\n\nPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.\n\n--match-server-version\n\nRequire server version to match client version\n\n-n, --namespace string\n\nIf present, the namespace scope for this CLI request\n\n--password string\n\nPassword for basic authentication to the API server\n\n--profile string Default: \"none\"\n\nName of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex|trace)\n\n--profile-output string Default: \"profile.pprof\"\n\nName of the file to write the profile to\n\n--proxy-url string\n\nProxy URL to use for requests to the API server\n\n--request-timeout string Default: \"0\"\n\nThe length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.\n\n-s, --server string\n\nThe address and port of the Kubernetes API server\n\n--storage-driver-buffer-duration duration Default: 1m0s\n\nWrites in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction\n\n--storage-driver-db string Default: \"cadvisor\"\n\ndatabase name\n\n--storage-driver-host string Default: \"localhost:8086\"\n\ndatabase host:port\n\n--storage-driver-password string Default: \"root\"\n\ndatabase password\n\n--storage-driver-secure\n\nuse secure connection with database\n\n--storage-driver-table string Default: \"stats\"\n\ntable name\n\n--storage-driver-user string Default: \"root\"\n\ndatabase username\n\n--tls-server-name string\n\nServer name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used\n\n--token string\n\nBearer token for authentication to the API server\n\n--user string\n\nThe name of the kubeconfig user to use\n\n--username string\n\nUsername for basic authentication to the API server\n\n--version version[=true]\n\n--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version\n\n--warnings-as-errors\n\nTreat warnings received from the server as errors and exit with a non-zero exit code\n\n##\n\n* [kubectl](../kubectl/) - kubectl controls the Kubernetes cluster manager", "source": "content/en/docs/reference/kubectl/generated/kubectl_expose/_index.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "##\n\nProvides utilities for interacting with plugins.\n\nPlugins provide extended functionality that is not part of the major command-line distribution. Please refer to the documentation and examples for more information about how write your own plugins.\n\nThe easiest way to discover and install plugins is via the kubernetes sub-project krew: [krew.sigs.k8s.io]. To install krew, visit https://krew.sigs.k8s.io/docs/user-guide/setup/install\n\n```\nkubectl plugin [flags]\n```\n\n##\n\n```\n# List all available plugins\nkubectl plugin list\n\n# List only binary names of available plugins without paths\nkubectl plugin list --name-only\n```\n\n##\n\n-h, --help\n\nhelp for plugin\n\n##\n\n--as string\n\nUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.\n\n--as-group strings\n\nGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.\n\n--as-uid string\n\nUID to impersonate for the operation.\n\n--as-user-extra strings\n\nUser extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key.\n\n--cache-dir string Default: \"$HOME/.kube/cache\"\n\nDefault cache directory\n\n--certificate-authority string\n\nPath to a cert file for the certificate authority\n\n--client-certificate string\n\nPath to a client certificate file for TLS\n\n--client-key string\n\nPath to a client key file for TLS\n\n--cluster string\n\nThe name of the kubeconfig cluster to use\n\n--context string\n\nThe name of the kubeconfig context to use\n\n--disable-compression\n\nIf true, opt-out of response compression for all requests to the server\n\n--insecure-skip-tls-verify\n\nIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure\n\n--kubeconfig string\n\nPath to the kubeconfig file to use for CLI requests.\n\n--kuberc string\n\nPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.\n\n--match-server-version\n\nRequire server version to match client version\n\n-n, --namespace string\n\nIf present, the namespace scope for this CLI request\n\n--password string\n\nPassword for basic authentication to the API server\n\n--profile string Default: \"none\"\n\nName of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex|trace)\n\n--profile-output string Default: \"profile.pprof\"\n\nName of the file to write the profile to\n\n--proxy-url string\n\nProxy URL to use for requests to the API server\n\n--request-timeout string Default: \"0\"\n\nThe length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.\n\n-s, --server string\n\nThe address and port of the Kubernetes API server\n\n--storage-driver-buffer-duration duration Default: 1m0s\n\nWrites in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction\n\n--storage-driver-db string Default: \"cadvisor\"\n\ndatabase name\n\n--storage-driver-host string Default: \"localhost:8086\"\n\ndatabase host:port\n\n--storage-driver-password string Default: \"root\"\n\ndatabase password\n\n--storage-driver-secure\n\nuse secure connection with database\n\n--storage-driver-table string Default: \"stats\"\n\ntable name\n\n--storage-driver-user string Default: \"root\"\n\ndatabase username\n\n--tls-server-name string\n\nServer name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used\n\n--token string\n\nBearer token for authentication to the API server\n\n--user string\n\nThe name of the kubeconfig user to use\n\n--username string\n\nUsername for basic authentication to the API server\n\n--version version[=true]\n\n--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version\n\n--warnings-as-errors\n\nTreat warnings received from the server as errors and exit with a non-zero exit code\n\n##\n\n* [kubectl](../kubectl/) - kubectl controls the Kubernetes cluster manager\n* [kubectl plugin list](kubectl_plugin_list/) - List all visible plugin executables on a user's PATH", "source": "content/en/docs/reference/kubectl/generated/kubectl_plugin/_index.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "##\n\nMark the provided resource as paused.\n\nPaused resources will not be reconciled by a controller. Use \"kubectl rollout resume\" to resume a paused resource. Currently only deployments support being paused.\n\n```\nkubectl rollout pause RESOURCE\n```\n\n##\n\n```\n# Mark the nginx deployment as paused\n# Any current state of the deployment will continue its function; new updates\n# to the deployment will not have an effect as long as the deployment is paused\nkubectl rollout pause deployment/nginx\n```\n\n##\n\n--allow-missing-template-keys Default: true\n\nIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.\n\n--field-manager string Default: \"kubectl-rollout\"\n\nName of the manager used to track field ownership.\n\n-f, --filename strings\n\nFilename, directory, or URL to files identifying the resource to get from a server.\n\n-h, --help\n\nhelp for pause\n\n-k, --kustomize string\n\nProcess the kustomization directory. This flag can't be used together with -f or -R.\n\n-o, --output string\n\nOutput format. One of: (json, yaml, kyaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).\n\n-R, --recursive\n\nProcess the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.\n\n-l, --selector string\n\nSelector (label query) to filter on, supports '=', '==', '!=', 'in', 'notin'.(e.g. -l key1=value1,key2=value2,key3 in (value3)). Matching objects must satisfy all of the specified label constraints.\n\n--show-managed-fields\n\nIf true, keep the managedFields when printing objects in JSON or YAML format.\n\n--template string\n\nTemplate string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].\n\n##\n\n--as string\n\nUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.\n\n--as-group strings\n\nGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.\n\n--as-uid string\n\nUID to impersonate for the operation.\n\n--as-user-extra strings\n\nUser extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key.\n\n--cache-dir string Default: \"$HOME/.kube/cache\"\n\nDefault cache directory\n\n--certificate-authority string\n\nPath to a cert file for the certificate authority\n\n--client-certificate string\n\nPath to a client certificate file for TLS\n\n--client-key string\n\nPath to a client key file for TLS\n\n--cluster string\n\nThe name of the kubeconfig cluster to use\n\n--context string\n\nThe name of the kubeconfig context to use\n\n--disable-compression\n\nIf true, opt-out of response compression for all requests to the server\n\n--insecure-skip-tls-verify\n\nIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure\n\n--kubeconfig string\n\nPath to the kubeconfig file to use for CLI requests.\n\n--kuberc string\n\nPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.\n\n--match-server-version\n\nRequire server version to match client version\n\n-n, --namespace string\n\nIf present, the namespace scope for this CLI request\n\n--password string\n\nPassword for basic authentication to the API server\n\n--profile string Default: \"none\"\n\nName of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex|trace)\n\n--profile-output string Default: \"profile.pprof\"\n\nName of the file to write the profile to\n\n--proxy-url string\n\nProxy URL to use for requests to the API server\n\n--request-timeout string Default: \"0\"\n\nThe length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.\n\n-s, --server string\n\nThe address and port of the Kubernetes API server\n\n--storage-driver-buffer-duration duration Default: 1m0s\n\nWrites in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction\n\n--storage-driver-db string Default: \"cadvisor\"\n\ndatabase name\n\n--storage-driver-host string Default: \"localhost:8086\"\n\ndatabase host:port\n\n--storage-driver-password string Default: \"root\"\n\ndatabase password\n\n--storage-driver-secure\n\nuse secure connection with database\n\n--storage-driver-table string Default: \"stats\"\n\ntable name\n\n--storage-driver-user string Default: \"root\"\n\ndatabase username\n\n--tls-server-name string\n\nServer name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used\n\n--token string\n\nBearer token for authentication to the API server\n\n--user string\n\nThe name of the kubeconfig user to use\n\n--username string\n\nUsername for basic authentication to the API server\n\n--version version[=true]\n\n--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version\n\n--warnings-as-errors\n\nTreat warnings received from the server as errors and exit with a non-zero exit code\n\n##\n\n* [kubectl rollout](../) - Manage the rollout of a resource", "source": "content/en/docs/reference/kubectl/generated/kubectl_rollout/kubectl_rollout_pause.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "##\n\nCreate and run a particular image in a pod.\n\n```\nkubectl run NAME --image=image [--env=\"key=value\"] [--port=port] [--dry-run=server|client] [--overrides=inline-json] [--command] -- [COMMAND] [args...]\n```\n\n##\n\n```\n# Start a nginx pod\nkubectl run nginx --image=nginx\n\n# Start a hazelcast pod and let the container expose port 5701\nkubectl run hazelcast --image=hazelcast/hazelcast --port=5701\n\n# Start a hazelcast pod and set environment variables \"DNS_DOMAIN=cluster\" and \"POD_NAMESPACE=default\" in the container\nkubectl run hazelcast --image=hazelcast/hazelcast --env=\"DNS_DOMAIN=cluster\" --env=\"POD_NAMESPACE=default\"\n\n# Start a hazelcast pod and set labels \"app=hazelcast\" and \"env=prod\" in the container\nkubectl run hazelcast --image=hazelcast/hazelcast --labels=\"app=hazelcast,env=prod\"\n\n# Dry run; print the corresponding API objects without creating them\nkubectl run nginx --image=nginx --dry-run=client\n\n# Start a nginx pod, but overload the spec with a partial set of values parsed from JSON\nkubectl run nginx --image=nginx --overrides='{ \"apiVersion\": \"v1\", \"spec\": { ... } }'\n\n# Start a busybox pod and keep it in the foreground, don't restart it if it exits\nkubectl run -i -t busybox --image=busybox --restart=Never\n\n# Start the nginx pod using the default command, but use custom arguments (arg1 .. argN) for that command\nkubectl run nginx --image=nginx -- ...\n\n# Start the nginx pod using a different command and custom arguments\nkubectl run nginx --image=nginx --command -- ...\n```\n\n##\n\n--allow-missing-template-keys Default: true\n\nIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.\n\n--annotations strings\n\nAnnotations to apply to the pod.\n\n--attach\n\nIf true, wait for the Pod to start running, and then attach to the Pod as if 'kubectl attach ...' were called. Default false, unless '-i/--stdin' is set, in which case the default is true. With '--restart=Never' the exit code of the container process is returned.\n\n--cascade string[=\"background\"] Default: \"background\"\n\nMust be \"background\", \"orphan\", or \"foreground\". Selects the deletion cascading strategy for the dependents (e.g. Pods created by a ReplicationController). Defaults to background.\n\n--command\n\nIf true and extra arguments are present, use them as the 'command' field in the container, rather than the 'args' field which is the default.\n\n--detach-keys string Default: \"ctrl-p,ctrl-q\"\n\nOverride the key sequence for detaching a container.\n\n--dry-run string[=\"unchanged\"] Default: \"none\"\n\nMust be \"none\", \"server\", or \"client\". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.\n\n--env strings\n\nEnvironment variables to set in the container.\n\n--expose --port\n\nIf true, create a ClusterIP service associated with the pod. Requires --port.\n\n--field-manager string Default: \"kubectl-run\"\n\nName of the manager used to track field ownership.\n\n--force\n\nIf true, immediately remove resources from API and bypass graceful deletion. Note that immediate deletion of some resources may result in inconsistency or data loss and requires confirmation.\n\n--grace-period int Default: -1\n\nPeriod of time in seconds given to the resource to terminate gracefully. Ignored if negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true (force deletion).\n\n-h, --help\n\nhelp for run\n\n--image string\n\nThe image for the container to run.\n\n--image-pull-policy string\n\nThe image pull policy for the container. If left empty, this value will not be specified by the client and defaulted by the server.\n\n-k, --kustomize string\n\nProcess a kustomization directory. This flag can't be used together with -f or -R.\n\n-l, --labels string\n\nComma separated labels to apply to the pod. Will override previous values.\n\n--leave-stdin-open\n\nIf the pod is started in interactive mode or with stdin, leave stdin open after the first attach completes. By default, stdin will be closed after the first attach completes.\n\n-o, --output string\n\nOutput format. One of: (json, yaml, kyaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).\n\n--override-type string Default: \"merge\"\n\nThe method used to override the generated object: json, merge, or strategic.\n\n--overrides string\n\nAn inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field.\n\n--pod-running-timeout duration Default: 1m0s\n\nThe length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running\n\n--port string\n\nThe port that this container exposes.\n\n--privileged\n\nIf true, run the container in privileged mode.\n\n-q, --quiet\n\nIf true, suppress prompt messages.\n\n-R, --recursive\n\nProcess the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.\n\n--restart string Default: \"Always\"\n\nThe restart policy for this Pod. Legal values [Always, OnFailure, Never].\n\n--rm\n\nIf true, delete the pod after it exits. Only valid when attaching to the container, e.g. with '--attach' or with '-i/--stdin'.\n\n--save-config\n\nIf true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.\n\n--show-managed-fields\n\nIf true, keep the managedFields when printing objects in JSON or YAML format.\n\n-i, --stdin\n\nKeep stdin open on the container in the pod, even if nothing is attached.\n\n--template string\n\nTemplate string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].\n\n--timeout duration\n\nThe length of time to wait before giving up on a delete, zero means determine a timeout from the size of the object\n\n-t, --tty\n\nAllocate a TTY for the container in the pod.\n\n--wait\n\nIf true, wait for resources to be gone before returning. This waits for finalizers.\n\n##\n\n--as string\n\nUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.\n\n--as-group strings\n\nGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.\n\n--as-uid string\n\nUID to impersonate for the operation.\n\n--as-user-extra strings\n\nUser extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key.\n\n--cache-dir string Default: \"$HOME/.kube/cache\"\n\nDefault cache directory\n\n--certificate-authority string\n\nPath to a cert file for the certificate authority\n\n--client-certificate string\n\nPath to a client certificate file for TLS\n\n--client-key string\n\nPath to a client key file for TLS\n\n--cluster string\n\nThe name of the kubeconfig cluster to use\n\n--context string\n\nThe name of the kubeconfig context to use\n\n--disable-compression\n\nIf true, opt-out of response compression for all requests to the server\n\n--insecure-skip-tls-verify\n\nIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure\n\n--kubeconfig string\n\nPath to the kubeconfig file to use for CLI requests.\n\n--kuberc string\n\nPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.\n\n--match-server-version\n\nRequire server version to match client version\n\n-n, --namespace string\n\nIf present, the namespace scope for this CLI request\n\n--password string\n\nPassword for basic authentication to the API server\n\n--profile string Default: \"none\"\n\nName of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex|trace)\n\n--profile-output string Default: \"profile.pprof\"\n\nName of the file to write the profile to\n\n--proxy-url string\n\nProxy URL to use for requests to the API server\n\n--request-timeout string Default: \"0\"\n\nThe length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.\n\n-s, --server string\n\nThe address and port of the Kubernetes API server\n\n--storage-driver-buffer-duration duration Default: 1m0s\n\nWrites in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction\n\n--storage-driver-db string Default: \"cadvisor\"\n\ndatabase name\n\n--storage-driver-host string Default: \"localhost:8086\"\n\ndatabase host:port\n\n--storage-driver-password string Default: \"root\"\n\ndatabase password\n\n--storage-driver-secure\n\nuse secure connection with database\n\n--storage-driver-table string Default: \"stats\"\n\ntable name\n\n--storage-driver-user string Default: \"root\"\n\ndatabase username\n\n--tls-server-name string\n\nServer name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used\n\n--token string\n\nBearer token for authentication to the API server\n\n--user string\n\nThe name of the kubeconfig user to use\n\n--username string\n\nUsername for basic authentication to the API server\n\n--version version[=true]\n\n--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version\n\n--warnings-as-errors\n\nTreat warnings received from the server as errors and exit with a non-zero exit code\n\n##\n\n* [kubectl](../kubectl/) - kubectl controls the Kubernetes cluster manager", "source": "content/en/docs/reference/kubectl/generated/kubectl_run/_index.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "## Resource Types\n\n- [Summary](#Summary)\n\n## `AcceleratorStats` {#AcceleratorStats}\n\n**Appears in:**\n\n- [ContainerStats](#ContainerStats)\n\nAcceleratorStats contains stats for accelerators attached to the container.\n\nField Description\n\nmake [Required]\n\nstring\n\nMake of the accelerator (nvidia, amd, google etc.)\n\nmodel [Required]\n\nstring\n\nModel of the accelerator (tesla-p100, tesla-k80 etc.)\n\nid [Required]\n\nstring\n\nID of the accelerator.\n\nmemoryTotal [Required]\n\nuint64\n\nTotal accelerator memory.\nunit: bytes\n\nmemoryUsed [Required]\n\nuint64\n\nTotal accelerator memory allocated.\nunit: bytes\n\ndutyCycle [Required]\n\nuint64\n\nPercent of time over the past sample period (10s) during which\nthe accelerator was actively processing.\n\n## `CPUStats` {#CPUStats}\n\n**Appears in:**\n\n- [ContainerStats](#ContainerStats)\n\n- [NodeStats](#NodeStats)\n\n- [PodStats](#PodStats)\n\nCPUStats contains data about CPU usage.\n\nField Description\n\ntime [Required]\n\nmeta/v1.Time\n\nThe time at which these stats were updated.\n\nusageNanoCores\n\nuint64\n\nTotal CPU usage (sum of all cores) averaged over the sample window.\nThe \"core\" unit can be interpreted as CPU core-nanoseconds per second.\n\nusageCoreNanoSeconds\n\nuint64\n\nCumulative CPU usage (sum of all cores) since object creation.\n\npsi\n\nPSIStats\n\nCPU PSI stats.\n\n## `ContainerStats` {#ContainerStats}\n\n**Appears in:**\n\n- [NodeStats](#NodeStats)\n\n- [PodStats](#PodStats)\n\nContainerStats holds container-level unprocessed sample stats.\n\nField Description\n\nname [Required]\n\nstring\n\nReference to the measured container.\n\nstartTime [Required]\n\nmeta/v1.Time\n\nThe time at which data collection for this container was (re)started.\n\ncpu\n\nCPUStats\n\nStats pertaining to CPU resources.\n\nmemory\n\nMemoryStats\n\nStats pertaining to memory (RAM) resources.\n\nio\n\nIOStats\n\nStats pertaining to IO resources.\n\naccelerators [Required]\n\n[]AcceleratorStats\n\nMetrics for Accelerators. Each Accelerator corresponds to one element in the array.\n\nrootfs\n\nFsStats\n\nStats pertaining to container rootfs usage of filesystem resources.\nRootfs.UsedBytes is the number of bytes used for the container write layer.\n\nlogs\n\nFsStats\n\nStats pertaining to container logs usage of filesystem resources.\nLogs.UsedBytes is the number of bytes used for the container logs.\n\nuserDefinedMetrics [Required]\n\n[]UserDefinedMetric\n\nUser defined metrics that are exposed by containers in the pod. Typically, we expect only one container in the pod to be exposing user defined metrics. In the event of multiple containers exposing metrics, they will be combined here.\n\nswap\n\nSwapStats\n\nStats pertaining to swap resources. This is reported to non-windows systems only.\n\n## `FsStats` {#FsStats}\n\n**Appears in:**\n\n- [ContainerStats](#ContainerStats)\n\n- [NodeStats](#NodeStats)\n\n- [PodStats](#PodStats)\n\n- [RuntimeStats](#RuntimeStats)\n\n- [VolumeStats](#VolumeStats)\n\nFsStats contains data about filesystem usage.\n\nField Description\n\ntime [Required]\n\nmeta/v1.Time\n\nThe time at which these stats were updated.\n\navailableBytes\n\nuint64\n\nAvailableBytes represents the storage space available (bytes) for the filesystem.\n\ncapacityBytes\n\nuint64\n\nCapacityBytes represents the total capacity (bytes) of the filesystems underlying storage.\n\nusedBytes\n\nuint64\n\nUsedBytes represents the bytes used for a specific task on the filesystem.\nThis may differ from the total bytes used on the filesystem and may not equal CapacityBytes - AvailableBytes.\ne.g. For ContainerStats.Rootfs this is the bytes used by the container rootfs on the filesystem.\n\ninodesFree\n\nuint64\n\nInodesFree represents the free inodes in the filesystem.\n\ninodes\n\nuint64\n\nInodes represents the total inodes in the filesystem.\n\ninodesUsed [Required]\n\nuint64\n\nInodesUsed represents the inodes used by the filesystem\nThis may not equal Inodes - InodesFree because this filesystem may share inodes with other \"filesystems\"\ne.g. For ContainerStats.Rootfs, this is the inodes used only by that container, and does not count inodes used by other containers.\n\n## `IOStats` {#IOStats}\n\n**Appears in:**\n\n- [ContainerStats](#ContainerStats)\n\n- [NodeStats](#NodeStats)\n\n- [PodStats](#PodStats)\n\nIOStats contains data about IO usage.\n\nField Description\n\ntime [Required]\n\nmeta/v1.Time\n\nThe time at which these stats were updated.\n\npsi\n\nPSIStats\n\nIO PSI stats.\n\n## `InterfaceStats` {#InterfaceStats}\n\n**Appears in:**\n\n- [NetworkStats](#NetworkStats)\n\nInterfaceStats contains resource value data about interface.\n\nField Description\n\nname [Required]\n\nstring\n\nThe name of the interface\n\nrxBytes\n\nuint64\n\nCumulative count of bytes received.\n\nrxErrors\n\nuint64\n\nCumulative count of receive errors encountered.\n\ntxBytes\n\nuint64\n\nCumulative count of bytes transmitted.\n\ntxErrors\n\nuint64\n\nCumulative count of transmit errors encountered.\n\n## `MemoryStats` {#MemoryStats}\n\n**Appears in:**\n\n- [ContainerStats](#ContainerStats)\n\n- [NodeStats](#NodeStats)\n\n- [PodStats](#PodStats)\n\nMemoryStats contains data about memory usage.\n\nField Description\n\ntime [Required]\n\nmeta/v1.Time\n\nThe time at which these stats were updated.\n\navailableBytes\n\nuint64\n\nAvailable memory for use. This is defined as the memory limit - workingSetBytes.\nIf memory limit is undefined, the available bytes is omitted.\n\nusageBytes\n\nuint64\n\nTotal memory in use. This includes all memory regardless of when it was accessed.\n\nworkingSetBytes\n\nuint64\n\nThe amount of working set memory. This includes recently accessed memory,\ndirty memory, and kernel memory. WorkingSetBytes is <= UsageBytes\n\nrssBytes\n\nuint64\n\nThe amount of anonymous and swap cache memory (includes transparent\nhugepages).\n\npageFaults\n\nuint64\n\nCumulative number of minor page faults.\n\nmajorPageFaults\n\nuint64\n\nCumulative number of major page faults.\n\npsi\n\nPSIStats\n\nMemory PSI stats.\n\n## `NetworkStats` {#NetworkStats}\n\n**Appears in:**\n\n- [NodeStats](#NodeStats)\n\n- [PodStats](#PodStats)\n\nNetworkStats contains data about network resources.\n\nField Description\n\ntime [Required]\n\nmeta/v1.Time\n\nThe time at which these stats were updated.\n\nInterfaceStats [Required]\n\nInterfaceStats\n\nStats for the default interface, if found\n\ninterfaces [Required]\n\n[]InterfaceStats\n\nNo description provided.\n\n## `NodeStats` {#NodeStats}\n\n**Appears in:**\n\n- [Summary](#Summary)\n\nNodeStats holds node-level unprocessed sample stats.\n\nField Description\n\nnodeName [Required]\n\nstring\n\nReference to the measured Node.\n\nsystemContainers\n\n[]ContainerStats\n\nStats of system daemons tracked as raw containers.\nThe system containers are named according to the SystemContainer* constants.\n\nstartTime [Required]\n\nmeta/v1.Time\n\nThe time at which data collection for the node-scoped (i.e. aggregate) stats was (re)started.\n\ncpu\n\nCPUStats\n\nStats pertaining to CPU resources.\n\nmemory\n\nMemoryStats\n\nStats pertaining to memory (RAM) resources.\n\nio\n\nIOStats\n\nStats pertaining to IO resources.\n\nnetwork\n\nNetworkStats\n\nStats pertaining to network resources.\n\nfs\n\nFsStats\n\nStats pertaining to total usage of filesystem resources on the rootfs used by node k8s components.\nNodeFs.Used is the total bytes used on the filesystem.\n\nruntime\n\nRuntimeStats\n\nStats about the underlying container runtime.\n\nrlimit\n\nRlimitStats\n\nStats about the rlimit of system.\n\nswap\n\nSwapStats\n\nStats pertaining to swap resources. This is reported to non-windows systems only.\n\n## `PSIData` {#PSIData}\n\n**Appears in:**\n\n- [PSIStats](#PSIStats)\n\nPSI data for an individual resource.\n\nField Description\n\ntotal [Required]\n\nuint64\n\nTotal time duration for tasks in the cgroup have waited due to congestion.\nUnit: nanoseconds.\n\navg10 [Required]\n\nfloat64\n\nThe average (in %) tasks have waited due to congestion over a 10 second window.\n\navg60 [Required]\n\nfloat64\n\nThe average (in %) tasks have waited due to congestion over a 60 second window.\n\navg300 [Required]\n\nfloat64\n\nThe average (in %) tasks have waited due to congestion over a 300 second window.\n\n## `PSIStats` {#PSIStats}\n\n**Appears in:**\n\n- [CPUStats](#CPUStats)\n\n- [IOStats](#IOStats)\n\n- [MemoryStats](#MemoryStats)\n\nPSI statistics for an individual resource.\n\nField Description\n\nfull [Required]\n\nPSIData\n\nPSI data for all tasks in the cgroup.\n\nsome [Required]\n\nPSIData\n\nPSI data for some tasks in the cgroup.\n\n## `PVCReference` {#PVCReference}\n\n**Appears in:**\n\n- [VolumeStats](#VolumeStats)\n\nPVCReference contains enough information to describe the referenced PVC.\n\nField Description\n\nname [Required]\n\nstring\n\nNo description provided.\n\nnamespace [Required]\n\nstring\n\nNo description provided.\n\n## `PodReference` {#PodReference}\n\n**Appears in:**\n\n- [PodStats](#PodStats)\n\nPodReference contains enough information to locate the referenced pod.\n\nField Description\n\nname [Required]\n\nstring\n\nNo description provided.\n\nnamespace [Required]\n\nstring\n\nNo description provided.\n\nuid [Required]\n\nstring\n\nNo description provided.\n\n## `PodStats` {#PodStats}\n\n**Appears in:**\n\n- [Summary](#Summary)\n\nPodStats holds pod-level unprocessed sample stats.\n\nField Description\n\npodRef [Required]\n\nPodReference\n\nReference to the measured Pod.\n\nstartTime [Required]\n\nmeta/v1.Time\n\nThe time at which data collection for the pod-scoped (e.g. network) stats was (re)started.\n\ncontainers [Required]\n\n[]ContainerStats\n\nStats of containers in the measured pod.\n\ncpu\n\nCPUStats\n\nStats pertaining to CPU resources consumed by pod cgroup (which includes all containers' resource usage and pod overhead).\n\nmemory\n\nMemoryStats\n\nStats pertaining to memory (RAM) resources consumed by pod cgroup (which includes all containers' resource usage and pod overhead).\n\nio\n\nIOStats\n\nStats pertaining to IO resources consumed by pod cgroup (which includes all containers' resource usage and pod overhead).\n\nnetwork\n\nNetworkStats\n\nStats pertaining to network resources.\n\nvolume\n\n[]VolumeStats\n\nStats pertaining to volume usage of filesystem resources.\nVolumeStats.UsedBytes is the number of bytes used by the Volume\n\nephemeral-storage\n\nFsStats\n\nEphemeralStorage reports the total filesystem usage for the containers and emptyDir-backed volumes in the measured Pod.\n\nprocess_stats\n\nProcessStats\n\nProcessStats pertaining to processes.\n\nswap\n\nSwapStats\n\nStats pertaining to swap resources. This is reported to non-windows systems only.\n\n## `ProcessStats` {#ProcessStats}\n\n**Appears in:**\n\n- [PodStats](#PodStats)\n\nProcessStats are stats pertaining to processes.\n\nField Description\n\nprocess_count\n\nuint64\n\nNumber of processes\n\n## `RlimitStats` {#RlimitStats}\n\n**Appears in:**\n\n- [NodeStats](#NodeStats)\n\nRlimitStats are stats rlimit of OS.\n\nField Description\n\ntime [Required]\n\nmeta/v1.Time\n\nNo description provided.\n\nmaxpid [Required]\n\nint64\n\nThe max number of extant process (threads, precisely on Linux) of OS. See RLIMIT_NPROC in getrlimit(2).\nThe operating system ceiling on the number of process IDs that can be assigned.\nOn Linux, tasks (either processes or threads) consume 1 PID each.\n\ncurproc [Required]\n\nint64\n\nThe number of running process (threads, precisely on Linux) in the OS.\n\n## `RuntimeStats` {#RuntimeStats}\n\n**Appears in:**\n\n- [NodeStats](#NodeStats)\n\nRuntimeStats are stats pertaining to the underlying container runtime.\n\nField Description\n\nimageFs\n\nFsStats\n\nStats about the underlying filesystem where container images are stored.\nThis filesystem could be the same as the primary (root) filesystem.\nUsage here refers to the total number of bytes occupied by images on the filesystem.\n\ncontainerFs\n\nFsStats\n\nStats about the underlying filesystem where container's writeable layer is stored.\nThis filesystem could be the same as the primary (root) filesystem or the ImageFS.\nUsage here refers to the total number of bytes occupied by the writeable layer on the filesystem.\n\n## `SwapStats` {#SwapStats}\n\n**Appears in:**\n\n- [ContainerStats](#ContainerStats)\n\n- [NodeStats](#NodeStats)\n\n- [PodStats](#PodStats)\n\nSwapStats contains data about memory usage\n\nField Description\n\ntime [Required]\n\nmeta/v1.Time\n\nThe time at which these stats were updated.\n\nswapAvailableBytes\n\nuint64\n\nAvailable swap memory for use. This is defined as the - .\nIf swap limit is undefined, this value is omitted.\n\nswapUsageBytes\n\nuint64\n\nTotal swap memory in use.\n\n## `UserDefinedMetric` {#UserDefinedMetric}\n\n**Appears in:**\n\n- [ContainerStats](#ContainerStats)\n\nUserDefinedMetric represents a metric defined and generated by users.\n\nField Description\n\nUserDefinedMetricDescriptor [Required]\n\nUserDefinedMetricDescriptor\n\nNo description provided.\n\ntime [Required]\n\nmeta/v1.Time\n\nThe time at which these stats were updated.\n\nvalue [Required]\n\nfloat64\n\nValue of the metric. Float64s have 53 bit precision.\nWe do not foresee any metrics exceeding that value.\n\n## `UserDefinedMetricDescriptor` {#UserDefinedMetricDescriptor}\n\n**Appears in:**\n\n- [UserDefinedMetric](#UserDefinedMetric)\n\nUserDefinedMetricDescriptor contains metadata that describes a user defined metric.\n\nField Description\n\nname [Required]\n\nstring\n\nThe name of the metric.\n\ntype [Required]\n\nUserDefinedMetricType\n\nType of the metric.\n\nunits [Required]\n\nstring\n\nDisplay Units for the stats.\n\nlabels\n\nmap[string]string\n\nMetadata labels associated with this metric.\n\n## `UserDefinedMetricType` {#UserDefinedMetricType}\n\n(Alias of `string`)\n\n**Appears in:**\n\n- [UserDefinedMetricDescriptor](#UserDefinedMetricDescriptor)\n\nUserDefinedMetricType defines how the metric should be interpreted by the user.\n\n## `VolumeStats` {#VolumeStats}\n\n**Appears in:**\n\n- [PodStats](#PodStats)\n\nVolumeStats contains data about Volume filesystem usage.\n\nField Description\n\nFsStats [Required]\n\nFsStats\n\nEmbedded FsStats\n\nname\n\nstring\n\nName is the name given to the Volume\n\npvcRef\n\nPVCReference\n\nReference to the PVC, if one exists", "source": "content/en/docs/reference/kubelet-api/stats.v1alpha1.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: admissionregistration.k8s.io/v1`\n\n`import \"k8s.io/api/admissionregistration/v1\"`\n\n## MutatingAdmissionPolicyBinding {#MutatingAdmissionPolicyBinding}\n\nMutatingAdmissionPolicyBinding binds the MutatingAdmissionPolicy with parametrized resources. MutatingAdmissionPolicyBinding and the optional parameter resource together define how cluster administrators configure policies for clusters.\n\nFor a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding. Each evaluation is constrained by a [runtime cost budget](https://kubernetes.io/docs/reference/using-api/cel/#runtime-cost-budget).\n\nAdding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nObjectMeta\nmetadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.\n\nspec\nMutatingAdmissionPolicyBindingSpec\nspec defines the desired behavior of the MutatingAdmissionPolicyBinding.\n\n## MutatingAdmissionPolicyBindingSpec {#MutatingAdmissionPolicyBindingSpec}\n\nMutatingAdmissionPolicyBindingSpec defines the specification of the MutatingAdmissionPolicyBinding.\n\nField Description\n\nmatchResources\nMatchResources\nmatchResources limits what resources match this binding and may be mutated by it. Note that if matchResources matches a resource, the resource must also match a policy's matchConstraints and matchConditions before the resource may be mutated. When matchResources is unset, it does not constrain resource matching, and only the policy's matchConstraints and matchConditions must match for the resource to be mutated. Additionally, matchResources.resourceRules are optional and do not constraint matching when unset. Note that this is differs from MutatingAdmissionPolicy matchConstraints, where resourceRules are required. The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. '\\*' matches CREATE, UPDATE and CONNECT.\n\nparamRef\nParamRef\nparamRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in spec.ParamKind of the bound MutatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the MutatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.\n\npolicyName\nstring\npolicyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.\n\n## MutatingAdmissionPolicyBindingList {#MutatingAdmissionPolicyBindingList}\n\nMutatingAdmissionPolicyBindingList is a list of MutatingAdmissionPolicyBinding.\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nitems *\nMutatingAdmissionPolicyBinding array\nList of PolicyBinding.\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nListMeta\nmetadata is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\n## Operations {#Operations}\n\n### `post` Create\n\n#### HTTP Request\n\nPOST /apis/admissionregistration.k8s.io/v1/mutatingadmissionpolicybindings\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nMutatingAdmissionPolicyBinding\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nMutatingAdmissionPolicyBinding\n\n201\nCreated\nMutatingAdmissionPolicyBinding\n\n202\nAccepted\nMutatingAdmissionPolicyBinding\n\n### `patch` Patch\n\n#### HTTP Request\n\nPATCH /apis/admissionregistration.k8s.io/v1/mutatingadmissionpolicybindings/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the MutatingAdmissionPolicyBinding\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\nforce\nboolean\nForce is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nPatch\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nMutatingAdmissionPolicyBinding\n\n201\nCreated\nMutatingAdmissionPolicyBinding\n\n### `put` Replace\n\n#### HTTP Request\n\nPUT /apis/admissionregistration.k8s.io/v1/mutatingadmissionpolicybindings/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the MutatingAdmissionPolicyBinding\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nMutatingAdmissionPolicyBinding\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nMutatingAdmissionPolicyBinding\n\n201\nCreated\nMutatingAdmissionPolicyBinding\n\n### `delete` Delete\n\n#### HTTP Request\n\nDELETE /apis/admissionregistration.k8s.io/v1/mutatingadmissionpolicybindings/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the MutatingAdmissionPolicyBinding\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\ngracePeriodSeconds\ninteger\nThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n\nignoreStoreReadErrorWithClusterBreakingPotential\nboolean\nif set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it\n\norphanDependents\nboolean\nDeprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n\npropagationPolicy\nstring\nWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nDeleteOptions\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatus\n\n202\nAccepted\nStatus\n\n### `delete` Delete Collection\n\n#### HTTP Request\n\nDELETE /apis/admissionregistration.k8s.io/v1/mutatingadmissionpolicybindings\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\ngracePeriodSeconds\ninteger\nThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n\nignoreStoreReadErrorWithClusterBreakingPotential\nboolean\nif set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\norphanDependents\nboolean\nDeprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n\npropagationPolicy\nstring\nWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nDeleteOptions\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatus\n\n### `get` Read\n\n#### HTTP Request\n\nGET /apis/admissionregistration.k8s.io/v1/mutatingadmissionpolicybindings/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the MutatingAdmissionPolicyBinding\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nMutatingAdmissionPolicyBinding\n\n### `get` List\n\n#### HTTP Request\n\nGET /apis/admissionregistration.k8s.io/v1/mutatingadmissionpolicybindings\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nMutatingAdmissionPolicyBindingList\n\n### `get` Watch\n\n#### HTTP Request\n\nGET /apis/admissionregistration.k8s.io/v1/watch/mutatingadmissionpolicybindings/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the MutatingAdmissionPolicyBinding\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent\n\n### `get` Watch List\n\n#### HTTP Request\n\nGET /apis/admissionregistration.k8s.io/v1/watch/mutatingadmissionpolicybindings\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent", "source": "content/en/docs/reference/kubernetes-api/admissionregistration/mutating-admission-policy-binding-v1.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: admissionregistration.k8s.io/v1`\n\n`import \"k8s.io/api/admissionregistration/v1\"`\n\n## ValidatingWebhookConfiguration {#ValidatingWebhookConfiguration}\n\nValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nObjectMeta\nmetadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.\n\nwebhooks\nValidatingWebhook array\npatch strategy: merge on key name\nwebhooks is a list of webhooks and the affected resources and operations.\n\n## ValidatingWebhookConfigurationList {#ValidatingWebhookConfigurationList}\n\nValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nitems *\nValidatingWebhookConfiguration array\nList of ValidatingWebhookConfiguration.\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nListMeta\nmetadata is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\n## ValidatingWebhook {#ValidatingWebhook}\n\nValidatingWebhook describes an admission webhook and the resources and operations it applies to.\n\nField Description\n\nadmissionReviewVersions *\nstring array\nadmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.\n\nclientConfig *\nWebhookClientConfig\nclientConfig defines how to communicate with the hook. Required\n\nfailurePolicy\nstring\nfailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.\n\nPossible enum values:\n- `\"Fail\"` means that an error calling the webhook causes the admission to fail.\n- `\"Ignore\"` means that an error calling the webhook is ignored.\n\nmatchConditions\nMatchCondition array\npatch strategy: merge on key name\nmatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped\n\nmatchPolicy\nstring\nmatchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. Defaults to \"Equivalent\"\n\nPossible enum values:\n- `\"Equivalent\"` means requests should be sent to the webhook if they modify a resource listed in rules via another API group or version.\n- `\"Exact\"` means requests should only be sent to the webhook if they exactly match a given rule.\n\nname *\nstring\nname is the name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.\n\nnamespaceSelector\nLabelSelector\nnamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook. For example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": { \"matchExpressions\": [ { \"key\": \"runlevel\", \"operator\": \"NotIn\", \"values\": [ \"0\", \"1\" ] } ] } If instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": { \"matchExpressions\": [ { \"key\": \"environment\", \"operator\": \"In\", \"values\": [ \"prod\", \"staging\" ] } ] } See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors. Default to the empty LabelSelector, which matches everything.\n\nobjectSelector\nLabelSelector\nobjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.\n\nrules\nRuleWithOperations array\nrules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.\n\nsideEffects *\nstring\nsideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.\n\nPossible enum values:\n- `\"None\"` means that calling the webhook will have no side effects.\n- `\"NoneOnDryRun\"` means that calling the webhook will possibly have side effects, but if the request being reviewed has the dry-run attribute, the side effects will be suppressed.\n- `\"Some\"` means that calling the webhook will possibly have side effects. If a request with the dry-run attribute would trigger a call to this webhook, the request will instead fail.\n- `\"Unknown\"` means that no information is known about the side effects of calling the webhook. If a request with the dry-run attribute would trigger a call to this webhook, the request will instead fail.\n\ntimeoutSeconds\ninteger\ntimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds.\n\n## Operations {#Operations}\n\n### `post` Create\n\n#### HTTP Request\n\nPOST /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nValidatingWebhookConfiguration\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nValidatingWebhookConfiguration\n\n201\nCreated\nValidatingWebhookConfiguration\n\n202\nAccepted\nValidatingWebhookConfiguration\n\n### `patch` Patch\n\n#### HTTP Request\n\nPATCH /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the ValidatingWebhookConfiguration\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\nforce\nboolean\nForce is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nPatch\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nValidatingWebhookConfiguration\n\n201\nCreated\nValidatingWebhookConfiguration\n\n### `put` Replace\n\n#### HTTP Request\n\nPUT /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the ValidatingWebhookConfiguration\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nValidatingWebhookConfiguration\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nValidatingWebhookConfiguration\n\n201\nCreated\nValidatingWebhookConfiguration\n\n### `delete` Delete\n\n#### HTTP Request\n\nDELETE /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the ValidatingWebhookConfiguration\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\ngracePeriodSeconds\ninteger\nThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n\nignoreStoreReadErrorWithClusterBreakingPotential\nboolean\nif set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it\n\norphanDependents\nboolean\nDeprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n\npropagationPolicy\nstring\nWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nDeleteOptions\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatus\n\n202\nAccepted\nStatus\n\n### `delete` Delete Collection\n\n#### HTTP Request\n\nDELETE /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\ngracePeriodSeconds\ninteger\nThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n\nignoreStoreReadErrorWithClusterBreakingPotential\nboolean\nif set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\norphanDependents\nboolean\nDeprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n\npropagationPolicy\nstring\nWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nDeleteOptions\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatus\n\n### `get` Read\n\n#### HTTP Request\n\nGET /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the ValidatingWebhookConfiguration\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nValidatingWebhookConfiguration\n\n### `get` List\n\n#### HTTP Request\n\nGET /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nValidatingWebhookConfigurationList\n\n### `get` Watch\n\n#### HTTP Request\n\nGET /apis/admissionregistration.k8s.io/v1/watch/validatingwebhookconfigurations/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the ValidatingWebhookConfiguration\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent\n\n### `get` Watch List\n\n#### HTTP Request\n\nGET /apis/admissionregistration.k8s.io/v1/watch/validatingwebhookconfigurations\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent", "source": "content/en/docs/reference/kubernetes-api/admissionregistration/validating-webhook-configuration-v1.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: apps/v1`\n\n`import \"k8s.io/api/apps/v1\"`\n\n## StatefulSet {#StatefulSet}\n\nStatefulSet represents a set of pods with consistent identities. Identities are defined as:\n- Network: A single stable DNS and hostname.\n- Storage: As many VolumeClaims as requested.\n\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nObjectMeta\nStandard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n\nspec *\nStatefulSetSpec\nSpec defines the desired identities of pods in this set.\n\nstatus\nStatefulSetStatus\nStatus is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.\n\n## StatefulSetSpec {#StatefulSetSpec}\n\nA StatefulSetSpec is the specification of a StatefulSet.\n\nField Description\n\nminReadySeconds\ninteger\nMinimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)\n\nordinals\nStatefulSetOrdinals\nordinals controls the numbering of replica indices in a StatefulSet. The default ordinals behavior assigns a \"0\" index to the first replica and increments the index by one for each additional replica requested.\n\npersistentVolumeClaimRetentionPolicy\nStatefulSetPersistentVolumeClaimRetentionPolicy\npersistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and retained until manually deleted. This policy allows the lifecycle to be altered, for example by deleting persistent volume claims when their stateful set is deleted, or when their pod is scaled down.\n\npodManagementPolicy\nstring\npodManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.\n\nPossible enum values:\n- `\"OrderedReady\"` will create pods in strictly increasing order on scale up and strictly decreasing order on scale down, progressing only when the previous pod is ready or terminated. At most one pod will be changed at any time.\n- `\"Parallel\"` will create and delete pods as soon as the stateful set replica count is changed, and will not wait for pods to be ready or complete termination.\n\nreplicas\ninteger\nreplicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.\n\nrevisionHistoryLimit\ninteger\nrevisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.\n\nselector *\nLabelSelector\nselector is a label query over pods that should match the replica count. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors\n\nserviceName\nstring\nserviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.\n\ntemplate *\nPodTemplateSpec\ntemplate is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. Each pod will be named with the format \\ -\\ . For example, a pod in a StatefulSet named \"web\" with index number \"3\" would be named \"web-3\". The only allowed template.spec.restartPolicy value is \"Always\".\n\nupdateStrategy\nStatefulSetUpdateStrategy\nupdateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.\n\nvolumeClaimTemplates\nPersistentVolumeClaim array\nvolumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.\n\n## StatefulSetStatus {#StatefulSetStatus}\n\nStatefulSetStatus represents the current state of a StatefulSet.\n\nField Description\n\navailableReplicas\ninteger\nTotal number of available pods (ready for at least minReadySeconds) targeted by this statefulset.\n\ncollisionCount\ninteger\ncollisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.\n\nconditions\nStatefulSetCondition array\npatch strategy: merge on key type\nRepresents the latest available observations of a statefulset's current state.\n\ncurrentReplicas\ninteger\ncurrentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.\n\ncurrentRevision\nstring\ncurrentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).\n\nobservedGeneration\ninteger\nobservedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.\n\nreadyReplicas\ninteger\nreadyReplicas is the number of pods created for this StatefulSet with a Ready Condition.\n\nreplicas *\ninteger\nreplicas is the number of Pods created by the StatefulSet controller.\n\nupdateRevision\nstring\nupdateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)\n\nupdatedReplicas\ninteger\nupdatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.\n\n## StatefulSetList {#StatefulSetList}\n\nStatefulSetList is a collection of StatefulSets.\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nitems *\nStatefulSet array\nItems is the list of stateful sets.\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nListMeta\nStandard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n\n## RollingUpdateStatefulSetStrategy {#RollingUpdateStatefulSetStrategy}\n\nRollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.\n\nField Description\n\nmaxUnavailable\n\nThe maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0. Defaults to 1. This field is beta-level and is enabled by default. The field applies to all pods in the range 0 to Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it will be counted towards MaxUnavailable. This setting might not be effective for the OrderedReady podManagementPolicy. That policy ensures pods are created and become ready one at a time.\n\npartition\ninteger\nPartition indicates the ordinal at which the StatefulSet should be partitioned for updates. During a rolling update, all pods from ordinal Replicas-1 to Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. This is helpful in being able to do a canary based deployment. The default value is 0.\n\n## StatefulSetCondition {#StatefulSetCondition}\n\nStatefulSetCondition describes the state of a statefulset at a certain point.\n\nField Description\n\nlastTransitionTime\nTime\nLast time the condition transitioned from one status to another.\n\nmessage\nstring\nA human readable message indicating details about the transition.\n\nreason\nstring\nThe reason for the condition's last transition.\n\nstatus\nstring\nStatus of the condition, one of True, False, Unknown.\n\ntype\nstring\nType of statefulset condition.\n\n## StatefulSetOrdinals {#StatefulSetOrdinals}\n\nStatefulSetOrdinals describes the policy used for replica ordinal assignment in this StatefulSet.\n\nField Description\n\nstart\ninteger\nstart is the number representing the first replica's index. It may be used to number replicas from an alternate index (eg: 1-indexed) over the default 0-indexed names, or to orchestrate progressive movement of replicas from one StatefulSet to another. If set, replica indices will be in the range: [.spec.ordinals.start, .spec.ordinals.start + .spec.replicas). If unset, defaults to 0. Replica indices will be in the range: [0, .spec.replicas).\n\n## StatefulSetPersistentVolumeClaimRetentionPolicy {#StatefulSetPersistentVolumeClaimRetentionPolicy}\n\nStatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.\n\nField Description\n\nwhenDeleted\nstring\nWhenDeleted specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is deleted. The default policy of `Retain` causes PVCs to not be affected by StatefulSet deletion. The `Delete` policy causes those PVCs to be deleted.\n\nwhenScaled\nstring\nWhenScaled specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is scaled down. The default policy of `Retain` causes PVCs to not be affected by a scaledown. The `Delete` policy causes the associated PVCs for any excess pods above the replica count to be deleted.\n\n## StatefulSetUpdateStrategy {#StatefulSetUpdateStrategy}\n\nStatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.\n\nField Description\n\nrollingUpdate\nRollingUpdateStatefulSetStrategy\nRollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.\n\ntype\nstring\nType indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.\n\nPossible enum values:\n- `\"OnDelete\"` disables ordered rolling restarts. Version tracking is done on a best-effort basis - the controller will try to eventually converge StatefulSet's currentRevision with updateRevision. Pods are recreated from the StatefulSetSpec when they are manually deleted. When a scale operation is performed with this strategy, new Pods will be created from the specification version indicated by the StatefulSet's updateRevision.\n- `\"Recreate\"` indicates that all existing pods will be deleted and fully terminated before any new-revision pods are created. This ensures that old and new revision Pods never run at the same time. This is an alpha type and requires enabling StatefulSetRecreateStrategy feature gate. Switching to the Recreate strategy is allowed when the feature gate is enabled, and switching away from it to a different update strategy is also allowed. +featureGate=StatefulSetRecreateStrategy\n- `\"RollingUpdate\"` indicates that update will be applied to all Pods in the StatefulSet with respect to the StatefulSet ordering constraints. When a scale operation is performed with this strategy, new Pods will be created from the specification version indicated by the StatefulSet's updateRevision.\n\n## Operations {#Operations}\n\n### `post` Create\n\n#### HTTP Request\n\nPOST /apis/apps/v1/namespaces/{namespace}/statefulsets\n\n#### Path Parameters\n\nName Type Description\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nStatefulSet\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatefulSet\n\n201\nCreated\nStatefulSet\n\n202\nAccepted\nStatefulSet\n\n### `patch` Patch\n\n#### HTTP Request\n\nPATCH /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the StatefulSet\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\nforce\nboolean\nForce is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nPatch\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatefulSet\n\n201\nCreated\nStatefulSet\n\n### `put` Replace\n\n#### HTTP Request\n\nPUT /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the StatefulSet\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nStatefulSet\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatefulSet\n\n201\nCreated\nStatefulSet\n\n### `delete` Delete\n\n#### HTTP Request\n\nDELETE /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the StatefulSet\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\ngracePeriodSeconds\ninteger\nThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n\nignoreStoreReadErrorWithClusterBreakingPotential\nboolean\nif set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it\n\norphanDependents\nboolean\nDeprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n\npropagationPolicy\nstring\nWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nDeleteOptions\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatus\n\n202\nAccepted\nStatus\n\n### `delete` Delete Collection\n\n#### HTTP Request\n\nDELETE /apis/apps/v1/namespaces/{namespace}/statefulsets\n\n#### Path Parameters\n\nName Type Description\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\ngracePeriodSeconds\ninteger\nThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n\nignoreStoreReadErrorWithClusterBreakingPotential\nboolean\nif set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\norphanDependents\nboolean\nDeprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n\npropagationPolicy\nstring\nWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nDeleteOptions\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatus\n\n### `get` Read\n\n#### HTTP Request\n\nGET /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the StatefulSet\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatefulSet\n\n### `get` List\n\n#### HTTP Request\n\nGET /apis/apps/v1/namespaces/{namespace}/statefulsets\n\n#### Path Parameters\n\nName Type Description\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatefulSetList\n\n### `get` List All Namespaces\n\n#### HTTP Request\n\nGET /apis/apps/v1/statefulsets\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatefulSetList\n\n### `get` Watch\n\n#### HTTP Request\n\nGET /apis/apps/v1/watch/namespaces/{namespace}/statefulsets/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the StatefulSet\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent\n\n### `get` Watch List\n\n#### HTTP Request\n\nGET /apis/apps/v1/watch/namespaces/{namespace}/statefulsets\n\n#### Path Parameters\n\nName Type Description\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent\n\n### `get` Watch List All Namespaces\n\n#### HTTP Request\n\nGET /apis/apps/v1/watch/statefulsets\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent\n\n### `patch` Patch Status\n\n#### HTTP Request\n\nPATCH /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the StatefulSet\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\nforce\nboolean\nForce is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nPatch\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatefulSet\n\n201\nCreated\nStatefulSet\n\n### `get` Read Status\n\n#### HTTP Request\n\nGET /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the StatefulSet\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatefulSet\n\n### `put` Replace Status\n\n#### HTTP Request\n\nPUT /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the StatefulSet\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nStatefulSet\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatefulSet\n\n201\nCreated\nStatefulSet\n\n### `get` Read Scale\n\n#### HTTP Request\n\nGET /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the Scale\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nScale\n\n### `put` Replace Scale\n\n#### HTTP Request\n\nPUT /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the Scale\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nScale\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nScale\n\n201\nCreated\nScale\n\n### `patch` Patch Scale\n\n#### HTTP Request\n\nPATCH /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the Scale\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\nforce\nboolean\nForce is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nPatch\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nScale\n\n201\nCreated\nScale", "source": "content/en/docs/reference/kubernetes-api/apps/stateful-set-v1.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: autoscaling/v2`\n\n`import \"k8s.io/api/autoscaling/v2\"`\n\n## HorizontalPodAutoscaler {#HorizontalPodAutoscaler}\n\nHorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nObjectMeta\nmetadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n\nspec *\nHorizontalPodAutoscalerSpec\nspec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.\n\nstatus\nHorizontalPodAutoscalerStatus\nstatus is the current information about the autoscaler.\n\n## HorizontalPodAutoscalerSpec {#HorizontalPodAutoscalerSpec}\n\nHorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.\n\nField Description\n\nbehavior\nHorizontalPodAutoscalerBehavior\nbehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). If not set, the default HPAScalingRules for scale up and scale down are used.\n\nmaxReplicas *\ninteger\nmaxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.\n\nmetrics\nMetricSpec array\nmetrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization.\n\nminReplicas\ninteger\nminReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.\n\nscaleTargetRef *\nCrossVersionObjectReference\nscaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.\n\n## HorizontalPodAutoscalerStatus {#HorizontalPodAutoscalerStatus}\n\nHorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.\n\nField Description\n\nconditions\nHorizontalPodAutoscalerCondition array\npatch strategy: merge on key type\nconditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.\n\ncurrentMetrics\nMetricStatus array\ncurrentMetrics is the last read state of the metrics used by this autoscaler.\n\ncurrentReplicas\ninteger\ncurrentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.\n\ndesiredReplicas *\ninteger\ndesiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.\n\nlastScaleTime\nTime\nlastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.\n\nobservedGeneration\ninteger\nobservedGeneration is the most recent generation observed by this autoscaler.\n\n## HorizontalPodAutoscalerList {#HorizontalPodAutoscalerList}\n\nHorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nitems *\nHorizontalPodAutoscaler array\nitems is the list of horizontal pod autoscaler objects.\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nListMeta\nmetadata is the standard list metadata.\n\n## ContainerResourceMetricSource {#ContainerResourceMetricSource}\n\nContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.\n\nField Description\n\ncontainer *\nstring\ncontainer is the name of the container in the pods of the scaling target\n\nname *\nstring\nname is the name of the resource in question.\n\ntarget *\nMetricTarget\ntarget specifies the target value for the given metric\n\n## ContainerResourceMetricStatus {#ContainerResourceMetricStatus}\n\nContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\n\nField Description\n\ncontainer *\nstring\ncontainer is the name of the container in the pods of the scaling target\n\ncurrent *\nMetricValueStatus\ncurrent contains the current value for the given metric\n\nname *\nstring\nname is the name of the resource in question.\n\n## CrossVersionObjectReference {#CrossVersionObjectReference}\n\nCrossVersionObjectReference contains enough information to let you identify the referred resource.\n\nField Description\n\napiVersion\nstring\napiVersion is the API version of the referent\n\nkind *\nstring\nkind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nname *\nstring\nname is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\n\n## ExternalMetricSource {#ExternalMetricSource}\n\nExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).\n\nField Description\n\nmetric *\nMetricIdentifier\nmetric identifies the target metric by name and selector\n\ntarget *\nMetricTarget\ntarget specifies the target value for the given metric\n\n## ExternalMetricStatus {#ExternalMetricStatus}\n\nExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.\n\nField Description\n\ncurrent *\nMetricValueStatus\ncurrent contains the current value for the given metric\n\nmetric *\nMetricIdentifier\nmetric identifies the target metric by name and selector\n\n## HPAScalingPolicy {#HPAScalingPolicy}\n\nHPAScalingPolicy is a single policy which must hold true for a specified past interval.\n\nField Description\n\nperiodSeconds *\ninteger\nperiodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).\n\ntype *\nstring\ntype is used to specify the scaling policy.\n\nvalue *\ninteger\nvalue contains the amount of change which is permitted by the policy. It must be greater than zero\n\n## HPAScalingRules {#HPAScalingRules}\n\nHPAScalingRules configures the scaling behavior for one direction via scaling Policy Rules and a configurable metric tolerance.\n\nScaling Policy Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.\n\nThe tolerance is applied to the metric values and prevents scaling too eagerly for small metric variations.\n\nField Description\n\npolicies\nHPAScalingPolicy array\npolicies is a list of potential scaling polices which can be used during scaling. If not set, use the default values: - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window. - For scale down: allow all pods to be removed in a 15s window.\n\nselectPolicy\nstring\nselectPolicy is used to specify which policy should be used. If not set, the default value Max is used.\n\nstabilizationWindowSeconds\ninteger\nstabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).\n\ntolerance\nQuantity\ntolerance is the tolerance on the ratio between the current and desired metric value under which no updates are made to the desired number of replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not set, the default cluster-wide tolerance is applied (by default 10%). For example, if autoscaling is configured with a memory consumption target of 100Mi, and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be triggered when the actual consumption falls below 95Mi or exceeds 101Mi.\n\n## HorizontalPodAutoscalerBehavior {#HorizontalPodAutoscalerBehavior}\n\nHorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).\n\nField Description\n\nscaleDown\nHPAScalingRules\nscaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used).\n\nscaleUp\nHPAScalingRules\nscaleUp is scaling policy for scaling Up. If not set, the default value is the higher of: * increase no more than 4 pods per 60 seconds * double the number of pods per 60 seconds No stabilization is used.\n\n## HorizontalPodAutoscalerCondition {#HorizontalPodAutoscalerCondition}\n\nHorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.\n\nField Description\n\nlastTransitionTime\nTime\nlastTransitionTime is the last time the condition transitioned from one status to another\n\nmessage\nstring\nmessage is a human-readable explanation containing details about the transition\n\nobservedGeneration\ninteger\nobservedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.\n\nreason\nstring\nreason is the reason for the condition's last transition.\n\nstatus *\nstring\nstatus is the status of the condition (True, False, Unknown)\n\ntype *\nstring\ntype describes the current condition\n\n## MetricIdentifier {#MetricIdentifier}\n\nMetricIdentifier defines the name and optionally selector for a metric\n\nField Description\n\nname *\nstring\nname is the name of the given metric\n\nselector\nLabelSelector\nselector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.\n\n## MetricSpec {#MetricSpec}\n\nMetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).\n\nField Description\n\ncontainerResource\nContainerResourceMetricSource\ncontainerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\n\nexternal\nExternalMetricSource\nexternal refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).\n\nobject\nObjectMetricSource\nobject refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).\n\npods\nPodsMetricSource\npods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\n\nresource\nResourceMetricSource\nresource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\n\ntype *\nstring\ntype is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.\n\n## MetricStatus {#MetricStatus}\n\nMetricStatus describes the last-read state of a single metric.\n\nField Description\n\ncontainerResource\nContainerResourceMetricStatus\ncontainerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\n\nexternal\nExternalMetricStatus\nexternal refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).\n\nobject\nObjectMetricStatus\nobject refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).\n\npods\nPodsMetricStatus\npods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\n\nresource\nResourceMetricStatus\nresource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\n\ntype *\nstring\ntype is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.\n\n## MetricTarget {#MetricTarget}\n\nMetricTarget defines the target value, average value, or average utilization of a specific metric\n\nField Description\n\naverageUtilization\ninteger\naverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type\n\naverageValue\nQuantity\naverageValue is the target value of the average of the metric across all relevant pods (as a quantity)\n\ntype *\nstring\ntype represents whether the metric type is Utilization, Value, or AverageValue\n\nvalue\nQuantity\nvalue is the target value of the metric (as a quantity).\n\n## MetricValueStatus {#MetricValueStatus}\n\nMetricValueStatus holds the current value for a metric\n\nField Description\n\naverageUtilization\ninteger\naverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.\n\naverageValue\nQuantity\naverageValue is the current value of the average of the metric across all relevant pods (as a quantity)\n\nvalue\nQuantity\nvalue is the current value of the metric (as a quantity).\n\n## ObjectMetricSource {#ObjectMetricSource}\n\nObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\n\nField Description\n\ndescribedObject *\nCrossVersionObjectReference\ndescribedObject specifies the descriptions of a object,such as kind,name apiVersion\n\nmetric *\nMetricIdentifier\nmetric identifies the target metric by name and selector\n\ntarget *\nMetricTarget\ntarget specifies the target value for the given metric\n\n## ObjectMetricStatus {#ObjectMetricStatus}\n\nObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\n\nField Description\n\ncurrent *\nMetricValueStatus\ncurrent contains the current value for the given metric\n\ndescribedObject *\nCrossVersionObjectReference\ndescribedObject specifies the descriptions of a object,such as kind,name apiVersion\n\nmetric *\nMetricIdentifier\nmetric identifies the target metric by name and selector\n\n## PodsMetricSource {#PodsMetricSource}\n\nPodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\n\nField Description\n\nmetric *\nMetricIdentifier\nmetric identifies the target metric by name and selector\n\ntarget *\nMetricTarget\ntarget specifies the target value for the given metric\n\n## PodsMetricStatus {#PodsMetricStatus}\n\nPodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).\n\nField Description\n\ncurrent *\nMetricValueStatus\ncurrent contains the current value for the given metric\n\nmetric *\nMetricIdentifier\nmetric identifies the target metric by name and selector\n\n## ResourceMetricSource {#ResourceMetricSource}\n\nResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.\n\nField Description\n\nname *\nstring\nname is the name of the resource in question.\n\ntarget *\nMetricTarget\ntarget specifies the target value for the given metric\n\n## ResourceMetricStatus {#ResourceMetricStatus}\n\nResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.\n\nField Description\n\ncurrent *\nMetricValueStatus\ncurrent contains the current value for the given metric\n\nname *\nstring\nname is the name of the resource in question.\n\n## Operations {#Operations}\n\n### `post` Create\n\n#### HTTP Request\n\nPOST /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers\n\n#### Path Parameters\n\nName Type Description\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nHorizontalPodAutoscaler\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nHorizontalPodAutoscaler\n\n201\nCreated\nHorizontalPodAutoscaler\n\n202\nAccepted\nHorizontalPodAutoscaler\n\n### `patch` Patch\n\n#### HTTP Request\n\nPATCH /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the HorizontalPodAutoscaler\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\nforce\nboolean\nForce is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nPatch\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nHorizontalPodAutoscaler\n\n201\nCreated\nHorizontalPodAutoscaler\n\n### `put` Replace\n\n#### HTTP Request\n\nPUT /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the HorizontalPodAutoscaler\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nHorizontalPodAutoscaler\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nHorizontalPodAutoscaler\n\n201\nCreated\nHorizontalPodAutoscaler\n\n### `delete` Delete\n\n#### HTTP Request\n\nDELETE /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the HorizontalPodAutoscaler\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\ngracePeriodSeconds\ninteger\nThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n\nignoreStoreReadErrorWithClusterBreakingPotential\nboolean\nif set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it\n\norphanDependents\nboolean\nDeprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n\npropagationPolicy\nstring\nWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nDeleteOptions\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatus\n\n202\nAccepted\nStatus\n\n### `delete` Delete Collection\n\n#### HTTP Request\n\nDELETE /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers\n\n#### Path Parameters\n\nName Type Description\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\ngracePeriodSeconds\ninteger\nThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n\nignoreStoreReadErrorWithClusterBreakingPotential\nboolean\nif set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\norphanDependents\nboolean\nDeprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n\npropagationPolicy\nstring\nWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nDeleteOptions\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatus\n\n### `get` Read\n\n#### HTTP Request\n\nGET /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the HorizontalPodAutoscaler\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nHorizontalPodAutoscaler\n\n### `get` List\n\n#### HTTP Request\n\nGET /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers\n\n#### Path Parameters\n\nName Type Description\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nHorizontalPodAutoscalerList\n\n### `get` List All Namespaces\n\n#### HTTP Request\n\nGET /apis/autoscaling/v2/horizontalpodautoscalers\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nHorizontalPodAutoscalerList\n\n### `get` Watch\n\n#### HTTP Request\n\nGET /apis/autoscaling/v2/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the HorizontalPodAutoscaler\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent\n\n### `get` Watch List\n\n#### HTTP Request\n\nGET /apis/autoscaling/v2/watch/namespaces/{namespace}/horizontalpodautoscalers\n\n#### Path Parameters\n\nName Type Description\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent\n\n### `get` Watch List All Namespaces\n\n#### HTTP Request\n\nGET /apis/autoscaling/v2/watch/horizontalpodautoscalers\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent\n\n### `patch` Patch Status\n\n#### HTTP Request\n\nPATCH /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the HorizontalPodAutoscaler\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\nforce\nboolean\nForce is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nPatch\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nHorizontalPodAutoscaler\n\n201\nCreated\nHorizontalPodAutoscaler\n\n### `get` Read Status\n\n#### HTTP Request\n\nGET /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the HorizontalPodAutoscaler\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nHorizontalPodAutoscaler\n\n### `put` Replace Status\n\n#### HTTP Request\n\nPUT /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the HorizontalPodAutoscaler\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nHorizontalPodAutoscaler\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nHorizontalPodAutoscaler\n\n201\nCreated\nHorizontalPodAutoscaler", "source": "content/en/docs/reference/kubernetes-api/autoscaling/horizontal-pod-autoscaler-v2.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: coordination.k8s.io/v1`\n\n`import \"k8s.io/api/coordination/v1\"`\n\n## Lease {#Lease}\n\nLease defines a lease concept.\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nObjectMeta\nmetadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n\nspec\nLeaseSpec\nspec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\n\n## LeaseSpec {#LeaseSpec}\n\nLeaseSpec is a specification of a Lease.\n\nField Description\n\nacquireTime\nMicroTime\nacquireTime is a time when the current lease was acquired.\n\nholderIdentity\nstring\nholderIdentity contains the identity of the holder of a current lease. If Coordinated Leader Election is used, the holder identity must be equal to the elected LeaseCandidate.metadata.name field.\n\nleaseDurationSeconds\ninteger\nleaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measured against the time of last observed renewTime.\n\nleaseTransitions\ninteger\nleaseTransitions is the number of transitions of a lease between holders.\n\npreferredHolder\nstring\npreferredHolder signals to a lease holder that the lease has a more optimal holder and should be given up. This field can only be set if Strategy is also set.\n\nrenewTime\nMicroTime\nrenewTime is a time when the current holder of a lease has last updated the lease.\n\nstrategy\nstring\nstrategy indicates the strategy for picking the leader for coordinated leader election. If the field is not specified, there is no active coordination for this lease. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.\n\n## LeaseList {#LeaseList}\n\nLeaseList is a list of Lease objects.\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nitems *\nLease array\nitems is a list of schema objects.\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nListMeta\nStandard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n\n## Operations {#Operations}\n\n### `post` Create\n\n#### HTTP Request\n\nPOST /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases\n\n#### Path Parameters\n\nName Type Description\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nLease\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nLease\n\n201\nCreated\nLease\n\n202\nAccepted\nLease\n\n### `patch` Patch\n\n#### HTTP Request\n\nPATCH /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the Lease\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\nforce\nboolean\nForce is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nPatch\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nLease\n\n201\nCreated\nLease\n\n### `put` Replace\n\n#### HTTP Request\n\nPUT /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the Lease\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nLease\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nLease\n\n201\nCreated\nLease\n\n### `delete` Delete\n\n#### HTTP Request\n\nDELETE /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the Lease\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\ngracePeriodSeconds\ninteger\nThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n\nignoreStoreReadErrorWithClusterBreakingPotential\nboolean\nif set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it\n\norphanDependents\nboolean\nDeprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n\npropagationPolicy\nstring\nWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nDeleteOptions\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatus\n\n202\nAccepted\nStatus\n\n### `delete` Delete Collection\n\n#### HTTP Request\n\nDELETE /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases\n\n#### Path Parameters\n\nName Type Description\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\ngracePeriodSeconds\ninteger\nThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n\nignoreStoreReadErrorWithClusterBreakingPotential\nboolean\nif set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\norphanDependents\nboolean\nDeprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n\npropagationPolicy\nstring\nWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nDeleteOptions\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatus\n\n### `get` Read\n\n#### HTTP Request\n\nGET /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the Lease\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nLease\n\n### `get` List\n\n#### HTTP Request\n\nGET /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases\n\n#### Path Parameters\n\nName Type Description\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nLeaseList\n\n### `get` List All Namespaces\n\n#### HTTP Request\n\nGET /apis/coordination.k8s.io/v1/leases\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nLeaseList\n\n### `get` Watch\n\n#### HTTP Request\n\nGET /apis/coordination.k8s.io/v1/watch/namespaces/{namespace}/leases/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the Lease\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent\n\n### `get` Watch List\n\n#### HTTP Request\n\nGET /apis/coordination.k8s.io/v1/watch/namespaces/{namespace}/leases\n\n#### Path Parameters\n\nName Type Description\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent\n\n### `get` Watch List All Namespaces\n\n#### HTTP Request\n\nGET /apis/coordination.k8s.io/v1/watch/leases\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent", "source": "content/en/docs/reference/kubernetes-api/coordination/lease-v1.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: v1`\n\n`import \"k8s.io/api/core/v1\"`\n\n## ComponentStatus {#ComponentStatus}\n\nComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nconditions\nComponentCondition array\npatch strategy: merge on key type\nList of component conditions observed\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nObjectMeta\nStandard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n\n## ComponentStatusList {#ComponentStatusList}\n\nStatus of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nitems *\nComponentStatus array\nList of ComponentStatus objects.\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nListMeta\nStandard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\n## ComponentCondition {#ComponentCondition}\n\nInformation about the condition of a component.\n\nField Description\n\nerror\nstring\nCondition error code for a component. For example, a health check error code.\n\nmessage\nstring\nMessage about the condition for a component. For example, information about a health check.\n\nstatus *\nstring\nStatus of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\".\n\ntype *\nstring\nType of condition for a component. Valid value: \"Healthy\"\n\n## Operations {#Operations}\n\n### `get` Read\n\n#### HTTP Request\n\nGET /api/v1/componentstatuses/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the ComponentStatus\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nComponentStatus\n\n### `get` List\n\n#### HTTP Request\n\nGET /api/v1/componentstatuses\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nComponentStatusList", "source": "content/en/docs/reference/kubernetes-api/core/component-status-v1.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: v1`\n\n`import \"k8s.io/api/core/v1\"`\n\n## Node {#Node}\n\nNode is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nObjectMeta\nStandard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n\nspec\nNodeSpec\nSpec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\n\nstatus\nNodeStatus\nMost recently observed status of the node. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\n\n## NodeSpec {#NodeSpec}\n\nNodeSpec describes the attributes that a node is created with.\n\nField Description\n\nconfigSource\nNodeConfigSource\nDeprecated: Previously used to specify the source of the node's configuration for the DynamicKubeletConfig feature. This feature is removed.\n\nexternalID\nstring\nDeprecated. Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966\n\npodCIDR\nstring\nPodCIDR represents the pod IP range assigned to the node.\n\npodCIDRs\nstring array\npatch strategy: merge\npodCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for each of IPv4 and IPv6.\n\npodPreemptionPolicy\nNodePodPreemptionPolicy\nPodPreemptionPolicy controls the node-level preemption behaviors for pods on this node. This is an alpha field and requires enabling the InPlacePodVerticalScalingSchedulerPreemption feature gate.\n\nproviderID\nstring\nID of the node assigned by the cloud provider in the format: \\ ://\\\n\ntaints\nTaint array\nIf specified, the node's taints.\n\nunschedulable\nboolean\nUnschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration\n\n## NodeStatus {#NodeStatus}\n\nNodeStatus is information about the current status of a node.\n\nField Description\n\naddresses\nNodeAddress array\npatch strategy: merge on key type\nList of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/reference/node/node-status/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See https://pr.k8s.io/79391 for an example. Consumers should assume that addresses can change during the lifetime of a Node. However, there are some exceptions where this may not be possible, such as Pods that inherit a Node's address in its own status or consumers of the downward API (status.hostIP).\n\nallocatable\nobject\nAllocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.\n\ncapacity\nobject\nCapacity represents the total resources of a node. More info: https://kubernetes.io/docs/reference/node/node-status/#capacity\n\nconditions\nNodeCondition array\npatch strategy: merge on key type\nConditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/reference/node/node-status/#condition\n\nconfig\nNodeConfigStatus\nStatus of the config assigned to the node via the dynamic Kubelet config feature.\n\ndaemonEndpoints\nNodeDaemonEndpoints\nEndpoints of daemons running on the Node.\n\ndeclaredFeatures\nstring array\nDeclaredFeatures represents the features related to feature gates that are declared by the node.\n\nfeatures\nNodeFeatures\nFeatures describes the set of features implemented by the CRI implementation.\n\nimages\nContainerImage array\nList of container images on this node\n\nnodeInfo\nNodeSystemInfo\nSet of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/reference/node/node-status/#info\n\nphase\nstring\nNodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.\n\nPossible enum values:\n- `\"Pending\"` means the node has been created/added by the system, but not configured.\n- `\"Running\"` means the node has been configured and has Kubernetes components running.\n- `\"Terminated\"` means the node has been removed from the cluster.\n\nruntimeHandlers\nNodeRuntimeHandler array\nThe available runtime handlers.\n\nvolumesAttached\nAttachedVolume array\nList of volumes that are attached to the node.\n\nvolumesInUse\nstring array\nList of attachable volumes in use (mounted) by the node.\n\n## NodeList {#NodeList}\n\nNodeList is the whole list of all Nodes which have been registered with master.\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nitems *\nNode array\nList of nodes\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nListMeta\nStandard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\n## AttachedVolume {#AttachedVolume}\n\nAttachedVolume describes a volume attached to a node\n\nField Description\n\ndevicePath *\nstring\nDevicePath represents the device path where the volume should be available\n\nname *\nstring\nName of the attached volume\n\n## ConfigMapNodeConfigSource {#ConfigMapNodeConfigSource}\n\nConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. This API is deprecated since 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration\n\nField Description\n\nkubeletConfigKey *\nstring\nKubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases.\n\nname *\nstring\nName is the metadata.name of the referenced ConfigMap. This field is required in all cases.\n\nnamespace *\nstring\nNamespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases.\n\nresourceVersion\nstring\nResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.\n\nuid\nstring\nUID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.\n\n## ContainerImage {#ContainerImage}\n\nDescribe a container image\n\nField Description\n\nnames\nstring array\nNames by which this image is known. e.g. [\"kubernetes.example/hyperkube:v1.0.7\", \"cloud-vendor.registry.example/cloud-vendor/hyperkube:v1.0.7\"]\n\nsizeBytes\ninteger\nThe size of the image in bytes.\n\n## DaemonEndpoint {#DaemonEndpoint}\n\nDaemonEndpoint contains information about a single Daemon endpoint.\n\nField Description\n\nPort *\ninteger\nPort number of the given endpoint.\n\n## NodeAddress {#NodeAddress}\n\nNodeAddress contains information for the node's address.\n\nField Description\n\naddress *\nstring\nThe node address.\n\ntype *\nstring\nNode address type, one of Hostname, ExternalIP or InternalIP.\n\n## NodeCondition {#NodeCondition}\n\nNodeCondition contains condition information for a node.\n\nField Description\n\nlastHeartbeatTime\nTime\nLast time we got an update on a given condition.\n\nlastTransitionTime\nTime\nLast time the condition transit from one status to another.\n\nmessage\nstring\nHuman readable message indicating details about last transition.\n\nreason\nstring\n(brief) reason for the condition's last transition.\n\nstatus *\nstring\nStatus of the condition, one of True, False, Unknown.\n\ntype *\nstring\nType of node condition.\n\n## NodeConfigSource {#NodeConfigSource}\n\nNodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. This API is deprecated since 1.22\n\nField Description\n\nconfigMap\nConfigMapNodeConfigSource\nConfigMap is a reference to a Node's ConfigMap\n\n## NodeConfigStatus {#NodeConfigStatus}\n\nNodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource.\n\nField Description\n\nactive\nNodeConfigSource\nActive reports the checkpointed config the node is actively using. Active will represent either the current version of the Assigned config, or the current LastKnownGood config, depending on whether attempting to use the Assigned config results in an error.\n\nassigned\nNodeConfigSource\nAssigned reports the checkpointed config the node will try to use. When Node.Spec.ConfigSource is updated, the node checkpoints the associated config payload to local disk, along with a record indicating intended config. The node refers to this record to choose its config checkpoint, and reports this record in Assigned. Assigned only updates in the status after the record has been checkpointed to disk. When the Kubelet is restarted, it tries to make the Assigned config the Active config by loading and validating the checkpointed payload identified by Assigned.\n\nerror\nstring\nError describes any problems reconciling the Spec.ConfigSource to the Active config. Errors may occur, for example, attempting to checkpoint Spec.ConfigSource to the local Assigned record, attempting to checkpoint the payload associated with Spec.ConfigSource, attempting to load or validate the Assigned config, etc. Errors may occur at different points while syncing config. Earlier errors (e.g. download or checkpointing errors) will not result in a rollback to LastKnownGood, and may resolve across Kubelet retries. Later errors (e.g. loading or validating a checkpointed config) will result in a rollback to LastKnownGood. In the latter case, it is usually possible to resolve the error by fixing the config assigned in Spec.ConfigSource. You can find additional information for debugging by searching the error message in the Kubelet log. Error is a human-readable description of the error state; machines can check whether or not Error is empty, but should not rely on the stability of the Error text across Kubelet versions.\n\nlastKnownGood\nNodeConfigSource\nLastKnownGood reports the checkpointed config the node will fall back to when it encounters an error attempting to use the Assigned config. The Assigned config becomes the LastKnownGood config when the node determines that the Assigned config is stable and correct. This is currently implemented as a 10-minute soak period starting when the local record of Assigned config is updated. If the Assigned config is Active at the end of this period, it becomes the LastKnownGood. Note that if Spec.ConfigSource is reset to nil (use local defaults), the LastKnownGood is also immediately reset to nil, because the local default config is always assumed good. You should not make assumptions about the node's method of determining config stability and correctness, as this may change or become configurable in the future.\n\n## NodeDaemonEndpoints {#NodeDaemonEndpoints}\n\nNodeDaemonEndpoints lists ports opened by daemons running on the Node.\n\nField Description\n\nkubeletEndpoint\nDaemonEndpoint\nEndpoint on which Kubelet is listening.\n\n## NodeFeatures {#NodeFeatures}\n\nNodeFeatures describes the set of features implemented by the CRI implementation. The features contained in the NodeFeatures should depend only on the cri implementation independent of runtime handlers.\n\nField Description\n\nsupplementalGroupsPolicy\nboolean\nSupplementalGroupsPolicy is set to true if the runtime supports SupplementalGroupsPolicy and ContainerUser.\n\n## NodePodPreemptionPolicy {#NodePodPreemptionPolicy}\n\nNodePodPreemptionPolicy defines the node-level policies governing preemption for pods on this node.\n\nField Description\n\ndisableResizePreemption\nstring array\nDisableResizePreemption lists the owners (e.g., autoscalers, operators, administrators) that have requested to disable scheduler and Kubelet preemption for in-place pod resize on this node. If this list is non-empty, resize-induced preemption is disabled on this node. This is an alpha field and requires enabling the InPlacePodVerticalScalingSchedulerPreemption feature gate.\n\n## NodeRuntimeHandler {#NodeRuntimeHandler}\n\nNodeRuntimeHandler is a set of runtime handler information.\n\nField Description\n\nfeatures\nNodeRuntimeHandlerFeatures\nSupported features.\n\nname\nstring\nRuntime handler name. Empty for the default runtime handler.\n\n## NodeRuntimeHandlerFeatures {#NodeRuntimeHandlerFeatures}\n\nNodeRuntimeHandlerFeatures is a set of features implemented by the runtime handler.\n\nField Description\n\nrecursiveReadOnlyMounts\nboolean\nRecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts.\n\nuserNamespaces\nboolean\nUserNamespaces is set to true if the runtime handler supports UserNamespaces, including for volumes.\n\n## NodeSwapStatus {#NodeSwapStatus}\n\nNodeSwapStatus represents swap memory information.\n\nField Description\n\ncapacity\ninteger\nTotal amount of swap memory in bytes.\n\n## NodeSystemInfo {#NodeSystemInfo}\n\nNodeSystemInfo is a set of ids/uuids to uniquely identify the node.\n\nField Description\n\narchitecture *\nstring\nThe Architecture reported by the node\n\nbootID *\nstring\nBoot ID reported by the node.\n\ncontainerRuntimeVersion *\nstring\nContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2).\n\nkernelVersion *\nstring\nKernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).\n\nkubeProxyVersion *\nstring\nDeprecated: KubeProxy Version reported by the node.\n\nkubeletVersion *\nstring\nKubelet Version reported by the node.\n\nmachineID *\nstring\nMachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html\n\noperatingSystem *\nstring\nThe Operating System reported by the node\n\nosImage *\nstring\nOS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).\n\nrunningInUserNamespace\nboolean\nWhether the node is running in a user namespace.\n\nswap\nNodeSwapStatus\nSwap Info reported by the node.\n\nsystemUUID *\nstring\nSystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid\n\n## Taint {#Taint}\n\nThe node this Taint is attached to has the \"effect\" on any pod that does not tolerate the Taint.\n\nField Description\n\neffect *\nstring\nRequired. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.\n\nPossible enum values:\n- `\"NoExecute\"` Evict any already-running pods that do not tolerate the taint. Currently enforced by NodeController.\n- `\"NoSchedule\"` Do not allow new pods to schedule onto the node unless they tolerate the taint, but allow all pods submitted to Kubelet without going through the scheduler to start, and allow all already-running pods to continue running. Enforced by the scheduler.\n- `\"PreferNoSchedule\"` Like TaintEffectNoSchedule, but the scheduler tries not to schedule new pods onto the node, rather than prohibiting new pods from scheduling onto the node entirely. Enforced by the scheduler.\n\nkey *\nstring\nRequired. The taint key to be applied to a node.\n\ntimeAdded\nTime\nTimeAdded represents the time at which the taint was added.\n\nvalue\nstring\nThe taint value corresponding to the taint key.\n\n## Operations {#Operations}\n\n### `post` Create\n\n#### HTTP Request\n\nPOST /api/v1/nodes\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nNode\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nNode\n\n201\nCreated\nNode\n\n202\nAccepted\nNode\n\n### `patch` Patch\n\n#### HTTP Request\n\nPATCH /api/v1/nodes/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the Node\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\nforce\nboolean\nForce is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nPatch\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nNode\n\n201\nCreated\nNode\n\n### `put` Replace\n\n#### HTTP Request\n\nPUT /api/v1/nodes/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the Node\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nNode\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nNode\n\n201\nCreated\nNode\n\n### `delete` Delete\n\n#### HTTP Request\n\nDELETE /api/v1/nodes/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the Node\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\ngracePeriodSeconds\ninteger\nThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n\nignoreStoreReadErrorWithClusterBreakingPotential\nboolean\nif set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it\n\norphanDependents\nboolean\nDeprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n\npropagationPolicy\nstring\nWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nDeleteOptions\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatus\n\n202\nAccepted\nStatus\n\n### `delete` Delete Collection\n\n#### HTTP Request\n\nDELETE /api/v1/nodes\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\ngracePeriodSeconds\ninteger\nThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n\nignoreStoreReadErrorWithClusterBreakingPotential\nboolean\nif set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\norphanDependents\nboolean\nDeprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n\npropagationPolicy\nstring\nWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nDeleteOptions\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatus\n\n### `get` Read\n\n#### HTTP Request\n\nGET /api/v1/nodes/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the Node\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nNode\n\n### `get` List\n\n#### HTTP Request\n\nGET /api/v1/nodes\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nNodeList\n\n### `get` Watch\n\n#### HTTP Request\n\nGET /api/v1/watch/nodes/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the Node\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent\n\n### `get` Watch List\n\n#### HTTP Request\n\nGET /api/v1/watch/nodes\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent\n\n### `patch` Patch Status\n\n#### HTTP Request\n\nPATCH /api/v1/nodes/{name}/status\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the Node\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\nforce\nboolean\nForce is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nPatch\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nNode\n\n201\nCreated\nNode\n\n### `get` Read Status\n\n#### HTTP Request\n\nGET /api/v1/nodes/{name}/status\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the Node\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nNode\n\n### `put` Replace Status\n\n#### HTTP Request\n\nPUT /api/v1/nodes/{name}/status\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the Node\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nNode\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nNode\n\n201\nCreated\nNode\n\n### `post` Create Connect Proxy\n\n#### HTTP Request\n\nPOST /api/v1/nodes/{name}/proxy\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the NodeProxyOptions\n\n#### Query Parameters\n\nName Type Description\n\npath\nstring\nPath is the URL path to use for the current proxy request to node.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nstring\n\n### `post` Create Connect Proxy Path\n\n#### HTTP Request\n\nPOST /api/v1/nodes/{name}/proxy/{path}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the NodeProxyOptions\n\npath\nstring\npath to the resource\n\n#### Query Parameters\n\nName Type Description\n\npath\nstring\nPath is the URL path to use for the current proxy request to node.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nstring\n\n### `delete` Delete Connect Proxy\n\n#### HTTP Request\n\nDELETE /api/v1/nodes/{name}/proxy\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the NodeProxyOptions\n\n#### Query Parameters\n\nName Type Description\n\npath\nstring\nPath is the URL path to use for the current proxy request to node.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nstring\n\n### `delete` Delete Connect Proxy Path\n\n#### HTTP Request\n\nDELETE /api/v1/nodes/{name}/proxy/{path}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the NodeProxyOptions\n\npath\nstring\npath to the resource\n\n#### Query Parameters\n\nName Type Description\n\npath\nstring\nPath is the URL path to use for the current proxy request to node.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nstring\n\n### `get` Get Connect Proxy\n\n#### HTTP Request\n\nGET /api/v1/nodes/{name}/proxy\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the NodeProxyOptions\n\n#### Query Parameters\n\nName Type Description\n\npath\nstring\nPath is the URL path to use for the current proxy request to node.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nstring\n\n### `get` Get Connect Proxy Path\n\n#### HTTP Request\n\nGET /api/v1/nodes/{name}/proxy/{path}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the NodeProxyOptions\n\npath\nstring\npath to the resource\n\n#### Query Parameters\n\nName Type Description\n\npath\nstring\nPath is the URL path to use for the current proxy request to node.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nstring\n\n### `head` Head Connect Proxy\n\n#### HTTP Request\n\nHEAD /api/v1/nodes/{name}/proxy\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the NodeProxyOptions\n\n#### Query Parameters\n\nName Type Description\n\npath\nstring\nPath is the URL path to use for the current proxy request to node.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nstring\n\n### `head` Head Connect Proxy Path\n\n#### HTTP Request\n\nHEAD /api/v1/nodes/{name}/proxy/{path}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the NodeProxyOptions\n\npath\nstring\npath to the resource\n\n#### Query Parameters\n\nName Type Description\n\npath\nstring\nPath is the URL path to use for the current proxy request to node.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nstring\n\n### `put` Replace Connect Proxy\n\n#### HTTP Request\n\nPUT /api/v1/nodes/{name}/proxy\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the NodeProxyOptions\n\n#### Query Parameters\n\nName Type Description\n\npath\nstring\nPath is the URL path to use for the current proxy request to node.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nstring\n\n### `put` Replace Connect Proxy Path\n\n#### HTTP Request\n\nPUT /api/v1/nodes/{name}/proxy/{path}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the NodeProxyOptions\n\npath\nstring\npath to the resource\n\n#### Query Parameters\n\nName Type Description\n\npath\nstring\nPath is the URL path to use for the current proxy request to node.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nstring", "source": "content/en/docs/reference/kubernetes-api/core/node-v1.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: v1`\n\n`import \"k8s.io/api/core/v1\"`\n\n## PersistentVolumeClaim {#PersistentVolumeClaim}\n\nPersistentVolumeClaim is a user's request for and claim to a persistent volume\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nObjectMeta\nStandard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n\nspec\nPersistentVolumeClaimSpec\nspec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims\n\nstatus\nPersistentVolumeClaimStatus\nstatus represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims\n\n## PersistentVolumeClaimSpec {#PersistentVolumeClaimSpec}\n\nPersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes\n\nField Description\n\naccessModes\nstring array\naccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1\n\ndataSource\nTypedLocalObjectReference\ndataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource.\n\ndataSourceRef\nTypedObjectReference\ndataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.\n\nresources\nVolumeResourceRequirements\nresources represents the minimum resources the volume should have. Users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources\n\nselector\nLabelSelector\nselector is a label query over volumes to consider for binding.\n\nstorageClassName\nstring\nstorageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1\n\nvolumeAttributesClassName\nstring\nvolumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string or nil value indicates that no VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, this field can be reset to its previous value (including nil) to cancel the modification. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/\n\nvolumeMode\nstring\nvolumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.\n\nPossible enum values:\n- `\"Block\"` means the volume will not be formatted with a filesystem and will remain a raw block device.\n- `\"Filesystem\"` means the volume will be or is formatted with a filesystem.\n\nvolumeName\nstring\nvolumeName is the binding reference to the PersistentVolume backing this claim.\n\n## PersistentVolumeClaimStatus {#PersistentVolumeClaimStatus}\n\nPersistentVolumeClaimStatus is the current status of a persistent volume claim.\n\nField Description\n\naccessModes\nstring array\naccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1\n\nallocatedResourceStatuses\nobject\nallocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either: * Un-prefixed keys: - storage - the capacity of the volume. * Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\" Apart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used. ClaimResourceStatus can be in any of following states: - ControllerResizeInProgress: State set when resize controller starts resizing the volume in control-plane. - ControllerResizeFailed: State set when resize has failed in resize controller with a terminal error. - NodeResizePending: State set when resize controller has finished resizing the volume but further resizing of volume is needed on the node. - NodeResizeInProgress: State set when kubelet starts resizing the volume. - NodeResizeFailed: State set when resizing has failed in kubelet with a terminal error. Transient errors don't set NodeResizeFailed. For example: if expanding a PVC for more capacity - this field can be one of the following states: - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\" - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\" - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\" - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\" - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\" When this field is not set, it means that no resize operation is in progress for the given PVC. A controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nallocatedResources\nobject\nallocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either: * Un-prefixed keys: - storage - the capacity of the volume. * Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\" Apart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used. Capacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. A controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\ncapacity\nobject\ncapacity represents the actual resources of the underlying volume.\n\nconditions\nPersistentVolumeClaimCondition array\npatch strategy: merge on key type\nconditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'Resizing'.\n\ncurrentVolumeAttributesClassName\nstring\ncurrentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim\n\nhealthStatus\nVolumeHealthStatus\nhealthStatus contains the latest controller-reported health information for the volume bound to this claim.\n\nmodifyVolumeStatus\nModifyVolumeStatus\nModifyVolumeStatus represents the status object of ControllerModifyVolume operation. When this is unset, there is no ModifyVolume operation being attempted.\n\nphase\nstring\nphase represents the current phase of PersistentVolumeClaim.\n\nPossible enum values:\n- `\"Bound\"` used for PersistentVolumeClaims that are bound\n- `\"Lost\"` used for PersistentVolumeClaims that lost their underlying PersistentVolume. The claim was bound to a PersistentVolume and this volume does not exist any longer and all data on it was lost.\n- `\"Pending\"` used for PersistentVolumeClaims that are not yet bound\n\n## PersistentVolumeClaimList {#PersistentVolumeClaimList}\n\nPersistentVolumeClaimList is a list of PersistentVolumeClaim items.\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nitems *\nPersistentVolumeClaim array\nitems is a list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nListMeta\nStandard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\n## ModifyVolumeStatus {#ModifyVolumeStatus}\n\nModifyVolumeStatus represents the status object of ControllerModifyVolume operation\n\nField Description\n\nstatus *\nstring\nstatus is the status of the ControllerModifyVolume operation. It can be in any of following states: - Pending Pending indicates that the PersistentVolumeClaim cannot be modified due to unmet requirements, such as the specified VolumeAttributesClass not existing. - InProgress InProgress indicates that the volume is being modified. - Infeasible Infeasible indicates that the request has been rejected as invalid by the CSI driver. To resolve the error, a valid VolumeAttributesClass needs to be specified. Note: New statuses can be added in the future. Consumers should check for unknown statuses and fail appropriately.\n\nPossible enum values:\n- `\"InProgress\"` InProgress indicates that the volume is being modified\n- `\"Infeasible\"` Infeasible indicates that the request has been rejected as invalid by the CSI driver. To resolve the error, a valid VolumeAttributesClass needs to be specified\n- `\"Pending\"` Pending indicates that the PersistentVolumeClaim cannot be modified due to unmet requirements, such as the specified VolumeAttributesClass not existing\n\ntargetVolumeAttributesClassName\nstring\ntargetVolumeAttributesClassName is the name of the VolumeAttributesClass the PVC currently being reconciled\n\n## PersistentVolumeClaimCondition {#PersistentVolumeClaimCondition}\n\nPersistentVolumeClaimCondition contains details about state of pvc\n\nField Description\n\nlastProbeTime\nTime\nlastProbeTime is the time we probed the condition.\n\nlastTransitionTime\nTime\nlastTransitionTime is the time the condition transitioned from one status to another.\n\nmessage\nstring\nmessage is the human-readable message indicating details about last transition.\n\nreason\nstring\nreason is a unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"Resizing\" that means the underlying persistent volume is being resized.\n\nstatus *\nstring\nStatus is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required\n\ntype *\nstring\nType is the type of the condition. More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about\n\n## TypedObjectReference {#TypedObjectReference}\n\nTypedObjectReference contains enough information to let you locate the typed referenced object\n\nField Description\n\napiGroup\nstring\nAPIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.\n\nkind *\nstring\nKind is the type of resource being referenced\n\nname *\nstring\nName is the name of resource being referenced\n\nnamespace\nstring\nNamespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled.\n\n## VolumeHealthStatus {#VolumeHealthStatus}\n\nVolumeHealthStatus contains health information for a volume reported by the CSI controller plugin.\n\nField Description\n\nhealthConditions\nVolumeHealthCondition array\npatch strategy: merge on key status\nconditions is the set of adverse conditions reported by the CSI controller plugin. An empty list means no adverse condition. At most 16 conditions may be reported.\n\nlastTransitionTime\nTime\nlastTransitionTime is when the current set of conditions first appeared.\n\n## VolumeResourceRequirements {#VolumeResourceRequirements}\n\nVolumeResourceRequirements describes the storage resource requirements for a volume.\n\nField Description\n\nlimits\nobject\nLimits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\n\nrequests\nobject\nRequests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\n\n## Operations {#Operations}\n\n### `post` Create\n\n#### HTTP Request\n\nPOST /api/v1/namespaces/{namespace}/persistentvolumeclaims\n\n#### Path Parameters\n\nName Type Description\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nPersistentVolumeClaim\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nPersistentVolumeClaim\n\n201\nCreated\nPersistentVolumeClaim\n\n202\nAccepted\nPersistentVolumeClaim\n\n### `patch` Patch\n\n#### HTTP Request\n\nPATCH /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the PersistentVolumeClaim\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\nforce\nboolean\nForce is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nPatch\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nPersistentVolumeClaim\n\n201\nCreated\nPersistentVolumeClaim\n\n### `put` Replace\n\n#### HTTP Request\n\nPUT /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the PersistentVolumeClaim\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nPersistentVolumeClaim\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nPersistentVolumeClaim\n\n201\nCreated\nPersistentVolumeClaim\n\n### `delete` Delete\n\n#### HTTP Request\n\nDELETE /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the PersistentVolumeClaim\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\ngracePeriodSeconds\ninteger\nThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n\nignoreStoreReadErrorWithClusterBreakingPotential\nboolean\nif set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it\n\norphanDependents\nboolean\nDeprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n\npropagationPolicy\nstring\nWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nDeleteOptions\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nPersistentVolumeClaim\n\n202\nAccepted\nPersistentVolumeClaim\n\n### `delete` Delete Collection\n\n#### HTTP Request\n\nDELETE /api/v1/namespaces/{namespace}/persistentvolumeclaims\n\n#### Path Parameters\n\nName Type Description\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\ngracePeriodSeconds\ninteger\nThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n\nignoreStoreReadErrorWithClusterBreakingPotential\nboolean\nif set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\norphanDependents\nboolean\nDeprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n\npropagationPolicy\nstring\nWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nDeleteOptions\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatus\n\n### `get` Read\n\n#### HTTP Request\n\nGET /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the PersistentVolumeClaim\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nPersistentVolumeClaim\n\n### `get` List\n\n#### HTTP Request\n\nGET /api/v1/namespaces/{namespace}/persistentvolumeclaims\n\n#### Path Parameters\n\nName Type Description\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nPersistentVolumeClaimList\n\n### `get` List All Namespaces\n\n#### HTTP Request\n\nGET /api/v1/persistentvolumeclaims\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nPersistentVolumeClaimList\n\n### `get` Watch\n\n#### HTTP Request\n\nGET /api/v1/watch/namespaces/{namespace}/persistentvolumeclaims/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the PersistentVolumeClaim\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent\n\n### `get` Watch List\n\n#### HTTP Request\n\nGET /api/v1/watch/namespaces/{namespace}/persistentvolumeclaims\n\n#### Path Parameters\n\nName Type Description\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent\n\n### `get` Watch List All Namespaces\n\n#### HTTP Request\n\nGET /api/v1/watch/persistentvolumeclaims\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent\n\n### `patch` Patch Status\n\n#### HTTP Request\n\nPATCH /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the PersistentVolumeClaim\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\nforce\nboolean\nForce is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nPatch\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nPersistentVolumeClaim\n\n201\nCreated\nPersistentVolumeClaim\n\n### `get` Read Status\n\n#### HTTP Request\n\nGET /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the PersistentVolumeClaim\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nPersistentVolumeClaim\n\n### `put` Replace Status\n\n#### HTTP Request\n\nPUT /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the PersistentVolumeClaim\n\nnamespace\nstring\nobject name and auth scope, such as for teams and projects\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nPersistentVolumeClaim\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nPersistentVolumeClaim\n\n201\nCreated\nPersistentVolumeClaim", "source": "content/en/docs/reference/kubernetes-api/core/persistent-volume-claim-v1.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: meta/v1`\n\n`import \"k8s.io/apimachinery/pkg/apis/meta/v1\"`\n\n## Condition {#Condition}\n\nCondition contains details for one aspect of the current state of this API Resource.\n\nField Description\n\nlastTransitionTime *\nTime\nlastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.\n\nmessage *\nstring\nmessage is a human readable message indicating details about the transition. This may be an empty string.\n\nobservedGeneration\ninteger\nobservedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.\n\nreason *\nstring\nreason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.\n\nstatus *\nstring\nstatus of the condition, one of True, False, Unknown.\n\ntype *\nstring\ntype of condition in CamelCase or in foo.example.com/CamelCase.", "source": "content/en/docs/reference/kubernetes-api/definitions/condition-v1-meta.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: policy/v1`\n\n`import \"k8s.io/api/policy/v1\"`\n\n## Eviction {#Eviction}\n\nEviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods/<pod name>/evictions.\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\ndeleteOptions\nDeleteOptions\ndeleteOptions may be provided\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nObjectMeta\nmetadata describes the pod that is being evicted.", "source": "content/en/docs/reference/kubernetes-api/definitions/eviction-v1-policy.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: meta/v1`\n\n`import \"k8s.io/apimachinery/pkg/apis/meta/v1\"`\n\n## FieldsV1 {#FieldsV1}\n\nFieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:<name>', where <name> is the name of a field in a struct, or key in a map 'v:<value>', where <value> is the exact json formatted value of a list item 'i:<index>', where <index> is position of a item in a list 'k:<keys>', where <keys> is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff", "source": "content/en/docs/reference/kubernetes-api/definitions/fields-v1-v1-meta.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: meta/v1`\n\n`import \"k8s.io/apimachinery/pkg/apis/meta/v1\"`\n\n## ListMeta {#ListMeta}\n\nListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.\n\nField Description\n\ncontinue\nstring\ncontinue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.\n\nremainingItemCount\ninteger\nremainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.\n\nresourceVersion\nstring\nString that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n\nselfLink\nstring\nDeprecated: selfLink is a legacy read-only field that is no longer populated by the system.\n\nshardInfo\nShardInfo\nshardInfo is set when the list is a filtered subset of the full collection, as selected by a shard selector on the request. It echoes back the selector so clients can verify which shard they received and merge sharded responses. Clients should not cache sharded list responses as a full representation of the collection. This is an alpha field and requires enabling the ShardedListAndWatch feature gate.", "source": "content/en/docs/reference/kubernetes-api/definitions/list-meta-v1-meta.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: v1`\n\n`import \"k8s.io/api/core/v1\"`\n\n## ObjectReference {#ObjectReference}\n\nObjectReference contains enough information to let you inspect or modify the referred object.\n\nField Description\n\napiVersion\nstring\nAPI version of the referent.\n\nfieldPath\nstring\nIf referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.\n\nkind\nstring\nKind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nname\nstring\nName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\n\nnamespace\nstring\nNamespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/\n\nresourceVersion\nstring\nSpecific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n\nuid\nstring\nUID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids", "source": "content/en/docs/reference/kubernetes-api/definitions/object-reference-v1.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: resource`\n\n`import \"k8s.io/apimachinery/pkg/api/resource\"`\n\n## Quantity {#Quantity}\n\nQuantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` <quantity> ::= <signedNumber><suffix>\n\n(Note that <suffix> may be empty, from the \"\" case in <decimalSI>.)\n\n<digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= \"+\" | \"-\" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n<decimalSI> ::= m | \"\" | k | M | G | T | P | E\n\n(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n<decimalExponent> ::= \"e\" <signedNumber> | \"E\" <signedNumber> ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", "source": "content/en/docs/reference/kubernetes-api/definitions/quantity-resource.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: authorization.k8s.io/v1`\n\n`import \"k8s.io/api/authorization/v1\"`\n\n## SelfSubjectAccessReview {#SelfSubjectAccessReview}\n\nSelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nObjectMeta\nmetadata is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n\nspec *\nSelfSubjectAccessReviewSpec\nspec holds information about the request being evaluated. user and groups must be empty\n\nstatus\nSubjectAccessReviewStatus\nstatus is filled in by the server and indicates whether the request is allowed or not\n\n## SelfSubjectAccessReviewSpec {#SelfSubjectAccessReviewSpec}\n\nSelfSubjectAccessReviewSpec is a description of the access request. Exactly one of resourceAttributes and nonResourceAttributes must be set\n\nField Description\n\nnonResourceAttributes\nNonResourceAttributes\nnonResourceAttributes describes information for a non-resource access request\n\nresourceAttributes\nResourceAttributes\nresourceAttributes describes information for a resource access request", "source": "content/en/docs/reference/kubernetes-api/definitions/self-subject-access-review-v1-authorization.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: meta/v1`\n\n`import \"k8s.io/apimachinery/pkg/apis/meta/v1\"`\n\n## Status {#Status}\n\nStatus is a return value for calls that don't return other objects.\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\ncode\ninteger\nSuggested HTTP return code for this status, 0 if not set.\n\ndetails\nStatusDetails\nExtended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmessage\nstring\nA human-readable description of the status of this operation.\n\nmetadata\nListMeta\nStandard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nreason\nstring\nA machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.\n\nstatus\nstring\nStatus of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", "source": "content/en/docs/reference/kubernetes-api/definitions/status-v1-meta.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: admissionregistration.k8s.io/v1`\n\n`import \"k8s.io/api/admissionregistration/v1\"`\n\n## WebhookClientConfig {#WebhookClientConfig}\n\nWebhookClientConfig contains the information to make a TLS connection with the webhook\n\nField Description\n\ncaBundle\nstring\ncaBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.\n\nservice\nServiceReference\nservice is a reference to the service for this webhook. Either `service` or `url` must be specified. If the webhook is running within the cluster, then you should use `service`.\n\nurl\nstring\nurl gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified. The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster. The scheme must be \"https\"; the URL must begin with \"https://\". A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier. Attempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", "source": "content/en/docs/reference/kubernetes-api/definitions/webhook-client-config-v1-admissionregistration.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: rbac.authorization.k8s.io/v1`\n\n`import \"k8s.io/api/rbac/v1\"`\n\n## ClusterRoleBinding {#ClusterRoleBinding}\n\nClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nObjectMeta\nmetadata is the standard object's metadata.\n\nroleRef *\nRoleRef\nroleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable.\n\nsubjects\nSubject array\nsubjects holds references to the objects the role applies to.\n\n## ClusterRoleBindingList {#ClusterRoleBindingList}\n\nClusterRoleBindingList is a collection of ClusterRoleBindings\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nitems *\nClusterRoleBinding array\nItems is a list of ClusterRoleBindings\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nListMeta\nStandard object's metadata.\n\n## Operations {#Operations}\n\n### `post` Create\n\n#### HTTP Request\n\nPOST /apis/rbac.authorization.k8s.io/v1/clusterrolebindings\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nClusterRoleBinding\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nClusterRoleBinding\n\n201\nCreated\nClusterRoleBinding\n\n202\nAccepted\nClusterRoleBinding\n\n### `patch` Patch\n\n#### HTTP Request\n\nPATCH /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the ClusterRoleBinding\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\nforce\nboolean\nForce is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nPatch\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nClusterRoleBinding\n\n201\nCreated\nClusterRoleBinding\n\n### `put` Replace\n\n#### HTTP Request\n\nPUT /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the ClusterRoleBinding\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nClusterRoleBinding\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nClusterRoleBinding\n\n201\nCreated\nClusterRoleBinding\n\n### `delete` Delete\n\n#### HTTP Request\n\nDELETE /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the ClusterRoleBinding\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\ngracePeriodSeconds\ninteger\nThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n\nignoreStoreReadErrorWithClusterBreakingPotential\nboolean\nif set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it\n\norphanDependents\nboolean\nDeprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n\npropagationPolicy\nstring\nWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nDeleteOptions\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatus\n\n202\nAccepted\nStatus\n\n### `delete` Delete Collection\n\n#### HTTP Request\n\nDELETE /apis/rbac.authorization.k8s.io/v1/clusterrolebindings\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\ngracePeriodSeconds\ninteger\nThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n\nignoreStoreReadErrorWithClusterBreakingPotential\nboolean\nif set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\norphanDependents\nboolean\nDeprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n\npropagationPolicy\nstring\nWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nDeleteOptions\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatus\n\n### `get` Read\n\n#### HTTP Request\n\nGET /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the ClusterRoleBinding\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nClusterRoleBinding\n\n### `get` List\n\n#### HTTP Request\n\nGET /apis/rbac.authorization.k8s.io/v1/clusterrolebindings\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nClusterRoleBindingList\n\n### `get` Watch\n\n#### HTTP Request\n\nGET /apis/rbac.authorization.k8s.io/v1/watch/clusterrolebindings/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the ClusterRoleBinding\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent\n\n### `get` Watch List\n\n#### HTTP Request\n\nGET /apis/rbac.authorization.k8s.io/v1/watch/clusterrolebindings\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent", "source": "content/en/docs/reference/kubernetes-api/rbac/cluster-role-binding-v1.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`apiVersion: storagemigration.k8s.io/v1`\n\n`import \"k8s.io/api/storagemigration/v1\"`\n\n## StorageVersionMigration {#StorageVersionMigration}\n\nStorageVersionMigration represents a migration of stored data to the latest storage version.\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nObjectMeta\nStandard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n\nspec\nStorageVersionMigrationSpec\nSpecification of the migration.\n\nstatus\nStorageVersionMigrationStatus\nStatus of the migration.\n\n## StorageVersionMigrationSpec {#StorageVersionMigrationSpec}\n\nSpec of the storage version migration.\n\nField Description\n\nresource *\nGroupResource\nThe resource that is being migrated. The migrator sends requests to the endpoint serving the resource. Immutable.\n\n## StorageVersionMigrationStatus {#StorageVersionMigrationStatus}\n\nStatus of the storage version migration.\n\nField Description\n\nconditions\nCondition array\npatch strategy: merge on key type\nThe latest available observations of the migration's current state.\n\nresourceVersion\nstring\nResourceVersion to compare with the GC cache for performing the migration. This is the current resource version of given group, version and resource when kube-controller-manager first observes this StorageVersionMigration resource.\n\n## StorageVersionMigrationList {#StorageVersionMigrationList}\n\nStorageVersionMigrationList is a collection of storage version migrations.\n\nField Description\n\napiVersion\nstring\nAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n\nitems *\nStorageVersionMigration array\nItems is the list of StorageVersionMigration\n\nkind\nstring\nKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n\nmetadata\nListMeta\nStandard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n\n## Operations {#Operations}\n\n### `post` Create\n\n#### HTTP Request\n\nPOST /apis/storagemigration.k8s.io/v1/storageversionmigrations\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nStorageVersionMigration\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStorageVersionMigration\n\n201\nCreated\nStorageVersionMigration\n\n202\nAccepted\nStorageVersionMigration\n\n### `patch` Patch\n\n#### HTTP Request\n\nPATCH /apis/storagemigration.k8s.io/v1/storageversionmigrations/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the StorageVersionMigration\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\nforce\nboolean\nForce is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nPatch\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStorageVersionMigration\n\n201\nCreated\nStorageVersionMigration\n\n### `put` Replace\n\n#### HTTP Request\n\nPUT /apis/storagemigration.k8s.io/v1/storageversionmigrations/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the StorageVersionMigration\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nStorageVersionMigration\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStorageVersionMigration\n\n201\nCreated\nStorageVersionMigration\n\n### `delete` Delete\n\n#### HTTP Request\n\nDELETE /apis/storagemigration.k8s.io/v1/storageversionmigrations/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the StorageVersionMigration\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\ngracePeriodSeconds\ninteger\nThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n\nignoreStoreReadErrorWithClusterBreakingPotential\nboolean\nif set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it\n\norphanDependents\nboolean\nDeprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n\npropagationPolicy\nstring\nWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nDeleteOptions\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatus\n\n202\nAccepted\nStatus\n\n### `delete` Delete Collection\n\n#### HTTP Request\n\nDELETE /apis/storagemigration.k8s.io/v1/storageversionmigrations\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\ngracePeriodSeconds\ninteger\nThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n\nignoreStoreReadErrorWithClusterBreakingPotential\nboolean\nif set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\norphanDependents\nboolean\nDeprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n\npropagationPolicy\nstring\nWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nDeleteOptions\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStatus\n\n### `get` Read\n\n#### HTTP Request\n\nGET /apis/storagemigration.k8s.io/v1/storageversionmigrations/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the StorageVersionMigration\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStorageVersionMigration\n\n### `get` List\n\n#### HTTP Request\n\nGET /apis/storagemigration.k8s.io/v1/storageversionmigrations\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStorageVersionMigrationList\n\n### `get` Watch\n\n#### HTTP Request\n\nGET /apis/storagemigration.k8s.io/v1/watch/storageversionmigrations/{name}\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the StorageVersionMigration\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent\n\n### `get` Watch List\n\n#### HTTP Request\n\nGET /apis/storagemigration.k8s.io/v1/watch/storageversionmigrations\n\n#### Query Parameters\n\nName Type Description\n\nallowWatchBookmarks\nboolean\nallowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n\ncontinue\nstring\nThe continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n\nfieldSelector\nstring\nA selector to restrict the list of returned objects by their fields. Defaults to everything.\n\nlabelSelector\nstring\nA selector to restrict the list of returned objects by their labels. Defaults to everything.\n\nlimit\ninteger\nlimit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\nresourceVersion\nstring\nresourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nresourceVersionMatch\nstring\nresourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n\nsendInitialEvents\nboolean\n`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following:\n- `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed.\n- `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.\n\nshardSelector\nstring\nshardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') Field paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths: - object.metadata.uid - object.metadata.namespace hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. Examples: 2-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-shard split: shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') This is an alpha field and requires enabling the ShardedListAndWatch feature gate.\n\ntimeoutSeconds\ninteger\nTimeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n\nwatch\nboolean\nWatch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nWatchEvent\n\n### `patch` Patch Status\n\n#### HTTP Request\n\nPATCH /apis/storagemigration.k8s.io/v1/storageversionmigrations/{name}/status\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the StorageVersionMigration\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\nforce\nboolean\nForce is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nPatch\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStorageVersionMigration\n\n201\nCreated\nStorageVersionMigration\n\n### `get` Read Status\n\n#### HTTP Request\n\nGET /apis/storagemigration.k8s.io/v1/storageversionmigrations/{name}/status\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the StorageVersionMigration\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStorageVersionMigration\n\n### `put` Replace Status\n\n#### HTTP Request\n\nPUT /apis/storagemigration.k8s.io/v1/storageversionmigrations/{name}/status\n\n#### Path Parameters\n\nName Type Description\n\nname\nstring\nname of the StorageVersionMigration\n\n#### Query Parameters\n\nName Type Description\n\npretty\nstring\nIf 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).\n\ndryRun\nstring\nWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n\nfieldManager\nstring\nfieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n\nfieldValidation\nstring\nfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.\n\n#### Body Parameters\n\nName Type Description\n\nbody\nStorageVersionMigration\n\n#### Response\n\nStatus Description Response\n\n200\nOK\nStorageVersionMigration\n\n201\nCreated\nStorageVersionMigration", "source": "content/en/docs/reference/kubernetes-api/storagemigration/storage-version-migration-v1.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "The kubelet is mostly a stateless\nprocess running on a Kubernetes node.\nThis document outlines files that kubelet reads and writes.\n\nThis document is for informational purposes and not describing any guaranteed behaviors or APIs.\nIt lists resources used by the kubelet, which is an implementation detail and subject to change at any release.\n\nThe kubelet typically uses the control plane as\nthe source of truth on what needs to run on the Node, and the\ncontainer runtime to retrieve\nthe current state of containers. So long as you provide a _kubeconfig_ (API client configuration)\nto the kubelet, the kubelet does connect to your control plane; otherwise the node operates in\n_standalone mode_.\n\nOn Linux nodes, the kubelet also relies on reading cgroups and various system files to collect metrics.\n\nOn Windows nodes, the kubelet collects metrics via a different mechanism that does not rely on\npaths.\n\nThere are also a few other files that are used by the kubelet as well,\nas kubelet communicates using local Unix-domain sockets. Some are sockets that the\nkubelet listens on, and for other sockets the kubelet discovers them and then connects\nas a client.\n\nThis page lists paths as Linux paths, which map to the Windows paths by adding a root disk\n`C:\\` in place of `/` (unless specified otherwise).\nFor example, `/var/lib/kubelet/device-plugins` maps to `C:\\var\\lib\\kubelet\\device-plugins`.\n\n## Configuration\n\n### Kubelet configuration files\n\nThe path to the kubelet configuration file can be configured\nusing the command line argument `--config`. The kubelet also supports\n[drop-in configuration files](/docs/tasks/administer-cluster/kubelet-config-file/#kubelet-conf-d)\nto enhance configuration.\n\n### Certificates\n\nCertificates and private keys are typically located at `/var/lib/kubelet/pki`,\nbut can be configured using the `--cert-dir` kubelet command line argument.\nNames of certificate files are also configurable.\n\n### Manifests\n\nManifests for static pods are typically located in `/etc/kubernetes/manifests`.\nLocation can be configured using the `staticPodPath` kubelet configuration option.\n\n### Systemd unit settings\n\nWhen kubelet is running as a systemd unit, some kubelet configuration may be declared\nin systemd unit settings file. Typically it includes:\n\n- command line arguments to [run kubelet](/docs/reference/command-line-tools-reference/kubelet/)\n- environment variables, used by kubelet or [configuring golang runtime](https://pkg.go.dev/runtime#hdr-Environment_Variables)\n\n## State\n\n### Checkpoint files for resource managers {#resource-managers-state}\n\nAll resource managers keep the mapping of Pods to allocated resources in state files.\nState files are located in the kubelet's base directory, also termed the _root directory_\n(but not the same as `/`, the node root directory). You can configure the base directory\nfor the kubelet\nusing the kubelet command line argument `--root-dir`.\n\nNames of files:\n\n- `memory_manager_state` for the [Memory Manager](/docs/tasks/administer-cluster/memory-manager/)\n- `cpu_manager_state` for the [CPU Manager](/docs/tasks/administer-cluster/cpu-management-policies/)\n- `dra_manager_state` for [DRA](/docs/concepts/resource-management/dynamic-resource-allocation/)\n\n### Checkpoint file for device manager {#device-manager-state}\n\nDevice manager creates checkpoints in the same directory with socket files: `/var/lib/kubelet/device-plugins/`.\nThis path is hardcoded and is not relative to the kubelet root directory.\nThe name of a checkpoint file is `kubelet_internal_checkpoint` for\n[Device Manager](/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#device-plugin-integration-with-the-topology-manager)\n\n### Pod resource checkpoints\n\nIf a node has enabled the `InPlacePodVerticalScaling`[feature gate](/docs/reference/command-line-tools-reference/feature-gates/),\nthe kubelet stores a local record of _allocated_ and _actuated_ Pod resources.\nSee [Resize CPU and Memory Resources assigned to Containers](/docs/tasks/configure-pod-container/resize-container-resources/)\nfor more details on how these records are used.\n\nNames of files:\n\n- `allocated_pods_state` records the resources allocated to each pod running on the node\n- `actuated_pods_state` records the resources that have been accepted by the runtime\nfor each pod running on the node\n\nThe files are located within the kubelet base directory\n(`/var/lib/kubelet` by default on Linux; configurable using `--root-dir`).\n\n### Container runtime\n\nKubelet communicates with the container runtime using socket configured via the\nconfiguration parameters:\n\n- `containerRuntimeEndpoint` for runtime operations\n- `imageServiceEndpoint` for image management operations\n\nThe actual values of those endpoints depend on the container runtime being used.\n\n### Device plugins\n\nThe kubelet exposes a socket at the path `/var/lib/kubelet/device-plugins/kubelet.sock` for\nvarious [Device Plugins to register](/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#device-plugin-implementation).\n\nWhen a device plugin registers itself, it provides its socket path for the kubelet to connect.\n\nThe device plugin socket must be in the directory `/var/lib/kubelet/device-plugins/`.\nThis path is hardcoded and is not relative to the kubelet base directory (root directory).\nOn Linux, this path is always `/var/lib/kubelet/device-plugins`.\n\n### Pod resources API\n\n[Pod Resources API](/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#monitoring-device-plugin-resources)\nwill be exposed at the path `pod-resources` within the kubelet base directory (root directory).\nOn a typical Linux node, this means `/var/lib/kubelet/pod-resources`.\n\n### DRA, CSI, and Device plugins\n\nThe kubelet looks for socket files created by device plugins managed via [DRA](/docs/concepts/resource-management/dynamic-resource-allocation/),\ndevice manager, or storage plugins, and then attempts to connect\nto these sockets. The directory that the kubelet looks in is `plugins_registry` within the kubelet base\ndirectory, so on a typical Linux node this means `/var/lib/kubelet/plugins_registry`.\n\nNote, for the device plugins there are two alternative registration mechanisms\nOnly one should be used for a given plugin.\n\nThe types of plugins that can place socket files into that directory are:\n\n- CSI plugins\n- DRA plugins\n- Device Manager plugins\n\n(typically `/var/lib/kubelet/plugins_registry`).\n\n### Graceful node shutdown\n\n[Graceful node shutdown](/docs/concepts/cluster-administration/node-shutdown/#graceful-node-shutdown)\nstores state locally at `/var/lib/kubelet/graceful_node_shutdown_state`.\n\n### Image Pull Records\n\nThe kubelet stores records of attempted and successful image pulls, and uses it\nto verify that the image was previously successfully pulled with the same credentials.\n\nThese records are cached as files in the `image_registry` directory within\nthe kubelet base directory. On a typical Linux node, this means `/var/lib/kubelet/image_manager`.\nThere are two subdirectories to `image_manager`:\n* `pulling` - stores records about images the Kubelet is attempting to pull.\n* `pulled` - stores records about images that were successfully pulled by the Kubelet,\nalong with metadata about the credentials used for the pulls.\n\nSee [Ensure Image Pull Credential Verification](/docs/concepts/containers/images#ensureimagepullcredentialverification)\nfor details.\n\n## Security profiles & configuration\n\n### Seccomp\n\nSeccomp profile files referenced from Pods should be placed in `/var/lib/kubelet/seccomp`.\nSee the [seccomp reference](/docs/reference/node/seccomp/) for details.\n\n### AppArmor\n\nThe kubelet does not load or refer to AppArmor profiles by a Kubernetes-specific path.\nAppArmor profiles are loaded via the node operating system rather than referenced by their path.\n\n## Locking\n\nA lock file for the kubelet; typically `/var/run/kubelet.lock`. The kubelet uses this to ensure\nthat two different kubelets don't try to run in conflict with each other.\nYou can configure the path to the lock file using the `--lock-file` kubelet command line argument.\n\nIf two kubelets on the same node use a different value for the lock file path, they will not be able to\ndetect a conflict when both are running.\n\n##\n\n- Learn about the kubelet [command line arguments](/docs/reference/command-line-tools-reference/kubelet/).\n- Review the [Kubelet Configuration (v1beta1) reference](/docs/reference/config-api/kubelet-config.v1beta1/)", "source": "content/en/docs/reference/node/kubelet-files.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "### Synopsis\n\nOutput shell completion code for the specified shell (bash or zsh).\nThe shell code must be evaluated to provide interactive\ncompletion of kubeadm commands. This can be done by sourcing it from\nthe .bash_profile.\n\nNote: this requires the bash-completion framework.\n\nTo install it on Mac use homebrew:\n$ brew install bash-completion\nOnce installed, bash_completion must be evaluated. This can be done by adding the\nfollowing line to the .bash_profile\n$ source $(brew --prefix)/etc/bash_completion\n\nIf bash-completion is not installed on Linux, please install the 'bash-completion' package\nvia your distribution's package manager.\n\nNote for zsh users: [1] zsh completions are only supported in versions of zsh >= 5.2\n\n```\nkubeadm completion SHELL [flags]\n```\n\n### Examples\n\n```\n\n# Install bash completion on a Mac using homebrew\nbrew install bash-completion\nprintf \"\\n# Bash completion support\\nsource $(brew --prefix)/etc/bash_completion\\n\" >> $HOME/.bash_profile\nsource $HOME/.bash_profile\n\n# Load the kubeadm completion code for bash into the current shell\nsource ~/.kube/kubeadm_completion.bash.inc\nprintf \"\\n# Kubeadm shell completion\\nsource '$HOME/.kube/kubeadm_completion.bash.inc'\\n\" >> $HOME/.bash_profile\nsource $HOME/.bash_profile\n\n# Load the kubeadm completion code for zsh[1] into the current shell\nsource\n\n-h, --help\n\nhelp for completion\n\n### Options inherited from parent commands\n\n--rootfs string\n\nThe path to the 'real' host root filesystem. This will cause kubeadm to chroot into the provided path.", "source": "content/en/docs/reference/setup-tools/kubeadm/generated/kubeadm_completion/_index.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "### Synopsis\n\nGenerate the certificate for the front proxy client, and save them into front-proxy-client.crt and front-proxy-client.key files.\n\nIf both files already exist, kubeadm skips the generation step and existing files will be used.\n\n```\nkubeadm init phase certs front-proxy-client [flags]\n```\n\n### Options\n\n--cert-dir string Default: \"/etc/kubernetes/pki\"\n\nThe path where to save and store the certificates.\n\n--config string\n\nPath to a kubeadm configuration file.\n\n--dry-run\n\nDon't apply any changes; just output what would be done.\n\n-h, --help\n\nhelp for front-proxy-client\n\n--kubernetes-version string Default: \"stable-1\"\n\nChoose a specific Kubernetes version for the control plane.\n\n### Options inherited from parent commands\n\n--rootfs string\n\nThe path to the 'real' host root filesystem. This will cause kubeadm to chroot into the provided path.", "source": "content/en/docs/reference/setup-tools/kubeadm/generated/kubeadm_init/kubeadm_init_phase_certs_front-proxy-client.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "### Synopsis\n\nGenerate all static Pod manifest files necessary to establish the control plane\n\n```\nkubeadm init phase control-plane [flags]\n```\n\n### Options\n\n-h, --help\n\nhelp for control-plane\n\n### Options inherited from parent commands\n\n--rootfs string\n\nThe path to the 'real' host root filesystem. This will cause kubeadm to chroot into the provided path.", "source": "content/en/docs/reference/setup-tools/kubeadm/generated/kubeadm_init/kubeadm_init_phase_control-plane.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "### Synopsis\n\nGenerates the kube-apiserver static Pod manifest\n\n```\nkubeadm init phase control-plane apiserver [flags]\n```\n\n### Options\n\n--apiserver-advertise-address string\n\nThe IP address the API Server will advertise it's listening on. If not set the default network interface will be used.\n\n--apiserver-bind-port int32 Default: 6443\n\nPort for the API Server to bind to.\n\n--cert-dir string Default: \"/etc/kubernetes/pki\"\n\nThe path where to save and store the certificates.\n\n--config string\n\nPath to a kubeadm configuration file.\n\n--control-plane-endpoint string\n\nSpecify a stable IP address or DNS name for the control plane.\n\n--dry-run\n\nDon't apply any changes; just output what would be done.\n\n--feature-gates string\n\nA set of key=value pairs that describe feature gates for various features. Options are:\nRootlessControlPlane=true|false (ALPHA - default=false)\n\n-h, --help\n\nhelp for apiserver\n\n--image-repository string Default: \"registry.k8s.io\"\n\nChoose a container registry to pull control plane images from\n\n--kubernetes-version string Default: \"stable-1\"\n\nChoose a specific Kubernetes version for the control plane.\n\n--patches string\n\nPath to a directory that contains files named \"target[suffix][+patchtype].extension\". For example, \"kube-apiserver0+merge.yaml\" or just \"etcd.json\". \"target\" can be one of \"kube-apiserver\", \"kube-controller-manager\", \"kube-scheduler\", \"etcd\", \"kubeletconfiguration\", \"corednsdeployment\", \"kubeproxydaemonset\". \"patchtype\" can be one of \"strategic\", \"merge\" or \"json\" and they match the patch formats supported by kubectl. The default \"patchtype\" is \"strategic\". \"extension\" must be either \"json\" or \"yaml\". \"suffix\" is an optional string that can be used to determine which patches are applied first alpha-numerically.\n\n--service-cidr string Default: \"10.96.0.0/12\"\n\nUse alternative range of IP address for service VIPs.\n\n### Options inherited from parent commands\n\n--rootfs string\n\nThe path to the 'real' host root filesystem. This will cause kubeadm to chroot into the provided path.", "source": "content/en/docs/reference/setup-tools/kubeadm/generated/kubeadm_init/kubeadm_init_phase_control-plane_apiserver.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "### Synopsis\n\nGenerates the kube-controller-manager static Pod manifest\n\n```\nkubeadm init phase control-plane controller-manager [flags]\n```\n\n### Options\n\n--cert-dir string Default: \"/etc/kubernetes/pki\"\n\nThe path where to save and store the certificates.\n\n--config string\n\nPath to a kubeadm configuration file.\n\n--dry-run\n\nDon't apply any changes; just output what would be done.\n\n-h, --help\n\nhelp for controller-manager\n\n--image-repository string Default: \"registry.k8s.io\"\n\nChoose a container registry to pull control plane images from\n\n--kubernetes-version string Default: \"stable-1\"\n\nChoose a specific Kubernetes version for the control plane.\n\n--patches string\n\nPath to a directory that contains files named \"target[suffix][+patchtype].extension\". For example, \"kube-apiserver0+merge.yaml\" or just \"etcd.json\". \"target\" can be one of \"kube-apiserver\", \"kube-controller-manager\", \"kube-scheduler\", \"etcd\", \"kubeletconfiguration\", \"corednsdeployment\", \"kubeproxydaemonset\". \"patchtype\" can be one of \"strategic\", \"merge\" or \"json\" and they match the patch formats supported by kubectl. The default \"patchtype\" is \"strategic\". \"extension\" must be either \"json\" or \"yaml\". \"suffix\" is an optional string that can be used to determine which patches are applied first alpha-numerically.\n\n--pod-network-cidr string\n\nSpecify range of IP addresses for the pod network. If set, the control plane will automatically allocate CIDRs for every node.\n\n### Options inherited from parent commands\n\n--rootfs string\n\nThe path to the 'real' host root filesystem. This will cause kubeadm to chroot into the provided path.", "source": "content/en/docs/reference/setup-tools/kubeadm/generated/kubeadm_init/kubeadm_init_phase_control-plane_controller-manager.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "### Synopsis\n\nRun all kubelet-finalize phases\n\n```\nkubeadm init phase kubelet-finalize all [flags]\n```\n\n### Examples\n\n```\n# Updates settings relevant to the kubelet after TLS bootstrap\nkubeadm init phase kubelet-finalize all --config\n```\n\n### Options\n\n--cert-dir string Default: \"/etc/kubernetes/pki\"\n\nThe path where to save and store the certificates.\n\n--config string\n\nPath to a kubeadm configuration file.\n\n--dry-run\n\nDon't apply any changes; just output what would be done.\n\n-h, --help\n\nhelp for all\n\n### Options inherited from parent commands\n\n--rootfs string\n\nThe path to the 'real' host root filesystem. This will cause kubeadm to chroot into the provided path.", "source": "content/en/docs/reference/setup-tools/kubeadm/generated/kubeadm_init/kubeadm_init_phase_kubelet-finalize_all.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "### Synopsis\n\nUpload all configuration to a config map\n\n```\nkubeadm init phase upload-config all [flags]\n```\n\n### Options\n\n--config string\n\nPath to a kubeadm configuration file.\n\n--cri-socket string\n\nPath to the CRI socket to connect. If empty kubeadm will try to auto-detect this value; use this option only if you have more than one CRI installed or if you have non-standard CRI socket.\n\n--dry-run\n\nDon't apply any changes; just output what would be done.\n\n-h, --help\n\nhelp for all\n\n--kubeconfig string Default: \"/etc/kubernetes/admin.conf\"\n\nThe kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.\n\n### Options inherited from parent commands\n\n--rootfs string\n\nThe path to the 'real' host root filesystem. This will cause kubeadm to chroot into the provided path.", "source": "content/en/docs/reference/setup-tools/kubeadm/generated/kubeadm_init/kubeadm_init_phase_upload-config_all.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "### Synopsis\n\nRun cleanup node.\n\n```\nkubeadm reset phase cleanup-node [flags]\n```\n\n### Options\n\n--cert-dir string Default: \"/etc/kubernetes/pki\"\n\nThe path to the directory where the certificates are stored. If specified, clean this directory.\n\n--cleanup-tmp-dir\n\nCleanup the \"/etc/kubernetes/tmp\" directory\n\n--cri-socket string\n\nPath to the CRI socket to connect. If empty kubeadm will try to auto-detect this value; use this option only if you have more than one CRI installed or if you have non-standard CRI socket.\n\n--dry-run\n\nDon't apply any changes; just output what would be done.\n\n-h, --help\n\nhelp for cleanup-node\n\n### Options inherited from parent commands\n\n--rootfs string\n\nThe path to the 'real' host root filesystem. This will cause kubeadm to chroot into the provided path.", "source": "content/en/docs/reference/setup-tools/kubeadm/generated/kubeadm_reset/kubeadm_reset_phase_cleanup-node.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "### Synopsis\n\nUpload all the configurations to ConfigMaps\n\n```\nkubeadm upgrade apply phase upload-config all [flags]\n```\n\n### Options\n\n--config string\n\nPath to a kubeadm configuration file.\n\n--dry-run\n\nDo not change any state, just output what actions would be performed.\n\n-h, --help\n\nhelp for all\n\n--kubeconfig string Default: \"/etc/kubernetes/admin.conf\"\n\nThe kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.\n\n### Options inherited from parent commands\n\n--rootfs string\n\nThe path to the 'real' host root filesystem. This will cause kubeadm to chroot into the provided path.", "source": "content/en/docs/reference/setup-tools/kubeadm/generated/kubeadm_upgrade/kubeadm_upgrade_apply_phase_upload-config_all.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "`kubeadm init phase` enables you to invoke atomic steps of the bootstrap process.\nHence, you can let kubeadm do some of the work and you can fill in the gaps\nif you wish to apply customization.\n\n`kubeadm init phase` is consistent with the [kubeadm init workflow](/docs/reference/setup-tools/kubeadm/kubeadm-init/#init-workflow),\nand behind the scene both use the same code.\n\n## kubeadm init phase preflight {#cmd-phase-preflight}\n\nUsing this command you can execute preflight checks on a control-plane node.\n\n## kubeadm init phase certs {#cmd-phase-certs}\n\nCan be used to create all required certificates by kubeadm.\n\n## kubeadm init phase kubeconfig {#cmd-phase-kubeconfig}\n\nYou can create all required kubeconfig files by calling the `all` subcommand or call them individually.\n\n## kubeadm init phase etcd {#cmd-phase-etcd}\n\nUse the following phase to create a local etcd instance based on a static Pod file.\n\n## kubeadm init phase control-plane {#cmd-phase-control-plane}\n\nUsing this phase you can create all required static Pod files for the control plane components.\n\n## kubeadm init phase kubelet-start {#cmd-phase-kubelet-start}\n\nThis phase will write the kubelet configuration file and environment file and then start the kubelet.\n\n## kubeadm init phase wait-control-plane {#cmd-phase-wait-control-plane}\n\nIn this phase kubeadm will wait until the control plane components start.\n\n## kubeadm init phase upload-config {#cmd-phase-upload-config}\n\nYou can use this command to upload the kubeadm configuration to your cluster.\nAlternatively, you can use [kubeadm config](/docs/reference/setup-tools/kubeadm/kubeadm-config/).\n\n## kubeadm init phase upload-certs {#cmd-phase-upload-certs}\n\nUse the following phase to upload control-plane certificates to the cluster.\nBy default the certs and encryption key expire after two hours.\n\n## kubeadm init phase mark-control-plane {#cmd-phase-mark-control-plane}\n\nUse the following phase to label and taint the node as a control plane node.\n\n## kubeadm init phase bootstrap-token {#cmd-phase-bootstrap-token}\n\nUse the following phase to configure bootstrap tokens.\n\n## kubeadm init phase kubelet-finalize {#cmd-phase-kubelet-finalize-all}\n\nUse the following phase to update settings relevant to the kubelet after TLS\nbootstrap. You can use the `all` subcommand to run all `kubelet-finalize`\nphases.\n\n## kubeadm init phase bootstrap-token {#cmd-phase-bootstrap-token}\n\nUse the following phase to configure bootstrap tokens.\n\n## kubeadm init phase addon {#cmd-phase-addon}\n\nYou can install all the available addons with the `all` subcommand, or\ninstall them selectively.\n\n## kubeadm init phase show-join-command {#cmd-phase-show-join-command}\n\nShows a command that can be used with `kubeadm join`.\n\nFor more details on each field in the `v1beta4` configuration you can navigate to our\n[API reference pages.](/docs/reference/config-api/kubeadm-config.v1beta4/)\n\n##\n\n* [kubeadm init](/docs/reference/setup-tools/kubeadm/kubeadm-init/) to bootstrap a Kubernetes control-plane node\n* [kubeadm join](/docs/reference/setup-tools/kubeadm/kubeadm-join/) to connect a node to the cluster\n* [kubeadm reset](/docs/reference/setup-tools/kubeadm/kubeadm-reset/) to revert any changes made to this host by `kubeadm init` or `kubeadm join`\n* [kubeadm alpha](/docs/reference/setup-tools/kubeadm/kubeadm-alpha/) to try experimental functionality", "source": "content/en/docs/reference/setup-tools/kubeadm/kubeadm-init-phase.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Bootstrap tokens are used for establishing bidirectional trust between a node joining\nthe cluster and a control-plane node, as described in [authenticating with bootstrap tokens](/docs/reference/access-authn-authz/bootstrap-tokens/).\n\n`kubeadm init` creates an initial token with a 24-hour TTL. The following commands allow you to manage\nsuch a token and also to create and manage new ones.\n\n## kubeadm token create {#cmd-token-create}\n\n## kubeadm token delete {#cmd-token-delete}\n\n## kubeadm token generate {#cmd-token-generate}\n\n## kubeadm token list {#cmd-token-list}\n\n##\n\n* [kubeadm join](/docs/reference/setup-tools/kubeadm/kubeadm-join/) to bootstrap a Kubernetes worker node and join it to the cluster", "source": "content/en/docs/reference/setup-tools/kubeadm/kubeadm-token.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This section provides reference information for the Kubernetes API.\n\nThe REST API is the fundamental fabric of Kubernetes. All operations and\ncommunications between components, and external user commands are REST API\ncalls that the API Server handles. Consequently, everything in the Kubernetes\nplatform is treated as an API object and has a corresponding entry in the\n[API](/docs/reference/generated/kubernetes-api//).\n\nThe [Kubernetes API reference](/docs/reference/generated/kubernetes-api//)\nlists the API for Kubernetes version .\n\nFor general background information, read\n[The Kubernetes API](/docs/concepts/overview/kubernetes-api/).\n[Controlling Access to the Kubernetes API](/docs/concepts/security/controlling-access/)\ndescribes how clients can authenticate to the Kubernetes API server, and how their\nrequests are authorized.\n\n## API versioning\n\nThe JSON and Protobuf serialization schemas follow the same guidelines for\nschema changes. The following descriptions cover both formats.\n\nThe API versioning and software versioning are indirectly related.\nThe [API and release versioning proposal](https://git.k8s.io/sig-release/release-engineering/reference/versioning.md#kubernetes-release-versioning)\ndescribes the relationship between API versioning and software versioning.\n\nDifferent API versions indicate different levels of stability and support. You\ncan find more information about the criteria for each level in the\n[API Changes documentation](https://git.k8s.io/community/contributors/devel/sig-architecture/api_changes.md#alpha-beta-and-stable-versions).\n\nHere's a summary of each level:\n\n- Alpha:\n- The version names contain `alpha` (for example, `v1alpha1`).\n- Built-in alpha API versions are disabled by default and must be explicitly enabled in the `kube-apiserver` configuration to be used.\n- The software may contain bugs. Enabling a feature may expose bugs.\n- Support for an alpha API may be dropped at any time without notice.\n- The API may change in incompatible ways in a later software release without notice.\n- The software is recommended for use only in short-lived testing clusters,\ndue to increased risk of bugs and lack of long-term support.\n\n- Beta:\n- The version names contain `beta` (for example, `v2beta3`).\n- Built-in beta API versions are disabled by default and must be explicitly enabled in the `kube-apiserver` configuration to be used\n(**except** for beta versions of APIs introduced prior to Kubernetes 1.22, which were enabled by default).\n- Built-in beta API versions have a maximum lifetime of 9 months or 3 minor releases (whichever is longer) from introduction\nto deprecation, and 9 months or 3 minor releases (whichever is longer) from deprecation to removal.\n- The software is well tested. Enabling a feature is considered safe.\n- The support for a feature will not be dropped, though the details may change.\n\n- The schema and/or semantics of objects may change in incompatible ways in\na subsequent beta or stable API version. When this happens, migration\ninstructions are provided. Adapting to a subsequent beta or stable API version\nmay require editing or re-creating API objects, and may not be straightforward.\nThe migration may require downtime for applications that rely on the feature.\n- The software is not recommended for production uses. Subsequent releases\nmay introduce incompatible changes. Use of beta API versions is\nrequired to transition to subsequent beta or stable API versions\nonce the beta API version is deprecated and no longer served.\n\nPlease try beta features and provide feedback. After the features exit beta, it\nmay not be practical to make more changes.\n\n- Stable:\n- The version name is `vX` where `X` is an integer.\n- Stable API versions remain available for all future releases within a Kubernetes major version,\nand there are no current plans for a major version revision of Kubernetes that removes stable APIs.\n\n## API groups\n\n[API groups](https://git.k8s.io/design-proposals-archive/api-machinery/api-group.md)\nmake it easier to extend the Kubernetes API.\nThe API group is specified in a REST path and in the `apiVersion` field of a\nserialized object.\n\nThere are several API groups in Kubernetes:\n\n* The *core* (also called *legacy*) group is found at REST path `/api/v1`.\nThe core group is not specified as part of the `apiVersion` field, for\nexample, `apiVersion: v1`.\n* The named groups are at REST path `/apis/$GROUP_NAME/$VERSION` and use\n`apiVersion: $GROUP_NAME/$VERSION` (for example, `apiVersion: batch/v1`).\nYou can find the full list of supported API groups in\n[Kubernetes API reference](/docs/reference/generated/kubernetes-api//#-strong-api-groups-strong-).\n\n## Enabling or disabling API groups {#enabling-or-disabling}\n\nCertain resources and API groups are enabled by default. You can enable or\ndisable them by setting `--runtime-config` on the API server. The\n`--runtime-config` flag accepts comma separated ` [= ]` pairs\ndescribing the runtime configuration of the API server. If the `= `\npart is omitted, it is treated as if `=true` is specified. For example:\n\n- to disable `batch/v1`, set `--runtime-config=batch/v1=false`\n- to enable `batch/v2alpha1`, set `--runtime-config=batch/v2alpha1`\n- to enable a specific version of an API, such as `storage.k8s.io/v1beta1/csistoragecapacities`, set `--runtime-config=storage.k8s.io/v1beta1/csistoragecapacities`\n\nWhen you enable or disable groups or resources, you need to restart the API\nserver and controller manager to pick up the `--runtime-config` changes.\n\n## Persistence\n\nKubernetes stores its serialized state in terms of the API resources by writing them into\n.\n\n##\n\n- Learn more about [API conventions](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#api-conventions)\n- Read the design documentation for\n[aggregator](https://git.k8s.io/design-proposals-archive/api-machinery/aggregated-api-servers.md)\n- Learn about [Declarative API Validation](/docs/reference/using-api/declarative-validation/).", "source": "content/en/docs/reference/using-api/_index.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page shows how to use a Volume to communicate between two Containers running\nin the same Pod. See also how to allow processes to communicate by\n[sharing process namespace](/docs/tasks/configure-pod-container/share-process-namespace/)\nbetween containers.\n\n##\n\n## Creating a Pod that runs two Containers\n\nIn this exercise, you create a Pod that runs two Containers. The two containers\nshare a Volume that they can use to communicate. Here is the configuration file\nfor the Pod:\n\nIn the configuration file, you can see that the Pod has a Volume named\n`shared-data`.\n\nThe first container listed in the configuration file runs an nginx server. The\nmount path for the shared Volume is `/usr/share/nginx/html`.\nThe second container is based on the debian image, and has a mount path of\n`/pod-data`. The second container runs the following command and then terminates.\n\necho Hello from the debian container > /pod-data/index.html\n\nNotice that the second container writes the `index.html` file in the root\ndirectory of the nginx server.\n\nCreate the Pod and the two Containers:\n\nkubectl apply -f https://k8s.io/examples/pods/two-container-pod.yaml\n\nView information about the Pod and the Containers:\n\nkubectl get pod two-containers --output=yaml\n\nHere is a portion of the output:\n\napiVersion: v1\nkind: Pod\nmetadata:\n...\nname: two-containers\nnamespace: default\n...\nspec:\n...\ncontainerStatuses:\n\n- containerID: docker://c1d8abd1 ...\nimage: debian\n...\nlastState:\nterminated:\n...\nname: debian-container\n...\n\n- containerID: docker://96c1ff2c5bb ...\nimage: nginx\n...\nname: nginx-container\n...\nstate:\nrunning:\n...\n\nYou can see that the debian Container has terminated, and the nginx Container\nis still running.\n\nGet a shell to nginx Container:\n\nkubectl exec -it two-containers -c nginx-container -- /bin/bash\n\nIn your shell, verify that nginx is running:\n\nroot@two-containers:/# apt-get update\nroot@two-containers:/# apt-get install curl procps\nroot@two-containers:/# ps aux\n\nThe output is similar to this:\n\nUSER PID ... STAT START TIME COMMAND\nroot 1 ... Ss 21:12 0:00 nginx: master process nginx -g daemon off;\n\nRecall that the debian Container created the `index.html` file in the nginx root\ndirectory. Use `curl` to send a GET request to the nginx server:\n\n```\nroot@two-containers:/# curl localhost\n```\n\nThe output shows that nginx serves a web page written by the debian container:\n\n```\nHello from the debian container\n```\n\n## Discussion\n\nThe primary reason that Pods can have multiple containers is to support\nhelper applications that assist a primary application. Typical examples of\nhelper applications are data pullers, data pushers, and proxies.\nHelper and primary applications often need to communicate with each other.\nTypically this is done through a shared filesystem, as shown in this exercise,\nor through the loopback network interface, localhost. An example of this pattern is a\nweb server along with a helper program that polls a Git repository for new updates.\n\nThe Volume in this exercise provides a way for Containers to communicate during\nthe life of the Pod. If the Pod is deleted and recreated, any data stored in\nthe shared Volume is lost.\n\n##\n\n* Learn more about [patterns for composite containers](/blog/2015/06/the-distributed-system-toolkit-patterns/).\n\n* Learn about [composite containers for modular architecture](https://www.slideshare.net/Docker/slideshare-burns).\n\n* See [Configuring a Pod to Use a Volume for Storage](/docs/tasks/configure-pod-container/configure-volume-storage/).\n\n* See [Configure a Pod to share process namespace between containers in a Pod](/docs/tasks/configure-pod-container/share-process-namespace/)\n\n* See [Volume](/docs/reference/generated/kubernetes-api//#volume-v1-core).\n\n* See [Pod](/docs/reference/generated/kubernetes-api//#pod-v1-core).", "source": "content/en/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page shows how to configure kubectl to access one existing cluster using\na supplied kubeconfig file or your cluster's connection details. For background,\nsee [Organizing Cluster Access Using kubeconfig Files](/docs/concepts/configuration/organize-cluster-access-kubeconfig/).\n\n##\n\n* Have a running Kubernetes cluster. If you do not have one, create a local\ncluster with [Minikube](https://minikube.sigs.k8s.io/docs/start/) or choose\nanother [learning environment](/docs/setup/learning-environment/).\n* [Install kubectl](/docs/tasks/tools/). Its version should be\n[within one minor version](/releases/version-skew-policy/#kubectl) of your\ncluster's API server. Check your client version with `kubectl version --client`.\n* Ensure your computer can reach the cluster's API server, using a VPN if required.\n* Have a text editor and a private working directory.\n\nShell examples use Bash or Zsh on Linux and macOS, and PowerShell on Windows.\n\n## Obtain your cluster access information\n\nAsk your cluster administrator or provider for a personal kubeconfig file or\nthe information below. The example values match the commands later in this task;\nreplace them with the values for your cluster.\n\n| Information | Example | Where to obtain it |\n| :--- | :--- | :--- |\n| API server address | `https://api.example.com:6443` | Your administrator or the cluster provider's connection instructions. |\n| Trusted certificate authority (CA) certificate | A PEM file named `ca.crt` | Ask your administrator for the file. A provider-generated kubeconfig already records the required CA file or data. Omit a separate CA file if the server certificate is trusted by your operating system. |\n| Authentication method | A credential plugin such as `example-credential-plugin`, a signed client certificate, or a bearer token | Your provider's login instructions or your administrator's credential enrollment process. |\n| Namespace and permissions | Namespace `default`, with permission to list Pods | Your administrator or the provider's access policy. |\n\nFor clusters managed on your behalf by a provider, follow the provider's kubeconfig instructions.\nThese instructions also explain any required login tools.\n\nFor kubeadm clusters, administrators can refer to\n[Generating kubeconfig files for additional users](/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/#kubeconfig-additional-users).\n\nOnly use trusted kubeconfig files. They can execute credential plugins or read\nlocal files. Inspect unfamiliar files before use.\n\n### Try the task with Minikube\n\nFor a local example, install Minikube and a supported container or virtual-machine\nmanager using the [Minikube getting started guide](https://minikube.sigs.k8s.io/docs/start/).\n\n1. Start the default Minikube cluster:\n\n```shell\nminikube start --profile=minikube\n```\n\nMinikube creates a `minikube` context with the API server address and local\ncertificate settings, so you do not need to collect these values manually.\n\n1. In your private working directory, choose an unused filename such as\n`cluster-config` and export that context:\n\n```shell\nkubectl config view --context=minikube --minify --flatten --raw > cluster-config\n```\n\n```powershell\nkubectl config view --context=minikube --minify --flatten --raw | Set-Content -Path cluster-config -Encoding utf8\n```\n\n`--flatten` embeds the certificate files, and `--raw` preserves credentials\ninstead of redacting them. This file contains a private key; keep it private.\n\nContinue with [Verify access to the cluster](#verify-access-to-the-cluster).\nYour file is `cluster-config` and your context is `minikube`; skip the manual\nconfiguration sections below.\n\n## Use a supplied kubeconfig file\n\nFollow your provider's setup instructions, including installing and signing in\nto any credential plugin. For certificate authentication, use a locally generated\nprivate key; see the [client certificate workflow](#configure-credentials).\n\n1. Save the kubeconfig as `cluster-config` in your working directory. If it\nalready exists, choose another name and use it below. Use absolute paths\nfor any referenced files or credential plugin executables.\n\n1. List the contexts in the supplied file:\n\n```shell\nkubectl --kubeconfig=cluster-config config get-contexts\n```\n\n1. Select your cluster's context, replacing `CONTEXT_NAME` with a name from the\noutput:\n\n```shell\nkubectl --kubeconfig=cluster-config config use-context CONTEXT_NAME\n```\n\nContinue with [Verify access to the cluster](#verify-access-to-the-cluster).\n\n## Create a kubeconfig from connection information\n\nStart in a directory without a `cluster-config` file. These commands create it\nwithout changing your existing kubeconfig. Replace the server URL, certificate\npaths, and namespace with your cluster's values. You can keep the local names\n`my-cluster`, `my-user`, and `my-context` if they are not already used in your\nexisting kubeconfig files.\n\n### Configure the cluster\n\nSave your cluster's trusted CA certificate as `ca.crt`, then record it and the\nAPI server address using\n[`kubectl config set-cluster`](/docs/reference/kubectl/generated/kubectl_config/kubectl_config_set-cluster/):\n\n```shell\nkubectl --kubeconfig=cluster-config config set-cluster my-cluster --server=https://api.example.com:6443 --certificate-authority=ca.crt\n```\n\nThis records a reference to `ca.crt`, relative to the kubeconfig file's\ndirectory. If the server's certificate is trusted by your operating system,\nomit `--certificate-authority`.\n\n### Configure credentials\n\nUse\n[`kubectl config set-credentials`](/docs/reference/kubectl/generated/kubectl_config/kubectl_config_set-credentials/)\nto create an entry named `my-user` under `users` in `cluster-config`. This entry\ntells kubectl which credential plugin, certificate and key, or token to use. Choose one of the following authentication methods.\n\nA credential plugin retrieves credentials when kubectl connects to the API server.\n\n1. Install the plugin and sign in using your provider's instructions. Its\nexecutable must be on `PATH`, or specified by its full path.\n\n1. Configure the plugin, replacing `example-credential-plugin` with its executable:\n\n```shell\nkubectl --kubeconfig=cluster-config config set-credentials my-user --exec-command=example-credential-plugin --exec-api-version=client.authentication.k8s.io/v1 --exec-interactive-mode=IfAvailable\n```\n\nUse the API version and interactive mode required by your provider. Add\n`--exec-arg=VALUE` and `--exec-env=NAME=VALUE` for required arguments and\nenvironment variables. The plugin's response must match `--exec-api-version`.\nSee [client-go credential plugins](/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins)\nfor details.\n\nUse this method if your cluster supports X.509 client certificates. It requires\nthe `openssl` command-line tool.\n\n1. If you need a new certificate, generate a private key and certificate signing\nrequest (CSR). Use unused filenames, and replace `YOUR_USERNAME` with the\nusername agreed with your administrator, such as `jane`:\n\n```shell\nopenssl genrsa -out my-user.key 3072\nopenssl req -new -key my-user.key -out my-user.csr -subj \"/CN=YOUR_USERNAME\"\n```\n\n1. If you generated a CSR, send only `my-user.csr` to your administrator; keep\n`my-user.key` locally. Save the signed certificate as `my-user.crt`.\n\nYour administrator can follow the\n[CertificateSigningRequest workflow](/docs/tasks/tls/certificate-issue-client-csr/)\nwhere supported, using existing cluster access and the required permissions.\n\n1. Record your certificate and key:\n\n```shell\nkubectl --kubeconfig=cluster-config config set-credentials my-user --client-certificate=my-user.crt --client-key=my-user.key --embed-certs=true\n```\n\nThis embeds the certificate and private key in `cluster-config`.\nProtect that file as you would the private key.\n\nUse this method if your administrator or provider supplies a long-lived bearer\ntoken for your identity that the cluster accepts.\n\nReplace `YOUR_TOKEN` with that token:\n\n```shell\nkubectl --kubeconfig=cluster-config config set-credentials my-user --token=YOUR_TOKEN\n```\n\nThe token is stored in `cluster-config`. Anyone who obtains it can authenticate\nas that identity until the token expires or is revoked. Keep the file private\nand follow your administrator's instructions for replacing the token.\n\n### Configure and select a context\n\nA context saves the cluster, credential entry, and namespace to use together.\n\n1. Create a context that connects to `my-cluster` using the credentials saved as\n`my-user`, with `default` as its namespace. Use\n[`kubectl config set-context`](/docs/reference/kubectl/generated/kubectl_config/kubectl_config_set-context/):\n\n```shell\nkubectl --kubeconfig=cluster-config config set-context my-context --cluster=my-cluster --user=my-user --namespace=default\n```\n\nHere, `--user=my-user` selects the entry from the previous section. If that\nentry uses a certificate issued to `jane`, the cluster authenticates you as\n`jane`; `my-user` simply names the stored credentials in your file.\n\n1. Select it:\n\n```shell\nkubectl --kubeconfig=cluster-config config use-context my-context\n```\n\n1. Inspect the configuration:\n\n```shell\nkubectl --kubeconfig=cluster-config config view\n```\n\nFor the credential-plugin example, the output is similar to:\n\n```yaml\napiVersion: v1\nclusters:\n- cluster:\ncertificate-authority: ca.crt\nserver: https://api.example.com:6443\nname: my-cluster\ncontexts:\n- context:\ncluster: my-cluster\nnamespace: default\nuser: my-user\nname: my-context\ncurrent-context: my-context\nkind: Config\nusers:\n- name: my-user\nuser:\nexec:\napiVersion: client.authentication.k8s.io/v1\nargs: null\ncommand: example-credential-plugin\nenv: null\ninteractiveMode: IfAvailable\nprovideClusterInfo: false\n```\n\nCertificate authentication shows certificate and key fields instead of\n`exec`; bearer token authentication uses a `token` field.\n\nAdd `--minify` to `kubectl config view` to show only the configuration associated\nwith the current context.\n\n## Verify access to the cluster\n\nUse your assigned namespace in place of `default`.\n\n1. Check the identity recognized by the cluster:\n\n```shell\nkubectl --kubeconfig=cluster-config auth whoami\n```\n\nConfirm that the username and groups are as expected.\n\n1. Check whether you can list Pods in your namespace:\n\n```shell\nkubectl --kubeconfig=cluster-config auth can-i list pods --namespace=default\n```\n\nIf it returns `no`, ask your administrator for the required permissions.\nAuthentication alone does not grant access to resources.\n\n1. If the response is `yes`, list the Pods:\n\n```shell\nkubectl --kubeconfig=cluster-config get pods --namespace=default\n```\n\n`No resources found` is normal if the namespace has no Pods.\n\n## Save the kubeconfig in the default location\n\nAfter following any of the setup options above, save `cluster-config` as your\ndefault kubeconfig: `$HOME/.kube/config` on Linux and macOS, or\n`$env:USERPROFILE\\.kube\\config` on Windows. Kubectl reads this file automatically\nwhen `KUBECONFIG` env variable is unset or empty and you do not specify `--kubeconfig`.\nYou do not need to set `KUBECONFIG` to use the default file.\n\nIf your kubeconfig uses `certificate-authority: ca.crt`, change that value to\nthe CA file's absolute path before copying the kubeconfig.\n\nIf the default file does not exist, copy `cluster-config` from your working\ndirectory:\n\n```shell\nmkdir -p \"$HOME/.kube\"\ncp cluster-config \"$HOME/.kube/config\"\nchmod 600 \"$HOME/.kube/config\"\n```\n\n```powershell\nNew-Item -ItemType Directory -Path \"$env:USERPROFILE\\.kube\" -Force | Out-Null\nCopy-Item cluster-config \"$env:USERPROFILE\\.kube\\config\"\n```\n\n## Use additional kubeconfig files (optional)\n\nIf you prefer to keep configurations in separate files, use `KUBECONFIG` to\nselect the files kubectl reads. This is optional; your saved default kubeconfig\nworks without it. Paths in `KUBECONFIG` are separated by `:` on Linux and macOS,\nor `;` on Windows. An explicit `--kubeconfig` flag selects only that file instead.\n\nThe following examples save the current setting, append the default file and\n`cluster-config`, and make a request. Run them\nfrom the directory containing `cluster-config`. Replace `CONTEXT_NAME` with\n`my-context` for the manual example, `minikube` for the Minikube example, or the\ncontext selected in your supplied file. Replace `default` with your assigned\nnamespace:\n\n```shell\nexport KUBECONFIG_SAVED=\"$KUBECONFIG\"\nexport KUBECONFIG=\"${KUBECONFIG}:$HOME/.kube/config:$PWD/cluster-config\"\nkubectl --context=CONTEXT_NAME get pods --namespace=default\n```\n\n```powershell\n$env:KUBECONFIG_SAVED = $env:KUBECONFIG\n$env:KUBECONFIG = \"$env:KUBECONFIG;$env:USERPROFILE\\.kube\\config;$PWD\\cluster-config\"\nkubectl --context=CONTEXT_NAME get pods --namespace=default\n```\n\nEarlier files take precedence for duplicate entries. For more information, see\n[Configure Access to Multiple Clusters](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/).\n\nIf you followed the optional section above, run the following in the same\nterminal to restore your previous `KUBECONFIG` setting:\n\n```shell\nexport KUBECONFIG=\"$KUBECONFIG_SAVED\"\n```\n\n```powershell\n$env:KUBECONFIG = $env:KUBECONFIG_SAVED\n```\n\n## Troubleshoot access\n\nIf a command fails, see\n[Troubleshooting kubectl](/docs/tasks/debug/)\nfor help with kubeconfig settings, connectivity, authentication, and TLS errors.\n\n## Other uses of kubeconfig\n\nComponents such as the\n[kubelet](/docs/reference/command-line-tools-reference/kubelet/) and\n[kube-proxy](/docs/reference/command-line-tools-reference/kube-proxy/) also use\nkubeconfig files. Follow their documentation for the required identity and\nfile settings.\n\n##\n\n### Customize kubectl preferences\n\nYour kubeconfig provides cluster connection and authentication settings.\nA separate, optional `kuberc` file configures kubectl defaults and aliases;\nyou still use kubeconfig for cluster access.\n\nIf authentication uses an exec credential plugin, kuberc's\n[credential plugin policy](/docs/reference/kubectl/kuberc/#credential-plugin-policy)\ncan control whether that plugin may run. This helps protect you against\nmalicious kubeconfig files.\n\nSee\n[Kubectl user preferences (kuberc)](/docs/reference/kubectl/kuberc/)\nfor instructions on writing a separate `kuberc` file.\n\n### Additional reading\n\n* [Configure Access to Multiple Clusters](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)\n* [Organizing Cluster Access Using kubeconfig Files](/docs/concepts/configuration/organize-cluster-access-kubeconfig/)\n* [kubeconfig (v1) reference](/docs/reference/config-api/kubeconfig.v1/)\n* [`kubectl config` reference](/docs/reference/kubectl/generated/kubectl_config/)", "source": "content/en/docs/tasks/access-application-cluster/configure-access-single-cluster.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Kubernetes offers a DNS cluster addon, which most of the supported environments enable by default. In Kubernetes version 1.11 and later, CoreDNS is recommended and is installed by default with kubeadm.\n\nFor more information on how to configure CoreDNS for a Kubernetes cluster, see the [Customizing DNS Service](/docs/tasks/administer-cluster/dns-custom-nameservers/).", "source": "content/en/docs/tasks/access-application-cluster/configure-dns-cluster.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page shows how to create an external load balancer.\n\nWhen creating a Service, you have\nthe option of automatically creating a cloud load balancer. This provides an\nexternally-accessible IP address that sends traffic to the correct port on your cluster\nnodes,\n_provided your cluster runs in a supported environment and is configured with\nthe correct cloud load balancer provider package_.\n\nYou can also use an in place of Service.\nFor more information, check the [Ingress](/docs/concepts/services-networking/ingress/)\ndocumentation.\n\n##\n\nYour cluster must be running in a cloud or other environment that already has support\nfor configuring external load balancers.\n\n## Create a Service\n\n### Create a Service from a manifest\n\nTo create an external load balancer, add the following line to your\nService manifest:\n\n```yaml\ntype: LoadBalancer\n```\n\nYour manifest might then look like:\n\n```yaml\napiVersion: v1\nkind: Service\nmetadata:\nname: example-service\nspec:\nselector:\napp: example\nports:\n- port: 8765\ntargetPort: 9376\ntype: LoadBalancer\n```\n\n### Create a Service using kubectl\n\nYou can alternatively create the service with the `kubectl expose` command and\nits `--type=LoadBalancer` flag:\n\n```bash\nkubectl expose deployment example --port=8765 --target-port=9376 \\\n--name=example-service --type=LoadBalancer\n```\n\nThis command creates a new Service using the same selectors as the referenced\nresource (in the case of the example above, a\nDeployment named `example`).\n\nFor more information, including optional flags, refer to the\n[`kubectl expose` reference](/docs/reference/generated/kubectl/kubectl-commands/#expose).\n\n## Finding your IP address\n\nYou can find the IP address created for your service by getting the service\ninformation through `kubectl`:\n\n```bash\nkubectl describe services example-service\n```\n\nwhich should produce output similar to:\n\n```\nName: example-service\nNamespace: default\nLabels: app=example\nAnnotations:\nSelector: app=example\nType: LoadBalancer\nIP Families:\nIP: 10.3.22.96\nIPs: 10.3.22.96\nLoadBalancer Ingress: 192.0.2.89\nPort: 8765/TCP\nTargetPort: 9376/TCP\nNodePort: 30593/TCP\nEndpoints: 172.17.0.3:9376\nSession Affinity: None\nExternal Traffic Policy: Cluster\nEvents:\n```\n\nThe load balancer's IP address is listed next to `LoadBalancer Ingress`.\n\nIf you are running your service on Minikube, you can find the assigned IP address and port with:\n\n```bash\nminikube service example-service --url\n```\n\n## Preserving the client source IP\n\nBy default, the source IP seen in the target container is *not the original\nsource IP* of the client. To enable preservation of the client IP, the following\nfields can be configured in the `.spec` of the Service:\n\n* `.spec.externalTrafficPolicy` - denotes if this Service desires to route\nexternal traffic to node-local or cluster-wide endpoints. There are two available\noptions: `Cluster` (default) and `Local`. `Cluster` obscures the client source\nIP and may cause a second hop to another node, but should have good overall\nload-spreading. `Local` preserves the client source IP and avoids a second hop\nfor LoadBalancer and NodePort type Services, but risks potentially imbalanced\ntraffic spreading.\n* `.spec.healthCheckNodePort` - specifies the health check node port\n(numeric port number) for the service. If you don't specify\n`healthCheckNodePort`, the service controller allocates a port from your\ncluster's NodePort range.\nYou can configure that range by setting an API server command line option,\n`--service-node-port-range`. The Service will use the user-specified\n`healthCheckNodePort` value if you specify it, provided that the\nService `type` is set to LoadBalancer and `externalTrafficPolicy` is set\nto `Local`.\n\nSetting `externalTrafficPolicy` to Local in the Service manifest\nactivates this feature. For example:\n\n```yaml\napiVersion: v1\nkind: Service\nmetadata:\nname: example-service\nspec:\nselector:\napp: example\nports:\n- port: 8765\ntargetPort: 9376\nexternalTrafficPolicy: Local\ntype: LoadBalancer\n```\n\n### Caveats and limitations when preserving source IPs\n\nLoad balancing services from some cloud providers do not let you configure different weights for each target.\n\nWith each target weighted equally in terms of sending traffic to Nodes, external\ntraffic is not equally load balanced across different Pods. The external load balancer\nis unaware of the number of Pods on each node that are used as a target.\n\nWhere `NumServicePods > NumNodes`, a fairly close-to-equal\ndistribution will be seen, even without weights.\n\nInternal pod to pod traffic should behave similar to ClusterIP services, with equal probability across all pods.\n\n## Garbage collecting load balancers\n\nIn usual case, the correlating load balancer resources in cloud provider should\nbe cleaned up soon after a LoadBalancer type Service is deleted. But it is known\nthat there are various corner cases where cloud resources are orphaned after the\nassociated Service is deleted. Finalizer Protection for Service LoadBalancers was\nintroduced to prevent this from happening. By using finalizers, a Service resource\nwill never be deleted until the correlating load balancer resources are also deleted.\n\nSpecifically, if a Service has `type` LoadBalancer, the service controller will attach\na finalizer named `service.kubernetes.io/load-balancer-cleanup`.\nThe finalizer will only be removed after the load balancer resource is cleaned up.\nThis prevents dangling load balancer resources even in corner cases such as the\nservice controller crashing.\n\n## External load balancer providers\n\nIt is important to note that the datapath for this functionality is provided by a load balancer external to the Kubernetes cluster.\n\nWhen the Service `type` is set to LoadBalancer, Kubernetes provides functionality equivalent to `type` equals ClusterIP to pods\nwithin the cluster and extends it by programming the (external to Kubernetes) load balancer with entries for the nodes\nhosting the relevant Kubernetes pods. The Kubernetes control plane automates the creation of the external load balancer,\nhealth checks (if needed), and packet filtering rules (if needed). Once the cloud provider allocates an IP address for the load\nbalancer, the control plane looks up that external IP address and populates it into the Service object.\n\n##\n\n* Follow the [Connecting Applications with Services](/docs/tutorials/services/connect-applications-service/) tutorial\n* Read about [Service](/docs/concepts/services-networking/service/)\n* Read about [Ingress](/docs/concepts/services-networking/ingress/)", "source": "content/en/docs/tasks/access-application-cluster/create-external-load-balancer.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "When using client certificate authentication, you can generate certificates\nmanually through [`easyrsa`](https://github.com/OpenVPN/easy-rsa), [`openssl`](https://github.com/openssl/openssl) or [`cfssl`](https://github.com/cloudflare/cfssl).\n\n### easyrsa\n\n**easyrsa** can manually generate certificates for your cluster.\n\n1. Download, unpack, and initialize the patched version of `easyrsa3`.\n\n```shell\ncurl -LO https://dl.k8s.io/easy-rsa/easy-rsa.tar.gz\ntar xzf easy-rsa.tar.gz\ncd easy-rsa-master/easyrsa3\n./easyrsa init-pki\n```\n1. Generate a new certificate authority (CA). `--batch` sets automatic mode;\n`--req-cn` specifies the Common Name (CN) for the CA's new root certificate.\n\n```shell\n./easyrsa --batch \"--req-cn=${MASTER_IP}@`date +%s`\" build-ca nopass\n```\n\n1. Generate server certificate and key.\n\nThe argument `--subject-alt-name` sets the possible IPs and DNS names the API server will\nbe accessed with. The `MASTER_CLUSTER_IP` is usually the first IP from the service CIDR\nthat is specified as the `--service-cluster-ip-range` argument for both the API server and\nthe controller manager component. The argument `--days` is used to set the number of days\nafter which the certificate expires.\nThe sample below also assumes that you are using `cluster.local` as the default\nDNS domain name.\n\n```shell\n./easyrsa --subject-alt-name=\"IP:${MASTER_IP},\"\\\n\"IP:${MASTER_CLUSTER_IP},\"\\\n\"DNS:kubernetes,\"\\\n\"DNS:kubernetes.default,\"\\\n\"DNS:kubernetes.default.svc,\"\\\n\"DNS:kubernetes.default.svc.cluster,\"\\\n\"DNS:kubernetes.default.svc.cluster.local\" \\\n--days=10000 \\\nbuild-server-full server nopass\n```\n\n1. Copy `pki/ca.crt`, `pki/issued/server.crt`, and `pki/private/server.key` to your directory.\n\n1. Fill in and add the following parameters into the API server start parameters:\n\n```shell\n--client-ca-file=/yourdirectory/ca.crt\n--tls-cert-file=/yourdirectory/server.crt\n--tls-private-key-file=/yourdirectory/server.key\n```\n\n### openssl\n\n**openssl** can manually generate certificates for your cluster.\n\n1. Generate a ca.key with 2048bit:\n\n```shell\nopenssl genrsa -out ca.key 2048\n```\n\n1. According to the ca.key generate a ca.crt (use `-days` to set the certificate effective time):\n\n```shell\nopenssl req -x509 -new -noenc -key ca.key -subj \"/CN=${MASTER_IP}\" -days 10000 -out ca.crt\n```\n\n1. Generate a server.key with 2048bit:\n\n```shell\nopenssl genrsa -out server.key 2048\n```\n\n1. Create a config file for generating a Certificate Signing Request (CSR).\n\nBe sure to substitute the values marked with angle brackets (e.g. ` `)\nwith real values before saving this to a file (e.g. `csr.conf`).\nNote that the value for `MASTER_CLUSTER_IP` is the service cluster IP for the\nAPI server as described in previous subsection.\nThe sample below also assumes that you are using `cluster.local` as the default\nDNS domain name.\n\n```ini\n[ req ]\ndefault_bits = 2048\nprompt = no\ndefault_md = sha256\nreq_extensions = req_ext\ndistinguished_name = dn\n\n[ dn ]\nC =\nST =\nL =\nO =\nOU =\nCN =\n\n[ req_ext ]\nsubjectAltName = @alt_names\n\n[ alt_names ]\nDNS.1 = kubernetes\nDNS.2 = kubernetes.default\nDNS.3 = kubernetes.default.svc\nDNS.4 = kubernetes.default.svc.cluster\nDNS.5 = kubernetes.default.svc.cluster.local\nIP.1 =\nIP.2 =\n\n[ v3_ext ]\nauthorityKeyIdentifier=keyid,issuer:always\nbasicConstraints=CA:FALSE\nkeyUsage=keyEncipherment,dataEncipherment\nextendedKeyUsage=serverAuth,clientAuth\nsubjectAltName=@alt_names\n```\n\n1. Generate the certificate signing request based on the config file:\n\n```shell\nopenssl req -new -key server.key -out server.csr -config csr.conf\n```\n\n1. Generate the server certificate using the ca.key, ca.crt and server.csr:\n\n```shell\nopenssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key \\\n-CAcreateserial -out server.crt -days 10000 \\\n-extensions v3_ext -extfile csr.conf -sha256\n```\n\n1. View the certificate signing request:\n\n```shell\nopenssl req -noout -text -in ./server.csr\n```\n\n1. View the certificate:\n\n```shell\nopenssl x509 -noout -text -in ./server.crt\n```\n\n1. Fill in and add the following parameters into the API server start parameters:\n\n```shell\n--client-ca-file=/yourdirectory/ca.crt\n--tls-cert-file=/yourdirectory/server.crt\n--tls-private-key-file=/yourdirectory/server.key\n```\n\n### cfssl\n\n**cfssl** is another tool for certificate generation.\n\n1. Download, unpack and prepare the command line tools as shown below.\n\nNote that you may need to adapt the sample commands based on the hardware\narchitecture and cfssl version you are using.\n\n```shell\ncurl -L https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssl_1.5.0_linux_amd64 -o cfssl\nchmod +x cfssl\ncurl -L https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssljson_1.5.0_linux_amd64 -o cfssljson\nchmod +x cfssljson\ncurl -L https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssl-certinfo_1.5.0_linux_amd64 -o cfssl-certinfo\nchmod +x cfssl-certinfo\n```\n\n1. Create a directory to hold the artifacts and initialize cfssl:\n\n```shell\nmkdir cert\ncd cert\n../cfssl print-defaults config > config.json\n../cfssl print-defaults csr > csr.json\n```\n\n1. Create a JSON config file for generating the CA file, for example, `ca-config.json`:\n\n```json\n{\n\"signing\": {\n\"default\": {\n\"expiry\": \"8760h\"\n},\n\"profiles\": {\n\"kubernetes\": {\n\"usages\": [\n\"signing\",\n\"key encipherment\",\n\"server auth\",\n\"client auth\"\n],\n\"expiry\": \"8760h\"\n}\n}\n}\n}\n```\n\n1. Create a JSON config file for CA certificate signing request (CSR), for example,\n`ca-csr.json`. Be sure to replace the values marked with angle brackets with\nreal values you want to use.\n\n```json\n{\n\"CN\": \"kubernetes\",\n\"key\": {\n\"algo\": \"rsa\",\n\"size\": 2048\n},\n\"names\":[{\n\"C\": \" \",\n\"ST\": \" \",\n\"L\": \" \",\n\"O\": \" \",\n\"OU\": \" \"\n}]\n}\n```\n\n1. Generate CA key (`ca-key.pem`) and certificate (`ca.pem`):\n\n```shell\n../cfssl gencert -initca ca-csr.json | ../cfssljson -bare ca\n```\n\n1. Create a JSON config file for generating keys and certificates for the API\nserver, for example, `server-csr.json`. Be sure to replace the values in angle brackets with\nreal values you want to use. The ` ` is the service cluster\nIP for the API server as described in previous subsection.\nThe sample below also assumes that you are using `cluster.local` as the default\nDNS domain name.\n\n```json\n{\n\"CN\": \"kubernetes\",\n\"hosts\": [\n\"127.0.0.1\",\n\" \",\n\" \",\n\"kubernetes\",\n\"kubernetes.default\",\n\"kubernetes.default.svc\",\n\"kubernetes.default.svc.cluster\",\n\"kubernetes.default.svc.cluster.local\"\n],\n\"key\": {\n\"algo\": \"rsa\",\n\"size\": 2048\n},\n\"names\": [{\n\"C\": \" \",\n\"ST\": \" \",\n\"L\": \" \",\n\"O\": \" \",\n\"OU\": \" \"\n}]\n}\n```\n\n1. Generate the key and certificate for the API server, which are by default\nsaved into file `server-key.pem` and `server.pem` respectively:\n\n```shell\n../cfssl gencert -ca=ca.pem -ca-key=ca-key.pem \\\n--config=ca-config.json -profile=kubernetes \\\nserver-csr.json | ../cfssljson -bare server\n```\n\n## Distributing Self-Signed CA Certificate\n\nA client node may refuse to recognize a self-signed CA certificate as valid.\nFor a non-production deployment, or for a deployment that runs behind a company\nfirewall, you can distribute a self-signed CA certificate to all clients and\nrefresh the local list for valid certificates.\n\nOn each client, perform the following operations:\n\n```shell\nsudo cp ca.crt /usr/local/share/ca-certificates/kubernetes.crt\nsudo update-ca-certificates\n```\n\n```none\nUpdating certificates in /etc/ssl/certs...\n1 added, 0 removed; done.\nRunning hooks in /etc/ca-certificates/update.d....\ndone.\n```\n\n## Certificates API\n\nYou can use the `certificates.k8s.io` API to provision\nx509 certificates to use for authentication as documented\nin the [Managing TLS in a cluster](/docs/tasks/tls/managing-tls-in-a-cluster)\ntask page.", "source": "content/en/docs/tasks/administer-cluster/certificates.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Kubernetes keeps many aspects of how pods execute on nodes abstracted\nfrom the user. This is by design. However, some workloads require\nstronger guarantees in terms of latency and/or performance in order to operate\nacceptably. The kubelet provides methods to enable more complex workload\nplacement policies while keeping the abstraction free from explicit placement\ndirectives.\n\nFor detailed information on resource management, please refer to the\n[Resource Management for Pods and Containers](/docs/concepts/configuration/manage-resources-containers)\ndocumentation.\n\nFor detailed information on how the kubelet implements resource management, please refer to the\n[Node ResourceManagers](/docs/concepts/policy/node-resource-managers) documentation.\n\n##\n\nIf you are running an older version of Kubernetes, please look at the documentation for the version you are actually running.\n\n## Configuring CPU management policies\n\nBy default, the kubelet uses [CFS quota](https://en.wikipedia.org/wiki/Completely_Fair_Scheduler)\nto enforce pod CPU limits. When the node runs many CPU-bound pods,\nthe workload can move to different CPU cores depending on\nwhether the pod is throttled and which CPU cores are available at\nscheduling time. Many workloads are not sensitive to this migration and thus\nwork fine without any intervention.\n\nHowever, in workloads where CPU cache affinity and scheduling latency\nsignificantly affect workload performance, the kubelet allows alternative CPU\nmanagement policies to determine some placement preferences on the node.\n\n## Windows Support\n\nCPU Manager support can be enabled on Windows by using the `WindowsCPUAndMemoryAffinity` feature gate\nand it requires support in the container runtime.\nOnce the feature gate is enabled, follow the steps below to configure the [CPU manager policy](#configuration).\n\n## Configuration\n\nThe CPU Manager policy is set with the `--cpu-manager-policy` kubelet\nflag or the `cpuManagerPolicy` field in [KubeletConfiguration](/docs/reference/config-api/kubelet-config.v1beta1/).\nThere are two supported policies:\n\n* [`none`](#none-policy): the default policy.\n* [`static`](#static-policy): allows pods with certain resource characteristics to be\ngranted increased CPU affinity and exclusivity on the node.\n\nThe CPU manager periodically writes resource updates through the CRI in\norder to reconcile in-memory CPU assignments with cgroupfs. The reconcile\nfrequency is set through a new Kubelet configuration value\n`--cpu-manager-reconcile-period`. If not specified, it defaults to the same\nduration as `--node-status-update-frequency`.\n\nThe behavior of the static policy can be fine-tuned using the `--cpu-manager-policy-options` flag.\nThe flag takes a comma-separated list of `key=value` policy options.\nIf you disable the `CPUManagerPolicyOptions`\n[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)\nthen you cannot fine-tune CPU manager policies. In that case, the CPU manager\noperates only using its default settings.\n\nIn addition to the top-level `CPUManagerPolicyOptions` feature gate, the policy options are split\ninto two groups: alpha quality (hidden by default) and beta quality (visible by default).\nThe groups are guarded respectively by the `CPUManagerPolicyAlphaOptions`\nand `CPUManagerPolicyBetaOptions` feature gates. Diverging from the Kubernetes standard, these\nfeature gates guard groups of options, because it would have been too cumbersome to add a feature\ngate for each individual option.\n\n## Changing the CPU Manager Policy\n\nSince the CPU manager policy can only be applied when kubelet spawns new pods, simply changing from\n\"none\" to \"static\" won't apply to existing pods. So in order to properly change the CPU manager\npolicy on a node, perform the following steps:\n\n1. [Drain](/docs/tasks/administer-cluster/safely-drain-node) the node.\n2. Stop kubelet.\n3. Remove the old CPU manager state file. The path to this file is\n`/var/lib/kubelet/cpu_manager_state` by default. This clears the state maintained by the\nCPUManager so that the cpu-sets set up by the new policy won’t conflict with it.\n4. Edit the kubelet configuration to change the CPU manager policy to the desired value.\n5. Start kubelet.\n\nRepeat this process for every node that needs its CPU manager policy changed. Skipping this\nprocess will result in kubelet crashlooping with the following error:\n\n```\ncould not restore state from checkpoint: configured policy \"static\" differs from state checkpoint policy \"none\", please drain this node and delete the CPU manager checkpoint file \"/var/lib/kubelet/cpu_manager_state\" before restarting Kubelet\n```\n\nif the set of online CPUs changes on the node, the node must be drained and CPU manager manually reset by deleting the\nstate file `cpu_manager_state` in the kubelet root directory.\n\n### `none` policy configuration\n\nThis policy has no extra configuration items.\n\n### `static` policy configuration\n\nThis policy manages a shared pool of CPUs that initially contains all CPUs in the\nnode. The amount of exclusively allocatable CPUs is equal to the total\nnumber of CPUs in the node minus any CPU reservations by the kubelet `--kube-reserved` or\n`--system-reserved` options. From 1.17, the CPU reservation list can be specified\nexplicitly by kubelet `--reserved-cpus` option. The explicit CPU list specified by\n`--reserved-cpus` takes precedence over the CPU reservation specified by\n`--kube-reserved` and `--system-reserved`. CPUs reserved by these options are taken, in\ninteger quantity, from the initial shared pool in ascending order by physical\ncore ID. This shared pool is the set of CPUs on which any containers in\n`BestEffort` and `Burstable` pods run. Containers in `Guaranteed` pods with fractional\nCPU `requests` also run on CPUs in the shared pool. Only containers that are\nboth part of a `Guaranteed` pod and have integer CPU `requests` are assigned\nexclusive CPUs.\n\nThe kubelet requires a CPU reservation greater than zero be made\nusing either `--kube-reserved` and/or `--system-reserved` or `--reserved-cpus` when\nthe static policy is enabled. This is because zero CPU reservation would allow the shared\npool to become empty.\n\n### Static policy options {#cpu-policy-static--options}\n\nYou can toggle groups of options on and off based upon their maturity level\nusing the following feature gates:\n* `CPUManagerPolicyBetaOptions` default enabled. Disable to hide beta-level options.\n* `CPUManagerPolicyAlphaOptions` default disabled. Enable to show alpha-level options.\nYou will still have to enable each option using the `CPUManagerPolicyOptions` kubelet option.\n\nThe following policy options exist for the static `CPUManager` policy:\n* `full-pcpus-only` (GA, visible by default) (1.33 or higher)\n* `distribute-cpus-across-numa` (beta, visible by default) (1.33 or higher)\n* `align-by-socket` (alpha, hidden by default) (1.25 or higher)\n* `distribute-cpus-across-cores` (alpha, hidden by default) (1.31 or higher)\n* `strict-cpu-reservation` (GA, visible by default) (1.35 or higher)\n* `prefer-align-cpus-by-uncorecache` (GA, visible by default) (1.36 or higher)\n\nThe `full-pcpus-only` option can be enabled by adding `full-pcpus-only=true` to\nthe CPUManager policy options.\nLikewise, the `distribute-cpus-across-numa` option can be enabled by adding\n`distribute-cpus-across-numa=true` to the CPUManager policy options.\nWhen both are set, they are \"additive\" in the sense that CPUs will be\ndistributed across NUMA nodes in chunks of full-pcpus rather than individual\ncores.\nThe `align-by-socket` policy option can be enabled by adding `align-by-socket=true`\nto the `CPUManager` policy options. It is also additive to the `full-pcpus-only`\nand `distribute-cpus-across-numa` policy options.\n\nThe `distribute-cpus-across-cores` option can be enabled by adding\n`distribute-cpus-across-cores=true` to the `CPUManager` policy options.\nIt cannot be used with `full-pcpus-only` or `distribute-cpus-across-numa` policy\noptions together at this moment.\n\nThe `strict-cpu-reservation` option can be enabled by adding `strict-cpu-reservation=true` to\nthe CPUManager policy options followed by removing the `/var/lib/kubelet/cpu_manager_state` file and restart kubelet.\n\nThe `prefer-align-cpus-by-uncorecache` option can be enabled by adding the\n`prefer-align-cpus-by-uncorecache` to the `CPUManager` policy options. If\nincompatible options are used, the kubelet will fail to start with the error\nexplained in the logs.\n\nFor mode detail about the behavior of the individual options you can configure, please refer to the\n[Node ResourceManagers](/docs/concepts/policy/node-resource-managers) documentation.\n\n##\n\n* Read about [Pod-level resource managers](/docs/concepts/resource-management/resource-managers/#pod-level-resource-managers).", "source": "content/en/docs/tasks/administer-cluster/cpu-management-policies.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page shows how to configure a Key Management Service (KMS) provider and plugin to enable secret data encryption.\nIn Kubernetes there are two versions of KMS at-rest encryption.\nYou should use KMS v2 if feasible because KMS v1 is deprecated (since Kubernetes v1.28) and disabled by default (since Kubernetes v1.29).\nKMS v2 offers significantly better performance characteristics than KMS v1.\n\nThis documentation is for the generally available implementation of KMS v2 (and for the\ndeprecated version 1 implementation).\nIf you are using any control plane components older than Kubernetes v1.29, please check\nthe equivalent page in the documentation for the version of Kubernetes that your cluster\nis running. Earlier releases of Kubernetes had different behavior that may be relevant\nfor information security.\n\n##\n\nThe version of Kubernetes that you need depends on which KMS API version\nyou have selected. Kubernetes recommends using KMS v2.\n\n- If you selected KMS API v1 to support clusters prior to version v1.27\nor if you have a legacy KMS plugin that only supports KMS v1,\nany supported Kubernetes version will work. This API is deprecated as of Kubernetes v1.28.\nKubernetes does not recommend the use of this API.\n\n### KMS v1\n\n* Kubernetes version 1.10.0 or later is required\n\n* For version 1.29 and later, the v1 implementation of KMS is disabled by default.\nTo enable the feature, set `--feature-gates=KMSv1=true` to configure a KMS v1 provider.\n\n* Your cluster must use etcd v3 or later\n\n### KMS v2\n\n* Your cluster must use etcd v3 or later\n\n## KMS encryption and per-object encryption keys\n\nThe KMS encryption provider uses an envelope encryption scheme to encrypt data in etcd.\nThe data is encrypted using a data encryption key (DEK).\nThe DEKs are encrypted with a key encryption key (KEK) that is stored and managed in a remote KMS.\n\nIf you use the (deprecated) v1 implementation of KMS, a new DEK is generated for each encryption.\n\nWith KMS v2, a new DEK is generated **per encryption**: the API server uses a\n_key derivation function_ to generate single use data encryption keys from a secret seed\ncombined with some random data.\nThe seed is rotated whenever the KEK is rotated\n(see the _Understanding key_id and Key Rotation_ section below for more details).\n\nThe KMS provider uses gRPC to communicate with a specific KMS plugin over a UNIX domain socket.\nThe KMS plugin, which is implemented as a gRPC server and deployed on the same host(s)\nas the Kubernetes control plane, is responsible for all communication with the remote KMS.\n\n## Configuring the KMS provider\n\nTo configure a KMS provider on the API server, include a provider of type `kms` in the\n`providers` array in the encryption configuration file and set the following properties:\n\n### KMS v1 {#configuring-the-kms-provider-kms-v1}\n\n* `apiVersion`: API Version for KMS provider. Leave this value empty or set it to `v1`.\n* `name`: Display name of the KMS plugin. Cannot be changed once set.\n* `endpoint`: Listen address of the gRPC server (KMS plugin). The endpoint is a UNIX domain socket.\n* `cachesize`: Number of data encryption keys (DEKs) to be cached in the clear.\nWhen cached, DEKs can be used without another call to the KMS;\nwhereas DEKs that are not cached require a call to the KMS to unwrap.\n* `timeout`: How long should `kube-apiserver` wait for kms-plugin to respond before\nreturning an error (default is 3 seconds).\n\n### KMS v2 {#configuring-the-kms-provider-kms-v2}\n\n* `apiVersion`: API Version for KMS provider. Set this to `v2`.\n* `name`: Display name of the KMS plugin. Cannot be changed once set.\n* `endpoint`: Listen address of the gRPC server (KMS plugin). The endpoint is a UNIX domain socket.\n* `timeout`: How long should `kube-apiserver` wait for kms-plugin to respond before\nreturning an error (default is 3 seconds).\n\nKMS v2 does not support the `cachesize` property. All data encryption keys (DEKs) will be cached in\nthe clear once the server has unwrapped them via a call to the KMS. Once cached, DEKs can be used\nto perform decryption indefinitely without making a call to the KMS.\n\nSee [Understanding the encryption at rest configuration](/docs/tasks/administer-cluster/encrypt-data).\n\n## Implementing a KMS plugin\n\nTo implement a KMS plugin, you can develop a new plugin gRPC server or enable a KMS plugin\nalready provided by your cloud provider.\nYou then integrate the plugin with the remote KMS and deploy it on the Kubernetes control plane.\n\n### Enabling the KMS supported by your cloud provider\n\nRefer to your cloud provider for instructions on enabling the cloud provider-specific KMS plugin.\n\n### Developing a KMS plugin gRPC server\n\nYou can develop a KMS plugin gRPC server using a stub file available for Go. For other languages,\nyou use a proto file to create a stub file that you can use to develop the gRPC server code.\n\n#### KMS v1 {#developing-a-kms-plugin-gRPC-server-kms-v1}\n\n* Using Go: Use the functions and data structures in the stub file:\n[api.pb.go](https://github.com/kubernetes/kms/blob/release-/apis/v1beta1/api.pb.go)\nto develop the gRPC server code\n\n* Using languages other than Go: Use the protoc compiler with the proto file:\n[api.proto](https://github.com/kubernetes/kms/blob/release-/apis/v1beta1/api.proto)\nto generate a stub file for the specific language\n\n#### KMS v2 {#developing-a-kms-plugin-gRPC-server-kms-v2}\n\n* Using Go: A high level\n[library](https://github.com/kubernetes/kms/blob/release-/pkg/service/interface.go)\nis provided to make the process easier. Low level implementations\ncan use the functions and data structures in the stub file:\n[api.pb.go](https://github.com/kubernetes/kms/blob/release-/apis/v2/api.pb.go)\nto develop the gRPC server code\n\n* Using languages other than Go: Use the protoc compiler with the proto file:\n[api.proto](https://github.com/kubernetes/kms/blob/release-/apis/v2/api.proto)\nto generate a stub file for the specific language\n\nThen use the functions and data structures in the stub file to develop the server code.\n\n#### Notes\n\n##### KMS v1 {#developing-a-kms-plugin-gRPC-server-notes-kms-v1}\n\n* kms plugin version: `v1beta1`\n\nIn response to procedure call Version, a compatible KMS plugin should return `v1beta1` as `VersionResponse.version`.\n\n* message version: `v1beta1`\n\nAll messages from KMS provider have the version field set to `v1beta1`.\n\n* protocol: UNIX domain socket (`unix`)\n\nThe plugin is implemented as a gRPC server that listens at UNIX domain socket. The plugin deployment should create a file on the file system to run the gRPC unix domain socket connection. The API server (gRPC client) is configured with the KMS provider (gRPC server) unix domain socket endpoint in order to communicate with it. An abstract Linux socket may be used by starting the endpoint with `/@`, i.e. `unix:///@foo`. Care must be taken when using this type of socket as they do not have concept of ACL (unlike traditional file based sockets). However, they are subject to Linux networking namespace, so will only be accessible to containers within the same pod unless host networking is used.\n\n##### KMS v2 {#developing-a-kms-plugin-gRPC-server-notes-kms-v2}\n\n* KMS plugin version: `v2`\n\nIn response to the `Status` remote procedure call, a compatible KMS plugin should return its KMS compatibility\nversion as `StatusResponse.version`. That status response should also include\n\"ok\" as `StatusResponse.healthz` and a `key_id` (remote KMS KEK ID) as `StatusResponse.key_id`.\nThe Kubernetes project recommends you make your plugin\ncompatible with the stable `v2` KMS API. Kubernetes also supports the\n`v2beta1` API for KMS; future Kubernetes releases are likely to continue supporting that beta version.\n\nThe API server polls the `Status` procedure call approximately every minute when everything is healthy,\nand every 10 seconds when the plugin is not healthy. Plugins must take care to optimize this call as it will be\nunder constant load.\n\n* Encryption\n\nThe `EncryptRequest` procedure call provides the plaintext and a UID for logging purposes. The response must include\nthe ciphertext, the `key_id` for the KEK used, and, optionally, any metadata that the KMS plugin needs to aid in\nfuture `DecryptRequest` calls (via the `annotations` field). The plugin must guarantee that any distinct plaintext\nresults in a distinct response `(ciphertext, key_id, annotations)`.\n\nIf the plugin returns a non-empty `annotations` map, all map keys must be fully qualified domain names such as\n`example.com`. An example use case of `annotation` is `{\"kms.example.io/remote-kms-auditid\":\" \"}`\n\nThe API server does not perform the `EncryptRequest` procedure call at a high rate. Plugin implementations should\nstill aim to keep each request's latency at under 100 milliseconds.\n\n* Decryption\n\nThe `DecryptRequest` procedure call provides the `(ciphertext, key_id, annotations)` from `EncryptRequest` and a UID\nfor logging purposes. As expected, it is the inverse of the `EncryptRequest` call. Plugins must verify that the\n`key_id` is one that they understand - they must not attempt to decrypt data unless they are sure that it was\nencrypted by them at an earlier time.\n\nThe API server may perform thousands of `DecryptRequest` procedure calls on startup to fill its watch cache. Thus\nplugin implementations must perform these calls as quickly as possible, and should aim to keep each request's latency\nat under 10 milliseconds.\n\n* Understanding `key_id` and Key Rotation\n\nThe `key_id` is the public, non-secret name of the remote KMS KEK that is currently in use. It may be logged\nduring regular operation of the API server, and thus must not contain any private data. Plugin implementations\nare encouraged to use a hash to avoid leaking any data. The KMS v2 metrics take care to hash this value before\nexposing it via the `/metrics` endpoint.\n\nThe API server considers the `key_id` returned from the `Status` procedure call to be authoritative. Thus, a change\nto this value signals to the API server that the remote KEK has changed, and data encrypted with the old KEK should\nbe marked stale when a no-op write is performed (as described below). If an `EncryptRequest` procedure call returns a\n`key_id` that is different from `Status`, the response is thrown away and the plugin is considered unhealthy. Thus\nimplementations must guarantee that the `key_id` returned from `Status` will be the same as the one returned by\n`EncryptRequest`. Furthermore, plugins must ensure that the `key_id` is stable and does not flip-flop between values\n(i.e. during a remote KEK rotation).\n\nPlugins must not re-use `key_id`s, even in situations where a previously used remote KEK has been reinstated. For\nexample, if a plugin was using `key_id=A`, switched to `key_id=B`, and then went back to `key_id=A` - instead of\nreporting `key_id=A` the plugin should report some derivative value such as `key_id=A_001` or use a new value such\nas `key_id=C`.\n\nSince the API server polls `Status` about every minute, `key_id` rotation is not immediate. Furthermore, the API\nserver will coast on the last valid state for about three minutes. Thus if a user wants to take a passive approach\nto storage migration (i.e. by waiting), they must schedule a migration to occur at `3 + N + M` minutes after the\nremote KEK has been rotated (`N` is how long it takes the plugin to observe the `key_id` change and `M` is the\ndesired buffer to allow config changes to be processed - a minimum `M` of five minutes is recommend). Note that no\nAPI server restart is required to perform KEK rotation.\n\nBecause you don't control the number of writes performed with the DEK,\nthe Kubernetes project recommends rotating the KEK at least every 90 days.\n\n* protocol: UNIX domain socket (`unix`)\n\nThe plugin is implemented as a gRPC server that listens at UNIX domain socket.\nThe plugin deployment should create a file on the file system to run the gRPC unix domain socket connection.\nThe API server (gRPC client) is configured with the KMS provider (gRPC server) unix\ndomain socket endpoint in order to communicate with it.\nAn abstract Linux socket may be used by starting the endpoint with `/@`, i.e. `unix:///@foo`.\nCare must be taken when using this type of socket as they do not have concept of ACL\n(unlike traditional file based sockets).\nHowever, they are subject to Linux networking namespace, so will only be accessible to\ncontainers within the same pod unless host networking is used.\n\n### Integrating a KMS plugin with the remote KMS\n\nThe KMS plugin can communicate with the remote KMS using any protocol supported by the KMS.\nAll configuration data, including authentication credentials the KMS plugin uses to communicate with the remote KMS,\nare stored and managed by the KMS plugin independently.\nThe KMS plugin can encode the ciphertext with additional metadata that may be required before sending it to the KMS\nfor decryption (KMS v2 makes this process easier by providing a dedicated `annotations` field).\n\n### Deploying the KMS plugin\n\nEnsure that the KMS plugin runs on the same host(s) as the Kubernetes API server(s).\n\n## Encrypting your data with the KMS provider\n\nTo encrypt the data:\n\n1. Create a new `EncryptionConfiguration` file using the appropriate properties for the `kms` provider\nto encrypt resources like Secrets and ConfigMaps. If you want to encrypt an extension API that is\ndefined in a CustomResourceDefinition, your cluster must be running Kubernetes v1.26 or newer.\n\n1. Set the `--encryption-provider-config` flag on the kube-apiserver to point to the location of the configuration file.\n\n1. `--encryption-provider-config-automatic-reload` boolean argument\ndetermines if the file set by `--encryption-provider-config` should be\n[automatically reloaded](/docs/tasks/administer-cluster/encrypt-data/#configure-automatic-reloading)\nif the disk contents change.\n\n1. Restart your API server.\n\n### KMS v1 {#encrypting-your-data-with-the-kms-provider-kms-v1}\n\n```yaml\napiVersion: apiserver.config.k8s.io/v1\nkind: EncryptionConfiguration\nresources:\n- resources:\n- secrets\n- configmaps\n- pandas.awesome.bears.example\nproviders:\n- kms:\nname: myKmsPluginFoo\nendpoint: unix:///tmp/socketfile-foo.sock\ncachesize: 100\ntimeout: 3s\n- kms:\nname: myKmsPluginBar\nendpoint: unix:///tmp/socketfile-bar.sock\ncachesize: 100\ntimeout: 3s\n```\n\n### KMS v2 {#encrypting-your-data-with-the-kms-provider-kms-v2}\n\n```yaml\napiVersion: apiserver.config.k8s.io/v1\nkind: EncryptionConfiguration\nresources:\n- resources:\n- secrets\n- configmaps\n- pandas.awesome.bears.example\nproviders:\n- kms:\napiVersion: v2\nname: myKmsPluginFoo\nendpoint: unix:///tmp/socketfile-foo.sock\ntimeout: 3s\n- kms:\napiVersion: v2\nname: myKmsPluginBar\nendpoint: unix:///tmp/socketfile-bar.sock\ntimeout: 3s\n```\n\nSetting `--encryption-provider-config-automatic-reload` to `true` collapses all health checks to a single health check endpoint. Individual health checks are only available when KMS v1 providers are in use and the encryption config is not auto-reloaded.\n\nThe following table summarizes the health check endpoints for each KMS version:\n\n| KMS configurations | Without Automatic Reload | With Automatic Reload |\n| ------------------ | ------------------------ | --------------------- |\n| KMS v1 only | Individual Healthchecks | Single Healthcheck |\n| KMS v2 only | Single Healthcheck | Single Healthcheck |\n| Both KMS v1 and v2 | Individual Healthchecks | Single Healthcheck |\n| No KMS | None | Single Healthcheck |\n\n`Single Healthcheck` means that the only health check endpoint is `/healthz/kms-providers`.\n\n`Individual Healthchecks` means that each KMS plugin has an associated health check endpoint based on its location in the encryption config: `/healthz/kms-provider-0`, `/healthz/kms-provider-1` etc.\n\nThese healthcheck endpoint paths are hard coded and generated/controlled by the server. The indices for individual healthchecks corresponds to the order in which the KMS encryption config is processed.\n\nUntil the steps defined in [Ensuring all secrets are encrypted](#ensuring-all-secrets-are-encrypted) are performed, the `providers` list should end with the `identity: {}` provider to allow unencrypted data to be read. Once all resources are encrypted, the `identity` provider should be removed to prevent the API server from honoring unencrypted data.\n\nFor details about the `EncryptionConfiguration` format, please check the\n[API server encryption API reference](/docs/reference/config-api/apiserver-config.v1/).\n\n## Verifying that the data is encrypted\n\nWhen encryption at rest is correctly configured, resources are encrypted on write.\nAfter restarting your `kube-apiserver`, any newly created or updated Secret or other resource types\nconfigured in `EncryptionConfiguration` should be encrypted when stored. To verify,\nyou can use the `etcdctl` command line program to retrieve the contents of your secret data.\n\n1. Create a new secret called `secret1` in the `default` namespace:\n\n```shell\nkubectl create secret generic secret1 -n default --from-literal=mykey=mydata\n```\n\n1. Using the `etcdctl` command line, read that secret out of etcd:\n\n```shell\nETCDCTL_API=3 etcdctl get /kubernetes.io/secrets/default/secret1 [...] | hexdump -C\n```\n\nwhere `[...]` contains the additional arguments for connecting to the etcd server.\n\n1. Verify the stored secret is prefixed with `k8s:enc:kms:v1:` for KMS v1 or prefixed with `k8s:enc:kms:v2:` for KMS v2, which indicates that the `kms` provider has encrypted the resulting data.\n\n1. Verify that the secret is correctly decrypted when retrieved via the API:\n\n```shell\nkubectl describe secret secret1 -n default\n```\n\nThe Secret should contain `mykey: mydata`\n\n## Ensuring all secrets are encrypted\n\nWhen encryption at rest is correctly configured, resources are encrypted on write.\nThus we can perform an in-place no-op update to ensure that data is encrypted.\n\nThe following command reads all secrets and then updates them to apply server side encryption.\nIf an error occurs due to a conflicting write, retry the command.\nFor larger clusters, you may wish to subdivide the secrets by namespace or script an update.\n\n```shell\nkubectl get secrets --all-namespaces -o json | kubectl replace -f -\n```\n\n## Switching from a local encryption provider to the KMS provider\n\nTo switch from a local encryption provider to the `kms` provider and re-encrypt all of the secrets:\n\n1. Add the `kms` provider as the first entry in the configuration file as shown in the following example.\n\n```yaml\napiVersion: apiserver.config.k8s.io/v1\nkind: EncryptionConfiguration\nresources:\n- resources:\n- secrets\nproviders:\n- kms:\napiVersion: v2\nname : myKmsPlugin\nendpoint: unix:///tmp/socketfile.sock\n- aescbc:\nkeys:\n- name: key1\nsecret:\n```\n\n1. Restart all `kube-apiserver` processes.\n\n1. Run the following command to force all secrets to be re-encrypted using the `kms` provider.\n\n```shell\nkubectl get secrets --all-namespaces -o json | kubectl replace -f -\n```\n\n##\n\nIf you no longer want to use encryption for data persisted in the Kubernetes API, read\n[decrypt data that are already stored at rest](/docs/tasks/administer-cluster/decrypt-data/).", "source": "content/en/docs/tasks/administer-cluster/kms-provider.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page explains how to enable a package repository for the desired\nKubernetes minor release upon upgrading a cluster. This is only needed\nfor users of the community-owned package repositories hosted at `pkgs.k8s.io`.\nUnlike the legacy package repositories, the community-owned package\nrepositories are structured in a way that there's a dedicated package\nrepository for each Kubernetes minor version.\n\nThis guide only covers a part of the Kubernetes upgrade process. Please see the\n[upgrade guide](/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/) for\nmore information about upgrading Kubernetes clusters.\n\nThis step is only needed upon upgrading a cluster to another **minor** release.\nIf you're upgrading to another patch release within the same minor release (e.g.\nv.5 to v.7), you don't\nneed to follow this guide. However, if you're still using the legacy package\nrepositories, you'll need to migrate to the new community-owned package\nrepositories before upgrading (see the next section for more details on how to\ndo this).\n\n##\n\nThis document assumes that you're already using the community-owned\npackage repositories (`pkgs.k8s.io`). If that's not the case, it's strongly\nrecommended to migrate to the community-owned package repositories as described\nin the [official announcement](/blog/2023/08/15/pkgs-k8s-io-introduction/).\n\n### Verifying if the Kubernetes package repositories are used\n\nIf you're unsure whether you're using the community-owned package repositories or the\nlegacy package repositories, take the following steps to verify:\n\nPrint the contents of the file that defines the Kubernetes `apt` repository:\n\n```shell\n# On your system, this configuration file could have a different name\npager /etc/apt/sources.list.d/kubernetes.list\n```\n\nIf you see a line similar to:\n\n```\ndeb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v/deb/ /\n```\n\n**You're using the Kubernetes package repositories and this guide applies to you.**\nOtherwise, it's strongly recommended to migrate to the Kubernetes package repositories\nas described in the [official announcement](/blog/2023/08/15/pkgs-k8s-io-introduction/).\n\nPrint the contents of the file that defines the Kubernetes `yum` repository:\n\n```shell\n# On your system, this configuration file could have a different name\ncat /etc/yum.repos.d/kubernetes.repo\n```\n\nIf you see a `baseurl` similar to the `baseurl` in the output below:\n\n```\n[kubernetes]\nname=Kubernetes\nbaseurl=https://pkgs.k8s.io/core:/stable:/v/rpm/\nenabled=1\ngpgcheck=1\ngpgkey=https://pkgs.k8s.io/core:/stable:/v/rpm/repodata/repomd.xml.key\nexclude=kubelet kubeadm kubectl\n```\n\n**You're using the Kubernetes package repositories and this guide applies to you.**\nOtherwise, it's strongly recommended to migrate to the Kubernetes package repositories\nas described in the [official announcement](/blog/2023/08/15/pkgs-k8s-io-introduction/).\n\nPrint the contents of the file that defines the Kubernetes `zypper` repository:\n\n```shell\n# On your system, this configuration file could have a different name\ncat /etc/zypp/repos.d/kubernetes.repo\n```\n\nIf you see a `baseurl` similar to the `baseurl` in the output below:\n\n```\n[kubernetes]\nname=Kubernetes\nbaseurl=https://pkgs.k8s.io/core:/stable:/v/rpm/\nenabled=1\ngpgcheck=1\ngpgkey=https://pkgs.k8s.io/core:/stable:/v/rpm/repodata/repomd.xml.key\nexclude=kubelet kubeadm kubectl\n```\n\n**You're using the Kubernetes package repositories and this guide applies to you.**\nOtherwise, it's strongly recommended to migrate to the Kubernetes package repositories\nas described in the [official announcement](/blog/2023/08/15/pkgs-k8s-io-introduction/).\n\nThe URL used for the Kubernetes package repositories is not limited to `pkgs.k8s.io`,\nit can also be one of:\n\n- `pkgs.k8s.io`\n- `pkgs.kubernetes.io`\n- `packages.kubernetes.io`\n\n## Switching to another Kubernetes package repository\n\nThis step should be done upon upgrading from one to another Kubernetes minor\nrelease in order to get access to the packages of the desired Kubernetes minor\nversion.\n\n1. Open the file that defines the Kubernetes `apt` repository using a text editor of your choice:\n\n```shell\nnano /etc/apt/sources.list.d/kubernetes.list\n```\n\nYou should see a single line with the URL that contains your current Kubernetes\nminor version. For example, if you're using v,\nyou should see this:\n\n```\ndeb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v/deb/ /\n```\n\n1. Change the version in the URL to **the next available minor release**, for example:\n\n```\ndeb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable://deb/ /\n```\n\n1. Save the file and exit your text editor. Continue following the relevant upgrade instructions.\n\n1. Open the file that defines the Kubernetes `yum` repository using a text editor of your choice:\n\n```shell\nnano /etc/yum.repos.d/kubernetes.repo\n```\n\nYou should see a file with two URLs that contain your current Kubernetes\nminor version. For example, if you're using v,\nyou should see this:\n\n```\n[kubernetes]\nname=Kubernetes\nbaseurl=https://pkgs.k8s.io/core:/stable:/v/rpm/\nenabled=1\ngpgcheck=1\ngpgkey=https://pkgs.k8s.io/core:/stable:/v/rpm/repodata/repomd.xml.key\nexclude=kubelet kubeadm kubectl cri-tools kubernetes-cni\n```\n\n1. Change the version in these URLs to **the next available minor release**, for example:\n\n```\n[kubernetes]\nname=Kubernetes\nbaseurl=https://pkgs.k8s.io/core:/stable://rpm/\nenabled=1\ngpgcheck=1\ngpgkey=https://pkgs.k8s.io/core:/stable://rpm/repodata/repomd.xml.key\nexclude=kubelet kubeadm kubectl cri-tools kubernetes-cni\n```\n\n1. Save the file and exit your text editor. Continue following the relevant upgrade instructions.\n\n##\n\n* See how to [Upgrade Linux nodes](/docs/tasks/administer-cluster/kubeadm/upgrading-linux-nodes/).\n* See how to [Upgrade Windows nodes](/docs/tasks/administer-cluster/kubeadm/upgrading-windows-nodes/).", "source": "content/en/docs/tasks/administer-cluster/kubeadm/change-package-repository.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Client certificates generated by [kubeadm](/docs/reference/setup-tools/kubeadm/) expire after 1 year.\nThis page explains how to manage certificate renewals with kubeadm. It also covers other tasks related\nto kubeadm certificate management.\n\nThe Kubernetes project recommends upgrading to the latest patch releases promptly, and\nto ensure that you are running a supported minor release of Kubernetes.\nFollowing this recommendation helps you to stay secure.\n\n##\n\nYou should be familiar with [PKI certificates and requirements in Kubernetes](/docs/setup/best-practices/certificates/).\n\nYou should be familiar with how to pass a [configuration](/docs/reference/config-api/kubeadm-config.v1beta4/) file to the kubeadm commands.\n\nThis guide covers the usage of the `openssl` command (used for manual certificate signing,\nif you choose that approach), but you can use your preferred tools.\n\nSome of the steps here use `sudo` for administrator access. You can use any equivalent tool.\n\n## Using custom certificates {#custom-certificates}\n\nBy default, kubeadm generates all the certificates needed for a cluster to run.\nYou can override this behavior by providing your own certificates.\n\nTo do so, you must place them in whatever directory is specified by the\n`--cert-dir` flag or the `certificatesDir` field of kubeadm's `ClusterConfiguration`.\nBy default this is `/etc/kubernetes/pki`.\n\nIf a given certificate and private key pair exists before running `kubeadm init`,\nkubeadm does not overwrite them. This means you can, for example, copy an existing\nCA into `/etc/kubernetes/pki/ca.crt` and `/etc/kubernetes/pki/ca.key`,\nand kubeadm will use this CA for signing the rest of the certificates.\n\n## Choosing an encryption algorithm {#choosing-encryption-algorithm}\n\nkubeadm allows you to choose an encryption algorithm that is used for creating\npublic and private keys. That can be done by using the `encryptionAlgorithm` field of the\nkubeadm configuration:\n\n```yaml\napiVersion: kubeadm.k8s.io/v1beta4\nkind: ClusterConfiguration\nencryptionAlgorithm:\n```\n\n` ` can be one of `RSA-2048` (default), `RSA-3072`, `RSA-4096` or `ECDSA-P256`.\n\n## Choosing certificate validity period {#choosing-cert-validity-period}\n\nkubeadm allows you to choose the validity period of CA and leaf certificates.\nThat can be done by using the `certificateValidityPeriod` and `caCertificateValidityPeriod`\nfields of the kubeadm configuration:\n\n```yaml\napiVersion: kubeadm.k8s.io/v1beta4\nkind: ClusterConfiguration\ncertificateValidityPeriod: 8760h # Default: 365 days × 24 hours = 1 year\ncaCertificateValidityPeriod: 87600h # Default: 365 days × 24 hours * 10 = 10 years\n```\n\nThe values of the fields follow the accepted format for\n[Go's `time.Duration` values](https://pkg.go.dev/time#ParseDuration), with the longest supported\nunit being `h` (hours).\n\n## External CA mode {#external-ca-mode}\n\nIt is also possible to provide only the `ca.crt` file and not the\n`ca.key` file (this is only available for the root CA file, not other cert pairs).\nIf all other certificates and kubeconfig files are in place, kubeadm recognizes\nthis condition and activates the \"External CA\" mode. kubeadm will proceed without the\nCA key on disk.\n\nInstead, run the controller-manager standalone with `--controllers=csrsigner` and\npoint to the CA certificate and key.\n\nThere are various ways to prepare the component credentials when using external CA mode.\n\n### Manual preparation of component credentials\n\n[PKI certificates and requirements](/docs/setup/best-practices/certificates/) includes information\non how to prepare all the required by kubeadm component credentials manually.\n\nThis guide covers the usage of the `openssl` command (used for manual certificate signing,\nif you choose that approach), but you can use your preferred tools.\n\n### Preparation of credentials by signing CSRs generated by kubeadm\n\nkubeadm can [generate CSR files](#signing-csr) that you can sign manually with tools like\n`openssl` and your external CA. These CSR files will include all the specification for credentials\nthat components deployed by kubeadm require.\n\n### Automated preparation of component credentials by using kubeadm phases\n\nAlternatively, it is possible to use kubeadm phase commands to automate this process.\n\n- Go to a host that you want to prepare as a kubeadm control plane node with external CA.\n- Copy the external CA files `ca.crt` and `ca.key` that you have into `/etc/kubernetes/pki` on the node.\n- Prepare a temporary [kubeadm configuration file](/docs/reference/setup-tools/kubeadm/kubeadm-init/#config-file)\ncalled `config.yaml` that can be used with `kubeadm init`. Make sure that this file includes\nany relevant cluster wide or host-specific information that could be included in certificates, such as,\n`ClusterConfiguration.controlPlaneEndpoint`, `ClusterConfiguration.certSANs` and `InitConfiguration.APIEndpoint`.\n- On the same host execute the commands `kubeadm init phase kubeconfig all --config config.yaml` and\n`kubeadm init phase certs all --config config.yaml`. This will generate all required kubeconfig\nfiles and certificates under `/etc/kubernetes/` and its `pki` sub directory.\n- Inspect the generated files. Delete `/etc/kubernetes/pki/ca.key`, delete or move to a safe location\nthe file `/etc/kubernetes/super-admin.conf`.\n- On nodes where `kubeadm join` will be called also delete `/etc/kubernetes/kubelet.conf`.\nThis file is only required on the first node where `kubeadm init` will be called.\n- Note that some files such `pki/sa.*`, `pki/front-proxy-ca.*` and `pki/etc/ca.*` are\nshared between control plane nodes, You can generate them once and\n[distribute them manually](/docs/setup/production-environment/tools/kubeadm/high-availability/#manual-certs)\nto nodes where `kubeadm join` will be called, or you can use the\n[`--upload-certs`](/docs/setup/production-environment/tools/kubeadm/high-availability/#stacked-control-plane-and-etcd-nodes)\nfunctionality of `kubeadm init` and `--certificate-key` of `kubeadm join` to automate this distribution.\n\nOnce the credentials are prepared on all nodes, call `kubeadm init` and `kubeadm join` for these nodes to\njoin the cluster. kubeadm will use the existing kubeconfig and certificate files under `/etc/kubernetes/`\nand its `pki` sub directory.\n\n## Certificate expiry and management {#check-certificate-expiration}\n\n`kubeadm` cannot manage certificates signed by an external CA.\n\nYou can use the `check-expiration` subcommand to check when certificates expire:\n\n```shell\nkubeadm certs check-expiration\n```\n\nThe output is similar to this:\n\n```console\nCERTIFICATE EXPIRES RESIDUAL TIME CERTIFICATE AUTHORITY EXTERNALLY MANAGED\nadmin.conf Dec 30, 2020 23:36 UTC 364d no\napiserver Dec 30, 2020 23:36 UTC 364d ca no\napiserver-etcd-client Dec 30, 2020 23:36 UTC 364d etcd-ca no\napiserver-kubelet-client Dec 30, 2020 23:36 UTC 364d ca no\ncontroller-manager.conf Dec 30, 2020 23:36 UTC 364d no\netcd-healthcheck-client Dec 30, 2020 23:36 UTC 364d etcd-ca no\netcd-peer Dec 30, 2020 23:36 UTC 364d etcd-ca no\netcd-server Dec 30, 2020 23:36 UTC 364d etcd-ca no\nfront-proxy-client Dec 30, 2020 23:36 UTC 364d front-proxy-ca no\nscheduler.conf Dec 30, 2020 23:36 UTC 364d no\n\nCERTIFICATE AUTHORITY EXPIRES RESIDUAL TIME EXTERNALLY MANAGED\nca Dec 28, 2029 23:36 UTC 9y no\netcd-ca Dec 28, 2029 23:36 UTC 9y no\nfront-proxy-ca Dec 28, 2029 23:36 UTC 9y no\n```\n\nThe command shows expiration/residual time for the client certificates in the\n`/etc/kubernetes/pki` folder and for the client certificate embedded in the kubeconfig files used\nby kubeadm (`admin.conf`, `controller-manager.conf` and `scheduler.conf`).\n\nAdditionally, kubeadm informs the user if the certificate is externally managed; in this case, the\nuser should take care of managing certificate renewal manually/using other tools.\n\nThe `kubelet.conf` configuration file is not included in the list above because kubeadm\nconfigures kubelet\nfor [automatic certificate renewal](/docs/tasks/tls/certificate-rotation/)\nwith rotatable certificates under `/var/lib/kubelet/pki`.\nTo repair an expired kubelet client certificate see\n[Kubelet client certificate rotation fails](/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/#kubelet-client-cert).\n\nOn nodes created with `kubeadm init` from versions prior to kubeadm version 1.17, there is a\n[bug](https://github.com/kubernetes/kubeadm/issues/1753) where you manually have to modify the\ncontents of `kubelet.conf`. After `kubeadm init` finishes, you should update `kubelet.conf` to\npoint to the rotated kubelet client certificates, by replacing `client-certificate-data` and\n`client-key-data` with:\n\n```yaml\nclient-certificate: /var/lib/kubelet/pki/kubelet-client-current.pem\nclient-key: /var/lib/kubelet/pki/kubelet-client-current.pem\n```\n\n## Automatic certificate renewal\n\nkubeadm renews all the certificates during control plane\n[upgrade](/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/).\n\nThis feature is designed for addressing the simplest use cases;\nif you don't have specific requirements on certificate renewal and perform Kubernetes version\nupgrades regularly (less than 1 year in between each upgrade), kubeadm will take care of keeping\nyour cluster up to date and reasonably secure.\n\nIf you have more complex requirements for certificate renewal, you can opt out from the default\nbehavior by passing `--certificate-renewal=false` to `kubeadm upgrade apply` or to `kubeadm\nupgrade node`.\n\n## Manual certificate renewal\n\nYou can renew your certificates manually at any time with the `kubeadm certs renew` command,\nwith the appropriate command line options. If you are running cluster with a replicated control\nplane, this command needs to be executed on all the control-plane nodes.\n\nThis command performs the renewal using CA (or front-proxy-CA) certificate and key stored in `/etc/kubernetes/pki`.\n\n`kubeadm certs renew` uses the existing certificates as the authoritative source for attributes\n(Common Name, Organization, subject alternative name) and does not rely on the `kubeadm-config`\nConfigMap.\nEven so, the Kubernetes project recommends keeping the served certificate and the associated\nvalues in that ConfigMap synchronized, to avoid any risk of confusion.\n\nAfter running the command you should restart the control plane Pods. This is required since\ndynamic certificate reload is currently not supported for all components and certificates.\n[Static Pods](/docs/tasks/configure-pod-container/static-pod/) are managed by the local kubelet\nand not by the API Server, thus kubectl cannot be used to delete and restart them.\nTo restart a static Pod you can temporarily remove its manifest file from `/etc/kubernetes/manifests/`\nand wait for 20 seconds (see the `fileCheckFrequency` value in [KubeletConfiguration struct](/docs/reference/config-api/kubelet-config.v1beta1/)).\nThe kubelet will terminate the Pod if it's no longer in the manifest directory.\nYou can then move the file back and after another `fileCheckFrequency` period, the kubelet will recreate\nthe Pod and the certificate renewal for the component can complete.\n\n`kubeadm certs renew` can renew any specific certificate or, with the subcommand `all`, it can renew all of them:\n\n```shell\n# If you are running cluster with a replicated control plane, this command\n# needs to be executed on all the control-plane nodes.\nkubeadm certs renew all\n```\n\n### Copying the administrator certificate (optional) {#admin-certificate-copy}\n\nClusters built with kubeadm often copy the `admin.conf` certificate into\n`$HOME/.kube/config`, as instructed in [Creating a cluster with kubeadm](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/).\nOn such a system, to update the contents of `$HOME/.kube/config`\nafter renewing the `admin.conf`, you could run the following commands:\n\n```shell\nsudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config\nsudo chown $(id -u):$(id -g) $HOME/.kube/config\n```\n\n## Renew certificates with the Kubernetes certificates API\n\nThis section provides more details about how to execute manual certificate renewal using the Kubernetes certificates API.\n\nThese are advanced topics for users who need to integrate their organization's certificate\ninfrastructure into a kubeadm-built cluster. If the default kubeadm configuration satisfies your\nneeds, you should let kubeadm manage certificates instead.\n\n### Set up a signer\n\nThe Kubernetes Certificate Authority does not work out of the box.\nYou can configure an external signer such as [cert-manager](https://cert-manager.io/docs/configuration/ca/),\nor you can use the built-in signer.\n\nThe built-in signer is part of [`kube-controller-manager`](/docs/reference/command-line-tools-reference/kube-controller-manager/).\n\nTo activate the built-in signer, you must pass the `--cluster-signing-cert-file` and\n`--cluster-signing-key-file` flags.\n\nIf you're creating a new cluster, you can use a kubeadm\n[configuration file](/docs/reference/config-api/kubeadm-config.v1beta4/):\n\n```yaml\napiVersion: kubeadm.k8s.io/v1beta4\nkind: ClusterConfiguration\ncontrollerManager:\nextraArgs:\n- name: \"cluster-signing-cert-file\"\nvalue: \"/etc/kubernetes/pki/ca.crt\"\n- name: \"cluster-signing-key-file\"\nvalue: \"/etc/kubernetes/pki/ca.key\"\n```\n\n### Create certificate signing requests (CSR)\n\nSee [Create CertificateSigningRequest](/docs/reference/access-authn-authz/certificate-signing-requests/#create-certificatessigningrequest)\nfor creating CSRs with the Kubernetes API.\n\n## Renew certificates with external CA\n\nThis section provide more details about how to execute manual certificate renewal using an external CA.\n\nTo better integrate with external CAs, kubeadm can also produce certificate signing requests (CSRs).\nA CSR represents a request to a CA for a signed certificate for a client.\nIn kubeadm terms, any certificate that would normally be signed by an on-disk CA can be produced\nas a CSR instead. A CA, however, cannot be produced as a CSR.\n\n### Renewal by using certificate signing requests (CSR)\n\nRenewal of certificates is possible by generating new CSRs and signing them with the external CA.\nFor more details about working with CSRs generated by kubeadm see the section\n[Signing certificate signing requests (CSR) generated by kubeadm](#signing-csr).\n\n## Certificate authority (CA) rotation {#certificate-authority-rotation}\n\nKubeadm does not support rotation or replacement of CA certificates out of the box.\n\nFor more information about manual rotation or replacement of CA, see [manual rotation of CA certificates](/docs/tasks/tls/manual-rotation-of-ca-certificates/).\n\n## Enabling signed kubelet serving certificates {#kubelet-serving-certs}\n\nBy default the kubelet serving certificate deployed by kubeadm is self-signed.\nThis means a connection from external services like the\n[metrics-server](https://github.com/kubernetes-sigs/metrics-server) to a\nkubelet cannot be secured with TLS.\n\nTo configure the kubelets in a new kubeadm cluster to obtain properly signed serving\ncertificates you must pass the following minimal configuration to `kubeadm init`:\n\n```yaml\napiVersion: kubeadm.k8s.io/v1beta4\nkind: ClusterConfiguration\n---\napiVersion: kubelet.config.k8s.io/v1beta1\nkind: KubeletConfiguration\nserverTLSBootstrap: true\n```\n\nIf you have already created the cluster you must adapt it by doing the following:\n- Find and edit the `kubelet-config` ConfigMap in the `kube-system` namespace.\nIn that ConfigMap, the `kubelet` key has a\n[KubeletConfiguration](/docs/reference/config-api/kubelet-config.v1beta1/)\ndocument as its value. Edit the KubeletConfiguration document to set `serverTLSBootstrap: true`.\n- On each node, add the `serverTLSBootstrap: true` field in `/var/lib/kubelet/config.yaml`\nand restart the kubelet with `systemctl restart kubelet`\n\nThe field `serverTLSBootstrap: true` will enable the bootstrap of kubelet serving\ncertificates by requesting them from the `certificates.k8s.io` API. One known limitation\nis that the CSRs (Certificate Signing Requests) for these certificates cannot be automatically\napproved by the default signer in the kube-controller-manager -\n[`kubernetes.io/kubelet-serving`](/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers).\nThis will require action from the user or a third party controller.\n\nThese CSRs can be viewed using:\n\n```shell\nkubectl get csr\n```\n```console\nNAME AGE SIGNERNAME REQUESTOR CONDITION\ncsr-9wvgt 112s kubernetes.io/kubelet-serving system:node:worker-1 Pending\ncsr-lz97v 1m58s kubernetes.io/kubelet-serving system:node:control-plane-1 Pending\n```\n\nTo approve them you can do the following:\n```shell\nkubectl certificate approve\n```\n\nBy default, these serving certificate will expire after one year. Kubeadm sets the\n`KubeletConfiguration` field `rotateCertificates` to `true`, which means that close\nto expiration a new set of CSRs for the serving certificates will be created and must\nbe approved to complete the rotation. To understand more see\n[Certificate Rotation](/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/#certificate-rotation).\n\nIf you are looking for a solution for automatic approval of these CSRs it is recommended\nthat you contact your cloud provider and ask if they have a CSR signer that verifies\nthe node identity with an out of band mechanism.\n\nThird party custom controllers can be used:\n- [kubelet-csr-approver](https://github.com/postfinance/kubelet-csr-approver)\n\nSuch a controller is not a secure mechanism unless it not only verifies the CommonName\nin the CSR but also verifies the requested IPs and domain names. This would prevent\na malicious actor that has access to a kubelet client certificate to create\nCSRs requesting serving certificates for any IP or domain name.\n\n## Generating kubeconfig files for additional users {#kubeconfig-additional-users}\n\nDuring cluster creation, `kubeadm init` signs the certificate in the `super-admin.conf`\nto have `Subject: O = system:masters, CN = kubernetes-super-admin`.\n[`system:masters`](/docs/reference/access-authn-authz/rbac/#user-facing-roles)\nis a break-glass, super user group that bypasses the authorization layer (for example,\n[RBAC](/docs/reference/access-authn-authz/rbac/)). The file `admin.conf` is also created\nby kubeadm on control plane nodes and it contains a certificate with\n`Subject: O = kubeadm:cluster-admins, CN = kubernetes-admin`. `kubeadm:cluster-admins`\nis a group logically belonging to kubeadm. If your cluster uses RBAC\n(the kubeadm default), the `kubeadm:cluster-admins` group is bound to the\n[`cluster-admin`](/docs/reference/access-authn-authz/rbac/#user-facing-roles) ClusterRole.\n\nAvoid sharing the `super-admin.conf` or `admin.conf` files. Instead, create least\nprivileged access even for people who work as administrators and use that least\nprivilege alternative for anything other than break-glass (emergency) access.\n\nYou can use the [`kubeadm kubeconfig user`](/docs/reference/setup-tools/kubeadm/kubeadm-kubeconfig)\ncommand to generate kubeconfig files for additional users.\nThe command accepts a mixture of command line flags and\n[kubeadm configuration](/docs/reference/config-api/kubeadm-config.v1beta4/) options.\nThe generated kubeconfig will be written to stdout and can be piped to a file using\n`kubeadm kubeconfig user ... > somefile.conf`.\n\nExample configuration file that can be used with `--config`:\n\n```yaml\n# example.yaml\napiVersion: kubeadm.k8s.io/v1beta4\nkind: ClusterConfiguration\n# Will be used as the target \"cluster\" in the kubeconfig\nclusterName: \"kubernetes\"\n# Will be used as the \"server\" (IP or DNS name) of this cluster in the kubeconfig\ncontrolPlaneEndpoint: \"some-dns-address:6443\"\n# The cluster CA key and certificate will be loaded from this local directory\ncertificatesDir: \"/etc/kubernetes/pki\"\n```\n\nMake sure that these settings match the desired target cluster settings.\nTo see the settings of an existing cluster use:\n\n```shell\nkubectl get cm kubeadm-config -n kube-system -o=jsonpath=\"{.data.ClusterConfiguration}\"\n```\n\nThe following example will generate a kubeconfig file with credentials valid for 24 hours\nfor a new user `johndoe` that is part of the `appdevs` group:\n\n```shell\nkubeadm kubeconfig user --config example.yaml --org appdevs --client-name johndoe --validity-period 24h\n```\n\nThe following example will generate a kubeconfig file with administrator credentials valid for 1 week:\n\n```shell\nkubeadm kubeconfig user --config example.yaml --client-name admin --validity-period 168h\n```\n\n## Signing certificate signing requests (CSR) generated by kubeadm {#signing-csr}\n\nYou can create certificate signing requests with `kubeadm certs generate-csr`.\nCalling this command will generate `.csr` / `.key` file pairs for regular\ncertificates. For certificates embedded in kubeconfig files, the command will\ngenerate a `.csr` / `.conf` pair where the key is already embedded in the `.conf` file.\n\nA CSR file contains all relevant information for a CA to sign a certificate.\nkubeadm uses a\n[well defined specification](/docs/setup/best-practices/certificates/#all-certificates)\nfor all its certificates and CSRs.\n\nThe default certificate directory is `/etc/kubernetes/pki`, while the default\ndirectory for kubeconfig files is `/etc/kubernetes`. These defaults can be\noverridden with the flags `--cert-dir` and `--kubeconfig-dir`, respectively.\n\nTo pass custom options to `kubeadm certs generate-csr` use the `--config` flag,\nwhich accepts a [kubeadm configuration](/docs/reference/config-api/kubeadm-config.v1beta4/)\nfile, similarly to commands such as `kubeadm init`. Any specification such\nas extra SANs and custom IP addresses must be stored in the same configuration\nfile and used for all relevant kubeadm commands by passing it as `--config`.\n\nThis guide uses the default Kubernetes directory `/etc/kubernetes`, which requires\na super user. If you are following this guide and are using directories that you can\nwrite to (typically, this means running `kubeadm` with `--cert-dir` and `--kubeconfig-dir`)\nthen you can omit the `sudo` command.\n\nYou must then copy the files that you produced over to within the `/etc/kubernetes`\ndirectory so that `kubeadm init` or `kubeadm join` will find them.\n\n### Preparing CA and service account files\n\nOn the primary control plane node, where `kubeadm init` will be executed, call the following\ncommands:\n\n```shell\nsudo kubeadm init phase certs ca\nsudo kubeadm init phase certs etcd-ca\nsudo kubeadm init phase certs front-proxy-ca\nsudo kubeadm init phase certs sa\n```\n\nThis will populate the folders `/etc/kubernetes/pki` and `/etc/kubernetes/pki/etcd`\nwith all self-signed CA files (certificates and keys) and service account (public and\nprivate keys) that kubeadm needs for a control plane node.\n\nIf you are using an external CA, you must generate the same files out of band and manually\ncopy them to the primary control plane node in `/etc/kubernetes`.\n\nOnce all CSRs are signed, you can delete the root CA key (`ca.key`) as noted in the\n[External CA mode](#external-ca-mode) section.\n\nFor secondary control plane nodes (`kubeadm join --control-plane`) there is no need to call\nthe above commands. Depending on how you setup the\n[High Availability](/docs/setup/production-environment/tools/kubeadm/high-availability)\ncluster, you either have to manually copy the same files from the primary\ncontrol plane node, or use the automated `--upload-certs` functionality of `kubeadm init`.\n\n### Generate CSRs\n\nThe `kubeadm certs generate-csr` command generates CSRs for all known certificates\nmanaged by kubeadm. Once the command is done you must manually delete `.csr`, `.conf`\nor `.key` files that you don't need.\n\n#### Considerations for kubelet.conf {#considerations-kubelet-conf}\n\nThis section applies to both control plane and worker nodes.\n\nIf you have deleted the `ca.key` file from control plane nodes\n([External CA mode](#external-ca-mode)), the active kube-controller-manager in\nthis cluster will not be able to sign kubelet client certificates. If no external\nmethod for signing these certificates exists in your setup (such as an\n[external signer](#set-up-a-signer)), you could manually sign the `kubelet.conf.csr`\nas explained in this guide.\n\nNote that this also means that the automatic\n[kubelet client certificate rotation](/docs/tasks/tls/certificate-rotation/#enabling-client-certificate-rotation)\nwill be disabled. If so, close to certificate expiration, you must generate\na new `kubelet.conf.csr`, sign the certificate, embed it in `kubelet.conf`\nand restart the kubelet.\n\nIf this does not apply to your setup, you can skip processing the `kubelet.conf.csr`\non secondary control plane and on workers nodes (all nodes that call `kubeadm join ...`).\nThat is because the active kube-controller-manager will be responsible\nfor signing new kubelet client certificates.\n\nYou must process the `kubelet.conf.csr` file on the primary control plane node\n(the host where you originally ran `kubeadm init`). This is because `kubeadm`\nconsiders that as the node that bootstraps the cluster, and a pre-populated\n`kubelet.conf` is needed.\n\n#### Control plane nodes\n\nExecute the following command on primary (`kubeadm init`) and secondary\n(`kubeadm join --control-plane`) control plane nodes to generate all CSR files:\n\n```shell\nsudo kubeadm certs generate-csr\n```\n\nIf external etcd is to be used, follow the\n[External etcd with kubeadm](/docs/setup/production-environment/tools/kubeadm/high-availability/#external-etcd-nodes)\nguide to understand what CSR files are needed on the kubeadm and etcd nodes. Other\n`.csr` and `.key` files under `/etc/kubernetes/pki/etcd` can be removed.\n\nBased on the explanation in\n[Considerations for kubelet.conf](#considerations-kubelet-conf) keep or delete\nthe `kubelet.conf` and `kubelet.conf.csr` files.\n\n#### Worker nodes\n\nBased on the explanation in\n[Considerations for kubelet.conf](#considerations-kubelet-conf), optionally call:\n\n```shell\nsudo kubeadm certs generate-csr\n```\n\nand keep only the `kubelet.conf` and `kubelet.conf.csr` files. Alternatively skip\nthe steps for worker nodes entirely.\n\n### Signing CSRs for all certificates\n\nIf you are using external CA and already have CA serial number files (`.srl`) for\n`openssl`, you can copy such files to a kubeadm node where CSRs will be processed.\nThe `.srl` files to copy are `/etc/kubernetes/pki/ca.srl`,\n`/etc/kubernetes/pki/front-proxy-ca.srl` and `/etc/kubernetes/pki/etcd/ca.srl`.\nThe files can be then moved to a new node where CSR files will be processed.\n\nIf a `.srl` file is missing for a CA on a node, the script below will generate a new SRL file\nwith a random starting serial number.\n\nTo read more about `.srl` files see the\n[`openssl`](https://www.openssl.org/docs/man3.0/man1/openssl-x509.html)\ndocumentation for the `--CAserial` flag.\n\nRepeat this step for all nodes that have CSR files.\n\nWrite the following script in the `/etc/kubernetes` directory, navigate to the directory\nand execute the script. The script will generate certificates for all CSR files that are\npresent in the `/etc/kubernetes` tree.\n\n```bash\n#!/bin/bash\n\n# Set certificate expiration time in days\nDAYS=365\n\n# Process all CSR files except those for front-proxy and etcd\nfind ./ -name \"*.csr\" | grep -v \"pki/etcd\" | grep -v \"front-proxy\" | while read -r FILE;\ndo\necho \"* Processing ${FILE} ...\"\nFILE=${FILE%.*} # Trim the extension\nif [ -f \"./pki/ca.srl\" ]; then\nSERIAL_FLAG=\"-CAserial ./pki/ca.srl\"\nelse\nSERIAL_FLAG=\"-CAcreateserial\"\nfi\nopenssl x509 -req -days \"${DAYS}\" -CA ./pki/ca.crt -CAkey ./pki/ca.key ${SERIAL_FLAG} \\\n-in \"${FILE}.csr\" -out \"${FILE}.crt\"\nsleep 2\ndone\n\n# Process all etcd CSRs\nfind ./pki/etcd -name \"*.csr\" | while read -r FILE;\ndo\necho \"* Processing ${FILE} ...\"\nFILE=${FILE%.*} # Trim the extension\nif [ -f \"./pki/etcd/ca.srl\" ]; then\nSERIAL_FLAG=-CAserial ./pki/etcd/ca.srl\nelse\nSERIAL_FLAG=-CAcreateserial\nfi\nopenssl x509 -req -days \"${DAYS}\" -CA ./pki/etcd/ca.crt -CAkey ./pki/etcd/ca.key ${SERIAL_FLAG} \\\n-in \"${FILE}.csr\" -out \"${FILE}.crt\"\ndone\n\n# Process front-proxy CSRs\necho \"* Processing ./pki/front-proxy-client.csr ...\"\nopenssl x509 -req -days \"${DAYS}\" -CA ./pki/front-proxy-ca.crt -CAkey ./pki/front-proxy-ca.key -CAcreateserial \\\n-in ./pki/front-proxy-client.csr -out ./pki/front-proxy-client.crt\n```\n\n### Embedding certificates in kubeconfig files\n\nRepeat this step for all nodes that have CSR files.\n\nWrite the following script in the `/etc/kubernetes` directory, navigate to the directory\nand execute the script. The script will take the `.crt` files that were signed for\nkubeconfig files from CSRs in the previous step and will embed them in the kubeconfig files.\n\n```bash\n#!/bin/bash\n\nCLUSTER=kubernetes\nfind ./ -name \"*.conf\" | while read -r FILE;\ndo\necho \"* Processing ${FILE} ...\"\nKUBECONFIG=\"${FILE}\" kubectl config set-cluster \"${CLUSTER}\" --certificate-authority ./pki/ca.crt --embed-certs\nUSER=$(KUBECONFIG=\"${FILE}\" kubectl config view -o jsonpath='{.users[0].name}')\nKUBECONFIG=\"${FILE}\" kubectl config set-credentials \"${USER}\" --client-certificate \"${FILE}.crt\" --embed-certs\ndone\n```\n\n### Performing cleanup {#post-csr-cleanup}\n\nPerform this step on all nodes that have CSR files.\n\nWrite the following script in the `/etc/kubernetes` directory, navigate to the directory\nand execute the script.\n\n```bash\n#!/bin/bash\n\n# Cleanup CSR files\nrm -f ./*.csr ./pki/*.csr ./pki/etcd/*.csr # Clean all CSR files\n\n# Cleanup CRT files that were already embedded in kubeconfig files\nrm -f ./*.crt\n```\n\nOptionally, move `.srl` files to the next node to be processed.\n\nOptionally, if using external CA remove the `/etc/kubernetes/pki/ca.key` file,\nas explained in the [External CA node](#external-ca-mode) section.\n\n### kubeadm node initialization\n\nOnce CSR files have been signed and required certificates are in place on the hosts\nyou want to use as nodes, you can use the commands `kubeadm init` and `kubeadm join`\nto create a Kubernetes cluster from these nodes. During `init` and `join`, kubeadm\nuses existing certificates, encryption keys and kubeconfig files that it finds in the\n`/etc/kubernetes` tree on the host's local filesystem.", "source": "content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page shows how to configure default CPU requests and limits for a\nnamespace.\n\nA Kubernetes cluster can be divided into namespaces. If you create a Pod within a\nnamespace that has a default CPU\n[limit](/docs/concepts/configuration/manage-resources-containers/#requests-and-limits), and any container in that Pod does not specify\nits own CPU limit, then the\ncontrol plane assigns the default\nCPU limit to that container.\n\nKubernetes assigns a default CPU\n[request](/docs/concepts/configuration/manage-resources-containers/#requests-and-limits),\nbut only under certain conditions that are explained later in this page.\n\n##\n\nYou must have access to create namespaces in your cluster.\n\nIf you're not already familiar with what Kubernetes means by 1.0 CPU,\nread [meaning of CPU](/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu).\n\n## Create a namespace\n\nCreate a namespace so that the resources you create in this exercise are\nisolated from the rest of your cluster.\n\n```shell\nkubectl create namespace default-cpu-example\n```\n\n## Create a LimitRange and a Pod\n\nHere's a manifest for an example LimitRange.\nThe manifest specifies a default CPU request and a default CPU limit.\n\nCreate the LimitRange in the default-cpu-example namespace:\n\n```shell\nkubectl apply -f https://k8s.io/examples/admin/resource/cpu-defaults.yaml --namespace=default-cpu-example\n```\n\nNow if you create a Pod in the default-cpu-example namespace, and any container\nin that Pod does not specify its own values for CPU request and CPU limit,\nthen the control plane applies default values: a CPU request of 0.5 and a default\nCPU limit of 1.\n\nHere's a manifest for a Pod that has one container. The container\ndoes not specify a CPU request and limit.\n\nCreate the Pod.\n\n```shell\nkubectl apply -f https://k8s.io/examples/admin/resource/cpu-defaults-pod.yaml --namespace=default-cpu-example\n```\n\nView the Pod's specification:\n\n```shell\nkubectl get pod default-cpu-demo --output=yaml --namespace=default-cpu-example\n```\n\nThe output shows that the Pod's only container has a CPU request of 500m `cpu`\n(which you can read as “500 millicpu”), and a CPU limit of 1 `cpu`.\nThese are the default values specified by the LimitRange.\n\n```shell\ncontainers:\n- image: nginx\nimagePullPolicy: Always\nname: default-cpu-demo-ctr\nresources:\nlimits:\ncpu: \"1\"\nrequests:\ncpu: 500m\n```\n\n## What if you specify a container's limit, but not its request?\n\nHere's a manifest for a Pod that has one container. The container\nspecifies a CPU limit, but not a request:\n\nCreate the Pod:\n\n```shell\nkubectl apply -f https://k8s.io/examples/admin/resource/cpu-defaults-pod-2.yaml --namespace=default-cpu-example\n```\n\nView the [specification](/docs/concepts/overview/working-with-objects/#object-spec-and-status)\nof the Pod that you created:\n\n```\nkubectl get pod default-cpu-demo-2 --output=yaml --namespace=default-cpu-example\n```\n\nThe output shows that the container's CPU request is set to match its CPU limit.\nNotice that the container was not assigned the default CPU request value of 0.5 `cpu`:\n\n```\nresources:\nlimits:\ncpu: \"1\"\nrequests:\ncpu: \"1\"\n```\n\n## What if you specify a container's request, but not its limit?\n\nHere's an example manifest for a Pod that has one container. The container\nspecifies a CPU request, but not a limit:\n\nCreate the Pod:\n\n```shell\nkubectl apply -f https://k8s.io/examples/admin/resource/cpu-defaults-pod-3.yaml --namespace=default-cpu-example\n```\n\nView the specification of the Pod that you created:\n\n```\nkubectl get pod default-cpu-demo-3 --output=yaml --namespace=default-cpu-example\n```\n\nThe output shows that the container's CPU request is set to the value you specified at\nthe time you created the Pod (in other words: it matches the manifest).\nHowever, the same container's CPU limit is set to 1 `cpu`, which is the default CPU limit\nfor that namespace.\n\n```\nresources:\nlimits:\ncpu: \"1\"\nrequests:\ncpu: 750m\n```\n\n## Motivation for default CPU limits and requests\n\nIf your namespace has a CPU resource quota\nconfigured,\nit is helpful to have a default value in place for CPU limit.\nHere are two of the restrictions that a CPU resource quota imposes on a namespace:\n\n* For every Pod that runs in the namespace, each of its containers must have a CPU limit.\n* CPU limits apply a resource reservation on the node where the Pod in question is scheduled.\nThe total amount of CPU that is reserved for use by all Pods in the namespace must not\nexceed a specified limit.\n\nWhen you add a LimitRange:\n\nIf any Pod in that namespace that includes a container does not specify its own CPU limit,\nthe control plane applies the default CPU limit to that container, and the Pod can be\nallowed to run in a namespace that is restricted by a CPU ResourceQuota.\n\n## Clean up\n\nDelete your namespace:\n\n```shell\nkubectl delete namespace default-cpu-example\n```\n\n##\n\n### For cluster administrators\n\n* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/)\n\n* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/)\n\n* [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/)\n\n* [Configure Memory and CPU Quotas for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/)\n\n* [Configure a Pod Quota for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-pod-namespace/)\n\n* [Configure Quotas for API Objects](/docs/tasks/administer-cluster/quota-api-object/)\n\n### For app developers\n\n* [Assign Memory Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-memory-resource/)\n\n* [Assign CPU Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-cpu-resource/)\n\n* [Assign Pod-level CPU and memory resources](/docs/tasks/configure-pod-container/assign-pod-level-resources/)\n\n* [Configure Quality of Service for Pods](/docs/tasks/configure-pod-container/quality-service-pod/)", "source": "content/en/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "The Kubernetes *Memory Manager* enables the feature of guaranteed memory (and hugepages)\nallocation for pods in the `Guaranteed` QoS class.\n\nThe Memory Manager employs a hint generation protocol to yield the most suitable NUMA affinity for a pod.\nThe Memory Manager feeds the central manager (*Topology Manager*) with these affinity hints.\nBased on both the hints and Topology Manager policy, the pod is rejected or admitted to the node.\n\nMoreover, the Memory Manager ensures that the memory which a pod requests\nis allocated from a minimum number of NUMA nodes.\n\nFor background about memory resources for Pods, read\n[Assign Memory Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-memory-resource/).\n\n##\n\nIf you are running an older version of Kubernetes, check the documentation\nfor the version of Kubernetes you are running.\n\n### Resource alignment prerequisites\n\nTo align memory resources with other requested resources in a Pod spec:\n\n- the CPU Manager should be enabled and proper CPU Manager policy should be configured on a Node.\nSee [control CPU Management Policies](/docs/tasks/administer-cluster/cpu-management-policies/);\n- the Topology Manager should be enabled and proper Topology Manager policy should be configured on a Node.\nSee [control Topology Management Policies](/docs/tasks/administer-cluster/topology-manager/).\n\n### Windows support\n\nWindows support can be enabled via the `WindowsCPUAndMemoryAffinity` feature gate\nand it requires support in the container runtime.\nOnly the [None](#policy-none) and [BestEffort](#policy-best-effort) policies are supported on Windows.\n\n## How does the Memory Manager operate?\n\nFor Linux nodes, the Memory Manager offers the guaranteed memory (and hugepages) allocation\nfor Pods in Guaranteed QoS class.\nTo immediately put the Memory Manager into operation follow the guidelines in the section\n[Memory Manager configuration](#memory-manager-configuration), and subsequently,\nprepare and deploy a `Guaranteed` Pod as illustrated in the section\n[Placing a Pod in the Guaranteed QoS class](#placing-a-pod-in-the-guaranteed-qos-class).\n\nThe Memory Manager is a hint provider, and it provides topology hints for\nthe Topology Manager which then aligns the requested resources according to these topology hints.\nOn Linux, it also enforces `cgroups` (specifically, `cpuset.mems`) for Pods.\nThe complete flow diagram concerning pod admission and deployment process is illustrated\nbelow:\n\n\n\nDuring this process, the Memory Manager updates its internal counters stored in\n[Node Map and Memory Maps][2] to manage guaranteed memory allocation.\n\nThe memory manager activates during kubelet startup if a node administrator configures\n`reservedMemory` for the kubelet (section [Reserved memory configuration](#reserved-memory-flag)).\nIn this case, the kubelet updates its node map to reflect this reservation.\n\nWhen the `Static` policy is configured, you **must** configure reserved memory for the node\n(for example, with the `reservedMemory` configuration field in the kubelet configuration).\n\nAn important topic in the context of Memory Manager operation is the management of NUMA groups.\nEach time pod's memory request is in excess of single NUMA node capacity, the Memory Manager\nattempts to create a group that comprises several NUMA nodes and that features extended memory\ncapacity.\n\n## Memory Manager configuration\n\nOther Managers should already be configured (see [resource alignment prerequisites](#resource-alignment-prerequisites).\nSet the `memoryManagerPolicy` configuration field within the [kubelet configuration](), to the name of your chosen [policy](#policies).\n\nOptionally, some amount of memory can be reserved for system or kubelet processes to increase\nnode stability (section [Reserved memory configuration](#reserved-memory-flag)).\n\n### Policies\n\nKubernetes' memory manager provides three policies. You can select a policy via the `memoryManagerPolicy` configuration field\nin the kubelet configuration; the values available in Kubernetes are:\n\n* [`None`](#policy-none) (default)\n* [`Static`](#policy-static) (Linux only)\n* [`BestEffort`](#policy-best-effort) (Windows only)\n\n#### None policy {#policy-none}\n\nThis is the default policy and does not affect the memory allocation in any way.\nIt acts the same as if the Memory Manager is not present at all.\n\nThe `None` policy returns default topology hint. This special hint denotes that Hint Provider\n(Memory Manager in this case) has no preference for NUMA affinity with any resource.\n\n#### Static policy {#policy-static}\n\n**This policy is only supported on Linux.**\n\nIn the case of the `Guaranteed` pod, the `Static` Memory Manager policy returns topology hints\nrelating to the set of NUMA nodes where the memory can be guaranteed,\nand reserves the memory through updating the internal [NodeMap][2] object.\n\nIn the case of the `BestEffort` or `Burstable` pod, the `Static` Memory Manager policy sends back\nthe default topology hint as there is no request for the guaranteed memory,\nand does not reserve the memory in the internal [NodeMap][2] object.\n\nThis policy is only supported on Linux.\n\n#### BestEffort policy {#policy-best-effort}\n\n**This policy is only supported on Windows.**\n\nOn Windows, NUMA node assignment works differently than Linux.\nThere is no mechanism to ensure that Memory access only comes from a specific NUMA node.\nInstead the Windows operating system scheduler selects the most optimal NUMA node based on the CPU(s) assignments.\nIt is possible that Windows might use other NUMA nodes if the Windows scheduler deems them optimal.\n\nThe policy does track the amount of memory available and requested through the internal _node map_.\nThe memory manager makes a best effort at ensuring that enough memory is available on a NUMA node before making\na resource assignment.\nThis means that in most cases memory assignment should function as specified.\n\n## Reserved memory configuration {#reserved-memory-flag}\n\nAs an administrator, you can configure the total amount of reserved memory\nfor a node. This pre-configured value is subsequently utilized to calculate\nthe real amount of [node allocatable](/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable) memory available to pods.\n\nThe Kubernetes scheduler incorporates allocatable memory information to optimise pod\n[scheduling](/docs/concepts/scheduling-eviction/).\n. The _node allocatable_ mechanism is commonly used by node administrators to reserve K8s node\nsystem resources for the kubelet or operating system processes to help assure node stability.\n\nThe relevant kubelet settings include `kubeReserved`, `systemReserved` and `reservedMemory`.\nThe `reservedMemory` setting allows you to split the total reserved memory and assign it\nacross many NUMA nodes.\n\nYou specify a comma-separated list of memory reservations, of different\nmemory types, per NUMA node.\nYou can also specify reservations that span multiple NUMA nodes, using a semicolon as separator.\n\nThe Memory Manager will not use this reserved memory for running container workloads.\n\nFor example, if you have a NUMA node \"NUMA0\" with 10GiB of memory available, and\nyou configure `reservedMemory` to reserve `1Gi` (of memory) for NUMA0,\nthe Memory Manager assumes that only 9GiB is available for pods.\n\nYou can omit this parameter, however, you should be aware that the quantity of reserved memory\nfrom all NUMA nodes should be equal to the quantity of _node allocatable_ memory.\n\nIf at least one node allocatable parameter is non-zero, you will need to specify\n`reservedMemory` for at least one NUMA node.\nIn fact, the `evictionHard` threshold value is equal to `100Mi` by default, so\nif you use the `Static` policy, specifying `reservedMemory` is obligatory.\n\n### Memory manager reserved memory syntax {#reserved-memory-syntax}\n\nHere are some examples of how to set the `reservedMemory` configuration for the kubelet.\n\n```yaml\n# Example 1\nreservedMemory:\n- numaNode: 0 # NUMA node index\nlimits:\nmemory: \"1Gi\" # byte quantity\n- numaNode: 1\nlimits:\nmemory: \"2Gi\" # byte quantity\n```\n\n```yaml\n# Example 2\nreservedMemory:\n- numaNode: 0\nlimits:\n\"memory\": \"512Gi\"\n- numaNode: 1\nlimits:\n\"memory\": \"512Gi\"\n\"hugepages-1Gi\": \"2Gi\" # only relevant on Linux\n```\n\n### Constraints on NUMA memory reservation\n\nWhen you specify values for `reservedMemory`, this must be compatible with the `kubeReserved`\nand `systemReserved` values that are in effect, along with any `memory.available` setting\nyou make as part of `evictionHard`.\n\n```math\n\\begin{equation*}\n\\sum_{ \\textnormal{i} = 0}^{ \\textnormal{node count}} { \\textit{reservedMemory} [ \\textnormal{i} ]} = \\textit{kubeReserved} + \\textit{systemReserved} + \\textit{evictionHard} \\, \\boxed{\\textnormal{memory.available}}\n\\end{equation*}\\\\\\\n\\text{where i is an index of a NUMA node}\n```\n\nIf you do not follow the formula above, the Memory Manager will show an error on startup.\n\nIn other words, the example 1 (above) illustrates that for the conventional memory (`type=memory`),\nKubernetes reserves 3GiB in total; that is:\n\n```math\n\\begin{equation*}\n\\sum_{ \\textnormal{i} = 0}^{ \\textnormal{node count}} \\textit{reservedMemory}_{ [ \\textnormal{i} ] } = \\underbrace{\\textit{reservedMemory} [ 0 ] + \\textit{reservedMemory} [ 1 ] }_{\\textnormal{type=memory}}\n= 1 \\textnormal{GiB} + 2 \\textnormal{GiB}\n= 3 \\textnormal{GiB}\n\\end{equation*}\\\\\\\n\\text{where i is an index of a NUMA node}\n```\n\nSome examples of kubelet configuration settings relevant to the node allocatable configuration:\n\n```yaml\nkubeReserved: { cpu: \"500m\", memory: \"50Mi\" } # half a CPU, 50MiB of memory\nsystemReserved: { cpu: \"500m\", memory: \"256Mi\" } # half a CPU, 256MiB of memory\n```\n\nThe default hard eviction threshold is 100MiB, and **not** zero.\nRemember to increase the quantity of memory that you reserve by setting `reservedMemory`\nby that hard eviction threshold. Otherwise, the kubelet will not start Memory Manager and\ndisplay an error.\n\nHere is an example of a correct configuration that uses `reservedMemory`:\n```yaml\n# this snippet relies on the default value of evictionHard\nmemoryManagerPolicy: Static\nkubeReserved: { cpu: \"4\", memory: \"4Gi\" }\nsystemReserved: { cpu: \"1\", memory: \"1Gi\" }\nreservedMemory:\n- numaNode: 0\nlimits:\nmemory: \"3Gi\"\n- numaNode: 1\nlimits:\nmemory: \"2148Mi\" # 3GiB minus 100MiB\n```\n\n### Configurations to avoid {#reserved-memory-configurations-to-avoid}\n\nAvoid the following configurations:\n\n1. duplicates: the same NUMA node or memory type, but with a different value;\n1. setting a zero limit for any of memory types;\n1. NUMA node IDs that do not exist in the machine hardware;\n1. memory type names different than `memory` or `hugepages- `\n(hugepages of particular ` ` should also exist).\n\n## Placing a Pod in the Guaranteed QoS class\n\nIf the selected policy is anything other than `None`, the Memory Manager identifies pods\nthat are in the `Guaranteed` QoS class.\nThe Memory Manager provides specific topology hints to the Topology Manager for each `Guaranteed` pod.\nFor pods in a QoS class other than `Guaranteed`, the Memory Manager provides default topology hints\nto the Topology Manager.\n\nThe following excerpts from pod manifests assign a pod to the `Guaranteed` QoS class.\n\nA Pod with integer CPU(s) runs in the `Guaranteed` QoS class, when `requests` are equal to `limits`:\n\n```yaml\nspec:\ncontainers:\n- name: nginx\nimage: nginx\nresources:\nlimits:\nmemory: \"200Mi\"\ncpu: \"2\"\nexample.com/device: \"1\"\nrequests:\nmemory: \"200Mi\"\ncpu: \"2\"\nexample.com/device: \"1\"\n```\n\nAlso, a pod sharing CPU(s) runs in the `Guaranteed` QoS class, when `requests` are equal to `limits`.\n\n```yaml\nspec:\ncontainers:\n- name: nginx\nimage: nginx\nresources:\nlimits:\nmemory: \"200Mi\"\ncpu: \"300m\"\nexample.com/device: \"1\"\nrequests:\nmemory: \"200Mi\"\ncpu: \"300m\"\nexample.com/device: \"1\"\n```\n\nNotice that both CPU and memory requests must be specified for a Pod to lend it to Guaranteed QoS class.\n\n##\n\n- Read [Troubleshooting Topology Management](/docs/tasks/debug/debug-cluster/topology/)\n- Read the [KEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager) (Kubernetes enhancement proposal) for memory manager\n- Read about [Pod-level resource managers](/docs/concepts/resource-management/resource-managers/#pod-level-resource-managers).", "source": "content/en/docs/tasks/administer-cluster/memory-manager.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page shows how to configure quotas for API objects, including\nPersistentVolumeClaims and Services. A quota restricts the number of\nobjects, of a particular type, that can be created in a namespace.\nYou specify quotas in a\n[ResourceQuota](/docs/reference/generated/kubernetes-api//#resourcequota-v1-core)\nobject.\n\n##\n\n## Create a namespace\n\nCreate a namespace so that the resources you create in this exercise are\nisolated from the rest of your cluster.\n\n```shell\nkubectl create namespace quota-object-example\n```\n\n## Create a ResourceQuota\n\nHere is the configuration file for a ResourceQuota object:\n\nCreate the ResourceQuota:\n\n```shell\nkubectl apply -f https://k8s.io/examples/admin/resource/quota-objects.yaml --namespace=quota-object-example\n```\n\nView detailed information about the ResourceQuota:\n\n```shell\nkubectl get resourcequota object-quota-demo --namespace=quota-object-example --output=yaml\n```\n\nThe output shows that in the quota-object-example namespace, there can be at most\none PersistentVolumeClaim, at most two Services of type LoadBalancer, and no Services\nof type NodePort.\n\n```yaml\nstatus:\nhard:\npersistentvolumeclaims: \"1\"\nservices.loadbalancers: \"2\"\nservices.nodeports: \"0\"\nused:\npersistentvolumeclaims: \"0\"\nservices.loadbalancers: \"0\"\nservices.nodeports: \"0\"\n```\n\n## Create a PersistentVolumeClaim\n\nHere is the configuration file for a PersistentVolumeClaim object:\n\nCreate the PersistentVolumeClaim:\n\n```shell\nkubectl apply -f https://k8s.io/examples/admin/resource/quota-objects-pvc.yaml --namespace=quota-object-example\n```\n\nVerify that the PersistentVolumeClaim was created:\n\n```shell\nkubectl get persistentvolumeclaims --namespace=quota-object-example\n```\n\nThe output shows that the PersistentVolumeClaim exists and has status Pending:\n\n```\nNAME STATUS\npvc-quota-demo Pending\n```\n\n## Attempt to create a second PersistentVolumeClaim\n\nHere is the configuration file for a second PersistentVolumeClaim:\n\nAttempt to create the second PersistentVolumeClaim:\n\n```shell\nkubectl apply -f https://k8s.io/examples/admin/resource/quota-objects-pvc-2.yaml --namespace=quota-object-example\n```\n\nThe output shows that the second PersistentVolumeClaim was not created,\nbecause it would have exceeded the quota for the namespace.\n\n```\npersistentvolumeclaims \"pvc-quota-demo-2\" is forbidden:\nexceeded quota: object-quota-demo, requested: persistentvolumeclaims=1,\nused: persistentvolumeclaims=1, limited: persistentvolumeclaims=1\n```\n\n## Notes\n\nThese are the strings used to identify API resources that can be constrained\nby quotas:\n\nString API Object\n\"pods\" Pod\n\"services\" Service\n\"replicationcontrollers\" ReplicationController\n\"resourcequotas\" ResourceQuota\n\"secrets\" Secret\n\"configmaps\" ConfigMap\n\"persistentvolumeclaims\" PersistentVolumeClaim\n\"services.nodeports\" Service of type NodePort\n\"services.loadbalancers\" Service of type LoadBalancer\n\n## Clean up\n\nDelete your namespace:\n\n```shell\nkubectl delete namespace quota-object-example\n```\n\n##\n\n### For cluster administrators\n\n* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/)\n\n* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/)\n\n* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/)\n\n* [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/)\n\n* [Configure Memory and CPU Quotas for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/)\n\n* [Configure a Pod Quota for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-pod-namespace/)\n\n### For app developers\n\n* [Assign Memory Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-memory-resource/)\n\n* [Assign CPU Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-cpu-resource/)\n\n* [Assign Pod-level CPU and memory resources](/docs/tasks/configure-pod-container/assign-pod-level-resources/)\n\n* [Configure Quality of Service for Pods](/docs/tasks/configure-pod-container/quality-service-pod/)", "source": "content/en/docs/tasks/administer-cluster/quota-api-object.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This document covers topics related to protecting a cluster from accidental or malicious access\nand provides recommendations on overall security.\n\n##\n\n*\n\n## Controlling access to the Kubernetes API\n\nAs Kubernetes is entirely API-driven, controlling and limiting who can access the cluster and what actions\nthey are allowed to perform is the first line of defense.\n\n### Use Transport Layer Security (TLS) for all API traffic\n\nKubernetes expects that all API communication in the cluster is encrypted by default with TLS, and the\nmajority of installation methods will allow the necessary certificates to be created and distributed to\nthe cluster components. Note that some components and installation methods may enable local ports over\nHTTP and administrators should familiarize themselves with the settings of each component to identify\npotentially unsecured traffic.\n\n### API Authentication\n\nChoose an authentication mechanism for the API servers to use that matches the common access patterns\nwhen you install a cluster. For instance, small, single-user clusters may wish to use a simple certificate\nor static Bearer token approach. Larger clusters may wish to integrate an existing OIDC or LDAP server that\nallow users to be subdivided into groups.\n\nAll API clients must be authenticated, even those that are part of the infrastructure like nodes,\nproxies, the scheduler, and volume plugins. These clients are typically [service accounts](/docs/reference/access-authn-authz/service-accounts-admin/) or use x509 client certificates, and they are created automatically at cluster startup or are setup as part of the cluster installation.\n\nConsult the [authentication reference document](/docs/reference/access-authn-authz/authentication/) for more information.\n\n### API Authorization\n\nOnce authenticated, every API call is also expected to pass an authorization check. Kubernetes ships\nan integrated [Role-Based Access Control (RBAC)](/docs/reference/access-authn-authz/rbac/) component that matches an incoming user or group to a\nset of permissions bundled into roles. These permissions combine verbs (get, create, delete) with\nresources (pods, services, nodes) and can be namespace-scoped or cluster-scoped. A set of out-of-the-box\nroles are provided that offer reasonable default separation of responsibility depending on what\nactions a client might want to perform. It is recommended that you use the\n[Node](/docs/reference/access-authn-authz/node/) and\n[RBAC](/docs/reference/access-authn-authz/rbac/) authorizers together, in combination with the\n[NodeRestriction](/docs/reference/access-authn-authz/admission-controllers/#noderestriction) admission plugin.\n\nAs with authentication, simple and broad roles may be appropriate for smaller clusters, but as\nmore users interact with the cluster, it may become necessary to separate teams into separate\nnamespaces with more limited roles.\n\nWith authorization, it is important to understand how updates on one object may cause actions in\nother places. For instance, a user may not be able to create pods directly, but allowing them to\ncreate a deployment, which creates pods on their behalf, will let them create those pods\nindirectly. Likewise, deleting a node from the API will result in the pods scheduled to that node\nbeing terminated and recreated on other nodes. The out-of-the box roles represent a balance\nbetween flexibility and common use cases, but more limited roles should be carefully reviewed\nto prevent accidental escalation. You can make roles specific to your use case if the out-of-box ones don't meet your needs.\n\nConsult the [authorization reference section](/docs/reference/access-authn-authz/authorization/) for more information.\n\nIf your cluster uses [Dynamic Resource Allocation (DRA)](/docs/concepts/resource-management/dynamic-resource-allocation/),\nreview DRA synthetic subresource authorization (`resourceclaims/binding` and\n`resourceclaims/driver`) and grant only the minimum required verbs to each\ncomponent. For details, see\n[Hardening Guide - Dynamic Resource Allocation](/docs/concepts/security/hardening-guide/dynamic-resource-allocation/)\nand\n[Harden Dynamic Resource Allocation in Your Cluster](/docs/tasks/administer-cluster/hardening-dra/).\n\n## Controlling access to the Kubelet\n\nKubelets expose HTTPS endpoints which grant powerful control over the node and containers.\nBy default Kubelets allow unauthenticated access to this API.\n\nProduction clusters should enable Kubelet authentication and authorization.\n\nConsult the [Kubelet authentication/authorization reference](/docs/reference/access-authn-authz/kubelet-authn-authz/)\nfor more information.\n\n## Controlling the capabilities of a workload or user at runtime\n\nAuthorization in Kubernetes is intentionally high level, focused on coarse actions on resources.\nMore powerful controls exist as **policies** to limit by use case how those objects act on the\ncluster, themselves, and other resources.\n\n### Limiting resource usage on a cluster\n\n[Resource quota](/docs/concepts/policy/resource-quotas/) limits the number or capacity of\nresources granted to a namespace. This is most often used to limit the amount of CPU, memory,\nor persistent disk a namespace can allocate, but can also control how many pods, services, or\nvolumes exist in each namespace.\n\n[Limit ranges](/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/) restrict the maximum or minimum size of some of the\nresources above, to prevent users from requesting unreasonably high or low values for commonly\nreserved resources like memory, or to provide default limits when none are specified.\n\n### Controlling what privileges containers run with\n\nA pod definition contains a [security context](/docs/tasks/configure-pod-container/security-context/)\nthat allows it to request access to run as a specific Linux user on a node (like root),\naccess to run privileged or access the host network, and other controls that would otherwise\nallow it to run unfettered on a hosting node.\n\nYou can configure [Pod security admission](/docs/concepts/security/pod-security-admission/)\nto enforce use of a particular [Pod Security Standard](/docs/concepts/security/pod-security-standards/)\nin a namespace, or to detect breaches.\n\nGenerally, most application workloads need limited access to host resources so they can\nsuccessfully run as a root process (uid 0) without access to host information. However,\nconsidering the privileges associated with the root user, you should write application\ncontainers to run as a non-root user. Similarly, administrators who wish to prevent\nclient applications from escaping their containers should apply the **Baseline**\nor **Restricted** Pod Security Standard.\n\n### Preventing containers from loading unwanted kernel modules\n\nThe Linux kernel automatically loads kernel modules from disk if needed in certain\ncircumstances, such as when a piece of hardware is attached or a filesystem is mounted. Of\nparticular relevance to Kubernetes, even unprivileged processes can cause certain\nnetwork-protocol-related kernel modules to be loaded, just by creating a socket of the\nappropriate type. This may allow an attacker to exploit a security hole in a kernel module\nthat the administrator assumed was not in use.\n\nTo prevent specific modules from being automatically loaded, you can uninstall them from\nthe node, or add rules to block them. On most Linux distributions, you can do that by\ncreating a file such as `/etc/modprobe.d/kubernetes-blacklist.conf` with contents like:\n\n```\n# DCCP is unlikely to be needed, has had multiple serious\n# vulnerabilities, and is not well-maintained.\nblacklist dccp\n\n# SCTP is not used in most Kubernetes clusters, and has also had\n# vulnerabilities in the past.\nblacklist sctp\n```\n\nTo block module loading more generically, you can use a Linux Security Module (such as\nSELinux) to completely deny the `module_request` permission to containers, preventing the\nkernel from loading modules for containers under any circumstances. (Pods would still be\nable to use modules that had been loaded manually, or modules that were loaded by the\nkernel on behalf of some more-privileged process.)\n\n### Restricting network access\n\nThe [network policies](/docs/tasks/administer-cluster/declare-network-policy/) for a namespace\nallows application authors to restrict which pods in other namespaces may access pods and ports\nwithin their namespaces. Many of the supported [Kubernetes networking providers](/docs/concepts/cluster-administration/networking/)\nnow respect network policy.\n\nQuota and limit ranges can also be used to control whether users may request node ports or\nload-balanced services, which on many clusters can control whether those users applications\nare visible outside of the cluster.\n\nAdditional protections may be available that control network rules on a per-plugin or per-\nenvironment basis, such as per-node firewalls, physically separating cluster nodes to\nprevent cross talk, or advanced networking policy.\n\n### Restricting cloud metadata API access\n\nCloud platforms (AWS, Azure, GCE, etc.) often expose metadata services locally to instances.\nBy default these APIs are accessible by pods running on an instance and can contain cloud\ncredentials for that node, or provisioning data such as kubelet credentials. These credentials\ncan be used to escalate within the cluster or to other cloud services under the same account.\n\nWhen running Kubernetes on a cloud platform, limit permissions given to instance credentials, use\n[network policies](/docs/tasks/administer-cluster/declare-network-policy/) to restrict pod access\nto the metadata API, and avoid using provisioning data to deliver secrets.\n\n### Controlling which nodes pods may access\n\nBy default, there are no restrictions on which nodes may run a pod. Kubernetes offers a\n[rich set of policies for controlling placement of pods onto nodes](/docs/concepts/scheduling-eviction/assign-pod-node/)\nand the [taint-based pod placement and eviction](/docs/concepts/scheduling-eviction/taint-and-toleration/)\nthat are available to end users. For many clusters use of these policies to separate workloads\ncan be a convention that authors adopt or enforce via tooling.\n\nAs an administrator, a beta admission plugin `PodNodeSelector` can be used to force pods\nwithin a namespace to default or require a specific node selector, and if end users cannot\nalter namespaces, this can strongly limit the placement of all of the pods in a specific workload.\n\n## Protecting cluster components from compromise\n\nThis section describes some common patterns for protecting clusters from compromise.\n\n### Restrict access to etcd\n\nWrite access to the etcd backend for the API is equivalent to gaining root on the entire cluster,\nand read access can be used to escalate fairly quickly. Administrators should always use strong\ncredentials from the API servers to their etcd server, such as mutual auth via TLS client certificates,\nand it is often recommended to isolate the etcd servers behind a firewall that only the API servers\nmay access.\n\nAllowing other components within the cluster to access the master etcd instance with\nread or write access to the full keyspace is equivalent to granting cluster-admin access. Using\nseparate etcd instances for non-master components or using etcd ACLs to restrict read and write\naccess to a subset of the keyspace is strongly recommended.\n\n### Enable audit logging\n\nThe [audit logger](/docs/tasks/debug/debug-cluster/audit/) is a beta feature that records actions taken by the\nAPI for later analysis in the event of a compromise. It is recommended to enable audit logging\nand archive the audit file on a secure server.\n\n### Restrict access to alpha or beta features\n\nAlpha and beta Kubernetes features are in active development and may have limitations or bugs\nthat result in security vulnerabilities. Always assess the value an alpha or beta feature may\nprovide against the possible risk to your security posture. When in doubt, disable features you\ndo not use.\n\n### Rotate infrastructure credentials frequently\n\nThe shorter the lifetime of a secret or credential the harder it is for an attacker to make\nuse of that credential. Set short lifetimes on certificates and automate their rotation. Use\nan authentication provider that can control how long issued tokens are available and use short\nlifetimes where possible. If you use service-account tokens in external integrations, plan to\nrotate those tokens frequently. For example, once the bootstrap phase is complete, a bootstrap\ntoken used for setting up nodes should be revoked or its authorization removed.\n\n### Review third party integrations before enabling them\n\nMany third party integrations to Kubernetes may alter the security profile of your cluster. When\nenabling an integration, always review the permissions that an extension requests before granting\nit access. For example, many security integrations may request access to view all secrets on\nyour cluster which is effectively making that component a cluster admin. When in doubt,\nrestrict the integration to functioning in a single namespace if possible.\n\nComponents that create pods may also be unexpectedly powerful if they can do so inside namespaces\nlike the `kube-system` namespace, because those pods can gain access to service account secrets\nor run with elevated permissions if those service accounts are granted access to permissive\n[PodSecurityPolicies](/docs/concepts/security/pod-security-policy/).\n\nIf you use [Pod Security admission](/docs/concepts/security/pod-security-admission/) and allow\nany component to create Pods within a namespace that permits privileged Pods, those Pods may\nbe able to escape their containers and use this widened access to elevate their privileges.\n\nYou should not allow untrusted components to create Pods in any system namespace (those with\nnames that start with `kube-`) nor in any namespace where that access grant allows the possibility\nof privilege escalation.\n\n### Encrypt secrets at rest\n\nIn general, the etcd database will contain any information accessible via the Kubernetes API\nand may grant an attacker significant visibility into the state of your cluster. Always encrypt\nyour backups using a well reviewed backup and encryption solution, and consider using full disk\nencryption where possible.\n\nKubernetes supports optional [encryption at rest](/docs/tasks/administer-cluster/encrypt-data/) for information in the Kubernetes API.\nThis lets you ensure that when Kubernetes stores data for objects (for example, `Secret` or\n`ConfigMap` objects), the API server writes an encrypted representation of the object.\nThat encryption means that even someone who has access to etcd backup data is unable\nto view the content of those objects.\nIn Kubernetes you can also encrypt custom resources;\nencryption-at-rest for extension APIs defined in CustomResourceDefinitions was added to\nKubernetes as part of the v1.26 release.\n\n### Receiving alerts for security updates and reporting vulnerabilities\n\nJoin the [kubernetes-announce](https://groups.google.com/forum/#!forum/kubernetes-announce)\ngroup for emails about security announcements. See the\n[security reporting](/docs/reference/issues-security/security/)\npage for more on how to report vulnerabilities.\n\n## What's next\n\n- [Security Checklist](/docs/concepts/security/security-checklist/) for additional information on Kubernetes security guidance.\n- [Seccomp Node Reference](/docs/reference/node/seccomp/)", "source": "content/en/docs/tasks/administer-cluster/securing-a-cluster.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page shows how to assign a memory *request* and a memory *limit* to a\nContainer. A Container is guaranteed to have as much memory as it requests,\nbut is not allowed to use more memory than its limit.\n\n##\n\nEach node in your cluster must have at least 300 MiB of memory.\n\nA few of the steps on this page require you to run the\n[metrics-server](https://github.com/kubernetes-sigs/metrics-server)\nservice in your cluster. If you have the metrics-server\nrunning, you can skip those steps.\n\nIf you are running Minikube, run the following command to enable the\nmetrics-server:\n\n```shell\nminikube addons enable metrics-server\n```\n\nTo see whether the metrics-server is running, or another provider of the resource metrics\nAPI (`metrics.k8s.io`), run the following command:\n\n```shell\nkubectl get apiservices\n```\n\nIf the resource metrics API is available, the output includes a\nreference to `metrics.k8s.io`.\n\n```shell\nNAME\nv1beta1.metrics.k8s.io\n```\n\n## Create a namespace\n\nCreate a namespace so that the resources you create in this exercise are\nisolated from the rest of your cluster.\n\n```shell\nkubectl create namespace mem-example\n```\n\n## Specify a memory request and a memory limit\n\nTo specify a memory request for a container, include the `resources.requests.memory` field\nin the container’s resource manifest. To specify a memory limit, include `resources.limits.memory`.\n\nIn this exercise, you create a Pod that has one Container. The Container has a memory\nrequest of 100 MiB and a memory limit of 200 MiB. Here's the configuration file\nfor the Pod:\n\nThe `args` section in the configuration file provides arguments for the Container when it starts.\nThe `\"--vm-bytes\", \"150M\"` arguments tell the Container to attempt to allocate 150 MiB of memory.\n\nCreate the Pod:\n\n```shell\nkubectl apply -f https://k8s.io/examples/pods/resource/memory-request-limit.yaml --namespace=mem-example\n```\n\nVerify that the Pod Container is running:\n\n```shell\nkubectl get pod memory-demo --namespace=mem-example\n```\n\nView detailed information about the Pod:\n\n```shell\nkubectl get pod memory-demo --output=yaml --namespace=mem-example\n```\n\nThe output shows that the one Container in the Pod has a memory request of 100 MiB\nand a memory limit of 200 MiB.\n\n```yaml\n...\nresources:\nrequests:\nmemory: 100Mi\nlimits:\nmemory: 200Mi\n...\n```\n\nRun `kubectl top` to fetch the metrics for the pod:\n\n```shell\nkubectl top pod memory-demo --namespace=mem-example\n```\n\nThe output shows that the Pod is using about 162,900,000 bytes of memory, which\nis about 150 MiB. This is greater than the Pod's 100 MiB request, but within the\nPod's 200 MiB limit.\n\n```\nNAME CPU(cores) MEMORY(bytes)\nmemory-demo 162856960\n```\n\nDelete your Pod:\n\n```shell\nkubectl delete pod memory-demo --namespace=mem-example\n```\n\n## Exceed a Container's memory limit\n\nA Container can exceed its memory request if the Node has memory available. But a Container\nis not allowed to use more than its memory limit. If a Container allocates more memory than\nits limit, the Container becomes a candidate for termination. If the Container continues to\nconsume memory beyond its limit, the Container is terminated. If a terminated Container can be\nrestarted, the kubelet restarts it, as with any other type of runtime failure.\n\nIn this exercise, you create a Pod that attempts to allocate more memory than its limit.\nHere is the configuration file for a Pod that has one Container with a\nmemory request of 50 MiB and a memory limit of 100 MiB:\n\nIn the `args` section of the configuration file, you can see that the Container\nwill attempt to allocate 250 MiB of memory, which is well above the 100 MiB limit.\n\nCreate the Pod:\n\n```shell\nkubectl apply -f https://k8s.io/examples/pods/resource/memory-request-limit-2.yaml --namespace=mem-example\n```\n\nView detailed information about the Pod:\n\n```shell\nkubectl get pod memory-demo-2 --namespace=mem-example\n```\n\nAt this point, the Container might be running or killed. Repeat the preceding command until the Container is killed:\n\n```shell\nNAME READY STATUS RESTARTS AGE\nmemory-demo-2 0/1 OOMKilled 1 24s\n```\n\nGet a more detailed view of the Container status:\n\n```shell\nkubectl get pod memory-demo-2 --output=yaml --namespace=mem-example\n```\n\nThe output shows that the Container was killed because it is out of memory (OOM):\n\n```yaml\nlastState:\nterminated:\ncontainerID: 65183c1877aaec2e8427bc95609cc52677a454b56fcb24340dbd22917c23b10f\nexitCode: 137\nfinishedAt: 2017-06-20T20:52:19Z\nreason: OOMKilled\nstartedAt: null\n```\n\nThe Container in this exercise can be restarted, so the kubelet restarts it. Repeat\nthis command several times to see that the Container is repeatedly killed and restarted:\n\n```shell\nkubectl get pod memory-demo-2 --namespace=mem-example\n```\n\nThe output shows that the Container is killed, restarted, killed again, restarted again, and so on:\n\n```\nkubectl get pod memory-demo-2 --namespace=mem-example\nNAME READY STATUS RESTARTS AGE\nmemory-demo-2 0/1 OOMKilled 1 37s\n```\n```\n\nkubectl get pod memory-demo-2 --namespace=mem-example\nNAME READY STATUS RESTARTS AGE\nmemory-demo-2 1/1 Running 2 40s\n```\n\nView detailed information about the Pod history:\n\n```\nkubectl describe pod memory-demo-2 --namespace=mem-example\n```\n\nThe output shows that the Container starts and fails repeatedly:\n\n```\n... Normal Created Created container with id 66a3a20aa7980e61be4922780bf9d24d1a1d8b7395c09861225b0eba1b1f8511\n... Warning BackOff Back-off restarting failed container\n```\n\nView detailed information about your cluster's Nodes:\n\n```\nkubectl describe nodes\n```\n\nThe output includes a record of the Container being killed because of an out-of-memory condition:\n\n```\nWarning OOMKilling Memory cgroup out of memory: Kill process 4481 (stress) score 1994 or sacrifice child\n```\n\nDelete your Pod:\n\n```shell\nkubectl delete pod memory-demo-2 --namespace=mem-example\n```\n\n## Specify a memory request that is too big for your Nodes\n\nMemory requests and limits are associated with Containers, but it is useful to think\nof a Pod as having a memory request and limit. The memory request for the Pod is the\nsum of the memory requests for all the Containers in the Pod. Likewise, the memory\nlimit for the Pod is the sum of the limits of all the Containers in the Pod.\n\nPod scheduling is based on requests. A Pod is scheduled to run on a Node only if the Node\nhas enough available memory to satisfy the Pod's memory request.\n\nIn this exercise, you create a Pod that has a memory request so big that it exceeds the\ncapacity of any Node in your cluster. Here is the configuration file for a Pod that has one\nContainer with a request for 1000 GiB of memory, which likely exceeds the capacity\nof any Node in your cluster.\n\nCreate the Pod:\n\n```shell\nkubectl apply -f https://k8s.io/examples/pods/resource/memory-request-limit-3.yaml --namespace=mem-example\n```\n\nView the Pod status:\n\n```shell\nkubectl get pod memory-demo-3 --namespace=mem-example\n```\n\nThe output shows that the Pod status is PENDING. That is, the Pod is not scheduled to run on any Node, and it will remain in the PENDING state indefinitely:\n\n```\nkubectl get pod memory-demo-3 --namespace=mem-example\nNAME READY STATUS RESTARTS AGE\nmemory-demo-3 0/1 Pending 0 25s\n```\n\nView detailed information about the Pod, including events:\n\n```shell\nkubectl describe pod memory-demo-3 --namespace=mem-example\n```\n\nThe output shows that the Container cannot be scheduled because of insufficient memory on the Nodes:\n\n```\nEvents:\n... Reason Message\n------ -------\n... FailedScheduling No nodes are available that match all of the following predicates:: Insufficient memory (3).\n```\n\n## Memory units\n\nThe memory resource is measured in bytes. You can express memory as a plain integer or a\nfixed-point integer with one of these suffixes: E, P, T, G, M, K, Ei, Pi, Ti, Gi, Mi, Ki.\nFor example, the following represent approximately the same value:\n\n```\n128974848, 129e6, 129M, 123Mi\n```\n\nDelete your Pod:\n\n```shell\nkubectl delete pod memory-demo-3 --namespace=mem-example\n```\n\n## If you do not specify a memory limit\n\nIf you do not specify a memory limit for a Container, one of the following situations applies:\n\n* The Container has no upper bound on the amount of memory it uses. The Container\ncould use all of the memory available on the Node where it is running which in turn could invoke the OOM Killer. Further, in case of an OOM Kill, a container with no resource limits will have a greater chance of being killed.\n\n* The Container is running in a namespace that has a default memory limit, and the\nContainer is automatically assigned the default limit. Cluster administrators can use a\n[LimitRange](/docs/reference/generated/kubernetes-api//#limitrange-v1-core)\nto specify a default value for the memory limit.\n\n## Motivation for memory requests and limits\n\nBy configuring memory requests and limits for the Containers that run in your\ncluster, you can make efficient use of the memory resources available on your cluster's\nNodes. By keeping a Pod's memory request low, you give the Pod a good chance of being\nscheduled. By having a memory limit that is greater than the memory request, you accomplish two things:\n\n* The Pod can have bursts of activity where it makes use of memory that happens to be available.\n* The amount of memory a Pod can use during a burst is limited to some reasonable amount.\n\n## Clean up\n\nDelete your namespace. This deletes all the Pods that you created for this task:\n\n```shell\nkubectl delete namespace mem-example\n```\n\n##\n\n### For app developers\n\n* [Assign CPU Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-cpu-resource/)\n\n* [Assign Pod-level CPU and memory resources](/docs/tasks/configure-pod-container/assign-pod-level-resources/)\n\n* [Configure Quality of Service for Pods](/docs/tasks/configure-pod-container/quality-service-pod/)\n\n* [Resize CPU and Memory Resources assigned to Containers](/docs/tasks/configure-pod-container/resize-container-resources/)\n\n### For cluster administrators\n\n* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/)\n\n* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/)\n\n* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/)\n\n* [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/)\n\n* [Configure Memory and CPU Quotas for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/)\n\n* [Configure a Pod Quota for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-pod-namespace/)\n\n* [Configure Quotas for API Objects](/docs/tasks/administer-cluster/quota-api-object/)\n\n* [Resize CPU and Memory Resources assigned to Containers](/docs/tasks/configure-pod-container/resize-container-resources/)", "source": "content/en/docs/tasks/configure-pod-container/assign-memory-resource.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "For Kubernetes, the _Metrics API_ offers a basic set of metrics to support automatic scaling and\nsimilar use cases. This API makes information available about resource usage for node and pod,\nincluding metrics for CPU and memory. If you deploy the Metrics API into your cluster, clients of\nthe Kubernetes API can then query for this information, and you can use Kubernetes' access control\nmechanisms to manage permissions to do so.\n\nThe [HorizontalPodAutoscaler](/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale/) (HPA) and\n[VerticalPodAutoscaler](/docs/concepts/workloads/autoscaling/vertical-pod-autoscale/) (VPA)\nuse data from the metrics API to adjust workload replicas and resources to meet customer demand.\n\nYou can also view the resource metrics using the\n[`kubectl top`](/docs/reference/generated/kubectl/kubectl-commands#top)\ncommand.\n\nThe Metrics API, and the metrics pipeline that it enables, only offers the minimum\nCPU and memory metrics to enable automatic scaling using HPA and / or VPA.\nIf you would like to provide a more complete set of metrics, you can complement\nthe simpler Metrics API by deploying a second\n[metrics pipeline](/docs/tasks/debug/debug-cluster/resource-usage-monitoring/#full-metrics-pipeline)\nthat uses the _Custom Metrics API_.\n\nFigure 1 illustrates the architecture of the resource metrics pipeline.\n\nflowchart RL\nsubgraph cluster[Cluster]\ndirection RL\nS[\n\n]\nA[Metrics-\nServer]\nsubgraph B[Nodes]\ndirection TB\nD[cAdvisor] --> C[kubelet]\nE[Container\nruntime] --> D\nE1[Container\nruntime] --> D\nP[pod data] -.- C\nend\nL[API\nserver]\nW[HPA]\nC ---->|node level\nresource metrics| A -->|metrics\nAPI| L --> W\nend\nL ---> K[kubectl\ntop]\nclassDef box fill:#fff,stroke:#000,stroke-width:1px,color:#000;\nclass W,B,P,K,cluster,D,E,E1 box\nclassDef spacewhite fill:#ffffff,stroke:#fff,stroke-width:0px,color:#000\nclass S spacewhite\nclassDef k8s fill:#326ce5,stroke:#fff,stroke-width:1px,color:#fff;\nclass A,L,C k8s\n\nFigure 1. Resource Metrics Pipeline\n\nThe architecture components, from right to left in the figure, consist of the following:\n\n* [cAdvisor](https://github.com/google/cadvisor): Daemon for collecting, aggregating and exposing\ncontainer metrics included in Kubelet.\n* [kubelet](/docs/concepts/architecture/#kubelet): Node agent for managing container\nresources. Resource metrics are accessible using the `/metrics/resource` and `/stats` kubelet\nAPI endpoints.\n* [node level resource metrics](/docs/reference/instrumentation/node-metrics): API provided by the kubelet for discovering and retrieving\nper-node summarized stats available through the `/metrics/resource` endpoint.\n* [metrics-server](#metrics-server): Cluster addon component that collects and aggregates resource\nmetrics pulled from each kubelet. The API server serves Metrics API for use by HPA, VPA, and by\nthe `kubectl top` command. Metrics Server is a reference implementation of the Metrics API.\n* [Metrics API](#metrics-api): Kubernetes API supporting access to CPU and memory used for\nworkload autoscaling. To make this work in your cluster, you need an API extension server that\nprovides the Metrics API.\n\ncAdvisor supports reading metrics from cgroups, which works with typical container runtimes on Linux.\nIf you use a container runtime that uses another resource isolation mechanism, for example\nvirtualization, then that container runtime must support\n[CRI Container Metrics](https://github.com/kubernetes/community/blob/main/contributors/devel/sig-node/cri-container-stats.md)\nin order for metrics to be available to the kubelet.\n\n## Metrics API\n\nThe metrics-server implements the Metrics API. This API allows you to access CPU and memory usage\nfor the nodes and pods in your cluster. Its primary role is to feed resource usage metrics to K8s\nautoscaler components.\n\nHere is an example of the Metrics API request for a `minikube` node piped through `jq` for easier\nreading:\n\n```shell\nkubectl get --raw \"/apis/metrics.k8s.io/v1/nodes/minikube\" | jq '.'\n```\n\nHere is the same API call using `curl`:\n\n```shell\ncurl http://localhost:8080/apis/metrics.k8s.io/v1/nodes/minikube\n```\n\nSample response:\n\n```json\n{\n\"kind\": \"NodeMetrics\",\n\"apiVersion\": \"metrics.k8s.io/v1\",\n\"metadata\": {\n\"name\": \"minikube\",\n\"selfLink\": \"/apis/metrics.k8s.io/v1/nodes/minikube\",\n\"creationTimestamp\": \"2022-01-27T18:48:43Z\"\n},\n\"timestamp\": \"2022-01-27T18:48:33Z\",\n\"window\": \"30s\",\n\"usage\": {\n\"cpu\": \"487558164n\",\n\"memory\": \"732212Ki\"\n}\n}\n```\n\nHere is an example of the Metrics API request for a `kube-scheduler-minikube` pod contained in the\n`kube-system` namespace and piped through `jq` for easier reading:\n\n```shell\nkubectl get --raw \"/apis/metrics.k8s.io/v1/namespaces/kube-system/pods/kube-scheduler-minikube\" | jq '.'\n```\n\nHere is the same API call using `curl`:\n\n```shell\ncurl http://localhost:8080/apis/metrics.k8s.io/v1/namespaces/kube-system/pods/kube-scheduler-minikube\n```\n\nSample response:\n\n```json\n{\n\"kind\": \"PodMetrics\",\n\"apiVersion\": \"metrics.k8s.io/v1\",\n\"metadata\": {\n\"name\": \"kube-scheduler-minikube\",\n\"namespace\": \"kube-system\",\n\"selfLink\": \"/apis/metrics.k8s.io/v1/namespaces/kube-system/pods/kube-scheduler-minikube\",\n\"creationTimestamp\": \"2022-01-27T19:25:00Z\"\n},\n\"timestamp\": \"2022-01-27T19:24:31Z\",\n\"window\": \"30s\",\n\"containers\": [\n{\n\"name\": \"kube-scheduler\",\n\"usage\": {\n\"cpu\": \"9559630n\",\n\"memory\": \"22244Ki\"\n}\n}\n]\n}\n```\n\nThe Metrics API is defined in the [k8s.io/metrics](https://github.com/kubernetes/metrics)\nrepository. You must enable the [API aggregation layer](/docs/tasks/extend-kubernetes/configure-aggregation-layer/)\nand register an [APIService](/docs/reference/kubernetes-api/cluster-resources/api-service-v1/)\nfor the `metrics.k8s.io` API.\n\nTo learn more about the Metrics API, see [resource metrics API design](https://git.k8s.io/design-proposals-archive/instrumentation/resource-metrics-api.md),\nthe [metrics-server repository](https://github.com/kubernetes-sigs/metrics-server) and the\n[resource metrics API](https://github.com/kubernetes/metrics#resource-metrics-api).\n\nYou must deploy the metrics-server or alternative adapter that serves the Metrics API to be able\nto access it.\n\n## Measuring resource usage\n\n### CPU\n\nCPU is reported as the average core usage measured in cpu units. One cpu, in Kubernetes, is\nequivalent to 1 vCPU/Core for cloud providers, and 1 hyper-thread on bare-metal Intel processors.\n\nThis value is derived by taking a rate over a cumulative CPU counter provided by the kernel (in\nboth Linux and Windows kernels). The time window used to calculate CPU is shown under window field\nin Metrics API.\n\nTo learn more about how Kubernetes allocates and measures CPU resources, see\n[meaning of CPU](/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu).\n\n### Memory\n\nMemory is reported as the working set, measured in bytes, at the instant the metric was collected.\n\nIn an ideal world, the \"working set\" is the amount of memory in-use that cannot be freed under\nmemory pressure. However, calculation of the working set varies by host OS, and generally makes\nheavy use of heuristics to produce an estimate.\n\nThe Kubernetes model for a container's working set expects that the container runtime counts\nanonymous memory associated with the container in question. The working set metric typically also\nincludes some cached (file-backed) memory, because the host OS cannot always reclaim pages.\n\nTo learn more about how Kubernetes allocates and measures memory resources, see\n[meaning of memory](/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory).\n\n## Metrics Server\n\nThe metrics-server fetches resource metrics from the kubelets and exposes them in the Kubernetes\nAPI server through the Metrics API for use by the HPA and VPA. You can also view these metrics\nusing the `kubectl top` command.\n\nThe metrics-server uses the Kubernetes API to track nodes and pods in your cluster. The\nmetrics-server queries each node over HTTP to fetch metrics. The metrics-server also builds an\ninternal view of pod metadata, and keeps a cache of pod health. That cached pod health information\nis available via the extension API that the metrics-server makes available.\n\nFor example with an HPA query, the metrics-server needs to identify which pods fulfill the label\nselectors in the deployment.\n\nThe metrics-server calls the [kubelet](/docs/reference/command-line-tools-reference/kubelet/) API\nto collect metrics from each node. Depending on the metrics-server version it uses:\n\n* Metrics resource endpoint `/metrics/resource` in version v0.6.0+ or\n* Summary API endpoint `/stats/summary` in older versions\n\n##\n\nTo learn more about the metrics-server, see the\n[metrics-server repository](https://github.com/kubernetes-sigs/metrics-server).\n\nYou can also check out the following:\n\n* [metrics-server design](https://git.k8s.io/design-proposals-archive/instrumentation/metrics-server.md)\n* [metrics-server FAQ](https://github.com/kubernetes-sigs/metrics-server/blob/master/FAQ.md)\n* [metrics-server known issues](https://github.com/kubernetes-sigs/metrics-server/blob/master/KNOWN_ISSUES.md)\n* [metrics-server releases](https://github.com/kubernetes-sigs/metrics-server/releases)\n* [Horizontal Pod Autoscaling](/docs/tasks/run-application/horizontal-pod-autoscale/)\n\nTo learn about how the kubelet serves node metrics, and how you can access those via\nthe Kubernetes API, read [Node Metrics Data](/docs/reference/instrumentation/node-metrics).", "source": "content/en/docs/tasks/debug/debug-cluster/resource-metrics-pipeline.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "To scale an application and provide a reliable service, you need to\nunderstand how the application behaves when it is deployed. You can examine\napplication performance in a Kubernetes cluster by examining the containers,\n[pods](/docs/concepts/workloads/pods/),\n[services](/docs/concepts/services-networking/service/), and\nthe characteristics of the overall cluster. Kubernetes provides detailed\ninformation about an application's resource usage at each of these levels.\nThis information allows you to evaluate your application's performance and\nwhere bottlenecks can be removed to improve overall performance.\n\nIn Kubernetes, application monitoring does not depend on a single monitoring solution.\nOn new clusters, you can use [resource metrics](#resource-metrics-pipeline) or\n[full metrics](#full-metrics-pipeline) pipelines to collect monitoring statistics.\n\n## Resource metrics pipeline\n\nThe resource metrics pipeline provides a limited set of metrics related to\ncluster components such as the\n[Horizontal Pod Autoscaler](/docs/tasks/run-application/horizontal-pod-autoscale/)\ncontroller, as well as the `kubectl top` utility.\nThese metrics are collected by the lightweight, short-term, in-memory\n[metrics-server](https://github.com/kubernetes-sigs/metrics-server) and\nare exposed via the `metrics.k8s.io` API.\n\nmetrics-server discovers all nodes on the cluster and\nqueries each node's\n[kubelet](/docs/reference/command-line-tools-reference/kubelet/) for CPU and\nmemory usage. The kubelet acts as a bridge between the Kubernetes master and\nthe nodes, managing the pods and containers running on a machine. The kubelet\ntranslates each pod into its constituent containers and fetches individual\ncontainer usage statistics from the container runtime through the container\nruntime interface. If you use a container runtime that uses Linux cgroups and\nnamespaces to implement containers, and the container runtime does not publish\nusage statistics, then the kubelet can look up those statistics directly\n(using code from [cAdvisor](https://github.com/google/cadvisor)).\nNo matter how those statistics arrive, the kubelet then exposes the aggregated pod\nresource usage statistics through the metrics-server Resource Metrics API.\nThis API is served at `/metrics/resource` on the kubelet's authenticated and\nread-only ports.\n\n## Full metrics pipeline\n\nA full metrics pipeline gives you access to richer metrics. Kubernetes can\nrespond to these metrics by automatically scaling or adapting the cluster\nbased on its current state, using mechanisms such as the Horizontal Pod\nAutoscaler. The monitoring pipeline fetches metrics from the kubelet and\nthen exposes them to Kubernetes via an adapter by implementing either the\n`custom.metrics.k8s.io` or `external.metrics.k8s.io` API.\n\nKubernetes is designed to work with [OpenMetrics](https://openmetrics.io/),\nwhich is one of the\n[CNCF Observability and Analysis - Monitoring Projects](https://landscape.cncf.io/?group=projects-and-products&view-mode=card#observability-and-analysis--monitoring),\nbuilt upon and carefully extending [Prometheus exposition format](https://prometheus.io/docs/instrumenting/exposition_formats/)\nin almost 100% backwards-compatible ways.\n\nIf you glance over at the\n[CNCF Landscape](https://landscape.cncf.io/?group=projects-and-products&view-mode=card#observability-and-analysis--monitoring),\nyou can see a number of monitoring projects that can work with Kubernetes by _scraping_\nmetric data and using that to help you observe your cluster. It is up to you to select the tool\nor tools that suit your needs. The CNCF landscape for observability and analytics includes a\nmix of open-source software, paid-for software-as-a-service, and other commercial products.\n\nWhen you design and implement a full metrics pipeline you can make that monitoring data\navailable back to Kubernetes. For example, a HorizontalPodAutoscaler can use the processed\nmetrics to work out how many Pods to run for a component of your workload.\n\nIntegration of a full metrics pipeline into your Kubernetes implementation is outside\nthe scope of Kubernetes documentation because of the very wide scope of possible\nsolutions.\n\nThe choice of monitoring platform depends heavily on your needs, budget, and technical resources.\nKubernetes does not recommend any specific metrics pipeline; [many options](https://landscape.cncf.io/?group=projects-and-products&view-mode=card#observability-and-analysis--monitoring) are available.\nYour monitoring system should be capable of handling the [OpenMetrics](https://openmetrics.io/) metrics\ntransmission standard and needs to be chosen to best fit into your overall design and deployment of\nyour infrastructure platform.\n\n##\n\nLearn about additional debugging tools, including:\n\n* [Logging](/docs/concepts/cluster-administration/logging/)\n* [Getting into containers via `exec`](/docs/tasks/debug/debug-application/get-shell-running-container/)\n* [Connecting to containers via proxies](/docs/tasks/extend-kubernetes/http-proxy-access-api/)\n* [Connecting to containers via port forwarding](/docs/tasks/access-application-cluster/port-forward-access-application-cluster/)\n* [Inspect Kubernetes node with crictl](/docs/tasks/debug/debug-cluster/crictl/)", "source": "content/en/docs/tasks/debug/debug-cluster/resource-usage-monitoring.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page shows how to install a\n[custom resource](/docs/concepts/extend-kubernetes/api-extension/custom-resources/)\ninto the Kubernetes API by creating a\n[CustomResourceDefinition](/docs/reference/generated/kubernetes-api//#customresourcedefinition-v1-apiextensions-k8s-io).\n\n##\n\nIf you are using an older version of Kubernetes that is still supported, switch to\nthe documentation for that version to see advice that is relevant for your cluster.\n\n## Create a CustomResourceDefinition\n\nWhen you create a new CustomResourceDefinition (CRD), the Kubernetes API Server\ncreates a new RESTful resource path for each version you specify. The custom\nresource created from a CRD object can be either namespaced or cluster-scoped,\nas specified in the CRD's `spec.scope` field. As with existing built-in\nobjects, deleting a namespace deletes all custom objects in that namespace.\nCustomResourceDefinitions themselves are non-namespaced and are available to\nall namespaces.\n\nFor example, if you save the following CustomResourceDefinition to `resourcedefinition.yaml`:\n\n```yaml\napiVersion: apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\n# name must match the spec fields below, and be in the form: .\nname: crontabs.stable.example.com\nspec:\n# group name to use for REST API: /apis/ /\ngroup: stable.example.com\n# list of versions supported by this CustomResourceDefinition\nversions:\n- name: v1\n# Each version can be enabled/disabled by Served flag.\nserved: true\n# One and only one version must be marked as the storage version.\nstorage: true\nschema:\nopenAPIV3Schema:\ntype: object\nproperties:\nspec:\ntype: object\nproperties:\ncronSpec:\ntype: string\nimage:\ntype: string\nreplicas:\ntype: integer\n# either Namespaced or Cluster\nscope: Namespaced\nnames:\n# plural name to be used in the URL: /apis/ / /\nplural: crontabs\n# singular name to be used as an alias on the CLI and for display\nsingular: crontab\n# kind is normally the CamelCased singular type. Your resource manifests use this.\nkind: CronTab\n# shortNames allow shorter string to match your resource on the CLI\nshortNames:\n- ct\n```\n\nand create it:\n\n```shell\nkubectl apply -f resourcedefinition.yaml\n```\n\nThen a new namespaced RESTful API endpoint is created at:\n\n```\n/apis/stable.example.com/v1/namespaces/*/crontabs/...\n```\n\nThis endpoint URL can then be used to create and manage custom objects.\nThe `kind` of these objects will be `CronTab` from the spec of the\nCustomResourceDefinition object you created above.\n\nIt might take a few seconds for the endpoint to be created.\nOnce the `Established` condition of your CustomResourceDefinition\nbecomes true and this is observed by the handling code, the endpoint serving starts.\nWatching the [discovery information of the API server](/docs/concepts/overview/kubernetes-api/#discovery-api) for your\nresource to show up is the reliable way to determine if it is ready for use.\n\n## Create custom objects\n\nAfter the CustomResourceDefinition object has been created, you can create\ncustom objects. Custom objects can contain custom fields. These fields can\ncontain arbitrary JSON.\nIn the following example, the `cronSpec` and `image` custom fields are set in a\ncustom object of kind `CronTab`. The kind `CronTab` comes from the spec of the\nCustomResourceDefinition object you created above.\n\nIf you save the following YAML to `my-crontab.yaml`:\n\n```yaml\napiVersion: \"stable.example.com/v1\"\nkind: CronTab\nmetadata:\nname: my-new-cron-object\nspec:\ncronSpec: \"* * * * */5\"\nimage: my-awesome-cron-image\n```\n\nand create it:\n\n```shell\nkubectl apply -f my-crontab.yaml\n```\n\nYou can then manage your CronTab objects using kubectl. For example:\n\n```shell\nkubectl get crontab\n```\n\nShould print a list like this:\n\n```none\nNAME AGE\nmy-new-cron-object 6s\n```\n\nResource names are not case-sensitive when using kubectl, and you can use either\nthe singular or plural forms defined in the CRD, as well as any short names.\n\nYou can also view the raw YAML data:\n\n```shell\nkubectl get ct -o yaml\n```\n\nYou should see that it contains the custom `cronSpec` and `image` fields\nfrom the YAML you used to create it:\n\n```yaml\napiVersion: v1\nitems:\n- apiVersion: stable.example.com/v1\nkind: CronTab\nmetadata:\nannotations:\nkubectl.kubernetes.io/last-applied-configuration: |\n{\"apiVersion\":\"stable.example.com/v1\",\"kind\":\"CronTab\",\"metadata\":{\"annotations\":{},\"name\":\"my-new-cron-object\",\"namespace\":\"default\"},\"spec\":{\"cronSpec\":\"* * * * */5\",\"image\":\"my-awesome-cron-image\"}}\ncreationTimestamp: \"2021-06-20T07:35:27Z\"\ngeneration: 1\nname: my-new-cron-object\nnamespace: default\nresourceVersion: \"1326\"\nuid: 9aab1d66-628e-41bb-a422-57b8b3b1f5a9\nspec:\ncronSpec: '* * * * */5'\nimage: my-awesome-cron-image\nkind: List\nmetadata:\nresourceVersion: \"\"\nselfLink: \"\"\n```\n\n## Delete a CustomResourceDefinition\n\nWhen you delete a CustomResourceDefinition, the server will uninstall the RESTful API endpoint\nand delete all custom objects stored in it.\n\n```shell\nkubectl delete -f resourcedefinition.yaml\nkubectl get crontabs\n```\n\n```none\nError from server (NotFound): Unable to list {\"stable.example.com\" \"v1\" \"crontabs\"}: the server could not\nfind the requested resource (get crontabs.stable.example.com)\n```\n\nIf you later recreate the same CustomResourceDefinition, it will start out empty.\n\n## Specifying a structural schema\n\nCustomResources store structured data in custom fields (alongside the built-in\nfields `apiVersion`, `kind` and `metadata`, which the API server validates\nimplicitly). With [OpenAPI v3.0 validation](#validation) a schema can be\nspecified, which is validated during creation and updates, compare below for\ndetails and limits of such a schema.\n\nWith `apiextensions.k8s.io/v1` the definition of a structural schema is\nmandatory for CustomResourceDefinitions. In the beta version of\nCustomResourceDefinition, the structural schema was optional.\n\nA structural schema is an [OpenAPI v3.0 validation schema](#validation) which:\n\n1. specifies a non-empty type (via `type` in OpenAPI) for the root, for each specified field of an object node\n(via `properties` or `additionalProperties` in OpenAPI) and for each item in an array node\n(via `items` in OpenAPI), with the exception of:\n* a node with `x-kubernetes-int-or-string: true`\n* a node with `x-kubernetes-preserve-unknown-fields: true`\n2. for each field in an object and each item in an array which is specified within any of `allOf`, `anyOf`,\n`oneOf` or `not`, the schema also specifies the field/item outside of those logical junctors (compare example 1 and 2).\n3. does not set `description`, `type`, `default`, `additionalProperties`, `nullable` within an `allOf`, `anyOf`,\n`oneOf` or `not`, with the exception of the two pattern for `x-kubernetes-int-or-string: true` (see below).\n4. if `metadata` is specified, then only restrictions on `metadata.name` and `metadata.generateName` are allowed.\n\nNon-structural example 1:\n\n```yaml\nallOf:\n- properties:\nfoo:\n# ...\n```\n\nconflicts with rule 2. The following would be correct:\n\n```yaml\nproperties:\nfoo:\n# ...\nallOf:\n- properties:\nfoo:\n# ...\n```\n\nNon-structural example 2:\n\n```yaml\nallOf:\n- items:\nproperties:\nfoo:\n# ...\n```\nconflicts with rule 2. The following would be correct:\n\n```yaml\nitems:\nproperties:\nfoo:\n# ...\nallOf:\n- items:\nproperties:\nfoo:\n# ...\n```\n\nNon-structural example 3:\n\n```yaml\nproperties:\nfoo:\npattern: \"abc\"\nmetadata:\ntype: object\nproperties:\nname:\ntype: string\npattern: \"^a\"\nfinalizers:\ntype: array\nitems:\ntype: string\npattern: \"my-finalizer\"\nanyOf:\n- properties:\nbar:\ntype: integer\nminimum: 42\nrequired: [\"bar\"]\ndescription: \"foo bar object\"\n```\n\nis not a structural schema because of the following violations:\n\n* the type at the root is missing (rule 1).\n* the type of `foo` is missing (rule 1).\n* `bar` inside of `anyOf` is not specified outside (rule 2).\n* `bar`'s `type` is within `anyOf` (rule 3).\n* the description is set within `anyOf` (rule 3).\n* `metadata.finalizers` might not be restricted (rule 4).\n\nIn contrast, the following, corresponding schema is structural:\n\n```yaml\ntype: object\ndescription: \"foo bar object\"\nproperties:\nfoo:\ntype: string\npattern: \"abc\"\nbar:\ntype: integer\nmetadata:\ntype: object\nproperties:\nname:\ntype: string\npattern: \"^a\"\nanyOf:\n- properties:\nbar:\nminimum: 42\nrequired: [\"bar\"]\n```\n\nViolations of the structural schema rules are reported in the `NonStructural` condition in the\nCustomResourceDefinition.\n\n### Field pruning\n\nCustomResourceDefinitions store validated resource data in the cluster's persistence store, etcd.\nAs with native Kubernetes resources such as ConfigMap,\nif you specify a field that the API server does not recognize, the unknown field is _pruned_ (removed) before being persisted.\n\nCRDs converted from `apiextensions.k8s.io/v1beta1` to `apiextensions.k8s.io/v1` might lack\nstructural schemas, and `spec.preserveUnknownFields` might be `true`.\n\nFor legacy CustomResourceDefinition objects created as\n`apiextensions.k8s.io/v1beta1` with `spec.preserveUnknownFields` set to\n`true`, the following is also true:\n\n* Pruning is not enabled.\n* You can store arbitrary data.\n\nFor compatibility with `apiextensions.k8s.io/v1`, update your custom\nresource definitions to:\n\n1. Use a structural OpenAPI schema.\n2. Set `spec.preserveUnknownFields` to `false`.\n\nIf you save the following YAML to `my-crontab.yaml`:\n\n```yaml\napiVersion: \"stable.example.com/v1\"\nkind: CronTab\nmetadata:\nname: my-new-cron-object\nspec:\ncronSpec: \"* * * * */5\"\nimage: my-awesome-cron-image\nsomeRandomField: 42\n```\n\nand create it:\n\n```shell\nkubectl create --validate=false -f my-crontab.yaml -o yaml\n```\n\nYour output is similar to:\n\n```yaml\napiVersion: stable.example.com/v1\nkind: CronTab\nmetadata:\ncreationTimestamp: 2017-05-31T12:56:35Z\ngeneration: 1\nname: my-new-cron-object\nnamespace: default\nresourceVersion: \"285\"\nuid: 9423255b-4600-11e7-af6a-28d2447dc82b\nspec:\ncronSpec: '* * * * */5'\nimage: my-awesome-cron-image\n```\n\nNotice that the field `someRandomField` was pruned.\n\nThis example turned off client-side validation to demonstrate the API server's behavior, by adding\nthe `--validate=false` command line option.\nBecause the [OpenAPI validation schemas are also published](#publish-validation-schema-in-openapi)\nto clients, `kubectl` also checks for unknown fields and rejects those objects well before they\nwould be sent to the API server.\n\n#### Controlling pruning\n\nBy default, all unspecified fields for a custom resource, across all versions, are pruned. It is possible though to\nopt-out of that for specific sub-trees of fields by adding `x-kubernetes-preserve-unknown-fields: true` in the\n[structural OpenAPI v3 validation schema](#specifying-a-structural-schema).\n\nFor example:\n\n```yaml\ntype: object\nproperties:\njson:\nx-kubernetes-preserve-unknown-fields: true\n```\n\nThe field `json` can store any JSON value, without anything being pruned.\n\nYou can also partially specify the permitted JSON; for example:\n\n```yaml\ntype: object\nproperties:\njson:\nx-kubernetes-preserve-unknown-fields: true\ntype: object\ndescription: this is arbitrary JSON\n```\n\nWith this, only `object` type values are allowed.\n\nPruning is enabled again for each specified property (or `additionalProperties`):\n\n```yaml\ntype: object\nproperties:\njson:\nx-kubernetes-preserve-unknown-fields: true\ntype: object\nproperties:\nspec:\ntype: object\nproperties:\nfoo:\ntype: string\nbar:\ntype: string\n```\n\nWith this, the value:\n\n```yaml\njson:\nspec:\nfoo: abc\nbar: def\nsomething: x\nstatus:\nsomething: x\n```\n\nis pruned to:\n\n```yaml\njson:\nspec:\nfoo: abc\nbar: def\nstatus:\nsomething: x\n```\n\nThis means that the `something` field in the specified `spec` object is pruned, but everything outside is not.\n\n### IntOrString\n\nNodes in a schema with `x-kubernetes-int-or-string: true` are excluded from rule 1, such that the\nfollowing is structural:\n\n```yaml\ntype: object\nproperties:\nfoo:\nx-kubernetes-int-or-string: true\n```\n\nAlso those nodes are partially excluded from rule 3 in the sense that the following two patterns are allowed\n(exactly those, without variations in order to additional fields):\n\n```yaml\nx-kubernetes-int-or-string: true\nanyOf:\n- type: integer\n- type: string\n...\n```\n\nand\n\n```yaml\nx-kubernetes-int-or-string: true\nallOf:\n- anyOf:\n- type: integer\n- type: string\n- # ... zero or more\n...\n```\n\nWith one of those specification, both an integer and a string validate.\n\nIn [Validation Schema Publishing](#publish-validation-schema-in-openapi),\n`x-kubernetes-int-or-string: true` is unfolded to one of the two patterns shown above.\n\n### RawExtension\n\nRawExtensions (as in [`runtime.RawExtension`](/docs/reference//kubernetes-api/workload-resources/controller-revision-v1#RawExtension))\nholds complete Kubernetes objects, i.e. with `apiVersion` and `kind` fields.\n\nIt is possible to specify those embedded objects (both completely without constraints or partially specified)\nby setting `x-kubernetes-embedded-resource: true`. For example:\n\n```yaml\ntype: object\nproperties:\nfoo:\nx-kubernetes-embedded-resource: true\nx-kubernetes-preserve-unknown-fields: true\n```\n\nHere, the field `foo` holds a complete object, e.g.:\n\n```yaml\nfoo:\napiVersion: v1\nkind: Pod\nspec:\n# ...\n```\n\nBecause `x-kubernetes-preserve-unknown-fields: true` is specified alongside, nothing is pruned.\nThe use of `x-kubernetes-preserve-unknown-fields: true` is optional though.\n\nWith `x-kubernetes-embedded-resource: true`, the `apiVersion`, `kind` and `metadata` are implicitly specified and validated.\n\n## Serving multiple versions of a CRD\n\nSee [Custom resource definition versioning](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/)\nfor more information about serving multiple versions of your\nCustomResourceDefinition and migrating your objects from one version to another.\n\n## Advanced topics\n\n### Finalizers\n\n*Finalizers* allow controllers to implement asynchronous pre-delete hooks.\nCustom objects support finalizers similar to built-in objects.\n\nYou can add a finalizer to a custom object like this:\n\n```yaml\napiVersion: \"stable.example.com/v1\"\nkind: CronTab\nmetadata:\nfinalizers:\n- stable.example.com/finalizer\n```\n\nIdentifiers of custom finalizers consist of a domain name, a forward slash and the name of\nthe finalizer. Any controller can add a finalizer to any object's list of finalizers.\n\nThe first delete request on an object with finalizers sets a value for the\n`metadata.deletionTimestamp` field but does not delete it. Once this value is set,\nentries in the `finalizers` list can only be removed. While any finalizers remain it is also\nimpossible to force the deletion of an object.\n\nWhen the `metadata.deletionTimestamp` field is set, controllers watching the object execute any\nfinalizers they handle and remove the finalizer from the list after they are done. It is the\nresponsibility of each controller to remove its finalizer from the list.\n\nThe value of `metadata.deletionGracePeriodSeconds` controls the interval between polling updates.\n\nOnce the list of finalizers is empty, meaning all finalizers have been executed, the resource is\ndeleted by Kubernetes.\n\n### Validation\n\nCustom resources are validated via\n[OpenAPI v3.0 schemas](https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schema-object),\nby x-kubernetes-validations when the [Validation Rules feature](#validation-rules) is enabled, and you\ncan add additional validation using\n[admission webhooks](/docs/reference/access-authn-authz/admission-controllers/#validatingadmissionwebhook).\n\nAdditionally, the following restrictions are applied to the schema:\n\n- These fields cannot be set:\n\n- `definitions`,\n- `dependencies`,\n- `deprecated`,\n- `discriminator`,\n- `id`,\n- `patternProperties`,\n- `readOnly`,\n- `writeOnly`,\n- `xml`,\n- `$ref`.\n\n- The field `uniqueItems` cannot be set to `true`.\n- The field `additionalProperties` cannot be set to `false`.\n- The field `additionalProperties` is mutually exclusive with `properties`.\n\nThe `x-kubernetes-validations` extension can be used to validate custom resources using\n[Common Expression Language (CEL)](https://github.com/google/cel-spec) expressions when the\n[Validation rules](#validation-rules) feature is enabled and the CustomResourceDefinition schema is a\n[structural schema](#specifying-a-structural-schema).\n\nRefer to the [structural schemas](#specifying-a-structural-schema) section for other\nrestrictions and CustomResourceDefinition features.\n\nThe schema is defined in the CustomResourceDefinition. In the following example, the\nCustomResourceDefinition applies the following validations on the custom object:\n\n- `spec.cronSpec` must be a string and must be of the form described by the regular expression.\n- `spec.replicas` must be an integer and must have a minimum value of 1 and a maximum value of 10.\n\nSave the CustomResourceDefinition to `resourcedefinition.yaml`:\n\n```yaml\napiVersion: apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\nname: crontabs.stable.example.com\nspec:\ngroup: stable.example.com\nversions:\n- name: v1\nserved: true\nstorage: true\nschema:\n# openAPIV3Schema is the schema for validating custom objects.\nopenAPIV3Schema:\ntype: object\nproperties:\nspec:\ntype: object\nproperties:\ncronSpec:\ntype: string\npattern: '^(\\d+|\\*)(/\\d+)?(\\s+(\\d+|\\*)(/\\d+)?){4}$'\nimage:\ntype: string\nreplicas:\ntype: integer\nminimum: 1\nmaximum: 10\nscope: Namespaced\nnames:\nplural: crontabs\nsingular: crontab\nkind: CronTab\nshortNames:\n- ct\n```\n\nand create it:\n\n```shell\nkubectl apply -f resourcedefinition.yaml\n```\n\nA request to create a custom object of kind CronTab is rejected if there are invalid values in its fields.\nIn the following example, the custom object contains fields with invalid values:\n\n- `spec.cronSpec` does not match the regular expression.\n- `spec.replicas` is greater than 10.\n\nIf you save the following YAML to `my-crontab.yaml`:\n\n```yaml\napiVersion: \"stable.example.com/v1\"\nkind: CronTab\nmetadata:\nname: my-new-cron-object\nspec:\ncronSpec: \"* * * *\"\nimage: my-awesome-cron-image\nreplicas: 15\n```\n\nand attempt to create it:\n\n```shell\nkubectl apply -f my-crontab.yaml\n```\n\nthen you get an error:\n\n```console\nThe CronTab \"my-new-cron-object\" is invalid: []: Invalid value: map[string]interface {}{\"apiVersion\":\"stable.example.com/v1\", \"kind\":\"CronTab\", \"metadata\":map[string]interface {}{\"name\":\"my-new-cron-object\", \"namespace\":\"default\", \"deletionTimestamp\":interface {}(nil), \"deletionGracePeriodSeconds\":(*int64)(nil), \"creationTimestamp\":\"2017-09-05T05:20:07Z\", \"uid\":\"e14d79e7-91f9-11e7-a598-f0761cb232d1\", \"clusterName\":\"\"}, \"spec\":map[string]interface {}{\"cronSpec\":\"* * * *\", \"image\":\"my-awesome-cron-image\", \"replicas\":15}}:\nvalidation failure list:\nspec.cronSpec in body should match '^(\\d+|\\*)(/\\d+)?(\\s+(\\d+|\\*)(/\\d+)?){4}$'\nspec.replicas in body should be less than or equal to 10\n```\n\nIf the fields contain valid values, the object creation request is accepted.\n\nSave the following YAML to `my-crontab.yaml`:\n\n```yaml\napiVersion: \"stable.example.com/v1\"\nkind: CronTab\nmetadata:\nname: my-new-cron-object\nspec:\ncronSpec: \"* * * * */5\"\nimage: my-awesome-cron-image\nreplicas: 5\n```\n\nAnd create it:\n\n```shell\nkubectl apply -f my-crontab.yaml\ncrontab \"my-new-cron-object\" created\n```\n### Validation ratcheting\n\nIf you are using a version of Kubernetes older than v1.30, you need to explicitly\nenable the `CRDValidationRatcheting`\n[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to\nuse this behavior, which then applies to all CustomResourceDefinitions in your\ncluster.\n\nProvided you enabled the feature gate, Kubernetes implements _validation ratcheting_\nfor CustomResourceDefinitions. The API server is willing to accept updates to resources that\nare not valid after the update, provided that each part of the resource that failed to validate\nwas not changed by the update operation. In other words, any invalid part of the resource\nthat remains invalid must have already been wrong.\nYou cannot use this mechanism to update a valid resource so that it becomes invalid.\n\nThis feature allows authors of CRDs to confidently add new validations to the\nOpenAPIV3 schema under certain conditions. Users can update to the new schema\nsafely without bumping the version of the object or breaking workflows.\n\nWhile most validations placed in the OpenAPIV3 schema of a CRD support\nratcheting, there are a few exceptions. The following OpenAPIV3 schema\nvalidations are not supported by ratcheting under the implementation in Kubernetes\nand if violated will continue to throw an error as normally:\n\n- Quantors\n- `allOf`\n- `oneOf`\n- `anyOf`\n- `not`\n- any validations in a descendent of one of these fields\n- `x-kubernetes-validations`\nFor Kubernetes 1.28, CRD [validation rules](#validation-rules) are ignored by\nratcheting. Starting with Alpha 2 in Kubernetes 1.29, `x-kubernetes-validations`\nare ratcheted only if they do not refer to `oldSelf`.\n\nTransition Rules are never ratcheted: only errors raised by rules that do not\nuse `oldSelf` will be automatically ratcheted if their values are unchanged.\n\nTo write custom ratcheting logic for CEL expressions, check out [optionalOldSelf](#field-optional-oldself).\n- `x-kubernetes-list-type`\nErrors arising from changing the list type of a subschema will not be\nratcheted. For example adding `set` onto a list with duplicates will always\nresult in an error.\n- `x-kubernetes-list-map-keys`\nErrors arising from changing the map keys of a list schema will not be\nratcheted.\n- `required`\nErrors arising from changing the list of required fields will not be ratcheted.\n- `properties`\nAdding/removing/modifying the names of properties is not ratcheted, but\nchanges to validations in each properties' schemas and subschemas may be ratcheted\nif the name of the property stays the same.\n- `additionalProperties`\nTo remove a previously specified `additionalProperties` validation will not be\nratcheted.\n- `metadata`\nErrors that come from Kubernetes' built-in validation of an object's `metadata`\nare not ratcheted (such as object name, or characters in a label value).\nIf you specify your own additional rules for the metadata of a custom resource,\nthat additional validation will be ratcheted.\n\n### Validation rules\n\nValidation rules use the [Common Expression Language (CEL)](https://github.com/google/cel-spec)\nto validate custom resource values. Validation rules are included in\nCustomResourceDefinition schemas using the `x-kubernetes-validations` extension.\n\nThe Rule is scoped to the location of the `x-kubernetes-validations` extension in the schema.\nAnd `self` variable in the CEL expression is bound to the scoped value.\n\nAll validation rules are scoped to the current object: no cross-object or stateful validation\nrules are supported.\n\nFor example:\n\n```yaml\n# ...\nopenAPIV3Schema:\ntype: object\nproperties:\nspec:\ntype: object\nx-kubernetes-validations:\n- rule: \"self.minReplicas :1:6: found no matching overload for '_==_' applied to '(int, bool)'\n```\n\n- `no_such_field`: does not contain the desired field.\n\nFor example, a rule like `self.nonExistingField > 0` against a non-existing field will return\nthe following error:\n\n```none\nInvalid value: apiextensions.ValidationRule{Rule:\"self.nonExistingField > 0\", Message:\"\"}: compilation failed: ERROR: \\ :1:5: undefined field 'nonExistingField'\n```\n\n- `invalid argument`: invalid argument to macros.\n\nFor example, a rule like `has(self)` will return error:\n\n```none\nInvalid value: apiextensions.ValidationRule{Rule:\"has(self)\", Message:\"\"}: compilation failed: ERROR: :1:4: invalid argument to has() macro\n```\n\nValidation Rules Examples:\n\n| Rule | Purpose |\n| ---------------- | ------------ |\n| `self.minReplicas !('MY_KEY' in self.map1) || self['MY_KEY'].matches('^[a-zA-Z]*$') | Validate the value of a map for a specific key, if it is in the map |\n| `self.envars.filter(e, e.name == 'MY_ENV').all(e, e.value.matches('^[a-zA-Z]*$')` | Validate the 'value' field of a listMap entry where key field 'name' is 'MY_ENV' |\n| `has(self.expired) && self.created + self.ttl = self.spec.minReplicas\"\nproperties:\nspec:\ntype: object\nproperties:\nminReplicas:\ntype: integer\n# ...\nstatus:\ntype: object\nproperties:\navailableReplicas:\ntype: integer\n```\n\n- If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable\nvia `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as\nabsent fields in CEL expressions.\n\n```yaml\n# ...\nopenAPIV3Schema:\ntype: object\nproperties:\nspec:\ntype: object\nx-kubernetes-validations:\n- rule: \"has(self.foo)\"\nproperties:\n# ...\nfoo:\ntype: integer\n```\n\n- If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map\nare accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all\nentries of the map are accessible via CEL macros and functions such as `self.all(...)`.\n\n```yaml\n# ...\nopenAPIV3Schema:\ntype: object\nproperties:\nspec:\ntype: object\nx-kubernetes-validations:\n- rule: \"self['xyz'].foo > 0\"\nadditionalProperties:\n# ...\ntype: object\nproperties:\nfoo:\ntype: integer\n```\n\n- If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and\nalso by macros and functions.\n\n```yaml\n# ...\nopenAPIV3Schema:\ntype: object\nproperties:\n# ...\nfoo:\ntype: array\nx-kubernetes-validations:\n- rule: \"size(self) == 1\"\nitems:\ntype: string\n```\n\n- If the Rule is scoped to a scalar, `self` is bound to the scalar value.\n\n```yaml\n# ...\nopenAPIV3Schema:\ntype: object\nproperties:\nspec:\ntype: object\nproperties:\n# ...\nfoo:\ntype: integer\nx-kubernetes-validations:\n- rule: \"self > 0\"\n```\n\nExamples:\n\n|type of the field rule scoped to | Rule example |\n| -----------------------| -----------------------|\n| root object | `self.status.actual = 0 && value 0` |\n| x-prop | `self.x__dash__prop > 0` |\n| redact__d | `self.redact__underscores__d > 0` |\n| string | `self.startsWith('kube')` |\n\nEquality on arrays with `x-kubernetes-list-type` of `set` or `map` ignores element order,\ni.e., `[1, 2] == [2, 1]`. Concatenation on arrays with x-kubernetes-list-type use the semantics of\nthe list type:\n\n- `set`: `X + Y` performs a union where the array positions of all elements in `X` are preserved\nand non-intersecting elements in `Y` are appended, retaining their partial order.\n\n- `map`: `X + Y` performs a merge where the array positions of all keys in `X` are preserved but\nthe values are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements\nin `Y` with non-intersecting keys are appended, retaining their partial order.\n\nHere is the declarations type mapping between OpenAPIv3 and CEL type:\n\n| OpenAPIv3 type | CEL type |\n| -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| 'object' with Properties | object / \"message type\" |\n| 'object' with AdditionalProperties | map |\n| 'object' with x-kubernetes-embedded-type | object / \"message type\", 'apiVersion', 'kind', 'metadata.name' and 'metadata.generateName' are implicitly included in schema |\n| 'object' with x-kubernetes-preserve-unknown-fields | object / \"message type\", unknown fields are NOT accessible in CEL expression |\n| x-kubernetes-int-or-string | dynamic object that is either an int or a string, `type(value)` can be used to check the type |\n| 'array | list |\n| 'array' with x-kubernetes-list-type=map | list with map based Equality & unique key guarantees |\n| 'array' with x-kubernetes-list-type=set | list with set based Equality & unique entry guarantees |\n| 'boolean' | boolean |\n| 'number' (all formats) | double |\n| 'integer' (all formats) | int (64) |\n| 'null' | null_type |\n| 'string' | string |\n| 'string' with format=byte (base64 encoded) | bytes |\n| 'string' with format=date | timestamp (google.protobuf.Timestamp) |\n| 'string' with format=datetime | timestamp (google.protobuf.Timestamp) |\n| 'string' with format=duration | duration (google.protobuf.Duration) |\n\nxref: [CEL types](https://github.com/google/cel-spec/blob/v0.6.0/doc/langdef.md#values),\n[OpenAPI types](https://swagger.io/specification/#data-types),\n[Kubernetes Structural Schemas](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#specifying-a-structural-schema).\n\n#### The messageExpression field\n\nSimilar to the `message` field, which defines the string reported for a validation rule failure,\n`messageExpression` allows you to use a CEL expression to construct the message string.\nThis allows you to insert more descriptive information into the validation failure message.\n`messageExpression` must evaluate a string and may use the same variables that are available to the `rule`\nfield. For example:\n\n```yaml\nx-kubernetes-validations:\n- rule: \"self.x )` function to cast the scalar to a string\nlike shown in the above example.\n\n`messageExpression` must evaluate to a string, and this is checked while the CRD is being written. Note that it is possible\nto set `message` and `messageExpression` on the same rule, and if both are present, `messageExpression`\nwill be used. However, if `messageExpression` evaluates to an error, the string defined in `message`\nwill be used instead, and the `messageExpression` error will be logged. This fallback will also occur if\nthe CEL expression defined in `messageExpression` generates an empty string, or a string containing line\nbreaks.\n\nIf one of the above conditions are met and no `message` has been set, then the default validation failure\nmessage will be used instead.\n\n`messageExpression` is a CEL expression, so the restrictions listed in [Resource use by validation functions](#resource-use-by-validation-functions) apply. If evaluation halts due to resource constraints\nduring `messageExpression` execution, then no further validation rules will be executed.\n\nSetting `messageExpression` is optional.\n\n#### The `message` field {#field-message}\n\nIf you want to set a static message, you can supply `message` rather than `messageExpression`.\nThe value of `message` is used as an opaque error string if validation fails.\n\nSetting `message` is optional.\n\n#### The `reason` field {#field-reason}\n\nYou can add a machine-readable validation failure reason within a `validation`, to be returned\nwhenever a request fails this validation rule.\n\nFor example:\n\n```yaml\nx-kubernetes-validations:\n- rule: \"self.x self.foo == \"foo\" || (oldSelf.hasValue() && oldSelf.value().foo != \"foo\") | Ratcheted rule. Once a value is set to \"foo\", it must stay foo. But if it existed before the \"foo\" constraint was introduced, it may use any value |\n| [oldSelf.orValue(\"\"), self].all(x, [\"OldCase1\", \"OldCase2\"].exists(case, x == case)) || [\"NewCase1\", \"NewCase2\"].exists(case, self == case) || [\"NewCase\"].has(self) | \"Ratcheted validation for removed enum cases if oldSelf used them\" |\n| oldSelf.optMap(o, o.size()).orValue(0) = 4 | Ratcheted validation of newly increased minimum map or list size |\n\n#### Validation functions {#available-validation-functions}\n\nFunctions available include:\n\n- CEL standard functions, defined in the [list of standard definitions](https://github.com/google/cel-spec/blob/v0.7.0/doc/langdef.md#list-of-standard-definitions)\n- CEL standard [macros](https://github.com/google/cel-spec/blob/v0.7.0/doc/langdef.md#macros)\n- CEL [extended string function library](https://pkg.go.dev/github.com/google/cel-go@v0.11.2/ext#Strings)\n- Kubernetes [CEL extension library](https://pkg.go.dev/k8s.io/apiextensions-apiserver@v0.24.0/pkg/apiserver/schema/cel/library#pkg-functions)\n\n#### Transition rules\n\nA rule that contains an expression referencing the identifier `oldSelf` is implicitly considered a\n_transition rule_. Transition rules allow schema authors to prevent certain transitions between two\notherwise valid states. For example:\n\n```yaml\ntype: string\nenum: [\"low\", \"medium\", \"high\"]\nx-kubernetes-validations:\n- rule: \"!(self == 'high' && oldSelf == 'low') && !(self == 'low' && oldSelf == 'high')\"\nmessage: cannot transition directly between 'low' and 'high'\n```\n\nUnlike other rules, transition rules apply only to operations meeting the following criteria:\n\n- The operation updates an existing object. Transition rules never apply to create operations.\n\n- Both an old and a new value exist. It remains possible to check if a value has been added or\nremoved by placing a transition rule on the parent node. Transition rules are never applied to\ncustom resource creation. When placed on an optional field, a transition rule will not apply to\nupdate operations that set or unset the field.\n\n- The path to the schema node being validated by a transition rule must resolve to a node that is\ncomparable between the old object and the new object. For example, list items and their\ndescendants (`spec.foo[10].bar`) can't necessarily be correlated between an existing object and a\nlater update to the same object.\n\nErrors will be generated on CRD writes if a schema node contains a transition rule that can never be\napplied, e.g. \"oldSelf cannot be used on the uncorrelatable portion of the schema within *path*\".\n\nTransition rules are only allowed on _correlatable portions_ of a schema.\nA portion of the schema is correlatable if all `array` parent schemas are of type `x-kubernetes-list-type=map`;\nany `set`or `atomic`array parent schemas make it impossible to unambiguously correlate a `self` with `oldSelf`.\n\nHere are some examples for transition rules:\n\n| Use Case | Rule\n| -------- | --------\n| Immutability | `self.foo == oldSelf.foo`\n| Prevent modification/removal once assigned | `oldSelf != 'bar' \\|\\| self == 'bar'` or `!has(oldSelf.field) \\|\\| has(self.field)`\n| Append-only set | `self.all(element, element in oldSelf)`\n| If previous value was X, new value can only be A or B, not Y or Z | `oldSelf != 'X' \\|\\| self in ['A', 'B']`\n| Monotonic (non-decreasing) counters | `self >= oldSelf`\n\n#### Resource use by validation functions\n\nWhen you create or update a CustomResourceDefinition that uses validation rules,\nthe API server checks the likely impact of running those validation rules. If a rule is\nestimated to be prohibitively expensive to execute, the API server rejects the create\nor update operation, and returns an error message.\nA similar system is used at runtime that observes the actions the interpreter takes. If the interpreter executes\ntoo many instructions, execution of the rule will be halted, and an error will result.\nEach CustomResourceDefinition is also allowed a certain amount of resources to finish executing all of\nits validation rules. If the sum total of its rules are estimated at creation time to go over that limit,\nthen a validation error will also occur.\n\nYou are unlikely to encounter issues with the resource budget for validation if you only\nspecify rules that always take the same amount of time regardless of how large their input is.\nFor example, a rule that asserts that `self.foo == 1` does not by itself have any\nrisk of rejection on validation resource budget groups.\nBut if `foo` is a string and you define a validation rule `self.foo.contains(\"someString\")`, that rule takes\nlonger to execute depending on how long `foo` is.\nAnother example would be if `foo` were an array, and you specified a validation rule `self.foo.all(x, x > 5)`.\nThe cost system always assumes the worst-case scenario if a limit on the length of `foo` is not\ngiven, and this will happen for anything that can be iterated over (lists, maps, etc.).\n\nBecause of this, it is considered best practice to put a limit via `maxItems`, `maxProperties`, and\n`maxLength` for anything that will be processed in a validation rule in order to prevent validation\nerrors during cost estimation. For example, given this schema with one rule:\n\n```yaml\nopenAPIV3Schema:\ntype: object\nproperties:\nfoo:\ntype: array\nitems:\ntype: string\nx-kubernetes-validations:\n- rule: \"self.all(x, x.contains('a string'))\"\n```\n\nthen the API server rejects this rule on validation budget grounds with error:\n\n```\nspec.validation.openAPIV3Schema.properties[spec].properties[foo].x-kubernetes-validations[0].rule: Forbidden:\nCEL rule exceeded budget by more than 100x (try simplifying the rule, or adding maxItems, maxProperties, and\nmaxLength where arrays, maps, and strings are used)\n```\n\nThe rejection happens because `self.all` implies calling `contains()` on every string in `foo`,\nwhich in turn will check the given string to see if it contains `'a string'`. Without limits, this\nis a very expensive rule.\n\nIf you do not specify any validation limit, the estimated cost of this rule will exceed the\nper-rule cost limit. But if you add limits in the appropriate places, the rule will be allowed:\n\n```yaml\nopenAPIV3Schema:\ntype: object\nproperties:\nfoo:\ntype: array\nmaxItems: 25\nitems:\ntype: string\nmaxLength: 10\nx-kubernetes-validations:\n- rule: \"self.all(x, x.contains('a string'))\"\n```\n\nThe cost estimation system takes into account how many times the rule will be executed in addition to the\nestimated cost of the rule itself. For instance, the following rule will have the same estimated cost as the\nprevious example (despite the rule now being defined on the individual array items):\n\n```yaml\nopenAPIV3Schema:\ntype: object\nproperties:\nfoo:\ntype: array\nmaxItems: 25\nitems:\ntype: string\nx-kubernetes-validations:\n- rule: \"self.contains('a string'))\"\nmaxLength: 10\n```\n\nIf a list inside of a list has a validation rule that uses `self.all`, that is significantly more expensive\nthan a non-nested list with the same rule. A rule that would have been allowed on a non-nested list might need\nlower limits set on both nested lists in order to be allowed. For example, even without having limits set,\nthe following rule is allowed:\n\n```yaml\nopenAPIV3Schema:\ntype: object\nproperties:\nfoo:\ntype: array\nitems:\ntype: integer\nx-kubernetes-validations:\n- rule: \"self.all(x, x == 5)\"\n```\n\nBut the same rule on the following schema (with a nested array added) produces a validation error:\n\n```yaml\nopenAPIV3Schema:\ntype: object\nproperties:\nfoo:\ntype: array\nitems:\ntype: array\nitems:\ntype: integer\nx-kubernetes-validations:\n- rule: \"self.all(x, x == 5)\"\n```\n\nThis is because each item of `foo` is itself an array, and each subarray in turn calls `self.all`.\nAvoid nested lists and maps if possible where validation rules are used.\n\n### Defaulting\n\nTo use defaulting, your CustomResourceDefinition must use API version `apiextensions.k8s.io/v1`.\n\nDefaulting allows you to specify default values in the [OpenAPI v3 validation schema](#validation):\n\n```yaml\napiVersion: apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\nname: crontabs.stable.example.com\nspec:\ngroup: stable.example.com\nversions:\n- name: v1\nserved: true\nstorage: true\nschema:\n# openAPIV3Schema is the schema for validating custom objects.\nopenAPIV3Schema:\ntype: object\nproperties:\nspec:\ntype: object\nproperties:\ncronSpec:\ntype: string\npattern: '^(\\d+|\\*)(/\\d+)?(\\s+(\\d+|\\*)(/\\d+)?){4}$'\ndefault: \"5 0 * * *\"\nimage:\ntype: string\nreplicas:\ntype: integer\nminimum: 1\nmaximum: 10\ndefault: 1\nscope: Namespaced\nnames:\nplural: crontabs\nsingular: crontab\nkind: CronTab\nshortNames:\n- ct\n```\n\nWith this both `cronSpec` and `replicas` are defaulted:\n\n```yaml\napiVersion: \"stable.example.com/v1\"\nkind: CronTab\nmetadata:\nname: my-new-cron-object\nspec:\nimage: my-awesome-cron-image\n```\n\nleads to\n\n```yaml\napiVersion: \"stable.example.com/v1\"\nkind: CronTab\nmetadata:\nname: my-new-cron-object\nspec:\ncronSpec: \"5 0 * * *\"\nimage: my-awesome-cron-image\nreplicas: 1\n```\n\nDefaulting happens on the object\n\n* in the request to the API server using the request version defaults,\n* when reading from etcd using the storage version defaults,\n* after mutating admission plugins with non-empty patches using the admission webhook object version defaults.\n\nDefaults applied when reading data from etcd are not automatically written back to etcd.\nAn update request via the API is required to persist those defaults back into etcd.\n\nDefault values for non-leaf fields must be pruned (with the exception of defaults for `metadata` fields) and must\nvalidate against a provided schema. For example in the above example, a default of `{\"replicas\": \"foo\", \"badger\": 1}`\nfor the `spec` field would be invalid, because `badger` is an unknown field, and `replicas` is not a string.\n\nDefault values for `metadata` fields of `x-kubernetes-embedded-resources: true` nodes (or parts of\na default value covering `metadata`) are not pruned during CustomResourceDefinition creation, but\nthrough the pruning step during handling of requests.\n\n#### Defaulting and Nullable\n\nNull values for fields that either don't specify the nullable flag, or give it a\n`false` value, will be pruned before defaulting happens. If a default is present, it will be\napplied. When nullable is `true`, null values will be conserved and won't be defaulted.\n\nFor example, given the OpenAPI schema below:\n\n```yaml\ntype: object\nproperties:\nspec:\ntype: object\nproperties:\nfoo:\ntype: string\nnullable: false\ndefault: \"default\"\nbar:\ntype: string\nnullable: true\nbaz:\ntype: string\n```\n\ncreating an object with null values for `foo` and `bar` and `baz`\n\n```yaml\nspec:\nfoo: null\nbar: null\nbaz: null\n```\n\nleads to\n\n```yaml\nspec:\nfoo: \"default\"\nbar: null\n```\n\nwith `foo` pruned and defaulted because the field is non-nullable, `bar` maintaining the null\nvalue due to `nullable: true`, and `baz` pruned because the field is non-nullable and has no\ndefault.\n\n### Publish Validation Schema in OpenAPI\n\nCustomResourceDefinition [OpenAPI v3 validation schemas](#validation) which are\n[structural](#specifying-a-structural-schema) and [enable pruning](#field-pruning) are published\nas [OpenAPI v3](/docs/concepts/overview/kubernetes-api/#openapi-and-swagger-definitions) and\nOpenAPI v2 from Kubernetes API server. It is recommended to use the OpenAPI v3 document\nas it is a lossless representation of the CustomResourceDefinition OpenAPI v3 validation schema\nwhile OpenAPI v2 represents a lossy conversion.\n\nThe [kubectl](/docs/reference/kubectl/) command-line tool consumes the published schema to perform\nclient-side validation (`kubectl create` and `kubectl apply`), schema explanation (`kubectl explain`)\non custom resources. The published schema can be consumed for other purposes as well, like client generation or documentation.\n\n#### Compatibility with OpenAPI V2\n\nFor compatibility with OpenAPI V2, the OpenAPI v3 validation schema performs a lossy conversion\nto the OpenAPI v2 schema. The schema show up in `definitions` and `paths` fields in the\n[OpenAPI v2 spec](/docs/concepts/overview/kubernetes-api/#openapi-and-swagger-definitions).\n\nThe following modifications are applied during the conversion to keep backwards compatibility with\nkubectl in previous 1.13 version. These modifications prevent kubectl from being over-strict and rejecting\nvalid OpenAPI schemas that it doesn't understand. The conversion won't modify the validation schema defined in CRD,\nand therefore won't affect [validation](#validation) in the API server.\n\n1. The following fields are removed as they aren't supported by OpenAPI v2.\n\n- The fields `allOf`, `anyOf`, `oneOf` and `not` are removed\n\n2. If `nullable: true` is set, we drop `type`, `nullable`, `items` and `properties` because OpenAPI v2 is\nnot able to express nullable. To avoid kubectl to reject good objects, this is necessary.\n\n### Additional printer columns\n\nThe kubectl tool relies on server-side output formatting. Your cluster's API server decides which\ncolumns are shown by the `kubectl get` command. You can customize these columns for a\nCustomResourceDefinition. The following example adds the `Spec`, `Replicas`, and `Age`\ncolumns.\n\nSave the CustomResourceDefinition to `resourcedefinition.yaml`:\n\n```yaml\napiVersion: apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\nname: crontabs.stable.example.com\nspec:\ngroup: stable.example.com\nscope: Namespaced\nnames:\nplural: crontabs\nsingular: crontab\nkind: CronTab\nshortNames:\n- ct\nversions:\n- name: v1\nserved: true\nstorage: true\nschema:\nopenAPIV3Schema:\ntype: object\nproperties:\nspec:\ntype: object\nproperties:\ncronSpec:\ntype: string\nimage:\ntype: string\nreplicas:\ntype: integer\nadditionalPrinterColumns:\n- name: Spec\ntype: string\ndescription: The cron spec defining the interval a CronJob is run\njsonPath: .spec.cronSpec\n- name: Replicas\ntype: integer\ndescription: The number of jobs launched by the CronJob\njsonPath: .spec.replicas\n- name: Age\ntype: date\njsonPath: .metadata.creationTimestamp\n```\n\nCreate the CustomResourceDefinition:\n\n```shell\nkubectl apply -f resourcedefinition.yaml\n```\n\nCreate an instance using the `my-crontab.yaml` from the previous section.\n\nInvoke the server-side printing:\n\n```shell\nkubectl get crontab my-new-cron-object\n```\n\nNotice the `NAME`, `SPEC`, `REPLICAS`, and `AGE` columns in the output:\n\n```\nNAME SPEC REPLICAS AGE\nmy-new-cron-object * * * * * 1 7s\n```\n\nThe `NAME` column is implicit and does not need to be defined in the CustomResourceDefinition.\n\n#### Priority\n\nEach column includes a `priority` field. Currently, the priority\ndifferentiates between columns shown in standard view or wide view (using the `-o wide` flag).\n\n- Columns with priority `0` are shown in standard view.\n- Columns with priority greater than `0` are shown only in wide view.\n\n#### Type\n\nA column's `type` field can be any of the following (compare\n[OpenAPI v3 data types](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#dataTypes)):\n\n- `integer` – non-floating-point numbers\n- `number` – floating point numbers\n- `string` – strings\n- `boolean` – `true` or `false`\n- `date` – rendered differentially as time since this timestamp.\n\nIf the value inside a CustomResource does not match the type specified for the column,\nthe value is omitted. Use CustomResource validation to ensure that the value\ntypes are correct.\n\n#### Format\n\nA column's `format` field can be any of the following:\n\n- `int32`\n- `int64`\n- `float`\n- `double`\n- `byte`\n- `date`\n- `date-time`\n- `password`\n\nThe column's `format` controls the style used when `kubectl` prints the value.\n\n### Field selectors\n\n[Field Selectors](/docs/concepts/overview/working-with-objects/field-selectors/)\nlet clients select custom resources based on the value of one or more resource\nfields.\n\nAll custom resources support the `metadata.name` and `metadata.namespace` field\nselectors.\n\nFields declared in a CustomResourceDefinition\nmay also be used with field selectors when included in the `spec.versions[*].selectableFields` field of the\nCustomResourceDefinition.\n\n#### Selectable fields for custom resources {#crd-selectable-fields}\n\nThe `spec.versions[*].selectableFields` field of a CustomResourceDefinition may be used to\ndeclare which other fields in a custom resource may be used in field selectors\nwith the feature of `CustomResourceFieldSelectors`\n[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) (This feature gate is enabled by default since Kubernetes v1.31).\nThe following example adds the `.spec.color` and `.spec.size` fields as\nselectable fields.\n\nSave the CustomResourceDefinition to `shirt-resource-definition.yaml`:\n\nCreate the CustomResourceDefinition:\n\n```shell\nkubectl apply -f https://k8s.io/examples/customresourcedefinition/shirt-resource-definition.yaml\n```\n\nDefine some Shirts by editing `shirt-resources.yaml`; for example:\n\nCreate the custom resources:\n\n```shell\nkubectl apply -f https://k8s.io/examples/customresourcedefinition/shirt-resources.yaml\n```\n\nGet all the resources:\n\n```shell\nkubectl get shirts.stable.example.com\n```\n\nThe output is:\n\n```\nNAME COLOR SIZE\nexample1 blue S\nexample2 blue M\nexample3 green M\n```\n\nFetch blue shirts (retrieve Shirts with a `color` of `blue`):\n\n```shell\nkubectl get shirts.stable.example.com --field-selector spec.color=blue\n```\n\nShould output:\n\n```\nNAME COLOR SIZE\nexample1 blue S\nexample2 blue M\n```\n\nGet only resources with a `color` of `green` and a `size` of `M`:\n\n```shell\nkubectl get shirts.stable.example.com --field-selector spec.color=green,spec.size=M\n```\n\nShould output:\n\n```\nNAME COLOR SIZE\nexample3 green M\n```\n\n### Subresources\n\nCustom resources support `/status` and `/scale` subresources.\n\nThe status and scale subresources can be optionally enabled by\ndefining them in the CustomResourceDefinition.\n\n#### Status subresource\n\nWhen the status subresource is enabled, the `/status` subresource for the custom resource is exposed.\n\n- The status and the spec stanzas are represented by the `.status` and `.spec` JSONPaths\nrespectively inside of a custom resource.\n- `PUT` requests to the `/status` subresource take a custom resource object and ignore changes to\nanything except the status stanza.\n- `PUT` requests to the `/status` subresource only validate the status stanza of the custom\nresource.\n- `PUT`/`POST`/`PATCH` requests to the custom resource ignore changes to the status stanza.\n- The `.metadata.generation` value is incremented for all changes, except for changes to\n`.metadata` or `.status`.\n- Only the following constructs are allowed at the root of the CRD OpenAPI validation schema:\n\n- `description`\n- `example`\n- `exclusiveMaximum`\n- `exclusiveMinimum`\n- `externalDocs`\n- `format`\n- `items`\n- `maximum`\n- `maxItems`\n- `maxLength`\n- `minimum`\n- `minItems`\n- `minLength`\n- `multipleOf`\n- `pattern`\n- `properties`\n- `required`\n- `title`\n- `type`\n- `uniqueItems`\n\n#### Scale subresource\n\nWhen the scale subresource is enabled, the `/scale` subresource for the custom resource is exposed.\nThe `autoscaling/v1.Scale` object is sent as the payload for `/scale`.\n\nTo enable the scale subresource, the following fields are defined in the CustomResourceDefinition.\n\n- `specReplicasPath` defines the JSONPath inside of a custom resource that corresponds to `scale.spec.replicas`.\n\n- It is a required value.\n- Only JSONPaths under `.spec` and with the dot notation are allowed.\n- If there is no value under the `specReplicasPath` in the custom resource,\nthe `/scale` subresource will return an error on GET.\n\n- `statusReplicasPath` defines the JSONPath inside of a custom resource that corresponds to `scale.status.replicas`.\n\n- It is a required value.\n- Only JSONPaths under `.status` and with the dot notation are allowed.\n- If there is no value under the `statusReplicasPath` in the custom resource,\nthe status replica value in the `/scale` subresource will default to 0.\n\n- `labelSelectorPath` defines the JSONPath inside of a custom resource that corresponds to\n`Scale.Status.Selector`.\n\n- It is an optional value.\n- It must be set to work with HPA and VPA.\n- Only JSONPaths under `.status` or `.spec` and with the dot notation are allowed.\n- If there is no value under the `labelSelectorPath` in the custom resource,\nthe status selector value in the `/scale` subresource will default to the empty string.\n- The field pointed by this JSON path must be a string field (not a complex selector struct)\nwhich contains a serialized label selector in string form.\n\nIn the following example, both status and scale subresources are enabled.\n\nSave the CustomResourceDefinition to `resourcedefinition.yaml`:\n\n```yaml\napiVersion: apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\nname: crontabs.stable.example.com\nspec:\ngroup: stable.example.com\nversions:\n- name: v1\nserved: true\nstorage: true\nschema:\nopenAPIV3Schema:\ntype: object\nproperties:\nspec:\ntype: object\nproperties:\ncronSpec:\ntype: string\nimage:\ntype: string\nreplicas:\ntype: integer\nstatus:\ntype: object\nproperties:\nreplicas:\ntype: integer\nlabelSelector:\ntype: string\n# subresources describes the subresources for custom resources.\nsubresources:\n# status enables the status subresource.\nstatus: {}\n# scale enables the scale subresource.\nscale:\n# specReplicasPath defines the JSONPath inside of a custom resource that corresponds to Scale.Spec.Replicas.\nspecReplicasPath: .spec.replicas\n# statusReplicasPath defines the JSONPath inside of a custom resource that corresponds to Scale.Status.Replicas.\nstatusReplicasPath: .status.replicas\n# labelSelectorPath defines the JSONPath inside of a custom resource that corresponds to Scale.Status.Selector.\nlabelSelectorPath: .status.labelSelector\nscope: Namespaced\nnames:\nplural: crontabs\nsingular: crontab\nkind: CronTab\nshortNames:\n- ct\n```\n\nAnd create it:\n\n```shell\nkubectl apply -f resourcedefinition.yaml\n```\n\nAfter the CustomResourceDefinition object has been created, you can create custom objects.\n\nIf you save the following YAML to `my-crontab.yaml`:\n\n```yaml\napiVersion: \"stable.example.com/v1\"\nkind: CronTab\nmetadata:\nname: my-new-cron-object\nspec:\ncronSpec: \"* * * * */5\"\nimage: my-awesome-cron-image\nreplicas: 3\n```\n\nand create it:\n\n```shell\nkubectl apply -f my-crontab.yaml\n```\n\nThen new namespaced RESTful API endpoints are created at:\n\n```none\n/apis/stable.example.com/v1/namespaces/*/crontabs/status\n```\n\nand\n\n```none\n/apis/stable.example.com/v1/namespaces/*/crontabs/scale\n```\n\nA custom resource can be scaled using the `kubectl scale` command.\nFor example, the following command sets `.spec.replicas` of the\ncustom resource created above to 5:\n\n```shell\nkubectl scale --replicas=5 crontabs/my-new-cron-object\ncrontabs \"my-new-cron-object\" scaled\n\nkubectl get crontabs my-new-cron-object -o jsonpath='{.spec.replicas}'\n5\n```\n\nYou can use a [PodDisruptionBudget](/docs/tasks/run-application/configure-pdb/) to protect custom\nresources that have the scale subresource enabled.\n\n### Categories\n\nCategories is a list of grouped resources the custom resource belongs to (eg. `all`).\nYou can use `kubectl get ` to list the resources belonging to the category.\n\nThe following example adds `all` in the list of categories in the CustomResourceDefinition\nand illustrates how to output the custom resource using `kubectl get all`.\n\nSave the following CustomResourceDefinition to `resourcedefinition.yaml`:\n\n```yaml\napiVersion: apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\nname: crontabs.stable.example.com\nspec:\ngroup: stable.example.com\nversions:\n- name: v1\nserved: true\nstorage: true\nschema:\nopenAPIV3Schema:\ntype: object\nproperties:\nspec:\ntype: object\nproperties:\ncronSpec:\ntype: string\nimage:\ntype: string\nreplicas:\ntype: integer\nscope: Namespaced\nnames:\nplural: crontabs\nsingular: crontab\nkind: CronTab\nshortNames:\n- ct\n# categories is a list of grouped resources the custom resource belongs to.\ncategories:\n- all\n```\n\nand create it:\n\n```shell\nkubectl apply -f resourcedefinition.yaml\n```\n\nAfter the CustomResourceDefinition object has been created, you can create custom objects.\n\nSave the following YAML to `my-crontab.yaml`:\n\n```yaml\napiVersion: \"stable.example.com/v1\"\nkind: CronTab\nmetadata:\nname: my-new-cron-object\nspec:\ncronSpec: \"* * * * */5\"\nimage: my-awesome-cron-image\n```\n\nand create it:\n\n```shell\nkubectl apply -f my-crontab.yaml\n```\n\nYou can specify the category when using `kubectl get`:\n\n```shell\nkubectl get all\n```\n\nand it will include the custom resources of kind `CronTab`:\n\n```none\nNAME AGE\ncrontabs/my-new-cron-object 3s\n```\n\n##\n\n* Read about [custom resources](/docs/concepts/extend-kubernetes/api-extension/custom-resources/).\n\n* See [CustomResourceDefinition](/docs/reference/generated/kubernetes-api//#customresourcedefinition-v1-apiextensions-k8s-io).\n\n* Serve [multiple versions](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/) of a\nCustomResourceDefinition.", "source": "content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "In this example, you will run a Job in [Indexed completion mode](/blog/2021/04/19/introducing-indexed-jobs/)\nconfigured such that the pods created by the Job can communicate with each other using pod hostnames rather\nthan pod IP addresses.\n\nPods within a Job might need to communicate among themselves. The user workload running in each pod\ncould query the Kubernetes API server to learn the IPs of the other Pods, but it's much simpler to\nrely on Kubernetes' built-in DNS resolution.\n\nJobs in Indexed completion mode automatically set the pods' hostname to be in the format of\n`${jobName}-${completionIndex}`. You can use this format to deterministically build\npod hostnames and enable pod communication *without* needing to create a client connection to\nthe Kubernetes control plane to obtain pod hostnames/IPs via API requests.\n\nThis configuration is useful for use cases where pod networking is required but you don't want\nto depend on a network connection with the Kubernetes API server.\n\n##\n\nYou should already be familiar with the basic use of [Job](/docs/concepts/workloads/controllers/job/).\n\nIf you are using minikube or a similar tool, you may need to take\n[extra steps](https://minikube.sigs.k8s.io/docs/handbook/addons/ingress-dns/)\nto ensure you have DNS.\n\n## Starting a Job with pod-to-pod communication\n\nTo enable pod-to-pod communication using pod hostnames in a Job, you must do the following:\n\n1. Set up a [headless Service](/docs/concepts/services-networking/service/#headless-services)\nwith a valid label selector for the pods created by your Job. The headless service must be\nin the same namespace as the Job. One easy way to do this is to use the\n`job-name: ` selector, since the `job-name` label will be automatically added\nby Kubernetes. This configuration will trigger the DNS system to create records of the hostnames\nof the pods running your Job.\n\n1. Configure the headless service as subdomain service for the Job pods by including the following\nvalue in your Job template spec:\n\n```yaml\nsubdomain:\n```\n\n### Example\n\nBelow is a working example of a Job with pod-to-pod communication via pod hostnames enabled.\nThe Job is completed only after all pods successfully ping each other using hostnames.\n\nIn the Bash script executed on each pod in the example below, the pod hostnames can be prefixed\nby the namespace as well if the pod needs to be reached from outside the namespace.\n\n```yaml\napiVersion: v1\nkind: Service\nmetadata:\nname: headless-svc\nspec:\nclusterIP: None # clusterIP must be None to create a headless service\nselector:\njob-name: example-job # must match Job name\n---\napiVersion: batch/v1\nkind: Job\nmetadata:\nname: example-job\nspec:\ncompletions: 3\nparallelism: 3\ncompletionMode: Indexed\ntemplate:\nspec:\nsubdomain: headless-svc # has to match Service name\nrestartPolicy: Never\ncontainers:\n- name: example-workload\nimage: bash:latest\ncommand:\n- bash\n- -c\n- |\nfor i in 0 1 2\ndo\ngotStatus=\"-1\"\nwantStatus=\"0\"\nwhile [ $gotStatus -ne $wantStatus ]\ndo\nping -c 1 example-job-${i}.headless-svc > /dev/null 2>&1\ngotStatus=$?\nif [ $gotStatus -ne $wantStatus ]; then\necho \"Failed to ping pod example-job-${i}.headless-svc, retrying in 1 second...\"\nsleep 1\nfi\ndone\necho \"Successfully pinged pod: example-job-${i}.headless-svc\"\ndone\n```\n\nAfter applying the example above, reach each other over the network\nusing: ` . `. You should see output similar to the following:\n\n```shell\nkubectl logs example-job-0-qws42\n```\n\n```\nFailed to ping pod example-job-0.headless-svc, retrying in 1 second...\nSuccessfully pinged pod: example-job-0.headless-svc\nSuccessfully pinged pod: example-job-1.headless-svc\nSuccessfully pinged pod: example-job-2.headless-svc\n```\n\nKeep in mind that the ` . ` name format used\nin this example would not work with DNS policy set to `None` or `Default`.\nRefer to [Pod's DNS Policy](/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy).", "source": "content/en/docs/tasks/job/job-with-pod-to-pod-communication.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This task demonstrates running multiple Jobs\nbased on a common template. You can use this approach to process batches of work in\nparallel.\n\nFor this example there are only three items: _apple_, _banana_, and _cherry_.\nThe sample Jobs process each item by printing a string then pausing.\n\nSee [using Jobs in real workloads](#using-jobs-in-real-workloads) to learn about how\nthis pattern fits more realistic use cases.\n\n##\n\nYou should be familiar with the basic,\nnon-parallel, use of [Job](/docs/concepts/workloads/controllers/job/).\n\nFor basic templating you need the command-line utility `sed`.\n\nTo follow the advanced templating example, you need a working installation of\n[Python](https://www.python.org/), and the Jinja2 template\nlibrary for Python.\n\nOnce you have Python set up, you can install Jinja2 by running:\n\n```shell\npip install --user jinja2\n```\n\n## Create Jobs based on a template\n\nFirst, download the following template of a Job to a file called `job-tmpl.yaml`.\nHere's what you'll download:\n\n```shell\n# Use curl to download job-tmpl.yaml\ncurl -L -s -O https://k8s.io/examples/application/job/job-tmpl.yaml\n```\n\nThe file you downloaded is not yet a valid Kubernetes\nmanifest.\nInstead that template is a YAML representation of a Job object with some placeholders\nthat need to be filled in before it can be used. The `$ITEM` syntax is not meaningful to Kubernetes.\n\n### Create manifests from the template\n\nThe following shell snippet uses `sed` to replace the string `$ITEM` with the loop\nvariable, writing into a temporary directory named `jobs`. Run this now:\n\n```shell\n# Expand the template into multiple files, one for each item to be processed.\nmkdir ./jobs\nfor i in apple banana cherry\ndo\ncat job-tmpl.yaml | sed \"s/\\$ITEM/$i/\" > ./jobs/job-$i.yaml\ndone\n```\n\nCheck if it worked:\n\n```shell\nls jobs/\n```\n\nThe output is similar to this:\n\n```\njob-apple.yaml\njob-banana.yaml\njob-cherry.yaml\n```\n\nYou could use any type of template language (for example: Jinja2; ERB), or\nwrite a program to generate the Job manifests.\n\n### Create Jobs from the manifests\n\nNext, create all the Jobs with one kubectl command:\n\n```shell\nkubectl create -f ./jobs\n```\n\nThe output is similar to this:\n\n```\njob.batch/process-item-apple created\njob.batch/process-item-banana created\njob.batch/process-item-cherry created\n```\n\nNow, check on the jobs:\n\n```shell\nkubectl get jobs -l jobgroup=jobexample\n```\n\nThe output is similar to this:\n\n```\nNAME COMPLETIONS DURATION AGE\nprocess-item-apple 1/1 14s 22s\nprocess-item-banana 1/1 12s 21s\nprocess-item-cherry 1/1 12s 20s\n```\n\nUsing the `-l` option to kubectl selects only the Jobs that are part\nof this group of jobs (there might be other unrelated jobs in the system).\n\nYou can check on the Pods as well using the same\nlabel selector:\n\n```shell\nkubectl get pods -l jobgroup=jobexample\n```\n\nThe output is similar to:\n\n```\nNAME READY STATUS RESTARTS AGE\nprocess-item-apple-kixwv 0/1 Completed 0 4m\nprocess-item-banana-wrsf7 0/1 Completed 0 4m\nprocess-item-cherry-dnfu9 0/1 Completed 0 4m\n```\n\nWe can use this single command to check on the output of all jobs at once:\n\n```shell\nkubectl logs -f -l jobgroup=jobexample\n```\n\nThe output should be:\n\n```\nProcessing item apple\nProcessing item banana\nProcessing item cherry\n```\n\n### Clean up {#cleanup-1}\n\n```shell\n# Remove the Jobs you created\n# Your cluster automatically cleans up their Pods\nkubectl delete job -l jobgroup=jobexample\n```\n\n## Use advanced template parameters\n\nIn the [first example](#create-jobs-based-on-a-template), each instance of the template had one\nparameter, and that parameter was also used in the Job's name. However,\n[names](/docs/concepts/overview/working-with-objects/names/#names) are restricted\nto contain only certain characters.\n\nThis slightly more complex example uses the\n[Jinja template language](https://palletsprojects.com/p/jinja/) to generate manifests\nand then objects from those manifests, with a multiple parameters for each Job.\n\nFor this part of the task, you are going to use a one-line Python script to\nconvert the template to a set of manifests.\n\nFirst, copy and paste the following template of a Job object, into a file called `job.yaml.jinja2`:\n\n```liquid\n{% set params = [{ \"name\": \"apple\", \"url\": \"http://dbpedia.org/resource/Apple\", },\n{ \"name\": \"banana\", \"url\": \"http://dbpedia.org/resource/Banana\", },\n{ \"name\": \"cherry\", \"url\": \"http://dbpedia.org/resource/Cherry\" }]\n%}\n{% for p in params %}\n{% set name = p[\"name\"] %}\n{% set url = p[\"url\"] %}\n---\napiVersion: batch/v1\nkind: Job\nmetadata:\nname: jobexample-{{ name }}\nlabels:\njobgroup: jobexample\nspec:\ntemplate:\nmetadata:\nname: jobexample\nlabels:\njobgroup: jobexample\nspec:\ncontainers:\n- name: c\nimage: busybox:1.28\ncommand: [\"sh\", \"-c\", \"echo Processing URL {{ url }} && sleep 5\"]\nrestartPolicy: Never\n{% endfor %}\n```\n\nThe above template defines two parameters for each Job object using a list of\npython dicts (lines 1-4). A `for` loop emits one Job manifest for each\nset of parameters (remaining lines).\n\nThis example relies on a feature of YAML. One YAML file can contain multiple\ndocuments (Kubernetes manifests, in this case), separated by `---` on a line\nby itself.\nYou can pipe the output directly to `kubectl` to create the Jobs.\n\nNext, use this one-line Python program to expand the template:\n\n```shell\nalias render_template='python -c \"from jinja2 import Template; import sys; print(Template(sys.stdin.read()).render());\"'\n```\n\nUse `render_template` to convert the parameters and template into a single\nYAML file containing Kubernetes manifests:\n\n```shell\n# This requires the alias you defined earlier\ncat job.yaml.jinja2 | render_template > jobs.yaml\n```\n\nYou can view `jobs.yaml` to verify that the `render_template` script worked\ncorrectly.\n\nOnce you are happy that `render_template` is working how you intend,\nyou can pipe its output into `kubectl`:\n\n```shell\ncat job.yaml.jinja2 | render_template | kubectl apply -f -\n```\n\nKubernetes accepts and runs the Jobs you created.\n\n### Clean up {#cleanup-2}\n\n```shell\n# Remove the Jobs you created\n# Your cluster automatically cleans up their Pods\nkubectl delete job -l jobgroup=jobexample\n```\n\n## Using Jobs in real workloads\n\nIn a real use case, each Job performs some substantial computation, such as rendering a frame\nof a movie, or processing a range of rows in a database. If you were rendering a movie\nyou would set `$ITEM` to the frame number. If you were processing rows from a database\ntable, you would set `$ITEM` to represent the range of database rows to process.\n\nIn the task, you ran a command to collect the output from Pods by fetching\ntheir logs. In a real use case, each Pod for a Job writes its output to\ndurable storage before completing. You can use a PersistentVolume for each Job,\nor an external storage service. For example, if you are rendering frames for a movie,\nuse HTTP to `PUT` the rendered frame data to a URL, using a different URL for each\nframe.\n\n## Labels on Jobs and Pods\n\nAfter you create a Job, Kubernetes automatically adds additional\nlabels that\ndistinguish one Job's pods from another Job's pods.\n\nIn this example, each Job and its Pod template have a label:\n`jobgroup=jobexample`.\n\nKubernetes itself pays no attention to labels named `jobgroup`. Setting a label\nfor all the Jobs you create from a template makes it convenient to operate on all\nthose Jobs at once.\nIn the [first example](#create-jobs-based-on-a-template) you used a template to\ncreate several Jobs. The template ensures that each Pod also gets the same label, so\nyou can check on all Pods for these templated Jobs with a single command.\n\nThe label key `jobgroup` is not special or reserved.\nYou can pick your own labelling scheme.\nThere are [recommended labels](/docs/concepts/overview/working-with-objects/common-labels/#labels)\nthat you can use if you wish.\n\n## Alternatives\n\nIf you plan to create a large number of Job objects, you may find that:\n\n- Even using labels, managing so many Jobs is cumbersome.\n- If you create many Jobs in a batch, you might place high load\non the Kubernetes control plane. Alternatively, the Kubernetes API\nserver could rate limit you, temporarily rejecting your requests with a 429 status.\n- You are limited by a resource quota\non Jobs: the API server permanently rejects some of your requests\nwhen you create a great deal of work in one batch.\n\nThere are other [job patterns](/docs/concepts/workloads/controllers/job/#job-patterns)\nthat you can use to process large amounts of work without creating very many Job\nobjects.\n\nYou could also consider writing your own [controller](/docs/concepts/architecture/controller/)\nto manage Job objects automatically.", "source": "content/en/docs/tasks/job/parallel-processing-expansion.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This document shows you how to use the\n[Pod failure policy](/docs/concepts/workloads/controllers/job#pod-failure-policy),\nin combination with the default\n[Pod backoff failure policy](/docs/concepts/workloads/controllers/job#pod-backoff-failure-policy),\nto improve the control over the handling of container- or Pod-level failure\nwithin a Job.\n\nThe definition of Pod failure policy may help you to:\n* better utilize the computational resources by avoiding unnecessary Pod retries.\n* avoid Job failures due to Pod disruptions (such preemption,\nAPI-initiated eviction\nor taint-based eviction).\n\n##\n\nYou should already be familiar with the basic use of [Job](/docs/concepts/workloads/controllers/job/).\n\n## Usage scenarios\n\nConsider the following usage scenarios for Jobs that define a Pod failure policy :\n- [Avoiding unnecessary Pod retries](#pod-failure-policy-failjob)\n- [Ignoring Pod disruptions](#pod-failure-policy-ignore)\n- [Avoiding unnecessary Pod retries based on custom Pod Conditions](#pod-failure-policy-config-issue)\n- [Avoiding unnecessary Pod retries per index](#backoff-limit-per-index-failindex)\n\n### Using Pod failure policy to avoid unnecessary Pod retries {#pod-failure-policy-failjob}\n\nWith the following example, you can learn how to use Pod failure policy to\navoid unnecessary Pod restarts when a Pod failure indicates a non-retriable\nsoftware bug.\n\n1. Examine the following manifest:\n\n1. Apply the manifest:\n\n```sh\nkubectl create -f https://k8s.io/examples/controllers/job-pod-failure-policy-failjob.yaml\n```\n\n1. After around 30 seconds the entire Job should be terminated. Inspect the status of the Job by running:\n\n```sh\nkubectl get jobs -l job-name=job-pod-failure-policy-failjob -o yaml\n```\n\nIn the Job status, the following conditions display:\n- `FailureTarget` condition: has a `reason` field set to `PodFailurePolicy` and\na `message` field with more information about the termination, like\n`Container main for pod default/job-pod-failure-policy-failjob-8ckj8 failed with exit code 42 matching FailJob rule at index 0`.\nThe Job controller adds this condition as soon as the Job is considered a failure.\nFor details, see [Termination of Job Pods](/docs/concepts/workloads/controllers/job/#termination-of-job-pods).\n- `Failed` condition: same `reason` and `message` as the `FailureTarget`\ncondition. The Job controller adds this condition after all of the Job's Pods\nare terminated.\n\nFor comparison, if the Pod failure policy were disabled, the Job would\nretry until reaching the `backoffLimit` (6 failures). Because retries\nuse exponential backoff and, with `parallelism: 2`, failures occur in\npairs, the delay between attempts increases with each retry. As a result,\nthis example would take at least 9 minutes before the Job fails.\n\n#### Clean up\n\nDelete the Job you created:\n\n```sh\nkubectl delete jobs/job-pod-failure-policy-failjob\n```\n\nThe cluster automatically cleans up the Pods.\n\n### Using Pod failure policy to ignore Pod disruptions {#pod-failure-policy-ignore}\n\nWith the following example, you can learn how to use Pod failure policy to\nignore Pod disruptions from incrementing the Pod retry counter towards the\n`.spec.backoffLimit` limit.\n\nTiming is important for this example, so you may want to read the steps before\nexecution. In order to trigger a Pod disruption it is important to drain the\nnode while the Pod is running on it (within 90s since the Pod is scheduled).\n\n1. Examine the following manifest:\n\n1. Apply the manifest:\n\n```sh\nkubectl create -f https://k8s.io/examples/controllers/job-pod-failure-policy-ignore.yaml\n```\n\n1. Run this command to check the `nodeName` the Pod is scheduled to:\n\n```sh\nnodeName=$(kubectl get pods -l job-name=job-pod-failure-policy-ignore -o jsonpath='{.items[0].spec.nodeName}')\n```\n\n1. Drain the node to evict the Pod before it completes (within 90s):\n\n```sh\nkubectl drain nodes/$nodeName --ignore-daemonsets --grace-period=0\n```\n\n1. Inspect the `.status.failed` to check the counter for the Job is not incremented:\n\n```sh\nkubectl get jobs -l job-name=job-pod-failure-policy-ignore -o yaml\n```\n\n1. Uncordon the node:\n\n```sh\nkubectl uncordon nodes/$nodeName\n```\n\nThe Job resumes and succeeds.\n\nFor comparison, if the Pod failure policy was disabled the Pod disruption would\nresult in terminating the entire Job (as the `.spec.backoffLimit` is set to 0).\n\n#### Cleaning up\n\nDelete the Job you created:\n\n```sh\nkubectl delete jobs/job-pod-failure-policy-ignore\n```\n\nThe cluster automatically cleans up the Pods.\n\n### Using Pod failure policy to avoid unnecessary Pod retries based on custom Pod Conditions {#pod-failure-policy-config-issue}\n\nWith the following example, you can learn how to use Pod failure policy to\navoid unnecessary Pod restarts based on custom Pod Conditions.\n\nThe example below works since version 1.27 as it relies on transitioning of\ndeleted pods, in the `Pending` phase, to a terminal phase\n(see: [Pod Phase](/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase)).\n\n1. Examine the following manifest:\n\n1. Apply the manifest:\n\n```sh\nkubectl create -f https://k8s.io/examples/controllers/job-pod-failure-policy-config-issue.yaml\n```\n\nNote that, the image is misconfigured, as it does not exist.\n\n1. Inspect the status of the job's Pods by running:\n\n```sh\nkubectl get pods -l job-name=job-pod-failure-policy-config-issue -o yaml\n```\n\nYou will see output similar to this:\n```yaml\ncontainerStatuses:\n- image: non-existing-repo/non-existing-image:example\n...\nstate:\nwaiting:\nmessage: Back-off pulling image \"non-existing-repo/non-existing-image:example\"\nreason: ImagePullBackOff\n...\nphase: Pending\n```\n\nNote that the pod remains in the `Pending` phase as it fails to pull the\nmisconfigured image. This, in principle, could be a transient issue and the\nimage could get pulled. However, in this case, the image does not exist so\nwe indicate this fact by a custom condition.\n\n1. Add the custom condition. First prepare the patch by running:\n\n```sh\ncat patch.yaml\nstatus:\nconditions:\n- type: ConfigIssue\nstatus: \"True\"\nreason: \"NonExistingImage\"\nlastTransitionTime: \"$(date -u +\"%Y-%m-%dT%H:%M:%SZ\")\"\nEOF\n```\nSecond, select one of the pods created by the job by running:\n```\npodName=$(kubectl get pods -l job-name=job-pod-failure-policy-config-issue -o jsonpath='{.items[0].metadata.name}')\n```\n\nThen, apply the patch on one of the pods by running the following command:\n\n```sh\nkubectl patch pod $podName --subresource=status --patch-file=patch.yaml\n```\n\nIf applied successfully, you will get a notification like this:\n\n```sh\npod/job-pod-failure-policy-config-issue-k6pvp patched\n```\n\n1. Delete the pod to transition it to `Failed` phase, by running the command:\n\n```sh\nkubectl delete pods/$podName\n```\n\n1. Inspect the status of the Job by running:\n\n```sh\nkubectl get jobs -l job-name=job-pod-failure-policy-config-issue -o yaml\n```\n\nIn the Job status, see a job `Failed` condition with the field `reason`\nequal `PodFailurePolicy`. Additionally, the `message` field contains a\nmore detailed information about the Job termination, such as:\n`Pod default/job-pod-failure-policy-config-issue-k6pvp has condition ConfigIssue matching FailJob rule at index 0`.\n\nIn a production environment, the steps 3 and 4 should be automated by a\nuser-provided controller.\n\n#### Cleaning up\n\nDelete the Job you created:\n\n```sh\nkubectl delete jobs/job-pod-failure-policy-config-issue\n```\n\nThe cluster automatically cleans up the Pods.\n\n### Using Pod Failure Policy to avoid unnecessary Pod retries per index {#backoff-limit-per-index-failindex}\n\nTo avoid unnecessary Pod restarts per index, you can use the _Pod failure policy_ and\n_backoff limit per index_ features. This section of the page shows how to use these features\ntogether.\n\n1. Examine the following manifest:\n\n1. Apply the manifest:\n\n```sh\nkubectl create -f https://k8s.io/examples/controllers/job-backoff-limit-per-index-failindex.yaml\n```\n\n1. After around 15 seconds, inspect the status of the Pods for the Job. You can do that by running:\n\n```shell\nkubectl get pods -l job-name=job-backoff-limit-per-index-failindex -o yaml\n```\n\nYou will see output similar to this:\n\n```none\nNAME READY STATUS RESTARTS AGE\njob-backoff-limit-per-index-failindex-0-4g4cm 0/1 Error 0 4s\njob-backoff-limit-per-index-failindex-0-fkdzq 0/1 Error 0 15s\njob-backoff-limit-per-index-failindex-1-2bgdj 0/1 Error 0 15s\njob-backoff-limit-per-index-failindex-2-vs6lt 0/1 Completed 0 11s\njob-backoff-limit-per-index-failindex-3-s7s47 0/1 Completed 0 6s\n```\n\nNote that the output shows the following:\n\n* Two Pods have index 0, because of the backoff limit allowed for one retry\nof the index.\n* Only one Pod has index 1, because the exit code of the failed Pod matched\nthe Pod failure policy with the `FailIndex` action.\n\n1. Inspect the status of the Job by running:\n\n```sh\nkubectl get jobs -l job-name=job-backoff-limit-per-index-failindex -o yaml\n```\n\nIn the Job status, see that the `failedIndexes` field shows \"0,1\", because\nboth indexes failed. Because the index 1 was not retried the number of failed\nPods, indicated by the status field \"failed\" equals 3.\n\n#### Cleaning up\n\nDelete the Job you created:\n\n```sh\nkubectl delete jobs/job-backoff-limit-per-index-failindex\n```\n\nThe cluster automatically cleans up the Pods.\n\n## Alternatives\n\nYou could rely solely on the\n[Pod backoff failure policy](/docs/concepts/workloads/controllers/job#pod-backoff-failure-policy),\nby specifying the Job's `.spec.backoffLimit` field. However, in many situations\nit is problematic to find a balance between setting a low value for `.spec.backoffLimit`\nto avoid unnecessary Pod retries, yet high enough to make sure the Job would\nnot be terminated by Pod disruptions.", "source": "content/en/docs/tasks/job/pod-failure-policy.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page demonstrates how to build a basic DaemonSet\nthat runs a Pod on every node in a Kubernetes cluster.\nIt covers a simple use case of mounting a file from the host, logging its contents using\nan [init container](/docs/concepts/workloads/pods/init-containers/), and utilizing a pause container.\n\n##\n\nA Kubernetes cluster with at least two nodes (one control plane node and one worker node)\nto demonstrate the behavior of DaemonSets.\n\n## Define the DaemonSet\n\nIn this task, a basic DaemonSet is created which ensures that the copy of a Pod is scheduled on every node.\nThe Pod will use an init container to read and log the contents of `/etc/machine-id` from the host,\nwhile the main container will be a `pause` container, which keeps the Pod running.\n\n1. Create a DaemonSet based on the (YAML) manifest:\n\n```shell\nkubectl apply -f https://k8s.io/examples/application/basic-daemonset.yaml\n```\n\n1. Once applied, you can verify that the DaemonSet is running a Pod on every node in the cluster:\n\n```shell\nkubectl get pods -o wide\n```\n\nThe output will list one Pod per node, similar to:\n\n```\nNAME READY STATUS RESTARTS AGE IP NODE\nexample-daemonset-xxxxx 1/1 Running 0 5m x.x.x.x node-1\nexample-daemonset-yyyyy 1/1 Running 0 5m x.x.x.x node-2\n```\n\n1. You can inspect the contents of the logged `/etc/machine-id` file by checking\nthe log directory mounted from the host:\n\n```shell\nkubectl exec -- cat /var/log/machine-id.log\n```\n\nWhere ` ` is the name of one of your Pods.\n\n##\n\nTo delete the DaemonSet, run this command:\n\n```shell\nkubectl delete --cascade=foreground --ignore-not-found --now daemonsets/example-daemonset\n```\n\nThis simple DaemonSet example introduces key components like init containers and host path volumes,\nwhich can be expanded upon for more advanced use cases. For more details refer to\n[DaemonSet](/docs/concepts/workloads/controllers/daemonset/).\n\n##\n\n* See [Performing a rolling update on a DaemonSet](/docs/tasks/manage-daemon/update-daemon-set/)\n* See [Creating a DaemonSet to adopt existing DaemonSet pods](/docs/concepts/workloads/controllers/daemonset/)", "source": "content/en/docs/tasks/manage-daemon/create-daemon-set.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This document shares how to extend the existing Service IP range assigned to a cluster.\n\n##\n\nWhile you can use this feature with an earlier version, the feature is only GA and officially supported since v1.33.\n\n## Extend Service IP Ranges\n\nThe control plane ensures that there is a special ServiceCIDR object, with\nthe well-known name `kubernetes`, that specifies an IP address range\nbased on the value of the `--service-cluster-ip-range` command line argument to kube-apiserver.\n\n```sh\nkubectl get servicecidr\n```\n\n```\nNAME CIDRS AGE\nkubernetes 10.96.0.0/28 17d\n```\n\nThe well-known `kubernetes` Service, that exposes the kube-apiserver endpoint to the Pods, calculates\nthe first IP address from the default ServiceCIDR range and uses that IP address as its\ncluster IP address.\n\n```sh\nkubectl get service kubernetes\n```\n\n```\nNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE\nkubernetes ClusterIP 10.96.0.1 443/TCP 17d\n```\n\nThe default Service, in this case, uses the ClusterIP 10.96.0.1, that has the corresponding IPAddress object.\n\n```sh\nkubectl get ipaddress 10.96.0.1\n```\n\n```\nNAME PARENTREF\n10.96.0.1 services/default/kubernetes\n```\n\nThe ServiceCIDRs are protected with finalizers,\nto avoid leaving Service ClusterIPs orphans; the finalizer is only removed if there is another subnet\nthat contains the existing IPAddresses or there are no IPAddresses belonging to the subnet.\n\n## Extend the number of available IPs for Services\n\nThere are cases that users will need to increase the number addresses available to Services,\npreviously, increasing the Service range was a disruptive operation that could also cause data loss.\nWith this new feature users only need to add a new ServiceCIDR to increase the number of available addresses.\n\n### Adding a new ServiceCIDR\n\nOn a cluster with a 10.96.0.0/28 range for Services, there is only 2^(32-28) - 2 = 14\nIP addresses available. The `kubernetes.default` Service is always created; for this example,\nthat leaves you with only 13 possible Services.\n\n```sh\nfor i in $(seq 1 13); do kubectl create service clusterip \"test-$i\" --tcp 80 -o json | jq -r .spec.clusterIP; done\n```\n\n```\n10.96.0.11\n10.96.0.5\n10.96.0.12\n10.96.0.13\n10.96.0.14\n10.96.0.2\n10.96.0.3\n10.96.0.4\n10.96.0.6\n10.96.0.7\n10.96.0.8\n10.96.0.9\nerror: failed to create ClusterIP service: Internal error occurred: failed to allocate a serviceIP: range is full\n```\n\nYou can increase the number of IP addresses available for Services, by creating a new ServiceCIDR\nthat extends or adds new IP address ranges.\n\n```sh\ncat <<EOF | kubectl apply -f -\napiVersion: networking.k8s.io/v1\nkind: ServiceCIDR\nmetadata:\nname: newcidr1\nspec:\ncidrs:\n- 10.96.0.0/24\nEOF\n```\n\n```\nservicecidr.networking.k8s.io/newcidr1 created\n```\n\nand this will allow you to create new Services with ClusterIPs that will be picked from this new range.\n\n```sh\nfor i in $(seq 13 16); do kubectl create service clusterip \"test-$i\" --tcp 80 -o json | jq -r .spec.clusterIP; done\n```\n\n```\n10.96.0.48\n10.96.0.200\n10.96.0.121\n10.96.0.144\n```\n\n### Deleting a ServiceCIDR\n\nYou cannot delete a ServiceCIDR if there are IPAddresses that depend on the ServiceCIDR.\n\n```sh\nkubectl delete servicecidr newcidr1\n```\n\n```\nservicecidr.networking.k8s.io \"newcidr1\" deleted\n```\n\nKubernetes uses a finalizer on the ServiceCIDR to track this dependent relationship.\n\n```sh\nkubectl get servicecidr newcidr1 -o yaml\n```\n\n```yaml\napiVersion: networking.k8s.io/v1\nkind: ServiceCIDR\nmetadata:\ncreationTimestamp: \"2023-10-12T15:11:07Z\"\ndeletionGracePeriodSeconds: 0\ndeletionTimestamp: \"2023-10-12T15:12:45Z\"\nfinalizers:\n- networking.k8s.io/service-cidr-finalizer\nname: newcidr1\nresourceVersion: \"1133\"\nuid: 5ffd8afe-c78f-4e60-ae76-cec448a8af40\nspec:\ncidrs:\n- 10.96.0.0/24\nstatus:\nconditions:\n- lastTransitionTime: \"2023-10-12T15:12:45Z\"\nmessage: There are still IPAddresses referencing the ServiceCIDR, please remove\nthem or create a new ServiceCIDR\nreason: OrphanIPAddress\nstatus: \"False\"\ntype: Ready\n```\n\nBy removing the Services containing the IP addresses that are blocking the deletion of the ServiceCIDR\n\n```sh\nfor i in $(seq 13 16); do kubectl delete service \"test-$i\" ; done\n```\n\n```\nservice \"test-13\" deleted\nservice \"test-14\" deleted\nservice \"test-15\" deleted\nservice \"test-16\" deleted\n```\n\nthe control plane notices the removal. The control plane then removes its finalizer,\nso that the ServiceCIDR that was pending deletion will actually be removed.\n\n```sh\nkubectl get servicecidr newcidr1\n```\n\n```\nError from server (NotFound): servicecidrs.networking.k8s.io \"newcidr1\" not found\n```\n\n## Kubernetes Service CIDR Policies\n\nCluster administrators can implement policies to control the creation and\nmodification of ServiceCIDR resources within the cluster. This allows for\ncentralized management of the IP address ranges used for Services and helps\nprevent unintended or conflicting configurations. Kubernetes provides mechanisms\nlike Validating Admission Policies to enforce these rules.\n\n### Preventing Unauthorized ServiceCIDR Creation/Update using Validating Admission Policy\n\nThere can be situations that the cluster administrators want to restrict the\nranges that can be allowed or to completely deny any changes to the cluster\nService IP ranges.\n\nThe default \"kubernetes\" ServiceCIDR is created by the kube-apiserver\nto provide consistency in the cluster and is required for the cluster to work,\nso it always must be allowed. You can ensure your `ValidatingAdmissionPolicy`\ndoesn't restrict the default ServiceCIDR by adding the clause:\n\n```yaml\nmatchConditions:\n- name: 'exclude-default-servicecidr'\nexpression: \"object.metadata.name != 'kubernetes'\"\n```\n\nas in the examples below.\n\n#### Restrict Service CIDR ranges to some specific ranges\n\nThe following is an example of a `ValidatingAdmissionPolicy` that only allows\nServiceCIDRs to be created if they are subranges of the given `allowed` ranges.\n(So the example policy would allow a ServiceCIDR with `cidrs: ['10.96.1.0/24']`\nor `cidrs: ['2001:db8:0:0:ffff::/80', '10.96.0.0/20']` but would not allow a\nServiceCIDR with `cidrs: ['172.20.0.0/16']`.) You can copy this policy and change\nthe value of `allowed` to something appropriate for you cluster.\n\nConsult the [CEL documentation](https://kubernetes.io/docs/reference/using-api/cel/)\nto learn more about CEL if you want to write your own validation `expression`.\n\n#### Restrict any usage of the ServiceCIDR API\n\nThe following example demonstrates how to use a `ValidatingAdmissionPolicy` and\nits binding to restrict the creation of any new Service CIDR ranges, excluding the default \"kubernetes\" ServiceCIDR:", "source": "content/en/docs/tasks/network/extend-service-ip-ranges.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Kubernetes provides a `certificates.k8s.io` API, which lets you provision TLS\ncertificates signed by a Certificate Authority (CA) that you control. These CAs\nand certificates can be used by your workloads to establish trust.\n\nThe `certificates.k8s.io` API uses a protocol that is similar to the [ACME\ndraft](https://github.com/ietf-wg-acme/acme/).\n\nCertificates created using the `certificates.k8s.io` API are signed by a\n[dedicated CA](#configuring-your-cluster-to-provide-signing). It is possible to configure your cluster to use the cluster root\nCA for this purpose, but you should never rely on this. Do not assume that\nthese certificates will validate against the cluster root CA.\n\n##\n\nYou need the `cfssl` tool. You can download `cfssl` from\n[https://github.com/cloudflare/cfssl/releases](https://github.com/cloudflare/cfssl/releases).\n\nSome steps in this page use the `jq` tool. If you don't have `jq`, you can\ninstall it via your operating system's software sources, or fetch it from\n[https://jqlang.github.io/jq/](https://jqlang.github.io/jq/).\n\n## Trusting TLS in a cluster\n\nTrusting the [custom CA](#configuring-your-cluster-to-provide-signing) from an application running as a pod usually requires\nsome extra application configuration. You will need to add the CA certificate\nbundle to the list of CA certificates that the TLS client or server trusts. For\nexample, you would do this with a Golang TLS config by parsing the certificate\nchain and adding the parsed certificates to the `RootCAs` field in the\n[`tls.Config`](https://pkg.go.dev/crypto/tls#Config) struct.\n\nEven though the custom CA certificate may be included in the filesystem (in the\nConfigMap `kube-root-ca.crt`),\nyou should not use that certificate authority for any purpose other than to verify internal\nKubernetes endpoints. An example of an internal Kubernetes endpoint is the\nService named `kubernetes` in the default namespace.\n\nIf you want to use a custom certificate authority for your workloads, you should generate\nthat CA separately, and distribute its CA certificate using a\n[ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap) that your pods\nhave access to read.\n\n## Requesting a certificate\n\nThe following section demonstrates how to create a TLS certificate for a\nKubernetes service accessed through DNS.\n\nThis tutorial uses CFSSL: Cloudflare's PKI and TLS toolkit See the Cloudflare blog\narticle [Introducing CFSSL - CloudFlare's PKI toolkit](https://blog.cloudflare.com/introducing-cfssl/) for more information.\n\n## Create a certificate signing request\n\nGenerate a private key and certificate signing request (or CSR) by running\nthe following command:\n\n```shell\ncat\nAnnotations:\nCreationTimestamp: Tue, 01 Feb 2022 11:49:15 -0500\nRequesting User: yourname@example.com\nSigner: example.com/serving\nStatus: Pending\nSubject:\nCommon Name: my-pod.my-namespace.pod.cluster.local\nSerial Number:\nSubject Alternative Names:\nDNS Names: my-pod.my-namespace.pod.cluster.local\nmy-svc.my-namespace.svc.cluster.local\nIP Addresses: 192.0.2.24\n10.0.34.2\nEvents:\n```\n\n## Get the CertificateSigningRequest approved {#get-the-certificate-signing-request-approved}\n\nApproving the [certificate signing request](/docs/reference/access-authn-authz/certificate-signing-requests/)\nis either done by an automated approval process or on a one-off basis by a cluster\nadministrator. If you're authorized to approve a certificate request, you can do that\nmanually using `kubectl`; for example:\n\n```shell\nkubectl certificate approve my-svc.my-namespace\n```\n\n```none\ncertificatesigningrequest.certificates.k8s.io/my-svc.my-namespace approved\n```\n\nYou should now see the following:\n\n```shell\nkubectl get csr\n```\n\n```none\nNAME AGE SIGNERNAME REQUESTOR REQUESTEDDURATION CONDITION\nmy-svc.my-namespace 10m example.com/serving yourname@example.com Approved\n```\n\nThis means the certificate request has been approved and is waiting for the\nrequested signer to sign it.\n\n## Sign the CertificateSigningRequest {#sign-the-certificate-signing-request}\n\nNext, you'll play the part of a certificate signer, issue the certificate, and upload it to the API.\n\nA signer would typically watch the CertificateSigningRequest API for objects with its `signerName`,\ncheck that they have been approved, sign certificates for those requests,\nand update the API object status with the issued certificate.\n\n### Create a Certificate Authority\n\nYou need an authority to provide the digital signature on the new certificate.\n\nFirst, create a signing certificate by running the following:\n\n```shell\ncat Approved,Issued\n```\n\n## Download the certificate and use it\n\nNow, as the requesting user, you can download the issued certificate\nand save it to a `server.crt` file by running the following:\n\n```shell\nkubectl get csr my-svc.my-namespace -o jsonpath='{.status.certificate}' \\\n| base64 --decode > server.crt\n```\n\nNow you can populate `server.crt` and `server-key.pem` in a\nSecret\nthat you could later mount into a Pod (for example, to use with a webserver\nthat serves HTTPS).\n\n```shell\nkubectl create secret tls server --cert server.crt --key server-key.pem\n```\n\n```none\nsecret/server created\n```\n\nFinally, you can store `ca.pem` in a ConfigMap\nand use it as the trust root to verify the serving certificate:\n\n```shell\nkubectl create configmap example-serving-ca --from-file ca.crt=ca.pem\n```\n\n```none\nconfigmap/example-serving-ca created\n```\n\n## Approving CertificateSigningRequests {#approving-certificate-signing-requests}\n\nA Kubernetes administrator (with appropriate permissions) can manually approve\n(or deny) CertificateSigningRequests by using the `kubectl certificate\napprove` and `kubectl certificate deny` commands. However if you intend\nto make heavy usage of this API, you might consider writing an automated\ncertificates controller.\n\nThe ability to approve CSRs decides who trusts whom within your environment. The\nability to approve CSRs should not be granted broadly or lightly.\n\nYou should make sure that you confidently understand both the verification requirements\nthat fall on the approver **and** the repercussions of issuing a specific certificate\nbefore you grant the `approve` permission.\n\nWhether the approver is a machine or a human using kubectl as above, the role of the _approver_ is\nto verify that the CSR satisfies two requirements:\n\n1. The subject of the CSR controls the private key used to sign the CSR. This\naddresses the threat of a third party masquerading as an authorized subject.\nIn the above example, this step would be to verify that the pod controls the\nprivate key used to generate the CSR.\n2. The subject of the CSR is authorized to act in the requested context. This\naddresses the threat of an undesired subject joining the cluster. In the\nabove example, this step would be to verify that the pod is allowed to\nparticipate in the requested service.\n\nIf and only if these two requirements are met, the approver should approve\nthe CSR and otherwise should deny the CSR.\n\nFor more information on certificate approval and access control, read\nthe [Certificate Signing Requests](/docs/reference/access-authn-authz/certificate-signing-requests/)\nreference page.\n\n## Configuring your cluster to provide signing\n\nThis page assumes that a signer is set up to serve the certificates API. The\nKubernetes controller manager provides a default implementation of a signer. To\nenable it, pass the `--cluster-signing-cert-file` and\n`--cluster-signing-key-file` parameters to the controller manager with paths to\nyour Certificate Authority's keypair.", "source": "content/en/docs/tasks/tls/managing-tls-in-a-cluster.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "A plugin for Kubernetes command-line tool `kubectl`, which allows you to convert manifests between different API\nversions. This can be particularly helpful to migrate manifests to a non-deprecated api version with newer Kubernetes release.\nFor more info, visit [migrate to non deprecated apis](/docs/reference/using-api/deprecation-guide/#migrate-to-non-deprecated-apis)", "source": "content/en/docs/tasks/tools/included/kubectl-convert-overview.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "##\n\n* Learn about Kubernetes Pods.\n* Learn about Kubernetes Nodes.\n* Troubleshoot deployed applications.\n\n##\n\nThe shell commands in this tutorial use POSIX shell syntax, which is supported by\nthe default shells on most Linux and macOS systems (for example, bash, zsh, or sh).\nWindows users must use a POSIX-compatible shell such as\n[Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install)\nor [Git Bash](https://gitforwindows.org/) to run the commands as written.\nCommands that use `export`, `$()`, and similar constructs are **not** compatible\nwith PowerShell or the Windows Command Prompt.\n\n## Kubernetes Pods\n\n_A Pod is a group of one or more application containers (such as Docker) and includes\nshared storage (volumes), IP address and information about how to run them._\n\nWhen you created a Deployment in [Module 2](/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro/),\nKubernetes created a **Pod** to host your application instance. A Pod is a Kubernetes\nabstraction that represents a group of one or more application containers (such as Docker),\nand some shared resources for those containers. Those resources include:\n\n* Shared storage, as Volumes\n* Networking, as a unique cluster IP address\n* Information about how to run each container, such as the container image version\nor specific ports to use\n\nA Pod models an application-specific \"logical host\" and can contain different application\ncontainers which are relatively tightly coupled. For example, a Pod might include\nboth the container with your Node.js app as well as a different container that feeds\nthe data to be published by the Node.js webserver. The containers in a Pod share an\nIP Address and port space, are always co-located and co-scheduled, and run in a shared\ncontext on the same Node.\n\nPods are the atomic unit on the Kubernetes platform. When we create a Deployment\non Kubernetes, that Deployment creates Pods with containers inside them (as opposed\nto creating containers directly). Each Pod is tied to the Node where it is scheduled,\nand remains there until termination (according to restart policy) or deletion. In\ncase of a Node failure, identical Pods are scheduled on other available Nodes in\nthe cluster.\n\n### Pods overview\n\n_Containers should only be scheduled together in a single Pod if they are tightly\ncoupled and need to share resources such as disk._\n\n## Nodes\n\nA Pod always runs on a **Node**. A Node is a worker machine in Kubernetes and may\nbe either a virtual or a physical machine, depending on the cluster. Each Node is\nmanaged by the control plane. A Node can have multiple pods, and the Kubernetes\ncontrol plane automatically handles scheduling the pods across the Nodes in the\ncluster. The control plane's automatic scheduling takes into account the available\nresources on each Node.\n\nEvery Kubernetes Node runs at least:\n\n* Kubelet, a process responsible for communication between the Kubernetes control\nplane and the Node; it manages the Pods and the containers running on a machine.\n\n* A container runtime (like containerd) responsible for pulling the container image\nfrom a registry, unpacking the container, and running the application.\n\n### Nodes overview\n\n## Troubleshooting with kubectl\n\nIn [Module 2](/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro/), you used\nthe kubectl command-line interface. You'll continue to use it in Module 3 to get\ninformation about deployed applications and their environments. The most common\noperations can be done with the following kubectl subcommands:\n\n* `kubectl get` - list resources\n* `kubectl describe` - show detailed information about a resource\n* `kubectl logs` - print the logs from a container in a pod\n* `kubectl exec` - execute a command on a container in a pod\n\nYou can use these commands to see when applications were deployed, what their current\nstatuses are, where they are running and what their configurations are.\n\nNow that we know more about our cluster components and the command line, let's\nexplore our application.\n\n### Check application configuration\n\nLet's verify that the application we deployed in the previous scenario is running.\nWe'll use the `kubectl get` command and look for existing Pods:\n\n```shell\nkubectl get pods\n```\n\nIf no pods are running, please wait a couple of seconds and list the Pods again.\nYou can continue once you see one Pod running.\n\nNext, to view what containers are inside that Pod and what images are used to build\nthose containers we run the `kubectl describe pods` command:\n\n```shell\nkubectl describe pods\n```\n\nWe see here details about the Pod’s container: IP address, the ports used and a\nlist of events related to the lifecycle of the Pod.\n\nThe output of the `describe` subcommand is extensive and covers some concepts that\nwe didn’t explain yet, but don’t worry, they will become familiar by the end of this tutorial.\n\nThe `describe` subcommand can be used to get detailed information about most of the\nKubernetes primitives, including Nodes, Pods, and Deployments. The describe output is\ndesigned to be human readable, not to be scripted against.\n\n### Show the app in the terminal\n\nRecall that Pods are running in an isolated, private network - so we need to proxy access\nto them so we can debug and interact with them. To do this, we'll use the `kubectl proxy`\ncommand to run a proxy in a **second terminal**. Open a new terminal window, and\nin that new terminal, run:\n\n```shell\nkubectl proxy\n```\n\nNow again, we'll get the Pod name and query that pod directly through the proxy.\nTo get the Pod name and store it in the `POD_NAME` environment variable:\n\n```shell\nexport POD_NAME=\"$(kubectl get pods -o go-template --template '{{range .items}}{{.metadata.name}}{{\"\\n\"}}{{end}}')\"\necho Name of the Pod: $POD_NAME\n```\n\nTo see the output of our application, run a `curl` request:\n\n```shell\ncurl http://localhost:8001/api/v1/namespaces/default/pods/$POD_NAME:8080/proxy/\n```\n\nThe URL is the route to the API of the Pod.\n\nWe don't need to specify the container name, because we only have one container inside the pod.\n\n### Executing commands on the container\n\nWe can execute commands directly on the container once the Pod is up and running.\nFor this, we use the `exec` subcommand and use the name of the Pod as a parameter.\nLet’s list the environment variables:\n\n```shell\nkubectl exec \"$POD_NAME\" -- env\n```\n\nAgain, it's worth mentioning that the name of the container itself can be omitted\nsince we only have a single container in the Pod.\n\nNext let’s start a bash session in the Pod’s container:\n\n```shell\nkubectl exec -ti $POD_NAME -- bash\n```\n\nWe have now an open console on the container where we run our NodeJS application.\nThe source code of the app is in the `server.js` file:\n\n```shell\ncat server.js\n```\n\nYou can check that the application is up by running a curl command:\n\n```shell\ncurl http://localhost:8080\n```\n\nHere we used `localhost` because we executed the command inside the NodeJS Pod.\nIf you cannot connect to `localhost:8080`, check to make sure you have run the\n`kubectl exec` command and are launching the command from within the Pod.\n\nTo close your container connection, type `exit`.\n\n##\n\n* Tutorial\n[Using A Service To Expose Your App](/docs/tutorials/kubernetes-basics/expose/expose-intro/).\n* Learn more about [Pods](/docs/concepts/workloads/pods/).\n* Learn more about [Nodes](/docs/concepts/architecture/nodes/).", "source": "content/en/docs/tutorials/kubernetes-basics/explore/explore-intro.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "##\n\n* Learn about a Service in Kubernetes.\n* Understand how labels and selectors relate to a Service.\n* Expose an application outside a Kubernetes cluster.\n\n##\n\nThe shell commands in this tutorial use POSIX shell syntax, which is supported by\nthe default shells on most Linux and macOS systems (for example, bash, zsh, or sh).\nWindows users must use a POSIX-compatible shell such as\n[Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install)\nor [Git Bash](https://gitforwindows.org/) to run the commands as written.\nCommands that use `export`, `$()`, and similar constructs are **not** compatible\nwith PowerShell or the Windows Command Prompt.\n\n## Overview of Kubernetes Services\n\nKubernetes [Pods](/docs/concepts/workloads/pods/) are mortal. Pods have a\n[lifecycle](/docs/concepts/workloads/pods/pod-lifecycle/). When a worker node dies,\nthe Pods running on the Node are also lost. A [Replicaset](/docs/concepts/workloads/controllers/replicaset/)\nmight then dynamically drive the cluster back to the desired state via the creation\nof new Pods to keep your application running. As another example, consider an image-processing\nbackend with 3 replicas. Those replicas are exchangeable; the front-end system should\nnot care about backend replicas or even if a Pod is lost and recreated. That said,\neach Pod in a Kubernetes cluster has a unique IP address, even Pods on the same Node,\nso there needs to be a way of automatically reconciling changes among Pods so that your\napplications continue to function.\n\n_A Kubernetes Service is an abstraction layer which defines a logical set of Pods and\nenables external traffic exposure, load balancing and service discovery for those Pods._\n\nA [Service](/docs/concepts/services-networking/service/) in Kubernetes is an abstraction\nwhich defines a logical set of Pods and a policy by which to access them. Services\nenable a loose coupling between dependent Pods. A Service is defined using YAML or JSON,\nlike all Kubernetes object manifests. The set of Pods targeted by a Service is usually\ndetermined by a _label selector_ (see below for why you might want a Service without\nincluding a `selector` in the spec).\n\nAlthough each Pod has a unique IP address, those IPs are not exposed outside the\ncluster without a Service. Services allow your applications to receive traffic.\nServices can be exposed in different ways by specifying a `type` in the `spec` of the Service:\n\n* _ClusterIP_ (default) - Exposes the Service on an internal IP in the cluster. This\ntype makes the Service only reachable from within the cluster.\n\n* _NodePort_ - Exposes the Service on the same port of each selected Node in the cluster using NAT.\nMakes a Service accessible from outside the cluster using `NodeIP:NodePort`. Superset of ClusterIP.\n\n* _LoadBalancer_ - Creates an external load balancer in the current cloud (if supported)\nand assigns a fixed, external IP to the Service. Superset of NodePort.\n\n* _ExternalName_ - Maps the Service to the contents of the `externalName` field\n(e.g. `foo.bar.example.com`), by returning a `CNAME` record with its value.\nNo proxying of any kind is set up.\n\nMore information about the different types of Services can be found in the\n[Using Source IP](/docs/tutorials/services/source-ip/) tutorial. Also see\n[Connecting Applications with Services](/docs/tutorials/services/connect-applications-service/).\n\nAdditionally, note that there are some use cases with Services that involve not defining\na `selector` in the spec. A Service created without `selector` will also not create\nthe corresponding Endpoints object. This allows users to manually map a Service to\nspecific endpoints. Another possibility why there may be no selector is you are strictly\nusing `type: ExternalName`.\n\n## Services and Labels\n\nA Service routes traffic across a set of Pods. Services are the abstraction that allows\npods to die and replicate in Kubernetes without impacting your application. Discovery\nand routing among dependent Pods (such as the frontend and backend components in an application)\nare handled by Kubernetes Services.\n\nServices match a set of Pods using\n[labels and selectors](/docs/concepts/overview/working-with-objects/labels), a grouping\nprimitive that allows logical operation on objects in Kubernetes. Labels are key/value\npairs attached to objects and can be used in any number of ways:\n\n* Designate objects for development, test, and production\n* Embed version tags\n* Classify an object using tags\n\nLabels can be attached to objects at creation time or later on. They can be modified\nat any time. Let's expose our application now using a Service and apply some labels.\n\n### Step 1: Creating a new Service\n\nLet’s verify that our application is running. We’ll use the `kubectl get` command\nand look for existing Pods:\n\n```shell\nkubectl get pods\n```\n\nIf no Pods are running then it means the objects from the previous tutorials were\ncleaned up. In this case, go back and recreate the deployment from the\n[Using kubectl to create a Deployment](/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro#deploy-an-app)\ntutorial. Please wait a couple of seconds and list the Pods again. You can continue\nonce you see the one Pod running.\n\nNext, let’s list the current Services from our cluster:\n\n```shell\nkubectl get services\n```\n\nTo expose the deployment to external traffic, we'll use the kubectl expose command with the --type=NodePort option:\n\n```shell\nkubectl expose deployment/kubernetes-bootcamp --type=\"NodePort\" --port 8080\n```\n\nWe have now a running Service called kubernetes-bootcamp. Here we see that the Service\nreceived a unique cluster-IP, an internal port and an external-IP (the IP of the Node).\n\nTo find out what port was opened externally (for the `type: NodePort` Service) we’ll\nrun the `describe service` subcommand:\n\n```shell\nkubectl describe services/kubernetes-bootcamp\n```\n\nCreate an environment variable called `NODE_PORT` that has the value of the Node\nport assigned:\n\n```shell\nexport NODE_PORT=\"$(kubectl get services/kubernetes-bootcamp -o go-template='{{(index .spec.ports 0).nodePort}}')\"\necho \"NODE_PORT=$NODE_PORT\"\n```\n\nNow we can test that the app is exposed outside of the cluster using `curl`, the\nIP address of the Node and the externally exposed port:\n\n```shell\ncurl http://\"$(minikube ip):$NODE_PORT\"\n```\n\nIf you're running minikube with Docker Desktop as the container driver, a minikube\ntunnel is needed. This is because containers inside Docker Desktop are isolated\nfrom your host computer.\n\nIn a separate terminal window, execute:\n\n```shell\nminikube service kubernetes-bootcamp --url\n```\n\nThe output looks like this:\n\n```\nhttp://127.0.0.1:51082\n! Because you are using a Docker driver on darwin, the terminal needs to be open to run it.\n```\n\nThen use the given URL to access the app:\n\n```shell\ncurl 127.0.0.1:51082\n```\n\nAnd we get a response from the server. The Service is exposed.\n\n### Step 2: Using labels\n\nThe Deployment created automatically a label for our Pod. With the `describe deployment`\nsubcommand you can see the name (the _key_) of that label:\n\n```shell\nkubectl describe deployment\n```\n\nLet’s use this label to query our list of Pods. We’ll use the `kubectl get pods`\ncommand with `-l` as a parameter, followed by the label values:\n\n```shell\nkubectl get pods -l app=kubernetes-bootcamp\n```\nYou can do the same to list the existing Services:\n\n```shell\nkubectl get services -l app=kubernetes-bootcamp\n```\n\nGet the name of the Pod and store it in the POD_NAME environment variable:\n\n```shell\nexport POD_NAME=\"$(kubectl get pods -o go-template --template '{{range .items}}{{.metadata.name}}{{\"\\n\"}}{{end}}')\"\necho \"Name of the Pod: $POD_NAME\"\n```\n\nTo apply a new label we use the label subcommand followed by the object type,\nobject name and the new label:\n\n```shell\nkubectl label pods \"$POD_NAME\" version=v1\n```\n\nThis will apply a new label to our Pod (we pinned the application version to the Pod),\nand we can check it with the `describe pod` command:\n\n```shell\nkubectl describe pods \"$POD_NAME\"\n```\n\nWe see here that the label is attached now to our Pod. And we can query now the\nlist of pods using the new label:\n\n```shell\nkubectl get pods -l version=v1\n```\nAnd we see the Pod.\n\n### Step 3: Deleting a service\n\nTo delete Services you can use the `delete service` subcommand. Labels can be used\nalso here:\n\n```shell\nkubectl delete service -l app=kubernetes-bootcamp\n```\n\nConfirm that the Service is gone:\n\n```shell\nkubectl get services\n```\n\nThis confirms that our Service was removed. To confirm that route is not exposed\nanymore you can `curl` the previously exposed IP and port:\n\n```shell\ncurl http://\"$(minikube ip):$NODE_PORT\"\n```\n\nThis proves that the application is not reachable anymore from outside of the cluster.\nYou can confirm that the app is still running with a `curl` from inside the pod:\n\n```shell\nkubectl exec -ti $POD_NAME -- curl http://localhost:8080\n```\n\nWe see here that the application is up. This is because the Deployment is managing\nthe application. To shut down the application, you would need to delete the Deployment\nas well.\n\n##\n\n* Tutorial\n[Running Multiple Instances of Your App](/docs/tutorials/kubernetes-basics/scale/scale-intro/).\n* Learn more about [Service](/docs/concepts/services-networking/service/).", "source": "content/en/docs/tutorials/kubernetes-basics/expose/expose-intro.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "Seccomp stands for secure computing mode and has been a feature of the Linux\nkernel since version 2.6.12. It can be used to sandbox the privileges of a\nprocess, restricting the calls it is able to make from userspace into the\nkernel. Kubernetes lets you automatically apply seccomp profiles loaded onto a\nnode to your Pods and containers.\n\nIdentifying the privileges required for your workloads can be difficult. In this\ntutorial, you will go through how to load seccomp profiles into a local\nKubernetes cluster, how to apply them to a Pod, and how you can begin to craft\nprofiles that give only the necessary privileges to your container processes.\n\n##\n\n* Learn how to load seccomp profiles on a node\n* Learn how to apply a seccomp profile to a container\n* Observe auditing of syscalls made by a container process\n* Observe behavior when a missing profile is specified\n* Observe a violation of a seccomp profile\n* Learn how to create fine-grained seccomp profiles\n* Learn how to apply a container runtime default seccomp profile\n\n##\n\nIn order to complete all steps in this tutorial, you must install\n[kind](/docs/tasks/tools/#kind) and [kubectl](/docs/tasks/tools/#kubectl).\n\nThe commands used in the tutorial assume that you are using\n[Docker](https://www.docker.com/) as your container runtime. (The cluster that `kind` creates may\nuse a different container runtime internally). You could also use\n[Podman](https://podman.io/) but in that case, you would have to follow specific\n[instructions](https://kind.sigs.k8s.io/docs/user/rootless/) in order to complete the tasks\nsuccessfully.\n\nThis tutorial shows some examples that are still beta (since v1.25) and\nothers that use only generally available seccomp functionality. You should\nmake sure that your cluster is\n[configured correctly](https://kind.sigs.k8s.io/docs/user/quick-start/#setting-kubernetes-version)\nfor the version you are using.\n\nThe tutorial also uses the `curl` tool for downloading examples to your computer.\nYou can adapt the steps to use a different tool if you prefer.\n\nIt is not possible to apply a seccomp profile to a container running with\n`privileged: true` set in the container's `securityContext`. Privileged containers always\nrun as `Unconfined`.\n\n## Download example seccomp profiles {#download-profiles}\n\nThe contents of these profiles will be explored later on, but for now go ahead\nand download them into a directory named `profiles/` so that they can be loaded\ninto the cluster.\n\nRun these commands:\n\n```shell\nmkdir ./profiles\ncurl -L -o profiles/audit.json https://k8s.io/examples/pods/security/seccomp/profiles/audit.json\ncurl -L -o profiles/violation.json https://k8s.io/examples/pods/security/seccomp/profiles/violation.json\ncurl -L -o profiles/fine-grained.json https://k8s.io/examples/pods/security/seccomp/profiles/fine-grained.json\nls profiles\n```\n\nYou should see three profiles listed at the end of the final step:\n```\naudit.json fine-grained.json violation.json\n```\n\n## Create a local Kubernetes cluster with kind\n\nFor simplicity, [kind](https://kind.sigs.k8s.io/) can be used to create a single\nnode cluster with the seccomp profiles loaded. Kind runs Kubernetes in Docker,\nso each node of the cluster is a container. This allows for files\nto be mounted in the filesystem of each container similar to loading files\nonto a node.\n\nDownload that example kind configuration, and save it to a file named `kind.yaml`:\n```shell\ncurl -L -O https://k8s.io/examples/pods/security/seccomp/kind.yaml\n```\n\nYou can set a specific Kubernetes version by setting the node's container image.\nSee [Nodes](https://kind.sigs.k8s.io/docs/user/configuration/#nodes) within the\nkind documentation about configuration for more details on this.\nThis tutorial assumes you are using Kubernetes .\n\nAs a beta feature, you can configure Kubernetes to use the profile that the\ncontainer runtime\nprefers by default, rather than falling back to `Unconfined`.\nIf you want to try that, see\n[enable the use of `RuntimeDefault` as the default seccomp profile for all workloads](#enable-the-use-of-runtimedefault-as-the-default-seccomp-profile-for-all-workloads)\nbefore you continue.\n\nOnce you have a kind configuration in place, create the kind cluster with\nthat configuration:\n\n```shell\nkind create cluster --config=kind.yaml\n```\n\nAfter the new Kubernetes cluster is ready, identify the Docker container running\nas the single node cluster:\n\n```shell\ndocker ps\n```\n\nYou should see output indicating that a container is running with name\n`kind-control-plane`. The output is similar to:\n\n```\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n6a96207fed4b kindest/node:v1.18.2 \"/usr/local/bin/entr…\" 27 seconds ago Up 24 seconds 127.0.0.1:42223->6443/tcp kind-control-plane\n```\n\nIf observing the filesystem of that container, you should see that the\n`profiles/` directory has been successfully loaded into the default seccomp path\nof the kubelet. Use `docker exec` to run a command in the Pod:\n\n```shell\ndocker exec -it kind-control-plane ls /var/lib/kubelet/seccomp/profiles\n```\n\n```\naudit.json fine-grained.json violation.json\n```\n\nYou have verified that these seccomp profiles are available to the kubelet\nrunning within kind.\n\n## Create a Pod that uses the container runtime default seccomp profile\n\nMost container runtimes provide a sane set of default syscalls that are allowed\nor not. You can adopt these defaults for your workload by setting the seccomp\ntype in the security context of a pod or container to `RuntimeDefault`.\n\nIf you have the `seccompDefault` [configuration](/docs/reference/config-api/kubelet-config.v1beta1/)\nenabled, then Pods use the `RuntimeDefault` seccomp profile whenever\nno other seccomp profile is specified. Otherwise, the default is `Unconfined`.\n\nHere's a manifest for a Pod that requests the `RuntimeDefault` seccomp profile\nfor all its containers:\n\nCreate that Pod:\n```shell\nkubectl apply -f https://k8s.io/examples/pods/security/seccomp/ga/default-pod.yaml\n```\n\n```shell\nkubectl get pod default-pod\n```\n\nThe Pod should be showing as having started successfully:\n```\nNAME READY STATUS RESTARTS AGE\ndefault-pod 1/1 Running 0 20s\n```\n\nDelete the Pod before moving to the next section:\n\n```shell\nkubectl delete pod default-pod --wait --now\n```\n\n## Create a Pod with a seccomp profile for syscall auditing\n\nTo start off, apply the `audit.json` profile, which will log all syscalls of the\nprocess, to a new Pod.\n\nHere's a manifest for that Pod:\n\nOlder versions of Kubernetes allowed you to configure seccomp\nbehavior using annotations.\nKubernetes only supports using fields within\n`.spec.securityContext` to configure seccomp, and this tutorial explains that\napproach.\n\nCreate the Pod in the cluster:\n\n```shell\nkubectl apply -f https://k8s.io/examples/pods/security/seccomp/ga/audit-pod.yaml\n```\n\nThis profile does not restrict any syscalls, so the Pod should start\nsuccessfully.\n\n```shell\nkubectl get pod audit-pod\n```\n\n```\nNAME READY STATUS RESTARTS AGE\naudit-pod 1/1 Running 0 30s\n```\n\nIn order to be able to interact with this endpoint exposed by this\ncontainer, create a NodePort Service\nthat allows access to the endpoint from inside the kind control plane container.\n\n```shell\nkubectl expose pod audit-pod --type NodePort --port 5678\n```\n\nCheck what port the Service has been assigned on the node.\n\n```shell\nkubectl get service audit-pod\n```\n\nThe output is similar to:\n```\nNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE\naudit-pod NodePort 10.111.36.142 5678:32373/TCP 72s\n```\n\nNow you can use `curl` to access that endpoint from inside the kind control plane container,\nat the port exposed by this Service. Use `docker exec` to run the `curl` command within the\ncontainer belonging to that control plane container:\n\n```shell\n# Change 32373 to the port number you saw from \"kubectl get service audit-pod\"\ndocker exec -it kind-control-plane curl localhost:32373\n```\n\n```\njust made some syscalls!\n```\n\nYou can see that the process is running, but what syscalls did it actually make?\nBecause this Pod is running in a local cluster, you should be able to see those\nin `/var/log/syslog` on your local system. Open up a new terminal window and `tail` the output for\ncalls from `http-echo`:\n\n```shell\n# The log path on your computer might be different from \"/var/log/syslog\"\ntail -f /var/log/syslog | grep 'http-echo'\n```\n\nYou should already see some logs of syscalls made by `http-echo`, and if you run `curl` again inside\nthe control plane container you will see more output written to the log.\n\nFor example:\n```\nJul 6 15:37:40 my-machine kernel: [369128.669452] audit: type=1326 audit(1594067860.484:14536): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=29064 comm=\"http-echo\" exe=\"/http-echo\" sig=0 arch=c000003e syscall=51 compat=0 ip=0x46fe1f code=0x7ffc0000\nJul 6 15:37:40 my-machine kernel: [369128.669453] audit: type=1326 audit(1594067860.484:14537): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=29064 comm=\"http-echo\" exe=\"/http-echo\" sig=0 arch=c000003e syscall=54 compat=0 ip=0x46fdba code=0x7ffc0000\nJul 6 15:37:40 my-machine kernel: [369128.669455] audit: type=1326 audit(1594067860.484:14538): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=29064 comm=\"http-echo\" exe=\"/http-echo\" sig=0 arch=c000003e syscall=202 compat=0 ip=0x455e53 code=0x7ffc0000\nJul 6 15:37:40 my-machine kernel: [369128.669456] audit: type=1326 audit(1594067860.484:14539): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=29064 comm=\"http-echo\" exe=\"/http-echo\" sig=0 arch=c000003e syscall=288 compat=0 ip=0x46fdba code=0x7ffc0000\nJul 6 15:37:40 my-machine kernel: [369128.669517] audit: type=1326 audit(1594067860.484:14540): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=29064 comm=\"http-echo\" exe=\"/http-echo\" sig=0 arch=c000003e syscall=0 compat=0 ip=0x46fd44 code=0x7ffc0000\nJul 6 15:37:40 my-machine kernel: [369128.669519] audit: type=1326 audit(1594067860.484:14541): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=29064 comm=\"http-echo\" exe=\"/http-echo\" sig=0 arch=c000003e syscall=270 compat=0 ip=0x4559b1 code=0x7ffc0000\nJul 6 15:38:40 my-machine kernel: [369188.671648] audit: type=1326 audit(1594067920.488:14559): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=29064 comm=\"http-echo\" exe=\"/http-echo\" sig=0 arch=c000003e syscall=270 compat=0 ip=0x4559b1 code=0x7ffc0000\nJul 6 15:38:40 my-machine kernel: [369188.671726] audit: type=1326 audit(1594067920.488:14560): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=29064 comm=\"http-echo\" exe=\"/http-echo\" sig=0 arch=c000003e syscall=202 compat=0 ip=0x455e53 code=0x7ffc0000\n```\n\nYou can begin to understand the syscalls required by the `http-echo` process by\nlooking at the `syscall=` entry on each line. While these are unlikely to\nencompass all syscalls it uses, it can serve as a basis for a seccomp profile\nfor this container.\n\nDelete the Service and the Pod before moving to the next section:\n\n```shell\nkubectl delete service audit-pod --wait\nkubectl delete pod audit-pod --wait --now\n```\n\n## Create a Pod with a seccomp profile that causes violation\n\nFor demonstration, apply a profile to the Pod that does not allow for any\nsyscalls.\n\nThe manifest for this demonstration is:\n\nAttempt to create the Pod in the cluster:\n\n```shell\nkubectl apply -f https://k8s.io/examples/pods/security/seccomp/ga/violation-pod.yaml\n```\n\nThe Pod creates, but there is an issue.\nIf you check the status of the Pod, you should see that it failed to start.\n\n```shell\nkubectl get pod violation-pod\n```\n\n```\nNAME READY STATUS RESTARTS AGE\nviolation-pod 0/1 CrashLoopBackOff 1 6s\n```\n\nAs seen in the previous example, the `http-echo` process requires quite a few\nsyscalls. Here seccomp has been instructed to error on any syscall by setting\n`\"defaultAction\": \"SCMP_ACT_ERRNO\"`. This is extremely secure, but removes the\nability to do anything meaningful. What you really want is to give workloads\nonly the privileges they need.\n\nDelete the Pod before moving to the next section:\n\n```shell\nkubectl delete pod violation-pod --wait --now\n```\n\n## Create a Pod with a seccomp profile that only allows necessary syscalls\n\nIf you take a look at the `fine-grained.json` profile, you will notice some of the syscalls\nseen in syslog of the first example where the profile set `\"defaultAction\":\n\"SCMP_ACT_LOG\"`. Now the profile is setting `\"defaultAction\": \"SCMP_ACT_ERRNO\"`,\nbut explicitly allowing a set of syscalls in the `\"action\": \"SCMP_ACT_ALLOW\"`\nblock. Ideally, the container will run successfully and you will see no messages\nsent to `syslog`.\n\nThe manifest for this example is:\n\nCreate the Pod in your cluster:\n\n```shell\nkubectl apply -f https://k8s.io/examples/pods/security/seccomp/ga/fine-pod.yaml\n```\n\n```shell\nkubectl get pod fine-pod\n```\n\nThe Pod should be showing as having started successfully:\n```\nNAME READY STATUS RESTARTS AGE\nfine-pod 1/1 Running 0 30s\n```\n\nOpen up a new terminal window and use `tail` to monitor for log entries that\nmention calls from `http-echo`:\n\n```shell\n# The log path on your computer might be different from \"/var/log/syslog\"\ntail -f /var/log/syslog | grep 'http-echo'\n```\n\nNext, expose the Pod with a NodePort Service:\n\n```shell\nkubectl expose pod fine-pod --type NodePort --port 5678\n```\n\nCheck what port the Service has been assigned on the node:\n\n```shell\nkubectl get service fine-pod\n```\n\nThe output is similar to:\n```\nNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE\nfine-pod NodePort 10.111.36.142 5678:32373/TCP 72s\n```\n\nUse `curl` to access that endpoint from inside the kind control plane container:\n\n```shell\n# Change 32373 to the port number you saw from \"kubectl get service fine-pod\"\ndocker exec -it kind-control-plane curl localhost:32373\n```\n\n```\njust made some syscalls!\n```\n\nYou should see no output in the `syslog`. This is because the profile allowed all\nnecessary syscalls and specified that an error should occur if one outside of\nthe list is invoked. This is an ideal situation from a security perspective, but\nrequired some effort in analyzing the program. It would be nice if there was a\nsimple way to get closer to this security without requiring as much effort.\n\nDelete the Service and the Pod before moving to the next section:\n\n```shell\nkubectl delete service fine-pod --wait\nkubectl delete pod fine-pod --wait --now\n```\n\n## Enable the use of `RuntimeDefault` as the default seccomp profile for all workloads\n\nTo use seccomp profile defaulting, you must run the kubelet with the\n`--seccomp-default`\n[command line flag](/docs/reference/command-line-tools-reference/kubelet)\nenabled for each node where you want to use it.\n\nIf enabled, the kubelet will use the `RuntimeDefault` seccomp profile by default, which is\ndefined by the container runtime, instead of using the `Unconfined` (seccomp disabled) mode.\nThe default profiles aim to provide a strong set\nof security defaults while preserving the functionality of the workload. It is\npossible that the default profiles differ between container runtimes and their\nrelease versions, for example when comparing those from CRI-O and containerd.\n\nEnabling the feature will neither change the Kubernetes\n`securityContext.seccompProfile` API field nor add the deprecated annotations of\nthe workload. This provides users the possibility to rollback anytime without\nactually changing the workload configuration. Tools like\n[`crictl inspect`](https://github.com/kubernetes-sigs/cri-tools) can be used to\nverify which seccomp profile is being used by a container.\n\nSome workloads may require a lower amount of syscall restrictions than others.\nThis means that they can fail during runtime even with the `RuntimeDefault`\nprofile. To mitigate such a failure, you can:\n\n- Run the workload explicitly as `Unconfined`.\n- Disable the `SeccompDefault` feature for the nodes. Also making sure that\nworkloads get scheduled on nodes where the feature is disabled.\n- Create a custom seccomp profile for the workload.\n\nIf you were introducing this feature into production-like cluster, the Kubernetes project\nrecommends that you enable this feature gate on a subset of your nodes and then\ntest workload execution before rolling the change out cluster-wide.\n\nYou can find more detailed information about a possible upgrade and downgrade strategy\nin the related Kubernetes Enhancement Proposal (KEP):\n[Enable seccomp by default](https://github.com/kubernetes/enhancements/tree/9a124fd29d1f9ddf2ff455c49a630e3181992c25/keps/sig-node/2413-seccomp-by-default#upgrade--downgrade-strategy).\n\nKubernetes lets you configure the seccomp profile\nthat applies when the spec for a Pod doesn't define a specific seccomp profile.\nHowever, you still need to enable this defaulting for each node where you would\nlike to use it.\n\nIf you are running a Kubernetes cluster and want to\nenable the feature, either run the kubelet with the `--seccomp-default` command\nline flag, or enable it through the [kubelet configuration\nfile](/docs/tasks/administer-cluster/kubelet-config-file/). To enable the\nfeature gate in [kind](https://kind.sigs.k8s.io), ensure that `kind` provides\nthe minimum required Kubernetes version and enables the `SeccompDefault` feature\n[in the kind configuration](https://kind.sigs.k8s.io/docs/user/quick-start/#enable-feature-gates-in-your-cluster):\n\n```yaml\nkind: Cluster\napiVersion: kind.x-k8s.io/v1alpha4\nnodes:\n- role: control-plane\nimage: kindest/node:v1.28.0@sha256:9f3ff58f19dcf1a0611d11e8ac989fdb30a28f40f236f59f0bea31fb956ccf5c\nkubeadmConfigPatches:\n- |\nkind: JoinConfiguration\nnodeRegistration:\nkubeletExtraArgs:\nseccomp-default: \"true\"\n- role: worker\nimage: kindest/node:v1.28.0@sha256:9f3ff58f19dcf1a0611d11e8ac989fdb30a28f40f236f59f0bea31fb956ccf5c\nkubeadmConfigPatches:\n- |\nkind: JoinConfiguration\nnodeRegistration:\nkubeletExtraArgs:\nseccomp-default: \"true\"\n```\n\nIf the cluster is ready, then running a pod:\n\n```shell\nkubectl run --rm -it --restart=Never --image=alpine alpine -- sh\n```\n\nShould now have the default seccomp profile attached. This can be verified by\nusing `docker exec` to run `crictl inspect` for the container on the kind\nworker:\n\n```shell\ndocker exec -it kind-worker bash -c \\\n'crictl inspect $(crictl ps --name=alpine -q) | jq .info.runtimeSpec.linux.seccomp'\n```\n\n```json\n{\n\"defaultAction\": \"SCMP_ACT_ERRNO\",\n\"architectures\": [\"SCMP_ARCH_X86_64\", \"SCMP_ARCH_X86\", \"SCMP_ARCH_X32\"],\n\"syscalls\": [\n{\n\"names\": [\"...\"]\n}\n]\n}\n```\n\n##\n\nYou can learn more about Linux seccomp:\n\n* [A seccomp Overview](https://lwn.net/Articles/656307/)\n* [Seccomp Security Profiles for Docker](https://docs.docker.com/engine/security/seccomp/)", "source": "content/en/docs/tutorials/security/seccomp.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "This page shows how to create a Kubernetes Service object that exposes an\nexternal IP address.\n\n##\n\n* Install [kubectl](/docs/tasks/tools/).\n* Use a cloud provider like Google Kubernetes Engine or Amazon Web Services to\ncreate a Kubernetes cluster. This tutorial creates an\n[external load balancer](/docs/tasks/access-application-cluster/create-external-load-balancer/),\nwhich requires a cloud provider.\n* Configure `kubectl` to communicate with your Kubernetes API server. For instructions, see the\ndocumentation for your cloud provider.\n\n##\n\n* Run five instances of a Hello World application.\n* Create a Service object that exposes an external IP address.\n* Use the Service object to access the running application.\n\n## Creating a service for an application running in five pods\n\n1. Run a Hello World application in your cluster:\n\n```shell\nkubectl apply -f https://k8s.io/examples/service/load-balancer-example.yaml\n```\nThe preceding command creates a\nDeployment\nand an associated\nReplicaSet.\nThe ReplicaSet has five\nPods\neach of which runs the Hello World application.\n\n1. Display information about the Deployment:\n\n```shell\nkubectl get deployments hello-world\nkubectl describe deployments hello-world\n```\n\n1. Display information about your ReplicaSet objects:\n\n```shell\nkubectl get replicasets\nkubectl describe replicasets\n```\n\n1. Create a Service object that exposes the deployment:\n\n```shell\nkubectl expose deployment hello-world --type=LoadBalancer --name=my-service\n```\n\n1. Display information about the Service:\n\n```shell\nkubectl get services my-service\n```\n\nThe output is similar to:\n\n```console\nNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE\nmy-service LoadBalancer 10.3.245.137 104.198.205.71 8080/TCP 54s\n```\n\nThe `type=LoadBalancer` service is backed by external cloud providers, which is not covered in this example. Please refer to [setting `type: LoadBalancer` for your Service](/docs/concepts/services-networking/service/#loadbalancer) for the details.\n\nIf the external IP address is shown as \\ , wait for a minute and enter the same command again.\n\n1. Display detailed information about the Service:\n\n```shell\nkubectl describe services my-service\n```\n\nThe output is similar to:\n\n```console\nName: my-service\nNamespace: default\nLabels: app.kubernetes.io/name=load-balancer-example\nAnnotations:\nSelector: app.kubernetes.io/name=load-balancer-example\nType: LoadBalancer\nIP: 10.3.245.137\nLoadBalancer Ingress: 104.198.205.71\nPort: 8080/TCP\nNodePort: 32377/TCP\nEndpoints: 10.0.0.6:8080,10.0.1.6:8080,10.0.1.7:8080 + 2 more...\nSession Affinity: None\nEvents:\n```\n\nMake a note of the external IP address (`LoadBalancer Ingress`) exposed by\nyour service. In this example, the external IP address is 104.198.205.71.\nAlso note the value of `Port` and `NodePort`. In this example, the `Port`\nis 8080 and the `NodePort` is 32377.\n\n1. In the preceding output, you can see that the service has several endpoints:\n10.0.0.6:8080,10.0.1.6:8080,10.0.1.7:8080 + 2 more. These are internal\naddresses of the pods that are running the Hello World application. To\nverify these are pod addresses, enter this command:\n\n```shell\nkubectl get pods --output=wide\n```\n\nThe output is similar to:\n\n```console\nNAME ... IP NODE\nhello-world-2895499144-1jaz9 ... 10.0.1.6 gke-cluster-1-default-pool-e0b8d269-1afc\nhello-world-2895499144-2e5uh ... 10.0.1.8 gke-cluster-1-default-pool-e0b8d269-1afc\nhello-world-2895499144-9m4h1 ... 10.0.0.6 gke-cluster-1-default-pool-e0b8d269-5v7a\nhello-world-2895499144-o4z13 ... 10.0.1.7 gke-cluster-1-default-pool-e0b8d269-1afc\nhello-world-2895499144-segjf ... 10.0.2.5 gke-cluster-1-default-pool-e0b8d269-cpuc\n```\n\n1. Use the external IP address (`LoadBalancer Ingress`) to access the Hello\nWorld application:\n\n```shell\ncurl http:// :\n```\n\nwhere ` ` is the external IP address (`LoadBalancer Ingress`)\nof your Service, and ` ` is the value of `Port` in your Service\ndescription.\nIf you are using minikube, typing `minikube service my-service` will\nautomatically open the Hello World application in a browser.\n\nThe response to a successful request is a hello message:\n\n```console\nHello, world!\nVersion: 2.0.0\nHostname: 0bd46b45f32f\n```\n\n##\n\nTo delete the Service, enter this command:\n\n```shell\nkubectl delete services my-service\n```\n\nTo delete the Deployment, the ReplicaSet, and the Pods that are running\nthe Hello World application, enter this command:\n\n```shell\nkubectl delete deployment hello-world\n```\n\n##\n\nLearn more about\n[connecting applications with services](/docs/tutorials/services/connect-applications-service/).\nTry [Deploy a Canary Release](/docs/tutorials/stateless-application/canary-deployment/) to learn how to safely test new application versions in production.", "source": "content/en/docs/tutorials/stateless-application/expose-external-ip-address.md", "commit": "f2db56e570a59d1afb0bacabd0f26f6b8538ea91", "license": "CC-BY-4.0", "from": "kubernetes-docs.jsonl"}
|
||
{"text": "GET /api/v1/ is a Kubernetes API operation. get available resources. Its operation ID is getCoreV1APIResources. Response 200: OK Response 401: Unauthorized", "source": "paths/api/v1/.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /api/v1/namespaces/{namespace}/configmaps is a Kubernetes API operation. delete collection of ConfigMap. Its operation ID is deleteCoreV1CollectionNamespacedConfigMap. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 401: Unauthorized", "source": "paths/api/v1/namespaces/{namespace}/configmaps.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /api/v1/namespaces/{namespace}/configmaps/{name} is a Kubernetes API operation. delete a ConfigMap. Its operation ID is deleteCoreV1NamespacedConfigMap. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 202: Accepted Response 401: Unauthorized", "source": "paths/api/v1/namespaces/{namespace}/configmaps/{name}.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /api/v1/namespaces/{namespace}/endpoints/{name} is a Kubernetes API operation. delete Endpoints. Its operation ID is deleteCoreV1NamespacedEndpoints. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 202: Accepted Response 401: Unauthorized", "source": "paths/api/v1/namespaces/{namespace}/endpoints/{name}.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /api/v1/namespaces/{namespace}/limitranges is a Kubernetes API operation. list or watch objects of kind LimitRange. Its operation ID is listCoreV1NamespacedLimitRange. Response 200: OK Response 401: Unauthorized", "source": "paths/api/v1/namespaces/{namespace}/limitranges.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PATCH /api/v1/namespaces/{namespace}/pods/{name}/proxy is a Kubernetes API operation. connect PATCH requests to proxy of Pod. Its operation ID is connectCoreV1PatchNamespacedPodProxy. Response 200: OK Response 401: Unauthorized", "source": "paths/api/v1/namespaces/{namespace}/pods/{name}/proxy.patch", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /api/v1/namespaces/{namespace}/pods/{name}/status is a Kubernetes API operation. read status of the specified Pod. Its operation ID is readCoreV1NamespacedPodStatus. Response 200: OK Response 401: Unauthorized", "source": "paths/api/v1/namespaces/{namespace}/pods/{name}/status.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /api/v1/namespaces/{namespace}/podtemplates/{name} is a Kubernetes API operation. read the specified PodTemplate. Its operation ID is readCoreV1NamespacedPodTemplate. Response 200: OK Response 401: Unauthorized", "source": "paths/api/v1/namespaces/{namespace}/podtemplates/{name}.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PATCH /api/v1/namespaces/{namespace}/services/{name}/status is a Kubernetes API operation. partially update status of the specified Service. Its operation ID is patchCoreV1NamespacedServiceStatus. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/api/v1/namespaces/{namespace}/services/{name}/status.patch", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /api/v1/namespaces/{name} is a Kubernetes API operation. delete a Namespace. Its operation ID is deleteCoreV1Namespace. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 202: Accepted Response 401: Unauthorized", "source": "paths/api/v1/namespaces/{name}.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /api/v1/persistentvolumeclaims is a Kubernetes API operation. list or watch objects of kind PersistentVolumeClaim. Its operation ID is listCoreV1PersistentVolumeClaimForAllNamespaces. Response 200: OK Response 401: Unauthorized", "source": "paths/api/v1/persistentvolumeclaims.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /api/v1/persistentvolumes/{name} is a Kubernetes API operation. delete a PersistentVolume. Its operation ID is deleteCoreV1PersistentVolume. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 202: Accepted Response 401: Unauthorized", "source": "paths/api/v1/persistentvolumes/{name}.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /api/v1/serviceaccounts is a Kubernetes API operation. list or watch objects of kind ServiceAccount. Its operation ID is listCoreV1ServiceAccountForAllNamespaces. Response 200: OK Response 401: Unauthorized", "source": "paths/api/v1/serviceaccounts.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /api/v1/watch/endpoints is a Kubernetes API operation. watch individual changes to a list of Endpoints. deprecated: use the 'watch' parameter with a list operation instead. Its operation ID is watchCoreV1EndpointsListForAllNamespaces. Response 200: OK Response 401: Unauthorized", "source": "paths/api/v1/watch/endpoints.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /api/v1/watch/events is a Kubernetes API operation. watch individual changes to a list of Event. deprecated: use the 'watch' parameter with a list operation instead. Its operation ID is watchCoreV1EventListForAllNamespaces. Response 200: OK Response 401: Unauthorized", "source": "paths/api/v1/watch/events.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /api/v1/watch/namespaces/{namespace}/replicationcontrollers/{name} is a Kubernetes API operation. watch changes to an object of kind ReplicationController. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. Its operation ID is watchCoreV1NamespacedReplicationController. Response 200: OK Response 401: Unauthorized", "source": "paths/api/v1/watch/namespaces/{namespace}/replicationcontrollers/{name}.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /api/v1/watch/namespaces/{namespace}/secrets is a Kubernetes API operation. watch individual changes to a list of Secret. deprecated: use the 'watch' parameter with a list operation instead. Its operation ID is watchCoreV1NamespacedSecretList. Response 200: OK Response 401: Unauthorized", "source": "paths/api/v1/watch/namespaces/{namespace}/secrets.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /api/v1/watch/namespaces/{namespace}/services is a Kubernetes API operation. watch individual changes to a list of Service. deprecated: use the 'watch' parameter with a list operation instead. Its operation ID is watchCoreV1NamespacedServiceList. Response 200: OK Response 401: Unauthorized", "source": "paths/api/v1/watch/namespaces/{namespace}/services.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /api/v1/watch/secrets is a Kubernetes API operation. watch individual changes to a list of Secret. deprecated: use the 'watch' parameter with a list operation instead. Its operation ID is watchCoreV1SecretListForAllNamespaces. Response 200: OK Response 401: Unauthorized", "source": "paths/api/v1/watch/secrets.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/admissionregistration.k8s.io/v1/mutatingadmissionpolicybindings is a Kubernetes API operation. list or watch objects of kind MutatingAdmissionPolicyBinding. Its operation ID is listAdmissionregistrationV1MutatingAdmissionPolicyBinding. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/admissionregistration.k8s.io/v1/mutatingadmissionpolicybindings.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PATCH /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name} is a Kubernetes API operation. partially update the specified MutatingWebhookConfiguration. Its operation ID is patchAdmissionregistrationV1MutatingWebhookConfiguration. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}.patch", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name} is a Kubernetes API operation. delete a ValidatingAdmissionPolicy. Its operation ID is deleteAdmissionregistrationV1ValidatingAdmissionPolicy. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings is a Kubernetes API operation. list or watch objects of kind ValidatingAdmissionPolicyBinding. Its operation ID is listAdmissionregistrationV1ValidatingAdmissionPolicyBinding. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PUT /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name} is a Kubernetes API operation. replace the specified ValidatingWebhookConfiguration. Its operation ID is replaceAdmissionregistrationV1ValidatingWebhookConfiguration. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}.put", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/admissionregistration.k8s.io/v1/watch/validatingadmissionpolicies is a Kubernetes API operation. watch individual changes to a list of ValidatingAdmissionPolicy. deprecated: use the 'watch' parameter with a list operation instead. Its operation ID is watchAdmissionregistrationV1ValidatingAdmissionPolicyList. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/admissionregistration.k8s.io/v1/watch/validatingadmissionpolicies.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PATCH /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name} is a Kubernetes API operation. partially update the specified MutatingAdmissionPolicy. Its operation ID is patchAdmissionregistrationV1alpha1MutatingAdmissionPolicy. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name}.patch", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/apiregistration.k8s.io/v1/apiservices/{name} is a Kubernetes API operation. read the specified APIService. Its operation ID is readApiregistrationV1APIService. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/apiregistration.k8s.io/v1/apiservices/{name}.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "POST /apis/apps/v1/namespaces/{namespace}/controllerrevisions is a Kubernetes API operation. create a ControllerRevision. Its operation ID is createAppsV1NamespacedControllerRevision. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/apps/v1/namespaces/{namespace}/controllerrevisions.post", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name} is a Kubernetes API operation. delete a ControllerRevision. Its operation ID is deleteAppsV1NamespacedControllerRevision. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status is a Kubernetes API operation. read status of the specified DaemonSet. Its operation ID is readAppsV1NamespacedDaemonSetStatus. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PUT /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status is a Kubernetes API operation. replace status of the specified DaemonSet. Its operation ID is replaceAppsV1NamespacedDaemonSetStatus. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status.put", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/apps/v1/namespaces/{namespace}/replicasets/{name} is a Kubernetes API operation. read the specified ReplicaSet. Its operation ID is readAppsV1NamespacedReplicaSet. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/apps/v1/namespaces/{namespace}/replicasets/{name}.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PATCH /apis/apps/v1/namespaces/{namespace}/statefulsets/{name} is a Kubernetes API operation. partially update the specified StatefulSet. Its operation ID is patchAppsV1NamespacedStatefulSet. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}.patch", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PUT /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status is a Kubernetes API operation. replace status of the specified StatefulSet. Its operation ID is replaceAppsV1NamespacedStatefulSetStatus. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status.put", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/apps/v1/watch/namespaces/{namespace}/deployments is a Kubernetes API operation. watch individual changes to a list of Deployment. deprecated: use the 'watch' parameter with a list operation instead. Its operation ID is watchAppsV1NamespacedDeploymentList. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/apps/v1/watch/namespaces/{namespace}/deployments.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/apps/v1/watch/namespaces/{namespace}/deployments/{name} is a Kubernetes API operation. watch changes to an object of kind Deployment. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. Its operation ID is watchAppsV1NamespacedDeployment. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/apps/v1/watch/namespaces/{namespace}/deployments/{name}.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/apps/v1/watch/namespaces/{namespace}/replicasets/{name} is a Kubernetes API operation. watch changes to an object of kind ReplicaSet. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. Its operation ID is watchAppsV1NamespacedReplicaSet. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/apps/v1/watch/namespaces/{namespace}/replicasets/{name}.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/apps/v1/watch/namespaces/{namespace}/statefulsets/{name} is a Kubernetes API operation. watch changes to an object of kind StatefulSet. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. Its operation ID is watchAppsV1NamespacedStatefulSet. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/apps/v1/watch/namespaces/{namespace}/statefulsets/{name}.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/authentication.k8s.io/ is a Kubernetes API operation. get information of a group. Its operation ID is getAuthenticationAPIGroup. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/authentication.k8s.io/.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/autoscaling/v2/ is a Kubernetes API operation. get available resources. Its operation ID is getAutoscalingV2APIResources. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/autoscaling/v2/.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers is a Kubernetes API operation. delete collection of HorizontalPodAutoscaler. Its operation ID is deleteAutoscalingV2CollectionNamespacedHorizontalPodAutoscaler. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "POST /apis/batch/v1/namespaces/{namespace}/jobs is a Kubernetes API operation. create a Job. Its operation ID is createBatchV1NamespacedJob. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/batch/v1/namespaces/{namespace}/jobs.post", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PUT /apis/batch/v1/namespaces/{namespace}/jobs/{name} is a Kubernetes API operation. replace the specified Job. Its operation ID is replaceBatchV1NamespacedJob. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/batch/v1/namespaces/{namespace}/jobs/{name}.put", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/certificates.k8s.io/v1/certificatesigningrequests is a Kubernetes API operation. list or watch objects of kind CertificateSigningRequest. Its operation ID is listCertificatesV1CertificateSigningRequest. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/certificates.k8s.io/v1/certificatesigningrequests.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PUT /apis/certificates.k8s.io/v1/certificatesigningrequests/{name} is a Kubernetes API operation. replace the specified CertificateSigningRequest. Its operation ID is replaceCertificatesV1CertificateSigningRequest. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}.put", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PUT /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval is a Kubernetes API operation. replace approval of the specified CertificateSigningRequest. Its operation ID is replaceCertificatesV1CertificateSigningRequestApproval. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval.put", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/certificates.k8s.io/v1/clustertrustbundles/{name} is a Kubernetes API operation. read the specified ClusterTrustBundle. Its operation ID is readCertificatesV1ClusterTrustBundle. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/certificates.k8s.io/v1/clustertrustbundles/{name}.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/certificates.k8s.io/v1/clustertrustbundles/{name} is a Kubernetes API operation. delete a ClusterTrustBundle. Its operation ID is deleteCertificatesV1ClusterTrustBundle. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/certificates.k8s.io/v1/clustertrustbundles/{name}.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/certificates.k8s.io/v1/namespaces/{namespace}/podcertificaterequests/{name} is a Kubernetes API operation. delete a PodCertificateRequest. Its operation ID is deleteCertificatesV1NamespacedPodCertificateRequest. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/certificates.k8s.io/v1/namespaces/{namespace}/podcertificaterequests/{name}.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PUT /apis/certificates.k8s.io/v1/namespaces/{namespace}/podcertificaterequests/{name}/status is a Kubernetes API operation. replace status of the specified PodCertificateRequest. Its operation ID is replaceCertificatesV1NamespacedPodCertificateRequestStatus. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/certificates.k8s.io/v1/namespaces/{namespace}/podcertificaterequests/{name}/status.put", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests is a Kubernetes API operation. list or watch objects of kind PodCertificateRequest. Its operation ID is listCertificatesV1beta1NamespacedPodCertificateRequest. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/certificates.k8s.io/v1beta1/watch/clustertrustbundles is a Kubernetes API operation. watch individual changes to a list of ClusterTrustBundle. deprecated: use the 'watch' parameter with a list operation instead. Its operation ID is watchCertificatesV1beta1ClusterTrustBundleList. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/certificates.k8s.io/v1beta1/watch/clustertrustbundles.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/coordination.k8s.io/ is a Kubernetes API operation. get information of a group. Its operation ID is getCoordinationAPIGroup. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/coordination.k8s.io/.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "POST /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases is a Kubernetes API operation. create a Lease. Its operation ID is createCoordinationV1NamespacedLease. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases.post", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name} is a Kubernetes API operation. delete a LeaseCandidate. Its operation ID is deleteCoordinationV1alpha2NamespacedLeaseCandidate. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name}.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/coordination.k8s.io/v1alpha2/watch/namespaces/{namespace}/leasecandidates is a Kubernetes API operation. watch individual changes to a list of LeaseCandidate. deprecated: use the 'watch' parameter with a list operation instead. Its operation ID is watchCoordinationV1alpha2NamespacedLeaseCandidateList. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/coordination.k8s.io/v1alpha2/watch/namespaces/{namespace}/leasecandidates.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/coordination.k8s.io/v1beta1/leasecandidates is a Kubernetes API operation. list or watch objects of kind LeaseCandidate. Its operation ID is listCoordinationV1beta1LeaseCandidateForAllNamespaces. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/coordination.k8s.io/v1beta1/leasecandidates.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "POST /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates is a Kubernetes API operation. create a LeaseCandidate. Its operation ID is createCoordinationV1beta1NamespacedLeaseCandidate. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates.post", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name} is a Kubernetes API operation. delete a LeaseCandidate. Its operation ID is deleteCoordinationV1beta1NamespacedLeaseCandidate. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/events.k8s.io/v1/ is a Kubernetes API operation. get available resources. Its operation ID is getEventsV1APIResources. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/events.k8s.io/v1/.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "POST /apis/events.k8s.io/v1/namespaces/{namespace}/events is a Kubernetes API operation. create an Event. Its operation ID is createEventsV1NamespacedEvent. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/events.k8s.io/v1/namespaces/{namespace}/events.post", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PUT /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name} is a Kubernetes API operation. replace the specified FlowSchema. Its operation ID is replaceFlowcontrolApiserverV1FlowSchema. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}.put", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "POST /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations is a Kubernetes API operation. create a PriorityLevelConfiguration. Its operation ID is createFlowcontrolApiserverV1PriorityLevelConfiguration. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations.post", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/internal.apiserver.k8s.io/v1alpha1/watch/storageversions/{name} is a Kubernetes API operation. watch changes to an object of kind StorageVersion. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. Its operation ID is watchInternalApiserverV1alpha1StorageVersion. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/internal.apiserver.k8s.io/v1alpha1/watch/storageversions/{name}.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/lifecycle.k8s.io/v1alpha1/namespaces/{namespace}/evictionrequests/{name} is a Kubernetes API operation. read the specified EvictionRequest. Its operation ID is readLifecycleV1alpha1NamespacedEvictionRequest. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/lifecycle.k8s.io/v1alpha1/namespaces/{namespace}/evictionrequests/{name}.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/lifecycle.k8s.io/v1alpha1/namespaces/{namespace}/evictions/{name} is a Kubernetes API operation. delete an Eviction. Its operation ID is deleteLifecycleV1alpha1NamespacedEviction. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/lifecycle.k8s.io/v1alpha1/namespaces/{namespace}/evictions/{name}.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PATCH /apis/lifecycle.k8s.io/v1alpha1/namespaces/{namespace}/evictions/{name} is a Kubernetes API operation. partially update the specified Eviction. Its operation ID is patchLifecycleV1alpha1NamespacedEviction. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/lifecycle.k8s.io/v1alpha1/namespaces/{namespace}/evictions/{name}.patch", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PUT /apis/lifecycle.k8s.io/v1alpha1/namespaces/{namespace}/evictions/{name}/status is a Kubernetes API operation. replace status of the specified Eviction. Its operation ID is replaceLifecycleV1alpha1NamespacedEvictionStatus. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/lifecycle.k8s.io/v1alpha1/namespaces/{namespace}/evictions/{name}/status.put", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/lifecycle.k8s.io/v1alpha1/watch/namespaces/{namespace}/evictionrequests is a Kubernetes API operation. watch individual changes to a list of EvictionRequest. deprecated: use the 'watch' parameter with a list operation instead. Its operation ID is watchLifecycleV1alpha1NamespacedEvictionRequestList. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/lifecycle.k8s.io/v1alpha1/watch/namespaces/{namespace}/evictionrequests.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/networking.k8s.io/v1/ is a Kubernetes API operation. get available resources. Its operation ID is getNetworkingV1APIResources. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/networking.k8s.io/v1/.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/networking.k8s.io/v1/ingressclasses is a Kubernetes API operation. list or watch objects of kind IngressClass. Its operation ID is listNetworkingV1IngressClass. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/networking.k8s.io/v1/ingressclasses.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses is a Kubernetes API operation. delete collection of Ingress. Its operation ID is deleteNetworkingV1CollectionNamespacedIngress. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status is a Kubernetes API operation. read status of the specified Ingress. Its operation ID is readNetworkingV1NamespacedIngressStatus. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies is a Kubernetes API operation. delete collection of NetworkPolicy. Its operation ID is deleteNetworkingV1CollectionNamespacedNetworkPolicy. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name} is a Kubernetes API operation. read the specified NetworkPolicy. Its operation ID is readNetworkingV1NamespacedNetworkPolicy. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PATCH /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name} is a Kubernetes API operation. partially update the specified NetworkPolicy. Its operation ID is patchNetworkingV1NamespacedNetworkPolicy. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}.patch", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/networking.k8s.io/v1/watch/namespaces/{namespace}/ingresses/{name} is a Kubernetes API operation. watch changes to an object of kind Ingress. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. Its operation ID is watchNetworkingV1NamespacedIngress. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/ingresses/{name}.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/node.k8s.io/v1/runtimeclasses/{name} is a Kubernetes API operation. read the specified RuntimeClass. Its operation ID is readNodeV1RuntimeClass. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/node.k8s.io/v1/runtimeclasses/{name}.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets is a Kubernetes API operation. delete collection of PodDisruptionBudget. Its operation ID is deletePolicyV1CollectionNamespacedPodDisruptionBudget. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PATCH /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status is a Kubernetes API operation. partially update status of the specified PodDisruptionBudget. Its operation ID is patchPolicyV1NamespacedPodDisruptionBudgetStatus. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status.patch", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings is a Kubernetes API operation. list or watch objects of kind RoleBinding. Its operation ID is listRbacAuthorizationV1NamespacedRoleBinding. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings is a Kubernetes API operation. delete collection of RoleBinding. Its operation ID is deleteRbacAuthorizationV1CollectionNamespacedRoleBinding. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name} is a Kubernetes API operation. delete a RoleBinding. Its operation ID is deleteRbacAuthorizationV1NamespacedRoleBinding. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "POST /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles is a Kubernetes API operation. create a Role. Its operation ID is createRbacAuthorizationV1NamespacedRole. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles.post", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/rbac.authorization.k8s.io/v1/watch/rolebindings is a Kubernetes API operation. watch individual changes to a list of RoleBinding. deprecated: use the 'watch' parameter with a list operation instead. Its operation ID is watchRbacAuthorizationV1RoleBindingListForAllNamespaces. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/rbac.authorization.k8s.io/v1/watch/rolebindings.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/resource.k8s.io/v1/deviceclasses is a Kubernetes API operation. delete collection of DeviceClass. Its operation ID is deleteResourceV1CollectionDeviceClass. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/resource.k8s.io/v1/deviceclasses.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PUT /apis/resource.k8s.io/v1/devicetaintrules/{name}/status is a Kubernetes API operation. replace status of the specified DeviceTaintRule. Its operation ID is replaceResourceV1DeviceTaintRuleStatus. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/resource.k8s.io/v1/devicetaintrules/{name}/status.put", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/resource.k8s.io/v1/watch/resourceclaims is a Kubernetes API operation. watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead. Its operation ID is watchResourceV1ResourceClaimListForAllNamespaces. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/resource.k8s.io/v1/watch/resourceclaims.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name} is a Kubernetes API operation. delete a DeviceTaintRule. Its operation ID is deleteResourceV1alpha3DeviceTaintRule. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PUT /apis/resource.k8s.io/v1alpha3/resourcepoolstatusrequests/{name}/status is a Kubernetes API operation. replace status of the specified ResourcePoolStatusRequest. Its operation ID is replaceResourceV1alpha3ResourcePoolStatusRequestStatus. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/resource.k8s.io/v1alpha3/resourcepoolstatusrequests/{name}/status.put", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PATCH /apis/resource.k8s.io/v1alpha3/resourcepoolstatusrequests/{name}/status is a Kubernetes API operation. partially update status of the specified ResourcePoolStatusRequest. Its operation ID is patchResourceV1alpha3ResourcePoolStatusRequestStatus. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/resource.k8s.io/v1alpha3/resourcepoolstatusrequests/{name}/status.patch", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/resource.k8s.io/v1beta2/deviceclasses/{name} is a Kubernetes API operation. read the specified DeviceClass. Its operation ID is readResourceV1beta2DeviceClass. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/resource.k8s.io/v1beta2/deviceclasses/{name}.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/resource.k8s.io/v1beta2/devicetaintrules is a Kubernetes API operation. delete collection of DeviceTaintRule. Its operation ID is deleteResourceV1beta2CollectionDeviceTaintRule. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/resource.k8s.io/v1beta2/devicetaintrules.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PUT /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name} is a Kubernetes API operation. replace the specified ResourceClaim. Its operation ID is replaceResourceV1beta2NamespacedResourceClaim. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}.put", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PATCH /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name} is a Kubernetes API operation. partially update the specified ResourceClaim. Its operation ID is patchResourceV1beta2NamespacedResourceClaim. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}.patch", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PATCH /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}/status is a Kubernetes API operation. partially update status of the specified ResourceClaim. Its operation ID is patchResourceV1beta2NamespacedResourceClaimStatus. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}/status.patch", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PATCH /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name} is a Kubernetes API operation. partially update the specified ResourceClaimTemplate. Its operation ID is patchResourceV1beta2NamespacedResourceClaimTemplate. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name}.patch", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/resource.k8s.io/v1beta2/watch/resourceclaims is a Kubernetes API operation. watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead. Its operation ID is watchResourceV1beta2ResourceClaimListForAllNamespaces. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/resource.k8s.io/v1beta2/watch/resourceclaims.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/scheduling.k8s.io/v1/priorityclasses/{name} is a Kubernetes API operation. read the specified PriorityClass. Its operation ID is readSchedulingV1PriorityClass. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/scheduling.k8s.io/v1/priorityclasses/{name}.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PUT /apis/scheduling.k8s.io/v1alpha3/namespaces/{namespace}/compositepodgroups/{name} is a Kubernetes API operation. replace the specified CompositePodGroup. Its operation ID is replaceSchedulingV1alpha3NamespacedCompositePodGroup. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/scheduling.k8s.io/v1alpha3/namespaces/{namespace}/compositepodgroups/{name}.put", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PATCH /apis/scheduling.k8s.io/v1alpha3/namespaces/{namespace}/compositepodgroups/{name} is a Kubernetes API operation. partially update the specified CompositePodGroup. Its operation ID is patchSchedulingV1alpha3NamespacedCompositePodGroup. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/scheduling.k8s.io/v1alpha3/namespaces/{namespace}/compositepodgroups/{name}.patch", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PUT /apis/scheduling.k8s.io/v1alpha3/namespaces/{namespace}/compositepodgroups/{name}/status is a Kubernetes API operation. replace status of the specified CompositePodGroup. Its operation ID is replaceSchedulingV1alpha3NamespacedCompositePodGroupStatus. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/scheduling.k8s.io/v1alpha3/namespaces/{namespace}/compositepodgroups/{name}/status.put", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PATCH /apis/scheduling.k8s.io/v1alpha3/namespaces/{namespace}/compositepodgroups/{name}/status is a Kubernetes API operation. partially update status of the specified CompositePodGroup. Its operation ID is patchSchedulingV1alpha3NamespacedCompositePodGroupStatus. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/scheduling.k8s.io/v1alpha3/namespaces/{namespace}/compositepodgroups/{name}/status.patch", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PATCH /apis/scheduling.k8s.io/v1alpha3/namespaces/{namespace}/podgroups/{name} is a Kubernetes API operation. partially update the specified PodGroup. Its operation ID is patchSchedulingV1alpha3NamespacedPodGroup. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/scheduling.k8s.io/v1alpha3/namespaces/{namespace}/podgroups/{name}.patch", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/scheduling.k8s.io/v1alpha3/watch/namespaces/{namespace}/compositepodgroups is a Kubernetes API operation. watch individual changes to a list of CompositePodGroup. deprecated: use the 'watch' parameter with a list operation instead. Its operation ID is watchSchedulingV1alpha3NamespacedCompositePodGroupList. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/scheduling.k8s.io/v1alpha3/watch/namespaces/{namespace}/compositepodgroups.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PUT /apis/scheduling.k8s.io/v1beta1/namespaces/{namespace}/compositepodgroups/{name} is a Kubernetes API operation. replace the specified CompositePodGroup. Its operation ID is replaceSchedulingV1beta1NamespacedCompositePodGroup. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/scheduling.k8s.io/v1beta1/namespaces/{namespace}/compositepodgroups/{name}.put", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/scheduling.k8s.io/v1beta1/namespaces/{namespace}/compositepodgroups/{name} is a Kubernetes API operation. delete a CompositePodGroup. Its operation ID is deleteSchedulingV1beta1NamespacedCompositePodGroup. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/scheduling.k8s.io/v1beta1/namespaces/{namespace}/compositepodgroups/{name}.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/scheduling.k8s.io/v1beta1/namespaces/{namespace}/podgroups is a Kubernetes API operation. list or watch objects of kind PodGroup. Its operation ID is listSchedulingV1beta1NamespacedPodGroup. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/scheduling.k8s.io/v1beta1/namespaces/{namespace}/podgroups.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/scheduling.k8s.io/v1beta1/namespaces/{namespace}/podgroups/{name} is a Kubernetes API operation. delete a PodGroup. Its operation ID is deleteSchedulingV1beta1NamespacedPodGroup. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/scheduling.k8s.io/v1beta1/namespaces/{namespace}/podgroups/{name}.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PUT /apis/scheduling.k8s.io/v1beta1/namespaces/{namespace}/podgroups/{name}/status is a Kubernetes API operation. replace status of the specified PodGroup. Its operation ID is replaceSchedulingV1beta1NamespacedPodGroupStatus. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/scheduling.k8s.io/v1beta1/namespaces/{namespace}/podgroups/{name}/status.put", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PATCH /apis/scheduling.k8s.io/v1beta1/namespaces/{namespace}/podgroups/{name}/status is a Kubernetes API operation. partially update status of the specified PodGroup. Its operation ID is patchSchedulingV1beta1NamespacedPodGroupStatus. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 401: Unauthorized", "source": "paths/apis/scheduling.k8s.io/v1beta1/namespaces/{namespace}/podgroups/{name}/status.patch", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "POST /apis/scheduling.k8s.io/v1beta1/namespaces/{namespace}/workloads is a Kubernetes API operation. create a Workload. Its operation ID is createSchedulingV1beta1NamespacedWorkload. Parameters: body (body, required); dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed; fieldValidation (query, optional): fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.. Response 200: OK Response 201: Created Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/scheduling.k8s.io/v1beta1/namespaces/{namespace}/workloads.post", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/scheduling.k8s.io/v1beta1/namespaces/{namespace}/workloads/{name} is a Kubernetes API operation. read the specified Workload. Its operation ID is readSchedulingV1beta1NamespacedWorkload. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/scheduling.k8s.io/v1beta1/namespaces/{namespace}/workloads/{name}.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/storage.k8s.io/v1/csidrivers/{name} is a Kubernetes API operation. delete a CSIDriver. Its operation ID is deleteStorageV1CSIDriver. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/storage.k8s.io/v1/csidrivers/{name}.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities is a Kubernetes API operation. delete collection of CSIStorageCapacity. Its operation ID is deleteStorageV1CollectionNamespacedCSIStorageCapacity. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/storage.k8s.io/v1/watch/csidrivers is a Kubernetes API operation. watch individual changes to a list of CSIDriver. deprecated: use the 'watch' parameter with a list operation instead. Its operation ID is watchStorageV1CSIDriverList. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/storage.k8s.io/v1/watch/csidrivers.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/storage.k8s.io/v1/watch/namespaces/{namespace}/csistoragecapacities is a Kubernetes API operation. watch individual changes to a list of CSIStorageCapacity. deprecated: use the 'watch' parameter with a list operation instead. Its operation ID is watchStorageV1NamespacedCSIStorageCapacityList. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/storage.k8s.io/v1/watch/namespaces/{namespace}/csistoragecapacities.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/storage.k8s.io/v1/watch/storageclasses/{name} is a Kubernetes API operation. watch changes to an object of kind StorageClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. Its operation ID is watchStorageV1StorageClass. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/storage.k8s.io/v1/watch/storageclasses/{name}.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /apis/storagemigration.k8s.io/v1/watch/storageversionmigrations is a Kubernetes API operation. watch individual changes to a list of StorageVersionMigration. deprecated: use the 'watch' parameter with a list operation instead. Its operation ID is watchStoragemigrationV1StorageVersionMigrationList. Response 200: OK Response 401: Unauthorized", "source": "paths/apis/storagemigration.k8s.io/v1/watch/storageversionmigrations.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DELETE /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name} is a Kubernetes API operation. delete a StorageVersionMigration. Its operation ID is deleteStoragemigrationV1beta1StorageVersionMigration. Parameters: dryRun (query, optional): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed. Response 200: OK Response 202: Accepted Response 401: Unauthorized", "source": "paths/apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name}.delete", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GET /version/ is a Kubernetes API operation. get the version information for this server. Its operation ID is getCodeVersion. Response 200: OK Response 401: Unauthorized", "source": "paths/version/.get", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "MatchCondition is a Kubernetes object (admissionregistration/v1). MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook. Field expression (string): expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:\n\n'object' - The object from the incoming request. The value is null for DELETE requests. 'oldObject' - The existing object. The value is null for CREATE requests. 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\nDocumentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/\n\nRequired. Field name (string): name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\nRequired.", "source": "definitions/io.k8s.api.admissionregistration.v1.MatchCondition", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "MutatingAdmissionPolicyBindingSpec is a Kubernetes object (admissionregistration/v1). MutatingAdmissionPolicyBindingSpec defines the specification of the MutatingAdmissionPolicyBinding. Field matchResources (MatchResources): matchResources limits what resources match this binding and may be mutated by it. Note that if matchResources matches a resource, the resource must also match a policy's matchConstraints and matchConditions before the resource may be mutated. When matchResources is unset, it does not constrain resource matching, and only the policy's matchConstraints and matchConditions must match for the resource to be mutated. Additionally, matchResources.resourceRules are optional and do not constraint matching when unset. Note that this is differs from MutatingAdmissionPolicy matchConstraints, where resourceRules are required. The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT. Field paramRef (ParamRef): paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in spec.ParamKind of the bound MutatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the MutatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param. Field policyName (string): policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.", "source": "definitions/io.k8s.api.admissionregistration.v1.MutatingAdmissionPolicyBindingSpec", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "NamedRuleWithOperations is a Kubernetes object (admissionregistration/v1). NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. Field apiGroups (array): apiGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. Field apiVersions (array): apiVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required. Field operations (array): operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required. Field resourceNames (array): resourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. Field resources (array): resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required. Field scope (string): scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", "source": "definitions/io.k8s.api.admissionregistration.v1.NamedRuleWithOperations", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "ParamKind is a Kubernetes object (admissionregistration/v1). ParamKind is a tuple of Group Kind and Version. Field apiVersion (string): apiVersion is the API group version the resources belong to. In format of \"group/version\". Required. Field kind (string): kind is the API kind the resources belong to. Required.", "source": "definitions/io.k8s.api.admissionregistration.v1.ParamKind", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "ParamRef is a Kubernetes object (admissionregistration/v1). ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding. Field name (string): name is the name of the resource being referenced.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.\n\nA single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped. Field namespace (string): namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields.\n\nA per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty.\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.\n\n- If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error. Field parameterNotFoundAction (string): parameterNotFoundAction controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy.\n\nAllowed values are `Allow` or `Deny`\n\nRequired Field selector (LabelSelector): selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.\n\nIf multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.", "source": "definitions/io.k8s.api.admissionregistration.v1.ParamRef", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "ServiceReference is a Kubernetes object (admissionregistration/v1). ServiceReference holds a reference to Service.legacy.k8s.io Field name (string): name is the name of the service. Required Field namespace (string): namespace is the namespace of the service. Required Field path (string): path is an optional URL path which will be sent in any request to this service. Field port (integer): port is the port on the service that hosts the webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", "source": "definitions/io.k8s.api.admissionregistration.v1.ServiceReference", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "Variable is a Kubernetes object (admissionregistration/v1alpha1). Variable is the definition of a variable that is used for composition. Field expression (string): expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation. Field name (string): name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is \"foo\", the variable will be available as `variables.foo`", "source": "definitions/io.k8s.api.admissionregistration.v1alpha1.Variable", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "MutatingAdmissionPolicyBindingList is a Kubernetes object (admissionregistration/v1beta1). MutatingAdmissionPolicyBindingList is a list of MutatingAdmissionPolicyBinding. Field apiVersion (string): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources Field items (array): List of PolicyBinding. Field kind (string): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Field metadata (ListMeta): metadata is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "source": "definitions/io.k8s.api.admissionregistration.v1beta1.MutatingAdmissionPolicyBindingList", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "SelfSubjectReview is a Kubernetes object (authentication/v1). SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase. Field apiVersion (string): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources Field kind (string): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Field metadata (ObjectMeta): metadata is standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Field status (SelfSubjectReviewStatus): status is filled in by the server with the user attributes.", "source": "definitions/io.k8s.api.authentication.v1.SelfSubjectReview", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "NonResourceAttributes is a Kubernetes object (authorization/v1). NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface Field path (string): path is the URL path of the request Field verb (string): verb is the standard HTTP verb", "source": "definitions/io.k8s.api.authorization.v1.NonResourceAttributes", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "SubjectAccessReviewStatus is a Kubernetes object (authorization/v1). SubjectAccessReviewStatus Field allowed (boolean): allowed is true if the action would be allowed, false otherwise. allowed=true is mutually exclusive with denied=true and conditionalDecision != nil. Field conditionalDecision (ConditionsAwareDecision): conditionalDecision represents a conditional decision returned by the authorizer. When conditionalDecision is set, allowed, denied, reason and evaluationError must have their zero values. The top-level decision type should be ConditionsAwareDecisionTypeConditionsMap or ConditionsAwareDecisionTypeUnion, as Allow/Deny/NoOpinion decisions can be represented with SubjectAccessReviewStatus.Allowed and SubjectAccessReviewStatus.Denied alone. May only be set if spec.authorizationOptions.handledDecisionTypes includes `ConditionsMap` and `Union`. Requires the ConditionalAuthorization feature to be enabled. Field denied (boolean): denied is optional. True if the action would be denied, otherwise false If allowed is false, denied is false, and conditionalDecision is unset, then the authorizer has no opinion on whether to authorize the action. denied=true is mutually exclusive with allowed=true and conditionalDecision != nil. Field evaluationError (string): evaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. Field reason (string): reason is optional. It indicates why a request was allowed or denied.", "source": "definitions/io.k8s.api.authorization.v1.SubjectAccessReviewStatus", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "HorizontalPodAutoscalerSpec is a Kubernetes object (autoscaling/v1). specification of a horizontal pod autoscaler. Field maxReplicas (integer): maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. Field minReplicas (integer): minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available. Field scaleTargetRef (CrossVersionObjectReference): scaleTargetRef is the reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource. Field targetCPUUtilizationPercentage (integer): targetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.", "source": "definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerSpec", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "HorizontalPodAutoscalerList is a Kubernetes object (autoscaling/v2). HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects. Field apiVersion (string): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources Field items (array): items is the list of horizontal pod autoscaler objects. Field kind (string): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Field metadata (ListMeta): metadata is the standard list metadata.", "source": "definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerList", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "CertificateSigningRequestList is a Kubernetes object (certificates/v1). CertificateSigningRequestList is a collection of CertificateSigningRequest objects Field apiVersion (string): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources Field items (array): items is a collection of CertificateSigningRequest objects Field kind (string): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Field metadata (ListMeta).", "source": "definitions/io.k8s.api.certificates.v1.CertificateSigningRequestList", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PodCertificateRequestStatus is a Kubernetes object (certificates/v1beta1). PodCertificateRequestStatus describes the status of the request, and holds the certificate data if the request is issued. Field beginRefreshAt (Time): beginRefreshAt is the time at which the kubelet should begin trying to refresh the certificate. This field is set via the /status subresource, and must be set at the same time as certificateChain. Once populated, this field is immutable.\n\nThis field is only a hint. Kubelet may start refreshing before or after this time if necessary. Field certificateChain (string): certificateChain is populated with an issued certificate by the signer. This field is set via the /status subresource. Once populated, this field is immutable.\n\nIf the certificate signing request is denied, a condition of type \"Denied\" is added and this field remains empty. If the signer cannot issue the certificate, a condition of type \"Failed\" is added and this field remains empty.\n\nValidation requirements:\n 1. certificateChain must consist of one or more PEM-formatted certificates.\n 2. Each entry must be a valid PEM-wrapped, DER-encoded ASN.1 Certificate as\n described in section 4 of RFC5280.\n\nIf more than one block is present, and the definition of the requested spec.signerName does not indicate otherwise, the first block is the issued certificate, and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes. When projecting the chain into a pod volume, kubelet will drop any data in-between the PEM blocks, as well as any PEM block headers. Field conditions (array): conditions applied to the request.\n\nThe types \"Issued\", \"Denied\", and \"Failed\" have special handling. At most one of these conditions may be present, and they must have status \"True\".\n\nIf the request is denied with `Reason=UnsupportedKeyType`, the signer may suggest a key type that will work in the message field. Field notAfter (Time): notAfter is the time at which the certificate expires. The value must be the same as the notAfter value in the leaf certificate in certificateChain. This field is set via the /status subresource. Once populated, it is immutable. The signer must set this field at the same time it sets certificateChain. Field notBefore (Time): notBefore is the time at which the certificate becomes valid. The value must be the same as the notBefore value in the leaf certificate in certificateChain. This field is set via the /status subresource. Once populated, it is immutable. The signer must set this field at the same time it sets certificateChain.", "source": "definitions/io.k8s.api.certificates.v1beta1.PodCertificateRequestStatus", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "LeaseCandidate is a Kubernetes object (coordination/v1alpha2). LeaseCandidate defines a candidate for a Lease object. Candidates are created such that coordinated leader election will pick the best leader from the list of candidates. Field apiVersion (string): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources Field kind (string): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Field metadata (ObjectMeta): metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Field spec (LeaseCandidateSpec): spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", "source": "definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "AzureFileVolumeSource is a Kubernetes object (core/v1). AzureFile represents an Azure File Service mount on the host and bind mount to the pod. Field readOnly (boolean): readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. Field secretName (string): secretName is the name of secret that contains Azure Storage Account Name and Key Field shareName (string): shareName is the azure share Name", "source": "definitions/io.k8s.api.core.v1.AzureFileVolumeSource", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "Binding is a Kubernetes object (core/v1). Binding assigns a pod to a node. Field apiVersion (string): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources Field kind (string): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Field metadata (ObjectMeta): metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Field target (ObjectReference): target is the node that you want to bind the pod to.", "source": "definitions/io.k8s.api.core.v1.Binding", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "CSIVolumeSource is a Kubernetes object (core/v1). Represents a source location of a volume to mount, managed by an external CSI driver Field driver (string): driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. Field fsType (string): fsType to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. Field nodePublishSecretRef (LocalObjectReference): nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. Field readOnly (boolean): readOnly specifies a read-only configuration for the volume. Defaults to false (read/write). Field volumeAttributes (object): volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.", "source": "definitions/io.k8s.api.core.v1.CSIVolumeSource", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "ConfigMapNodeConfigSource is a Kubernetes object (core/v1). ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. This API is deprecated since 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration Field kubeletConfigKey (string): kubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases. Field name (string): name is the metadata.name of the referenced ConfigMap. This field is required in all cases. Field namespace (string): namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases. Field resourceVersion (string): resourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. Field uid (string): uid is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.", "source": "definitions/io.k8s.api.core.v1.ConfigMapNodeConfigSource", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "ContainerPort is a Kubernetes object (core/v1). ContainerPort represents a network port in a single container. Field containerPort (integer): containerPort is the number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. Field hostIP (string): hostIP is the host IP to bind the external port to. Field hostPort (integer): hostPort is the number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. Field name (string): name is the name of the port. If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. Field protocol (string): protocol is the protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\".", "source": "definitions/io.k8s.api.core.v1.ContainerPort", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "ContainerRestartRuleOnExitCodes is a Kubernetes object (core/v1). ContainerRestartRuleOnExitCodes describes the condition for handling an exited container based on its exit codes. Field operator (string): operator represents the relationship between the container exit code(s) and the specified values. Possible values are: - In: the requirement is satisfied if the container exit code is in the\n set of specified values.\n- NotIn: the requirement is satisfied if the container exit code is\n not in the set of specified values. Field values (array): values specifies the set of values to check for container exit codes. At most 255 elements are allowed.", "source": "definitions/io.k8s.api.core.v1.ContainerRestartRuleOnExitCodes", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "ContainerStatus is a Kubernetes object (core/v1). ContainerStatus contains details for the current status of this container. Field allocatedResources (object): allocatedResources represents the compute resources allocated for this container by the node. Kubelet sets this value to Container.Resources.Requests upon successful pod admission and after successfully admitting desired pod resize. Field allocatedResourcesStatus (array): allocatedResourcesStatus represents the status of various resources allocated for this Pod. Field containerID (string): containerID is the ID of the container in the format '<type>://<container_id>'. Where type is a container runtime identifier, returned from Version call of CRI API (for example \"containerd\"). Field image (string): image is the name of container image that the container is running. The container image may not match the image used in the PodSpec, as it may have been resolved by the runtime. More info: https://kubernetes.io/docs/concepts/containers/images. Field imageID (string): imageID is the image ID of the container's image. The image ID may not match the image ID of the image used in the PodSpec, as it may have been resolved by the runtime. Field lastState (ContainerState): lastState holds the last termination state of the container to help debug container crashes and restarts. This field is not populated if the container is still running and RestartCount is 0. Field name (string): name is a DNS_LABEL representing the unique name of the container. Each container in a pod must have a unique name across all container types. Cannot be updated. Field ready (boolean): ready specifies whether the container is currently passing its readiness check. The value will change as readiness probes keep executing. If no readiness probes are specified, this field defaults to true once the container is fully started (see Started field).\n\nThe value is typically used to determine whether a container is ready to accept traffic. Field resources (ResourceRequirements): resources represents the compute resource requests and limits that have been successfully enacted on the running container after it has been started or has been successfully resized. Field restartCount (integer): restartCount holds the number of times the container has been restarted. Kubelet makes an effort to always increment the value, but there are cases when the state may be lost due to node restarts and then the value may be reset to 0. The value is never negative. Field started (boolean): started indicates whether the container has finished its postStart lifecycle hook and passed its startup probe. Initialized as false, becomes true after startupProbe is considered successful. Resets to false when the container is restarted, or if kubelet loses state temporarily. In both cases, startup probes will run again. Is always true when no startupProbe is defined and container is running and has passed the postStart lifecycle hook. The null value must be treated the same as false. Field state (ContainerState): state holds details about the container's current condition. Field stopSignal (string): stopSignal reports the effective stop signal for this container Field user (ContainerUser): user represents user identity information initially attached to the first process of the container Field volumeMounts (array): volumeMounts represents the status of volume mounts.", "source": "definitions/io.k8s.api.core.v1.ContainerStatus", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "EventList is a Kubernetes object (core/v1). EventList is a list of events. Field apiVersion (string): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources Field items (array): List of events Field kind (string): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Field metadata (ListMeta): Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "source": "definitions/io.k8s.api.core.v1.EventList", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "LimitRange is a Kubernetes object (core/v1). LimitRange sets resource usage limits for each kind of resource in a Namespace. Field apiVersion (string): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources Field kind (string): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Field metadata (ObjectMeta): metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Field spec (LimitRangeSpec): spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", "source": "definitions/io.k8s.api.core.v1.LimitRange", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "LocalObjectReference is a Kubernetes object (core/v1). LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. Field name (string): name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", "source": "definitions/io.k8s.api.core.v1.LocalObjectReference", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "NamespaceSpec is a Kubernetes object (core/v1). NamespaceSpec describes the attributes on a Namespace. Field finalizers (array): finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/", "source": "definitions/io.k8s.api.core.v1.NamespaceSpec", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "NodeFeatures is a Kubernetes object (core/v1). NodeFeatures describes the set of features implemented by the CRI implementation. The features contained in the NodeFeatures should depend only on the cri implementation independent of runtime handlers. Field supplementalGroupsPolicy (boolean): supplementalGroupsPolicy is set to true if the runtime supports SupplementalGroupsPolicy and ContainerUser.", "source": "definitions/io.k8s.api.core.v1.NodeFeatures", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PersistentVolumeClaimSpec is a Kubernetes object (core/v1). PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes Field accessModes (array): accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 Field dataSource (TypedLocalObjectReference): dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource. Field dataSourceRef (TypedObjectReference): dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef\n allows any non-core object, as well as PersistentVolumeClaim objects.\n* While dataSource ignores disallowed values (dropping them), dataSourceRef\n preserves all values, and generates an error if a disallowed value is\n specified.\n* While dataSource only allows local objects, dataSourceRef allows objects\n in any namespaces.\n(Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. Field resources (VolumeResourceRequirements): resources represents the minimum resources the volume should have. Users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources Field selector (LabelSelector): selector is a label query over volumes to consider for binding. Field storageClassName (string): storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 Field volumeAttributesClassName (string): volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string or nil value indicates that no VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, this field can be reset to its previous value (including nil) to cancel the modification. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ Field volumeMode (string): volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. Field volumeName (string): volumeName is the binding reference to the PersistentVolume backing this claim.", "source": "definitions/io.k8s.api.core.v1.PersistentVolumeClaimSpec", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PersistentVolumeSpec is a Kubernetes object (core/v1). PersistentVolumeSpec is the specification of a persistent volume. Field accessModes (array): accessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes Field awsElasticBlockStore (AWSElasticBlockStoreVolumeSource): awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod.\n\nDeprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore Field azureDisk (AzureDiskVolumeSource): azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.\n\nDeprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver. Field azureFile (AzureFilePersistentVolumeSource): azureFile represents an Azure File Service mount on the host and bind mount to the pod.\n\nDeprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver. Field capacity (object): capacity is the description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity Field cephfs (CephFSPersistentVolumeSource): cephfs represents a Ceph FS mount on the host that shares a pod's lifetime.\n\nDeprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. Field cinder (CinderPersistentVolumeSource): cinder represents a cinder volume attached and mounted on kubelets host machine.\n\nDeprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md Field claimRef (ObjectReference): claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding Field csi (CSIPersistentVolumeSource): csi represents storage that is handled by an external CSI driver. Field fc (FCVolumeSource): fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. Field flexVolume (FlexPersistentVolumeSource): flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.\n\nDeprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. Field flocker (FlockerVolumeSource): flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running.\n\nDeprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. Field gcePersistentDisk (GCEPersistentDiskVolumeSource): gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.\n\nDeprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk Field glusterfs (GlusterfsPersistentVolumeSource): glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin.\n\nDeprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md Field hostPath (HostPathVolumeSource): hostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath Field iscsi (ISCSIPersistentVolumeSource): iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. Field local (LocalVolumeSource): local represents directly-attached storage with node affinity Field mountOptions (array): mountOptions is the list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options Field nfs (NFSVolumeSource): nfs represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs Field nodeAffinity (VolumeNodeAffinity): nodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume. This field is mutable if MutablePVNodeAffinity feature gate is enabled. Field persistentVolumeReclaimPolicy (string): persistentVolumeReclaimPolicy defines what happens to a persistent volume when released from its claim. Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming Field photonPersistentDisk (PhotonPersistentDiskVolumeSource): photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine.\n\nDeprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. Field portworxVolume (PortworxVolumeSource): portworxVolume represents a portworx volume attached and mounted on kubelets host machine.\n\nDeprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver. Field quobyte (QuobyteVolumeSource): quobyte represents a Quobyte mount on the host that shares a pod's lifetime.\n\nDeprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. Field rbd (RBDPersistentVolumeSource): rbd represents a Rados Block Device mount on the host that shares a pod's lifetime.\n\nDeprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md Field scaleIO (ScaleIOPersistentVolumeSource): scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.\n\nDeprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. Field storageClassName (string): storageClassName is the name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass. Field storageos (StorageOSPersistentVolumeSource): storageos represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod.\n\nDeprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. More info: https://examples.k8s.io/volumes/storageos/README.md Field volumeAttributesClassName (string): volumeAttributesClassName is the name of VolumeAttributesClass to which this persistent volume belongs. Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any VolumeAttributesClass. This field is mutable and can be changed by the CSI driver after a volume has been updated successfully to a new class. For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound PersistentVolumeClaims during the binding process. Field volumeMode (string): volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec. Field vsphereVolume (VsphereVirtualDiskVolumeSource): vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine.\n\nDeprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", "source": "definitions/io.k8s.api.core.v1.PersistentVolumeSpec", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PodReadinessGate is a Kubernetes object (core/v1). PodReadinessGate contains the reference to a pod condition Field conditionType (string): conditionType refers to a condition in the pod's condition list with matching type.", "source": "definitions/io.k8s.api.core.v1.PodReadinessGate", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PodResourceClaimStatus is a Kubernetes object (core/v1). PodResourceClaimStatus is stored in the PodStatus for each PodResourceClaim which references a ResourceClaimTemplate. It stores the generated name for the corresponding ResourceClaim. Field name (string): name uniquely identifies this resource claim inside the pod. This must match the name of an entry in pod.spec.resourceClaims, which implies that the string must be a DNS_LABEL. Field resourceClaimName (string): resourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod.\n\nWhen the DRAWorkloadResourceClaims feature is enabled and the corresponding PodResourceClaim matches a PodGroupResourceClaim made by the Pod's PodGroup, then this is the name of the ResourceClaim generated and reserved for the PodGroup.\n\nIf this is unset, then generating a ResourceClaim was not necessary. The pod.spec.resourceClaims entry can be ignored in this case.", "source": "definitions/io.k8s.api.core.v1.PodResourceClaimStatus", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PodSchedulingGroup is a Kubernetes object (core/v1). PodSchedulingGroup identifies the runtime scheduling group instance that a Pod belongs to. The scheduler uses this information to apply workload-aware scheduling semantics. Exactly one field must be specified. Field podGroupName (string): podGroupName specifies the name of the standalone PodGroup object that represents the runtime instance of this group. Must be a DNS subdomain.", "source": "definitions/io.k8s.api.core.v1.PodSchedulingGroup", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PodTemplateList is a Kubernetes object (core/v1). PodTemplateList is a list of PodTemplates. Field apiVersion (string): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources Field items (array): List of pod templates Field kind (string): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Field metadata (ListMeta): Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "source": "definitions/io.k8s.api.core.v1.PodTemplateList", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "RBDVolumeSource is a Kubernetes object (core/v1). Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling. Field fsType (string): fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd Field image (string): image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it Field keyring (string): keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it Field monitors (array): monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it Field pool (string): pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it Field readOnly (boolean): readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it Field secretRef (LocalObjectReference): secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it Field user (string): user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", "source": "definitions/io.k8s.api.core.v1.RBDVolumeSource", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "ServiceAccount is a Kubernetes object (core/v1). ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets Field apiVersion (string): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources Field automountServiceAccountToken (boolean): automountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level. Field imagePullSecrets (array): imagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod Field kind (string): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Field metadata (ObjectMeta): metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Field secrets (array): secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a \"kubernetes.io/enforce-mountable-secrets\" annotation set to \"true\". The \"kubernetes.io/enforce-mountable-secrets\" annotation is deprecated since v1.32. Prefer separate namespaces to isolate access to mounted secrets. This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret", "source": "definitions/io.k8s.api.core.v1.ServiceAccount", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "Endpoint is a Kubernetes object (discovery/v1). Endpoint represents a single logical \"backend\" implementing a service. Field addresses (array): addresses of this endpoint. For EndpointSlices of addressType \"IPv4\" or \"IPv6\", the values are IP addresses in canonical form. The syntax and semantics of other addressType values are not defined. This must contain at least one address but no more than 100. EndpointSlices generated by the EndpointSlice controller will always have exactly 1 address. No semantics are defined for additional addresses beyond the first, and kube-proxy does not look at them. Field conditions (EndpointConditions): conditions contains information about the current status of the endpoint. Field deprecatedTopology (object): deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead. Field hints (EndpointHints): hints contains information associated with how an endpoint should be consumed. Field hostname (string): hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. Field nodeName (string): nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. Field targetRef (ObjectReference): targetRef is a reference to a Kubernetes object that represents this endpoint. Field zone (string): zone is the name of the Zone this endpoint exists in.", "source": "definitions/io.k8s.api.discovery.v1.Endpoint", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "Eviction is a Kubernetes object (lifecycle/v1alpha1). Eviction initiates an eviction process, which should ideally result in a graceful eviction of a .spec.target (e.g. termination of a pod).\n\nThe evictionrequest-controller observes intents of all EvictionRequests and transforms them into Evictions. It manages the Eviction lifecycle. Requesters are preserved in .status.requesters even after they have withdrawn their request. If all requesters withdraw their eviction intent for a common target, the eviction will be canceled. Once all EvictionRequest corresponding to this Eviction .spec.target have been removed, this Eviction object will eventually be garbage collected.\n\nIf the target is a pod, the .status.targetResponders is populated from Pod's .spec.evictionResponders.\n\nResponders should observe and communicate through the .status to help with the eviction of the target when they see their state == Active in .status.targetResponders. ResponderStatus struct should then be periodically updated to indicate the progress or completion of the eviction process by each responder in .status.responders. If .status.responders[].heartbeatTime is not updated within the heartbeat deadline defined by the Eviction API (currently 20 minutes), the eviction is passed over to the next responder with a lower priority.\n\nIf there are no other responders and the target is a pod, the last default imperative-eviction.k8s.io/evictor responder with a priority of 100 will evict the pod using the imperative Eviction API (pods/<name>/eviction subresource). Field apiVersion (string): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources Field kind (string): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Field metadata (ObjectMeta): metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. .metadata.name set by the evictionrequest-controller is purely informative and subject to change. .spec.target field should be used to identify the target precisesly.\n\nThe requester and responder names will be used as label keys and added to the labels of the eviction in one of the following formats: 1. acme.io/foo: \"requester\" 2. acme.io/foo: \"responder\" 3. acme.io/foo: \"requester-responder\"\n\nPlease see EvictionParticipantRole for available role label values. Field spec (EvictionSpec): spec defines the eviction specification. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status Field status (EvictionStatus): status represents the most recently observed status of the eviction. Populated by responders and evictionrequest-controller. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", "source": "definitions/io.k8s.api.lifecycle.v1alpha1.Eviction", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "IngressBackend is a Kubernetes object (networking/v1). IngressBackend describes all endpoints for a given service and port. Field resource (TypedLocalObjectReference): resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with \"Service\". Field service (IngressServiceBackend): service references a service as a backend. This is a mutually exclusive setting with \"Resource\".", "source": "definitions/io.k8s.api.networking.v1.IngressBackend", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "ClusterRoleBindingList is a Kubernetes object (rbac/v1). ClusterRoleBindingList is a collection of ClusterRoleBindings Field apiVersion (string): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources Field items (array): Items is a list of ClusterRoleBindings Field kind (string): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Field metadata (ListMeta): Standard object's metadata.", "source": "definitions/io.k8s.api.rbac.v1.ClusterRoleBindingList", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "CapacityRequestPolicyRange is a Kubernetes object (resource/v1). CapacityRequestPolicyRange defines a valid range for consumable capacity values.\n\nIf the DRAFractionalCapacityRange feature gate is enabled and at least one of Min, Max, or Step is a fractional quantity (i.e. its value is not an integer), milli-unit arithmetic is used instead, supporting values with up to 3 decimal places (e.g. 100m = 0.1). The largest supported value then is 1000 times smaller compared to using 64-bit integers. Otherwise, all comparisons use 64-bit integer arithmetic via resource.Quantity.Value().\n\n - If the requested amount is less than Min, it is rounded up to the Min value.\n - If Step is set and the requested amount is between Min and Max but not aligned with Step,\n it will be rounded up to the next value equal to Min + (n * Step).\n - If Step is not set, the requested amount is used as-is if it falls within the range Min to Max (if set).\n - If the requested or rounded amount exceeds Max (if set), the request does not satisfy the policy,\n and the device cannot be allocated. Field max (Quantity): max defines the upper limit for capacity that can be requested.\n\nMax must be less than or equal to the capacity value. Min and requestPolicy.default must be less than or equal to the maximum. Field min (Quantity): min specifies the minimum capacity allowed for a consumption request.\n\nMin must be greater than or equal to zero, and less than or equal to the capacity value. requestPolicy.default must be more than or equal to the minimum. Field step (Quantity): step defines the step size between valid capacity amounts within the range.\n\nMax (if set) and requestPolicy.default must be a multiple of Step. Min + Step must be less than or equal to the capacity value.", "source": "definitions/io.k8s.api.resource.v1.CapacityRequestPolicyRange", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "CapacityRequirements is a Kubernetes object (resource/v1). CapacityRequirements defines the capacity requirements for a specific device request. Field requests (object): requests represent individual device capacity requests for distinct resources. Each requested name must be defined as a device capacity and/or a shared capacity (referenced by a device through consumesCounters).\n\nFor a per-device capacity, this value is used as an additional filtering condition against the available capacity on the device. This is semantically equivalent to a CEL selector with `device.capacity[<domain>].<name>.compareTo(quantity(<request quantity>)) >= 0`. For example, device.capacity['test-driver.cdi.k8s.io'].counters.compareTo(quantity('2')) >= 0.\n\nWith DRASharedConsumableCapacity enabled, a requested capacity may be provided as a shared capacity instead of a per-device capacity. If it is defined as both, the request must be satisfied by both independently.\n\nThe domain prefix can be omitted, in which case it defaults to the driver of the device under evaluation. For example, \"bandwidth: 1Gi\" is equivalent to \"<driver>/bandwidth: 1Gi\" for a device published by driver \"<driver>\", regardless of which other, differently-domained \"bandwidth\" capacities that device might also have. To request one of those, the domain must be given explicitly, for example \"example.com/bandwidth\". Requesting the same driver capacity with and without the driver name as domain, for example \"bandwidth: 1Gi\" and \"<driver>/bandwidth: 2Gi\", is ambiguous and causes scheduling to fail with an error. For the sake of consistency there's no exception for such a conflict where the value is the same - that is still an error.\n\nWhen a requestPolicy is defined, the requested amount is adjusted upward to the nearest valid value based on the policy. If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows— the device is considered ineligible for allocation.\n\nFor any capacity that is not explicitly requested: - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity\n (i.e., the whole device is claimed).\n- If a requestPolicy is set, the default consumed capacity is determined according to that policy.\n\nIf the device allows multiple allocation, the aggregated amount across all requests must not exceed the capacity value. The consumed capacity, which may be adjusted based on the requestPolicy if defined, is recorded in the resource claim's status.devices[*].consumedCapacity field.\n\nRequests may have at most 32 entries. The values must not be negative.", "source": "definitions/io.k8s.api.resource.v1.CapacityRequirements", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DeviceCounterConsumption is a Kubernetes object (resource/v1). DeviceCounterConsumption defines a set of counters that a device will consume from a CounterSet. Field compatibilityGroups (array): compatibilityGroups is a list of opaque group names for this counter set consumption.\n\nDevices that consume counters from the same counter set may only be allocated at the same time (\"co-allocated\") if they all share at least one common group: the intersection of the CompatibilityGroups of all co-allocated devices on that counter set must be non-empty. Devices that consume from different counter sets are never compared via this field.\n\nAn unset field, an explicit nil, and an empty list are equivalent and mean \"no groups\": such a device is only co-allocatable with sibling devices on the same counter set that also have no groups, and is never co-allocatable with a device that declares one or more groups.\n\nGroup names are opaque and meaningful only within the publishing driver's pool.\n\nThe maximum number of groups is 2, and the names must be unique. Field counterSet (string): counterSet is the name of the set from which the counters defined will be consumed. Field counters (object): counters defines the counters that will be consumed by the device.\n\nThe maximum number of counters is 32.", "source": "definitions/io.k8s.api.resource.v1.DeviceCounterConsumption", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "NodeAllocatableMapping is a Kubernetes object (resource/v1). NodeAllocatableMapping defines how a DRA allocation directly translates into a node allocatable resource quantity. The mapping can be derived from either the count of allocated devices (via deviceMultiplier) or the specific capacity consumed (via capacityKey and capacityMultiplier). These options are mutually exclusive. The scheduler records the mapped quantity in the pod's `status.extraNodeAllocatableResources`: once in the requests and limits of the pod level entry, and in the limits of the container entry of each container referencing the claim, so that each of these containers can use all of it while the pod level entry caps their total usage. Field capacityKey (string): capacityKey references a capacity name defined as a key in the `spec.devices[*].capacity` map. When this field is set, the value associated with this key in the `status.allocation.devices.results[*].consumedCapacity` map (for a specific claim allocation) determines the base quantity for the node allocatable resource. `capacityMultiplier` must also be set and is multiplied with the base quantity.\n\nFor example, if `spec.devices[*].capacity` has an entry \"dra.example.com/memory\": \"128Gi\", and this field is set to \"dra.example.com/memory\", then for a claim allocation that consumes { \"dra.example.com/memory\": \"4Gi\" } the base quantity for the node allocatable resource mapping will be \"4Gi\". The final node allocatable resource amount is `consumedCapacity[capacityKey]` * `capacityMultiplier`.\n\nIn this example, \"dra.example.com/memory\" is a fictional standardized capacity name. For driver-specific capacities the driver name can be omitted. As defined for consumedCapacity, the capacity consumption may be recorded there with or without the driver name. Field capacityMultiplier (Quantity): capacityMultiplier is used as a multiplier for the allocated capacity consumed. It is only valid if `capacityKey` is set. The final node allocatable resource amount is `consumedCapacity[capacityKey]` * `capacityMultiplier`. For example, if a Device's capacity \"dra.example.com/cores\" is consumed, and each \"core\" provides 2 \"cpu\"s, the mapping would be: {ResourceName: \"cpu\", capacityKey: \"dra.example.com/cores\", capacityMultiplier: \"2\"}. If a claim consumes 8 \"dra.example.com/cores\", the CPU footprint is 8 * 2 = 16. Field deviceMultiplier (Quantity): deviceMultiplier is used as a multiplier for the allocated device count in the claim. The final node allocatable resource amount is `deviceCount` * `deviceMultiplier`. For example, a DRA driver representing each cache complex (CCX) as a device would have {ResourceName: \"cpu\", deviceMultiplier: \"8\"} in its `nodeAllocatableResources`. If 2 devices (CCX) are allocated to the claim, 2 * 8 = 16 CPUs would be considered as allocated. It is only valid when `capacityKey` and `capacityMultiplier` are not set.", "source": "definitions/io.k8s.api.resource.v1.NodeAllocatableMapping", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "NodeAllocatableOverhead is a Kubernetes object (resource/v1). NodeAllocatableOverhead defines auxiliary resource overheads incurred when allocating a device. Overheads can be specified as a fixed cost per pod referencing the claim, a variable cost per container reference, or both. The scheduler records the overhead in the pod's `status.extraNodeAllocatableResources`, as described for perContainer. Field perContainer (Quantity): perContainer is applied per container reference to the claim. This models overhead scaling linearly with the number of containers actively using the device. When both PerPod and PerContainer are specified, the total overhead allocated for each pod referencing the claim is computed as: Quantity = PerPod + (PerContainer * NumReferences) The scheduler records this overhead in the pod's `status.extraNodeAllocatableResources`: - The pod level entry (requests and limits) gets PerPod + (PerContainer * NumReferences).\n PerContainer of a non-restartable init container counts towards the pod's peak resource\n calculation (see Pod `spec.initContainers`), not for the pod's entire duration.\n- The container entry of each referencing container gets PerContainer in its requests,\n and PerPod + PerContainer in its limits.\nThis allows any single container to use the pod level overhead, while the pod level entry caps the total usage to account for PerPod exactly once. Field perPod (Quantity): perPod is overhead applied once per pod referencing the claim on this node. This is a flat overhead incurred for every pod referencing the claim.", "source": "definitions/io.k8s.api.resource.v1.NodeAllocatableOverhead", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "ResourceClaimList is a Kubernetes object (resource/v1). ResourceClaimList is a collection of claims. Field apiVersion (string): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources Field items (array): Items is the list of resource claims. Field kind (string): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Field metadata (ListMeta): Standard list metadata", "source": "definitions/io.k8s.api.resource.v1.ResourceClaimList", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "ResourceClaimTemplate is a Kubernetes object (resource/v1). ResourceClaimTemplate is used to produce ResourceClaim objects. Field apiVersion (string): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources Field kind (string): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Field metadata (ObjectMeta): metadata is the standard object's metadata. Field spec (ResourceClaimTemplateSpec): spec describes the ResourceClaim that is to be generated.\n\nThis field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.", "source": "definitions/io.k8s.api.resource.v1.ResourceClaimTemplate", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "ResourceSlice is a Kubernetes object (resource/v1). ResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.\n\nAt the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple <driver name>, <pool name>, <device name>.\n\nWhenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.\n\nWhen allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.\n\nFor resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available. Field apiVersion (string): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources Field kind (string): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Field metadata (ObjectMeta): metadata is the standard object's metadata. Field spec (ResourceSliceSpec): spec contains the information published by the driver.\n\nChanging the spec automatically increments the metadata.generation number.", "source": "definitions/io.k8s.api.resource.v1.ResourceSlice", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "AllocationResult is a Kubernetes object (resource/v1beta2). AllocationResult contains attributes of an allocated resource. Field allocationTimestamp (Time): allocationTimestamp stores the time when the resources were allocated. This field is not guaranteed to be set, in which case that time is unknown. Field devices (DeviceAllocationResult): devices is the result of allocating devices. Field nodeSelector (NodeSelector): nodeSelector defines where the allocated resources are available. If unset, they are available everywhere.", "source": "definitions/io.k8s.api.resource.v1beta2.AllocationResult", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DeviceAllocationConfiguration is a Kubernetes object (resource/v1beta2). DeviceAllocationConfiguration gets embedded in an AllocationResult. Field opaque (OpaqueDeviceConfiguration): opaque provides driver-specific configuration parameters. Field requests (array): requests lists the names of requests where the configuration applies. If empty, its applies to all requests.\n\nReferences to subrequests must include the name of the main request and may include the subrequest using the format <main request>[/<subrequest>]. If just the main request is given, the configuration applies to all subrequests. Field source (string): source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim.", "source": "definitions/io.k8s.api.resource.v1beta2.DeviceAllocationConfiguration", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DeviceCapacity is a Kubernetes object (resource/v1beta2). DeviceCapacity describes a quantity associated with a device. Field requestPolicy (CapacityRequestPolicy): requestPolicy defines how this DeviceCapacity must be consumed when the device is allowed to be shared by multiple allocations.\n\nThe Device must have allowMultipleAllocations set to true in order to set a requestPolicy.\n\nIf unset, capacity requests are unconstrained: requests can consume any amount of capacity, as long as the total consumed across all allocations does not exceed the device's defined capacity. If request is also unset, default is the full capacity value. Field value (Quantity): value defines how much of a certain capacity that device has.\n\nThis field reflects the fixed total capacity and does not change. The consumed amount is tracked separately by scheduler and does not affect this value.", "source": "definitions/io.k8s.api.resource.v1beta2.DeviceCapacity", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DeviceDerivedAttribute is a Kubernetes object (resource/v1beta2). DeviceDerivedAttribute defines a derived attribute computed via CEL. Field expression (string): expression is a CEL expression evaluated against each candidate device. The expression must evaluate to a primitive scalar (string, integer, boolean, or semver) or a list of these scalars ([]string, []int64, []bool, []semver) to act as a virtual grouping key. Any other return type is an error and causes CEL evaluation for the device to fail.\n\nThe expression's input is an object named \"device\", which carries the same properties as in a CELDeviceSelector.\n\nWhen pod scheduling encounters CEL runtime errors (such as looking up an attribute that isn't defined) for some devices, it will abort allocation and fail scheduling for the Pod. Surfacing evaluation errors immediately prevents silent topology matching failures that are extremely hard to detect. A robust expression should, for example, check for the existence of attributes before referencing them to avoid runtime evaluation errors.\n\nThe expression gets evaluated after a device has passed the other selector expressions for the request in which this expression is used. This allows writing expressions that are tailored towards the specific devices being requested (for example, by assuming the device is from a certain vendor and skipping those checks).\n\nThe length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps; the combined cost of all derived attributes in a claim is capped by a shared CEL cost budget. Field name (string): name is the identifier for this derived attribute, used in constraints.\n\nIt must be a DNS subdomain followed by a slash (\"/\") followed by a C identifier (e.g. \"example.com/numaNode\" or \"derived/numaNode\").\n\nIf the chosen name matches an existing physical attribute from a driver, the derived attribute's expression will shadow the physical attribute, and its evaluated value will be used in constraints instead. When the goal is to define a derived attribute that is only used within the ResourceClaim and not meant to shadow an existing attribute, use a domain prefix that no DRA driver should be using (e.g. \"derived/myAttribute\").\n\nIt is not valid to define a derived attribute that isn't used in at least one constraint.", "source": "definitions/io.k8s.api.resource.v1beta2.DeviceDerivedAttribute", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DeviceRequest is a Kubernetes object (resource/v1beta2). DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices. With FirstAvailable it is also possible to provide a prioritized list of requests. Field exactly (ExactDeviceRequest): exactly specifies the details for a single request that must be met exactly for the request to be satisfied.\n\nOne of Exactly or FirstAvailable must be set. Field firstAvailable (array): firstAvailable contains subrequests, of which exactly one will be selected by the scheduler. It tries to satisfy them in the order in which they are listed here. So if there are two entries in the list, the scheduler will only check the second one if it determines that the first one can not be used.\n\nDRA does not yet implement scoring, so the scheduler will select the first set of devices that satisfies all the requests in the claim. And if the requirements can be satisfied on more than one node, other scheduling features will determine which node is chosen. This means that the set of devices allocated to a claim might not be the optimal set available to the cluster. Scoring will be implemented later. Field name (string): name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.\n\nReferences using the name in the DeviceRequest will uniquely identify a request when the Exactly field is set. When the FirstAvailable field is set, a reference to the name of the DeviceRequest will match whatever subrequest is chosen by the scheduler.\n\nMust be a DNS label.", "source": "definitions/io.k8s.api.resource.v1beta2.DeviceRequest", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "DeviceTaint is a Kubernetes object (resource/v1beta2). The device this taint is attached to has the \"effect\" on any claim which does not tolerate the taint and, through the claim, to pods using the claim. Field effect (string): effect is the effect of the taint on claims that do not tolerate the taint and through such claims on the pods using them.\n\nValid effects are None, NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here. More effects may get added in the future. Consumers must treat unknown effects like None. Field key (string): key is the taint key to be applied to a device. Must be a label name. Field timeAdded (Time): timeAdded represents the time at which the taint was added or (only in a DeviceTaintRule) the effect was modified. Added automatically during create or update if not set.\n\nIn addition, in a DeviceTaintRule a value provided during an update gets replaced with the current time if the provided value is the same as the old one and the new effect is different. Changing the key and/or value while keeping the effect unchanged is possible and does not update the time stamp because the eviction which uses it is either already started (NoExecute) or not started yet (NoEffect, NoSchedule). Field value (string): value is the taint value corresponding to the taint key. Must be a label value.", "source": "definitions/io.k8s.api.resource.v1beta2.DeviceTaint", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "ResourceSliceList is a Kubernetes object (resource/v1beta2). ResourceSliceList is a collection of ResourceSlices. Field apiVersion (string): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources Field items (array): Items is the list of resource ResourceSlices. Field kind (string): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Field metadata (ListMeta): Standard list metadata", "source": "definitions/io.k8s.api.resource.v1beta2.ResourceSliceList", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "GangSchedulingPolicy is a Kubernetes object (scheduling/v1alpha3). GangSchedulingPolicy defines the parameters for gang scheduling. Field minCount (integer): minCount is the minimum number of pods that must be schedulable or scheduled at the same time for the scheduler to admit the entire group. It must be a positive integer. This field is mutable to support workload scaling.\n\nNote that the scheduler operates on an eventually consistent model. Updates to minCount may not be immediately reflected in scheduling decisions due to propagation delays. If minCount is updated while a scheduling cycle is in progress for that group, the new value may not take effect until the next cycle. Moreover, minCount is only enforced during scheduling, meaning that modifications to this field do not affect already-scheduled pods, applying only to those evaluated in future cycles.", "source": "definitions/io.k8s.api.scheduling.v1alpha3.GangSchedulingPolicy", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "PodGroupSchedulingConstraints is a Kubernetes object (scheduling/v1alpha3). PodGroupSchedulingConstraints defines scheduling constraints (e.g. topology) for a PodGroup. Field topology (array): topology defines the topology constraints for the pod group. Currently only a single topology constraint can be specified. This may change in the future.", "source": "definitions/io.k8s.api.scheduling.v1alpha3.PodGroupSchedulingConstraints", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "TopologyConstraint is a Kubernetes object (scheduling/v1beta1). TopologyConstraint defines a topology constraint for a PodGroup. Field key (string): key specifies the key of the node label representing the topology domain. All pods within the PodGroup must be colocated within the same domain instance. Different PodGroups can land on different domain instances even if they derive from the same PodGroupTemplate. Nodes where this label is missing or has an empty value do not belong to any domain instance, so pods within the PodGroup cannot be scheduled onto them. Examples: \"topology.kubernetes.io/rack\"", "source": "definitions/io.k8s.api.scheduling.v1beta1.TopologyConstraint", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "CSIDriverList is a Kubernetes object (storage/v1). CSIDriverList is a collection of CSIDriver objects. Field apiVersion (string): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources Field items (array): items is the list of CSIDriver Field kind (string): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Field metadata (ListMeta): Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "source": "definitions/io.k8s.api.storage.v1.CSIDriverList", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "CustomResourceSubresourceStatus is a Kubernetes object (apiextensions/v1). CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. Status is represented by the `.status` JSON path inside of a CustomResource. When set, * exposes a /status subresource for the custom resource * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza", "source": "definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceStatus", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "SelectableField is a Kubernetes object (apiextensions/v1). SelectableField specifies the JSON path of a field that may be used with field selectors. Field jsonPath (string): jsonPath is a simple JSON path which is evaluated against each custom resource to produce a field selector value. Only JSON paths without the array notation are allowed. Must point to a field of type string, boolean or integer. Types with enum values and strings with formats are allowed. If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. Must not point to metdata fields. Required.", "source": "definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.SelectableField", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "WebhookConversion is a Kubernetes object (apiextensions/v1). WebhookConversion describes how to call a conversion webhook Field clientConfig (WebhookClientConfig): clientConfig is the instructions for how to call the webhook if strategy is `Webhook`. Field conversionReviewVersions (array): conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.", "source": "definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.WebhookConversion", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "Patch is a Kubernetes object (meta/v1). Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", "source": "definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "WatchEvent is a Kubernetes object (meta/v1). Event represents a single event to a watched resource. Field object (RawExtension): Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context. Field type (string).", "source": "definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "APIService is a Kubernetes object (apiregistration/v1). APIService represents a server for a particular GroupVersion. Name must be \"version.group\". Field apiVersion (string): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources Field kind (string): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Field metadata (ObjectMeta): Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Field spec (APIServiceSpec): Spec contains information for locating and communicating with a server Field status (APIServiceStatus): Status contains derived information about an API server", "source": "definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIService", "commit": "80d51ceb32d28aa2d3df01ed80a649533add021b", "sha256": "a5ffd0509edb2be823776fd0432bd480de8d0783038331a8087435c8ac1de66f", "license": "Apache-2.0", "from": "kubernetes-openapi.jsonl"}
|
||
{"text": "Prometheus has an official [Go client library](https://github.com/prometheus/client_golang) that you can use to instrument Go applications. In this guide, we'll create a simple Go application that exposes Prometheus metrics via HTTP.\n\nNOTE: For comprehensive API documentation, see the [GoDoc](https://godoc.org/github.com/prometheus/client_golang) for Prometheus' various Go libraries.\n\n## Installation\n\nYou can install the `prometheus`, `promauto`, and `promhttp` libraries necessary for the guide using [`go get`](https://golang.org/doc/articles/go_command.html):\n\n```bash\ngo get github.com/prometheus/client_golang/prometheus\ngo get github.com/prometheus/client_golang/prometheus/promauto\ngo get github.com/prometheus/client_golang/prometheus/promhttp\n```\n\n## How Go exposition works\n\nTo expose Prometheus metrics in a Go application, you need to provide a `/metrics` HTTP endpoint. You can use the [`prometheus/promhttp`](https://godoc.org/github.com/prometheus/client_golang/prometheus/promhttp) library's HTTP [`Handler`](https://godoc.org/github.com/prometheus/client_golang/prometheus/promhttp#Handler) as the handler function.\n\nThis minimal application, for example, would expose the default metrics for Go applications via `http://localhost:2112/metrics`:\n\n```go\npackage main\n\nimport (\n \"net/http\"\n\n \"github.com/prometheus/client_golang/prometheus\"\n \"github.com/prometheus/client_golang/prometheus/collectors\"\n \"github.com/prometheus/client_golang/prometheus/promhttp\"\n)\n\nfunc main() {\n reg := prometheus.NewRegistry()\n reg.MustRegister(\n collectors.NewGoCollector(),\n collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}),\n )\n http.Handle(\"/metrics\", promhttp.HandlerFor(reg, promhttp.HandlerOpts{}))\n http.ListenAndServe(\":2112\", nil)\n}\n```\n\nTo start the application:\n\n```bash\ngo run main.go\n```\n\nTo access the metrics:\n\n```bash\ncurl http://localhost:2112/metrics\n```\n\n## Adding your own metrics\n\nThe application [above](#how-go-exposition-works) exposes only the default Go metrics. You can also register your own custom application-specific metrics. This example application exposes a `myapp_processed_ops_total` [counter](/docs/concepts/metric_types/#counter) that counts the number of operations that have been processed thus far. Every 2 seconds, the counter is incremented by one.\n\n```go\npackage main\n\nimport (\n \"net/http\"\n \"time\"\n\n \"github.com/prometheus/client_golang/prometheus\"\n \"github.com/prometheus/client_golang/prometheus/promauto\"\n \"github.com/prometheus/client_golang/prometheus/promhttp\"\n)\n\ntype metrics struct {\n opsProcessed prometheus.Counter\n}\n\nfunc newMetrics(reg prometheus.Registerer) *metrics {\n m := &metrics{\n opsProcessed: promauto.With(reg).NewCounter(prometheus.CounterOpts{\n Name: \"myapp_processed_ops_total\",\n Help: \"The total number of processed events\",\n }),\n }\n return m\n}\n\nfunc recordMetrics(m *metrics) {\n go func() {\n for {\n m.opsProcessed.Inc()\n time.Sleep(2 * time.Second)\n }\n }()\n}\n\nfunc main() {\n reg := prometheus.NewRegistry()\n m := newMetrics(reg)\n recordMetrics(m)\n\n http.Handle(\"/metrics\", promhttp.HandlerFor(reg, promhttp.HandlerOpts{}))\n http.ListenAndServe(\":2112\", nil)\n}\n```\n\nTo run the application:\n\n```bash\ngo run main.go\n```\n\nTo access the metrics:\n\n```bash\ncurl http://localhost:2112/metrics\n```\n\nIn the metrics output, you'll see the help text, type information, and current value of the `myapp_processed_ops_total` counter:\n\n```\n# HELP myapp_processed_ops_total The total number of processed events\n# TYPE myapp_processed_ops_total counter\nmyapp_processed_ops_total 5\n```\n\nYou can [configure](/docs/prometheus/latest/configuration/configuration/#scrape_config) a locally running Prometheus instance to scrape metrics from the application. Here's an example `prometheus.yml` configuration:\n\n```yaml\nscrape_configs:\n- job_name: myapp\n scrape_interval: 10s\n static_configs:\n - targets:\n - localhost:2112\n```\n\n## Other Go client features\n\nIn this guide we covered just a small handful of features available in the Prometheus Go client libraries. You can also expose other metrics types, such as [gauges](https://godoc.org/github.com/prometheus/client_golang/prometheus#Gauge) and [histograms](https://godoc.org/github.com/prometheus/client_golang/prometheus#Histogram), [non-global registries](https://godoc.org/github.com/prometheus/client_golang/prometheus#Registry), functions for [pushing metrics](https://godoc.org/github.com/prometheus/client_golang/prometheus/push) to Prometheus [PushGateways](/docs/instrumenting/pushing/), bridging Prometheus and [Graphite](https://godoc.org/github.com/prometheus/client_golang/prometheus/graphite), and more.\n\n## Summary\n\nIn this guide, you created two sample Go applications that expose metrics to Prometheus---one that exposes only the default Go metrics and one that also exposes a custom Prometheus counter---and configured a Prometheus instance to scrape metrics from those applications.", "project": "prometheus-docs", "source": "docs/guides/go-application.md", "commit": "31957d4da93dd215cad8c91be3e5205181dd11f1", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "- Version: 1.0\n- Status: Published\n- Date: April 2023\n\nThis document is intended to define and standardise the API, wire format, protocol and semantics of the existing, widely and organically adopted protocol, and not to propose anything new.\n\nThe remote write specification is intended to document the standard for how Prometheus and Prometheus remote-write-compatible agents send data to a Prometheus or Prometheus remote-write compatible receiver.\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in [RFC 2119](https://datatracker.ietf.org/doc/html/rfc2119).\n\n> NOTE: This specification has a 2.0 version available, see [here](./remote_write_spec_2_0.md).\n\n## Introduction\n### Background\n\nThe remote write protocol is designed to make it possible to reliably propagate samples in real-time from a sender to a receiver, without loss.\n\nThe Remote-Write protocol is designed to be stateless; there is strictly no inter-message communication. As such the protocol is not considered \"streaming\". To achieve a streaming effect multiple messages should be sent over the same connection using e.g. HTTP/1.1 or HTTP/2. \"Fancy\" technologies such as gRPC were considered, but at the time were not widely adopted, and it was challenging to expose gRPC services to the internet behind load balancers such as an AWS EC2 ELB.\n\nThe remote write protocol contains opportunities for batching, e.g. sending multiple samples for different series in a single request. It is not expected that multiple samples for the same series will be commonly sent in the same request, although there is support for this in the protocol.\n\nThe remote write protocol is not intended for use by applications to push metrics to Prometheus remote-write-compatible receivers. It is intended that a Prometheus remote-write-compatible sender scrapes instrumented applications or exporters and sends remote write messages to a server.\n\nA test suite can be found at https://github.com/prometheus/compliance/tree/main/remotewrite/sender.\n\n### Glossary\n\nFor the purposes of this document the following definitions MUST be followed:\n\n- a \"Sender\" is something that sends Prometheus Remote Write data.\n- a \"Receiver\" is something that receives Prometheus Remote Write data.\n- a \"Sample\" is a pair of (timestamp, value).\n- a \"Label\" is a pair of (key, value).\n- a \"Series\" is a list of samples, identified by a unique set of labels.\n\n## Definitions\n### Protocol\n\nThe Remote Write Protocol MUST consist of RPCs with the following signature:\n\n```\nfunc Send(WriteRequest)\n\nmessage WriteRequest {\n repeated TimeSeries timeseries = 1;\n // Cortex uses this field to determine the source of the write request.\n // We reserve it to avoid any compatibility issues.\n reserved 2;\n\n // Prometheus uses this field to send metadata, but this is\n // omitted from v1 of the spec as it is experimental.\n reserved 3;\n}\n\nmessage TimeSeries {\n repeated Label labels = 1;\n repeated Sample samples = 2;\n}\n\nmessage Label {\n string name = 1;\n string value = 2;\n}\n\nmessage Sample {\n double value = 1;\n int64 timestamp = 2;\n}\n```\n\nRemote write Senders MUST encode the Write Request in the body of a HTTP POST request and send it to the Receivers via HTTP at a provided URL path. The Receiver MAY specify any HTTP URL path to receive metrics.\n\nTimestamps MUST be int64 counted as milliseconds since the Unix epoch. Values MUST be float64.\n\nThe following headers MUST be sent with the HTTP request:\n\n- `Content-Encoding: snappy`\n- `Content-Type: application/x-protobuf`\n- `User-Agent: `\n- `X-Prometheus-Remote-Write-Version: 0.1.0`\n\nClients MAY allow users to send custom HTTP headers; they MUST NOT allow users to configure them in such a way as to send reserved headers. For more info see https://github.com/prometheus/prometheus/pull/8416.\n\nThe remote write request in the body of the HTTP POST MUST be compressed with [Google’s Snappy](https://github.com/google/snappy). The block format MUST be used - the framed format MUST NOT be used.\n\nThe remote write request MUST be encoded using Google Protobuf 3, and MUST use the schema defined above. Note [the Prometheus implementation](https://github.com/prometheus/prometheus/blob/v2.24.0/prompb/remote.proto) uses [gogoproto optimisations](https://github.com/gogo/protobuf) - for receivers written in languages other than Golang the gogoproto types MAY be substituted for line-level equivalents.\n\nThe response body from the remote write receiver SHOULD be empty; clients MUST ignore the response body. The response body is RESERVED for future use.\n\n### Backward and forward compatibility\n\nThe protocol follows [semantic versioning 2.0](https://semver.org/): any 1.x compatible receivers MUST be able to read any 1.x compatible sender and so on. Breaking/backwards incompatible changes will result in a 2.x version of the spec.\n\nThe proto format itself is forward / backward compatible, in some respects:\n\n- Removing fields from the proto will mean a major version bump.\n- Adding (optional) fields will be a minor version bump.\n\nNegotiation:\n\n- Senders MUST send the version number in a headers.\n- Receivers MAY return the highest version number they support in a response header (\"X-Prometheus-Remote-Write-Version\").\n- Senders who wish to send in a format >1.x MUST start by sending an empty 1.x, and see if the response says the receiver supports something else. The Sender MAY use any supported version . If there is no version header in the response, senders MUST assume 1.x compatibility only.\n\n### Labels\n\nThe complete set of labels MUST be sent with each sample. Whatsmore, the label set associated with samples:\n\n- SHOULD contain a `__name__` label.\n- MUST NOT contain repeated label names.\n- MUST have label names sorted in lexicographical order.\n- MUST NOT contain any empty label names or values.\n\nSenders MUST only send valid metric names, label names, and label values:\n\n- Metric names MUST adhere to the regex `[a-zA-Z_:]([a-zA-Z0-9_:])*`.\n- Label names MUST adhere to the regex `[a-zA-Z_]([a-zA-Z0-9_])*`.\n- Label values MAY be any sequence of UTF-8 characters .\n\nReceivers MAY impose limits on the number and length of labels, but this will be receiver-specific and is out of scope for this document.\n\nLabel names beginning with \"__\" are RESERVED for system usage and SHOULD NOT be used, see [Prometheus Data Model](https://prometheus.io/docs/concepts/data_model/).\n\nRemote write Receivers MAY ingest valid samples within a write request that otherwise contains invalid samples. Receivers MUST return a HTTP 400 status code (\"Bad Request\") for write requests that contain any invalid samples. Receivers SHOULD provide a human readable error message in the response body. Senders MUST NOT try and interpret the error message, and SHOULD log it as is.\n\n### Ordering\nPrometheus Remote Write compatible senders MUST send samples for any given series in timestamp order. Prometheus Remote Write compatible Senders MAY send multiple requests for different series in parallel.\n\n### Retries & Backoff\nPrometheus Remote Write compatible senders MUST retry write requests on HTTP 5xx responses and MUST use a backoff algorithm to prevent overwhelming the server. They MUST NOT retry write requests on HTTP 2xx and 4xx responses other than 429. They MAY retry on HTTP 429 responses, which could result in senders \"falling behind\" if the server cannot keep up. This is done to ensure data is not lost when there are server side errors, and progress is made when there are client side errors.\n\nPrometheus remote Write compatible receivers MUST respond with a HTTP 2xx status code when the write is successful. They MUST respond with HTTP status code 5xx when the write fails and SHOULD be retried. They MUST respond with HTTP status code 4xx when the request is invalid, will never be able to succeed and should not be retried.\n\n### Stale Markers\nPrometheus remote write compatible senders MUST send stale markers when a time series will no longer be appended to.\n\nStale markers MUST be signalled by the special NaN value 0x7ff0000000000002. This value MUST NOT be used otherwise.\n\nTypically the sender can detect when a time series will no longer be appended to using the following techniques:\n\n1. Detecting, using service discovery, that the target exposing the series has gone away\n1. Noticing the target is no longer exposing the time series between successive scrapes\n1. Failing to scrape the target that originally exposed a time series\n1. Tracking configuration and evaluation for recording and alerting rules\n\n## Out of Scope\nThis document does not intend to explain all the features required for a fully Prometheus-compatible monitoring system. In particular, the following areas are out of scope for the first version of the spec:\n\n**The \"up\" metric** The definition and semantics of the \"up\" metric are beyond the scope of the remote write protocol and should be documented separately.\n\n**HTTP Path** The path for HTTP handler can be anything - and MUST be provided by the sender. Generally we expect the whole URL to be specified in config.\n\n**Persistence** It is recommended that Prometheus Remote Write compatible senders should persistently buffer sample data in the event of outages in the receiver.\n\n**Authentication & Encryption** as remote write uses HTTP, we consider authentication & encryption to be a transport-layer problem. Senders and receivers should support all the usual suspects (Basic auth, TLS etc) and are free to add potentially custom authentication options. Support for custom authentication in the Prometheus remote write sender and eventual agent should not be assumed, but we will endeavour to support common and widely used auth protocols, where feasible.\n\n**Remote Read** this is a separate interface that has already seen some iteration, and is less widely used.\n\n**Sharding** the current sharding scheme in Prometheus for remote write parallelisation is very much an implementation detail, and isn’t part of the spec. When senders do implement parallelisation they MUST preserve per-series sample ordering.\n\n**Backfill** The specification does not place a limit on how old series can be pushed, however server/implementation specific constraints may exist.\n\n**Limits** Limits on the number and length of labels, batch sizes etc are beyond the scope of this document, however it is expected that implementation will impose reasonable limits.\n\n**Push-based Prometheus** Applications pushing metrics to Prometheus Remote Write compatible receivers was not a design goal of this system, and should be explored in a separate doc.\n\n**Labels** Every series MAY include a \"job\" and/or \"instance\" label, as these are typically added by service discovery in the Sender. These are not mandatory.\n\n## Future Plans\nThis section contains speculative plans that are not considered part of protocol specification, but are mentioned here for completeness.\n\n**Transactionality** Prometheus aims at being \"transactional\" - i.e. to never expose a partially scraped target to a query. We intend to do the same with remote write - for instance, in the future we would like to \"align\" remote write with scrapes, perhaps such that all the samples, metadata and exemplars for a single scrape are sent in a single remote write request. This is yet to be designed.\n\n**Metadata** and Exemplars In line with above, we also send metadata (type information, help text) and exemplars along with the scraped samples. We plan to package this up in a single remote write request - future versions of the spec may insist on this. Prometheus currently has experimental support for sending metadata and exemplars.\n\n**Optimizations** We would like to investigate various optimizations to reduce message size by eliminating repetition of label names and values.\n\n## Related\n### Compatible Senders and Receivers\n\nThe spec is intended to describe how the following components interact (as of April 2023):\n\n- [Prometheus](https://github.com/prometheus/prometheus/tree/master/storage/remote) (as both a \"sender\" and a \"receiver\")\n- [Avalanche](https://github.com/prometheus-community/avalanche) (as a \"sender\") - A Load Testing Tool Prometheus Metrics.\n- [Cortex](https://github.com/cortexproject/cortex/blob/master/pkg/util/push/push.go#L20) (as a \"receiver\")\n- [Elastic Agent](https://docs.elastic.co/integrations/prometheus#prometheus-server-remote-write) (as a \"receiver\")\n- [Grafana Agent](https://github.com/grafana/agent) (as both a \"sender\" and a \"receiver\")\n- [GreptimeDB](https://github.com/greptimeTeam/greptimedb) (as a [\"receiver\"](https://docs.greptime.com/user-guide/ingest-data/for-observability/prometheus/))\n- InfluxData’s Telegraf agent. ([as a sender](https://github.com/influxdata/telegraf/tree/master/plugins/serializers/prometheusremotewrite), and [as a receiver](https://github.com/influxdata/telegraf/pull/8967))\n- [M3](https://m3db.io/docs/integrations/prometheus/#prometheus-configuration) (as a \"receiver\")\n- [Mimir](https://github.com/grafana/mimir) (as a \"receiver\")\n- [Oodle](https://docs.oodle.ai/integrations/metrics/prometheus/) (as a \"receiver\")\n- [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector-releases/) (as a [\"sender\"](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/prometheusremotewriteexporter#readme) and eventually as a \"receiver\")\n- [Thanos](https://thanos.io/tip/components/receive.md/) (as a \"receiver\")\n- Vector (as a [\"sender\"](https://vector.dev/docs/reference/configuration/sinks/prometheus_remote_write/) and a [\"receiver\"](https://vector.dev/docs/reference/configuration/sources/prometheus_remote_write/))\n- [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics) (as a [\"receiver\"](https://docs.victoriametrics.com/#prometheus-setup))\n\n### FAQ\n\n**Why did you not use gRPC?**\nFunnily enough we initially used gRPC, but switched to Protos atop HTTP as in 2016 it was hard to get them past ELBs: https://github.com/prometheus/prometheus/issues/1982\n\n**Why not streaming protobuf messages?**\nIf you use persistent HTTP/1.1 connections, they are pretty close to streaming… Of course headers have to be re-sent, but yes that is less expensive than a new TCP set up.\n\n**Why do we send samples in order?**\nThe in-order constraint comes from the encoding we use for time series data in Prometheus, the implementation of which is append only. It is possible to remove this constraint, for instance by buffering samples and reordering them before encoding. We can investigate this in future versions of the protocol.\n\n**How can we parallelise requests with the in-order constraint?**\nSamples must be in-order _for a given series_. Remote write requests can be sent in parallel as long as they are for different series. In Prometheus, we shard the samples by their labels into separate queues, and then writes happen sequentially in each queue. This guarantees samples for the same series are delivered in order, but samples for different series are sent in parallel - and potentially \"out of order\" between different series.\n\nWe believe this is necessary as, even if the receiver could support out-of-order samples, we can't have agents sending out of order as they would never be able to send to Prometheus, Cortex and Thanos. We’re doing this to ensure the integrity of the ecosystem and to prevent confusing/forking the community into \"prometheus-agents-that-can-write-to-prometheus\" and those that can’t.", "project": "prometheus-docs", "source": "docs/specs/prw/remote_write_spec.md", "commit": "31957d4da93dd215cad8c91be3e5205181dd11f1", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "The expression browser is available at `/graph` on the Prometheus server, allowing you\nto enter any expression and see its result either in a table or graphed over time.\n\nThis is primarily useful for ad-hoc queries and debugging. For graphs, use\n[Grafana](/docs/visualization/grafana/) or [Console templates](/docs/visualization/consoles/).", "project": "prometheus-docs", "source": "docs/visualization/browser.md", "commit": "31957d4da93dd215cad8c91be3e5205181dd11f1", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "[Perses](https://perses.dev) is an open-source dashboard and visualization platform designed for observability, with\nnative support for Prometheus as a data source.\nIt enables users to create, manage, and share dashboards for monitoring metrics and visualizing data.\nPerses aims to provide a simple, flexible, and extensible alternative to other dashboarding tools, focusing on ease of\nuse, community-driven development, GitOps capabilities and dashboard as code approach.\n\nHere is an example of a Perses dashboard querying Prometheus for data:\n\n[](/assets/docs/perses_prometheus.png)\n\n## Installing\n\nTo install Perses, see the official [Perses documentation](https://perses.dev/perses/docs/installation/in-a-container/).\n\n## Using\n\nBy default, Perses will be listening on port `8080`. You can access the web UI at `http://localhost:8080`. There is no\nlogin by default.\n\n### Creating a Prometheus data source\n\nTo learn about how to set up a data source in Perses, please refer\nto [Perses documentation](https://perses.dev/perses/docs/concepts/datasource/).\nOnce this connection to your Prometheus instance is configured, you are able to query it from the Dashboard and Explore\nviews.\n\n### Importing pre-built dashboards\n\nPerses is providing a set of pre-built dashboards that you can import into your instance. These dashboards are\nmaintained by the community and can be found in\nthe [Perses dashboard repository](https://github.com/perses/community-dashboards)", "project": "prometheus-docs", "source": "docs/visualization/perses.md", "commit": "31957d4da93dd215cad8c91be3e5205181dd11f1", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "Active Directory / LDAP Access Management\n\n :local:\n :depth: 2\n\nMinIO supports configuring a single Active Directory or LDAP (AD/LDAP) service for external management of user identities.\nEnabling AD/LDAP external identity management disables the MinIO internal IDP <minio-internal-idp>.\n\nFor identities managed by the external AD/LDAP provider, MinIO uses the user's Distinguished Name and attempts to map it against an existing policy <minio-policy>.\n\nIf the AD/LDAP configuration includes the necessary settings to query the user's AD/LDAP group membership, MinIO *also* uses those group Distinguished Names and attempts to map each against an existing policy <minio-policy>.\n\nMinIO by default denies access to all actions or resources not explicitly allowed by a user's assigned or inherited policies <minio-policy>.\nUsers managed by an AD/LDAP provider must specify the necessary policies as part of the user profile data.\nIf no policies match either the user DN or group DNs, MinIO blocks all access to actions and resources on the deployment.\n\nThe specific AD/LDAP queries MinIO issues to authenticate the user and retrieve it's group membership are configured as part of deploying the cluster with Active Directory / LDAP identity management <minio-external-iam-ad-ldap>.\nThis page covers creation of MinIO policies to match the possible returned Distinguished Names.\n\nAuthentication and Authorization Flow\n\nThe login flow for an application using Active Directory / LDAP\ncredentials is as follows:\n\n1. Specify the AD/LDAP credentials to the MinIO Security Token Service (STS)\n minio-sts-assumerolewithldapidentity API endpoint.\n\n2. MinIO verifies the provided credentials against the AD/LDAP server.\n\n3. MinIO checks for any policy <minio-policy> whose name matches the\n user Distinguished Name (DN) and assigns that policy to the authenticated\n user.\n\n If configured to perform group queries, MinIO also queries for a list of\n AD/LDAP groups in which the user has membership. MinIO checks for any policy\n whose name matches a returned group DN and assigns that\n policy to the authenticated user.\n\n4. MinIO returns temporary credentials in the STS API response in the form of an\n access key, secret key, and session token. The credentials have permissions\n matching those policies whose name matches either the authenticated user DN\n *or* a group DN.\n\nMinIO provides an example Go application\nldap.go <minio/blob/master/docs/sts/ldap.go> that handles the\nfull login flow.\n\nAD/LDAP users can alternatively create access keys <minio-idp-service-account> associated to their AD/LDAP user Distinguished Name.\nAccess Keys are long-lived credentials which inherit their privileges from the parent user.\nThe parent user can further restrict those privileges while creating the access keys.\nUse either of the following methods to create a new access key:\n\nUse the mc admin user svcacct add command to create the access keys.\nSpecify the user Distinguished Name as the username to which to associate the access keys.\n\nMapping Policies to User DN\n\nThe following commands use mc idp ldap policy attach to associate an existing MinIO policy <minio-policy> to an AD/LDAP User DN.\n\n mc idp ldap policy attach myminio consoleAdmin \\\n --user='cn=sisko,cn=users,dc=example,dc=com'\n\n mc idp ldap policy attach myminio readwrite,diagnostics \\\n --user='cn=dax,cn=users,dc=example,dc=com'\n\n- MinIO would assign an authenticated user with DN matching\n ``cn=sisko,cn=users,dc=example,dc=com`` the consoleAdmin\n policy, granting complete access to the MinIO server.\n\n- MinIO would assign an authenticated user with DN matching\n ``cn=dax,cn=users,dc=example,dc=com`` both the readwrite and\n diagnostics policies, granting general read/write access to the\n MinIO server *and* access to diagnostic administrative operations.\n\n- MinIO would assign no policies to an authenticated user with DN matching\n ``cn=quark,cn=users,dc=example,dc=com`` and deny all access to API operations.\n\nMapping Policies to Group DN\n\nThe following commands use mc idp ldap policy attach to associate an existing MinIO policy <minio-policy> to an AD/LDAP Group DN.\n\n mc idp ldap policy attach myminio consoleAdmin \\\n --group='cn=ops,cn=groups,dc=example,dc=com'\n\n mc idp ldap policy attach myminio diagnostics \\\n --group='cn=engineering,cn=groups,dc=example,dc=com'\n\n- MinIO would assign any authenticating user with membership in the\n ``cn=ops,cn=groups,dc=example,dc=com`` AD/LDAP group the\n consoleAdmin policy, granting complete access to the MinIO\n server.\n\n- MinIO would assign any authenticating user with membership in the\n ``cn=engineering,cn=groups,dc=example,dc=com`` AD/LDAP group the\n diagnostics policy, granting access to diagnostic administrative\n operations.", "project": "minio-docs", "source": "source/administration/identity-access-management/ad-ldap-access-management.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "MinIO Identity Management\n\n :local:\n :depth: 2\n\nMinIO includes a built-in IDentity Provider (IDP) that provides core identity\nmanagement functionality. The MinIO IDP supports creating an arbitrary number of\nlong-lived users on the deployment for supporting client authentication.\n\nEach user consists of a unique access key (username) and corresponding secret\nkey (password). Clients must authenticate their identity by specifying both\na valid access key (username) and the corresponding secret key (password) of\nan existing MinIO user.\n\nAdministrators use the mc admin user command to create and manage\nMinIO users.\n\nMinIO also supports creating :ref:`access keys\n<minio-idp-service-account>`. Access Keys are child identities of an\nauthenticated parent user and inherit their permissions from the parent.\n\nMinIO by default denies access to all actions or resources not explicitly\nallowed by a user's assigned or inherited policies <minio-policy>. You\nmust either explicitly assign a policy <minio-policy> describing the\nuser's authorized actions and resources *or* assign the user to :ref:`groups\n<minio-groups>` which have associated policies. See\nminio-access-management for more information.\n\n :class: note\n\n MinIO supports external management of identities using either an\n OpenID Connect (OIDC) or Active Directory/LDAP IDentity Provider (IDP).\n For more information, see:\n\n - minio-external-identity-management-openid\n - minio-external-identity-management-ad-ldap\n\n AD/LDAP and OIDC configurations are mutually exclusive.\n Furthermore, enabling AD/LDAP external identity management disables the MinIO internal IDP, with the exception of creating :ref:`access keys\n <minio-idp-service-account>`.\n You can configure multiple OIDC providers while maintaining MinIO-managed users.\n\n :titlesonly:\n :hidden:\n\n /administration/identity-access-management/minio-user-management.rst\n /administration/identity-access-management/minio-group-management.rst", "project": "minio-docs", "source": "source/administration/identity-access-management/minio-identity-management.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "MinIO External Identity Management Plugin\n\n :local:\n :depth: 1\n\nOverview\n\nThe MinIO Identity Management Plugin provides a REST interface for offloading authentication to an external identity manager through a webhook service.\n\nOnce enabled, client applications use the ``AssumeRoleWithCustomToken`` STS API extension to generate access tokens for MinIO.\nMinIO verifies this token by making a POST request to the configured plugin endpoint and uses the returned response to determine the authentication status of the client.\n\nConfiguration Settings\n\nYou can configure the MinIO Identity Management Plugin using the following environment variables or configuration settings:\n\n Specify the following environment variables <minio-server-envvar-external-identity-management-plugin> to each MinIO server in the deployment:\n\n :class: copyable\n\n MINIO_IDENTITY_PLUGIN_URL=\"https://external-auth.example.net:8080/auth\"\n MINIO_IDENTITY_PLUGIN_ROLE_POLICY=\"consoleAdmin\"\n\n # All other envvars are optional\n MINIO_IDENTITY_PLUGIN_TOKEN=\"Bearer TOKEN\"\n MINIO_IDENTITY_PLUGIN_ROLE_ID=\"external-auth-provider\"\n MINIO_IDENTITY_PLUGIN_COMMENT=\"External Identity Management using PROVIDER\"\n\n Set the following configuration settings using the mc admin config set command:\n\n :class: copyable\n\n mc admin config set identity_plugin \\\n url=\"https://external-auth.example.net:8080/auth\" \\\n role_policy=\"consoleAdmin\" \\\n\n # All other config settings are optional\n token=\"Bearer TOKEN\" \\\n role_id=\"external-auth-provider\" \\\n comment=\"External Identity Management using PROVIDER\"\n\nAuthentication and Authorization Flow\n\nThe login flow for an application is as follows:\n\n1. Make a POST request using the minio-sts-assumerolewithcustomtoken API.\n\n The request includes a token used by the configured external identity manager for authenticating the client.\n\n2. MinIO makes a POST call to the configured identity plugin URL using the token specified to the STS API.\n\n3. On successful authentication, the identity manager returns a ``200 OK`` response with an ``application/json`` content-type and body with the following structure:\n\n {\n \"user\": \"<string>\",\n \"maxValiditySeconds\": 3600,\n \"claims\": {\"KEY\": \"VALUE\", ...}\n }\n\n :stub-columns: 1\n :widths: 30 70\n :width: 100%\n\n * - ``user``\n - The owner of the requested credentials\n\n * - ``maxValiditySeconds``\n - The maximum allowed expiry duration for the returned credentials\n\n * - ``claims``\n - A JSON string of ``\"key\": \"value\"`` pair claims associated with the requested credentials.\n MinIO reserves and ignores the ``exp``, ``parent``, and ``sub`` claims objects if present.\n\n4. MinIO returns a response to the STS API request that includes temporary credentials for use with making authenticated requests.\n\nIf the identity manager rejects the authentication request or otherwise encounters an error, the response *must* return a ``403 FORBIDDEN`` HTTP status code with an ``application/json`` content-type and body with the following structure:\n\n {\n \"reason\": \"<string>\"\n }\n\nThe ``\"reason\"`` field should include the reason for the 403.\n\nCreating Policies to Match Claims\n\nUse the mc admin policy command to create policies that match one or more claim values.", "project": "minio-docs", "source": "source/administration/identity-access-management/pluggable-authentication.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "Publish Events to AMQP (RabbitMQ)\n\n :local:\n :depth: 1\n\nMinIO supports publishing :ref:`bucket notification\n<minio-bucket-notifications>` events to a `AMQP 0-9-1 <https://www.amqp.org/>`__\nservice endpoint such as `RabbitMQ <https://www.rabbitmq.com>`__.\n\nMinIO relies on the streadway/amqp project for AMQP connectivity. The\nproject is primarily tested against `RabbitMQ <https://www.rabbitmq.com/>`__\ndeployments, though other `AMQP 0-9-1-compatible <https://www.amqp.org/>`__\nservices *may* also work. The procedures on this page assume a RabbitMQ\ndeployment using the AMQP 0-9-1 protocol as the service endpoint.\n\nAdd an AMQP Endpoint to a MinIO Deployment\n\nThe following procedure adds a new AMQP service endpoint for supporting\nbucket notifications <minio-bucket-notifications> in a MinIO\ndeployment.\n\nPrerequisites\n\nAMQP 0-9-1 Service Endpoint\n\nMinIO relies on the streadway/amqp project for AMQP connectivity. The\nproject is primarily tested against `RabbitMQ <https://www.rabbitmq.com/>`__\ndeployments, though other `AMQP 0-9-1-compatible <https://www.amqp.org/>`__\nservices *may* also work. This procedure assumes a RabbitMQ deployment\nusing the 0-9-1 protocol as the service endpoint.\n\nIf the AMQP service requires authentication, you *must* provide an appropriate\nusername and password during the configuration process to grant MinIO access\nto the service.\n\nMinIO ``mc`` Command Line Tool\n\nThis procedure uses the mc command line tool for certain actions.\nSee the ``mc`` Quickstart <mc-install> for installation instructions.\n\n1) Add the AMQP Endpoint to MinIO\n\nYou can configure a new AMQP service endpoint using either environment variables\n*or* by setting runtime configuration settings.\n\n MinIO supports specifying the AMQP service endpoint and associated\n configuration settings using\n :ref:`environment variables\n <minio-server-envvar-bucket-notification-amqp>`. The\n minio server process applies the specified settings on its\n next startup.\n\n The following example code sets *all* environment variables\n related to configuring an AMQP service endpoint. The minimum\n *required* variables are\n MINIO_NOTIFY_AMQP_ENABLE and MINIO_NOTIFY_AMQP_URL:\n\n :class: copyable\n\n set MINIO_NOTIFY_AMQP_ENABLE_<IDENTIFIER>=\"on\"\n set MINIO_NOTIFY_AMQP_URL_<IDENTIFIER>=\"<ENDPOINT>\"\n set MINIO_NOTIFY_AMQP_EXCHANGE_<IDENTIFIER>=\"<string>\"\n set MINIO_NOTIFY_AMQP_EXCHANGE_TYPE_<IDENTIFIER>=\"<string>\"\n set MINIO_NOTIFY_AMQP_ROUTING_KEY_<IDENTIFIER>=\"<string>\"\n set MINIO_NOTIFY_AMQP_MANDATORY_<IDENTIFIER>=\"<string>\"\n set MINIO_NOTIFY_AMQP_DURABLE_<IDENTIFIER>=\"<string>\"\n set MINIO_NOTIFY_AMQP_NO_WAIT_<IDENTIFIER>=\"<string>\"\n set MINIO_NOTIFY_AMQP_INTERNAL_<IDENTIFIER>=\"<string>\"\n set MINIO_NOTIFY_AMQP_AUTO_DELETED_<IDENTIFIER>=\"<string>\"\n set MINIO_NOTIFY_AMQP_DELIVERY_MODE_<IDENTIFIER>=\"<string>\"\n set MINIO_NOTIFY_AMQP_QUEUE_DIR_<IDENTIFIER>=\"<string>\"\n set MINIO_NOTIFY_AMQP_QUEUE_LIMIT_<IDENTIFIER>=\"<string>\"\n set MINIO_NOTIFY_AMQP_COMMENT_<IDENTIFIER>=\"<string>\"\n\n :class: copyable\n\n export MINIO_NOTIFY_AMQP_ENABLE_<IDENTIFIER>=\"on\"\n export MINIO_NOTIFY_AMQP_URL_<IDENTIFIER>=\"<ENDPOINT>\"\n export MINIO_NOTIFY_AMQP_EXCHANGE_<IDENTIFIER>=\"<string>\"\n export MINIO_NOTIFY_AMQP_EXCHANGE_TYPE_<IDENTIFIER>=\"<string>\"\n export MINIO_NOTIFY_AMQP_ROUTING_KEY_<IDENTIFIER>=\"<string>\"\n export MINIO_NOTIFY_AMQP_MANDATORY_<IDENTIFIER>=\"<string>\"\n export MINIO_NOTIFY_AMQP_DURABLE_<IDENTIFIER>=\"<string>\"\n export MINIO_NOTIFY_AMQP_NO_WAIT_<IDENTIFIER>=\"<string>\"\n export MINIO_NOTIFY_AMQP_INTERNAL_<IDENTIFIER>=\"<string>\"\n export MINIO_NOTIFY_AMQP_AUTO_DELETED_<IDENTIFIER>=\"<string>\"\n export MINIO_NOTIFY_AMQP_DELIVERY_MODE_<IDENTIFIER>=\"<string>\"\n export MINIO_NOTIFY_AMQP_QUEUE_DIR_<IDENTIFIER>=\"<string>\"\n export MINIO_NOTIFY_AMQP_QUEUE_LIMIT_<IDENTIFIER>=\"<string>\"\n export MINIO_NOTIFY_AMQP_COMMENT_<IDENTIFIER>=\"<string>\"\n\n - Replace ``<IDENTIFIER>`` with a unique descriptive string for the\n AMQP service endpoint. Use the same ``<IDENTIFIER>`` value for all\n environment variables related to the new AMQP service endpoint.\n The following examples assume an identifier of ``PRIMARY``.\n\n If the specified ``<IDENTIFIER>`` matches an existing AMQP service\n endpoint on the MinIO deployment, the new settings *override*\n any existing settings for that endpoint. Use\n mc admin config get notify_amqp <mc admin config get> to\n review the currently configured AMQP endpoints on the MinIO deployment.\n\n - Replace ``<ENDPOINT>`` with the URL of the AMQP service endpoint.\n For example:\n\n ``amqp://user:password@hostname:port``\n\n See :ref:`AMQP Service for Bucket Notifications\n <minio-server-envvar-bucket-notification-amqp>` for complete documentation\n on each environment variable.\n\n MinIO supports adding or updating AMQP endpoints on a running\n minio server process using the mc admin config set command\n and the notify_amqp configuration key. You must restart the\n minio server process to apply any new or updated configuration\n settings.\n\n The following example code sets *all* settings related to configuring an\n AMQP service endpoint. The minimum *required* setting is\n notify_amqp url <notify_amqp.url>:\n\n :class: copyable\n\n mc admin config set ALIAS/ notify_amqp:IDENTIFIER \\\n url=\"ENDPOINT\" \\\n exchange=\"<string>\" \\\n exchange_type=\"<string>\" \\\n routing_key=\"<string>\" \\\n mandatory=\"<string>\" \\\n durable=\"<string>\" \\\n no_wait=\"<string>\" \\\n internal=\"<string>\" \\\n auto_deleted=\"<string>\" \\\n delivery_mode=\"<string>\" \\\n queue_dir=\"<string>\" \\\n queue_limit=\"<string>\" \\\n comment=\"<string>\"\n\n - Replace ``IDENTIFIER`` with a unique descriptive string for the\n AMQP service endpoint. The following examples in this procedure\n assume an identifier of ``PRIMARY``.\n\n If the specified ``IDENTIFIER`` matches an existing AMQP service\n endpoint on the MinIO deployment, the new settings *override*\n any existing settings for that endpoint. Use\n mc admin config get notify_amqp <mc admin config get> to\n review the currently configured AMQP endpoints on the MinIO deployment.\n\n - Replace ``ENDPOINT`` with the URL of the AMQP service endpoint.\n For example:\n\n ``amqp://user:password@hostname:port``\n\n See :ref:`AMQP Bucket Notification Configuration Settings\n <minio-server-config-bucket-notification-amqp>` for complete\n documentation on each setting.\n\n1) Restart the MinIO Deployment\n\nYou must restart the MinIO deployment to apply the configuration changes.\nUse the mc admin service restart command to restart the deployment.\n\n :class: copyable\n\n mc admin service restart ALIAS\n\nReplace ``ALIAS`` with the alias <alias> of the deployment to\nrestart.\n\nThe minio server process prints a line on startup for each configured AMQP\ntarget similar to the following:\n\n SQS ARNs: arn:minio:sqs::primary:amqp\n\nYou must specify the ARN resource when configuring bucket notifications with\nthe associated AMQP deployment as a target.\n\n :start-after: start-bucket-notification-find-arn\n :end-before: end-bucket-notification-find-arn\n\n3) Configure Bucket Notifications using the AMQP Endpoint as a Target\n\nUse the mc event add command to add a new bucket notification\nevent with the configured AMQP service as a target:\n\n :class: copyable\n\n mc event add ALIAS/BUCKET arn:minio:sqs::primary:amqp \\\n --event EVENTS\n\n- Replace ``ALIAS`` with the alias <alias> of a MinIO deployment.\n- Replace ``BUCKET`` with the name of the bucket in which to configure the\n event.\n- Replace ``EVENTS`` with a comma-separated list of :ref:`events\n <mc-event-supported-events>` for which MinIO triggers notifications.\n\nUse mc event ls to view all configured bucket events for\na given notification target:\n\n :class: copyable\n\n mc event ls ALIAS/BUCKET arn:minio:sqs::primary:amqp\n\n4) Validate the Configured Events\n\nPerform an action on the bucket for which you configured the new event and\ncheck the AMQP service for the notification data. The action required\ndepends on which events <mc event add --event> were specified\nwhen configuring the bucket notification.\n\nFor example, if the bucket notification configuration includes the\n``s3:ObjectCreated:Put`` event, you can use the\nmc cp command to create a new object in the bucket and trigger\na notification.\n\n :class: copyable\n\n mc cp ~/data/new-object.txt ALIAS/BUCKET\n\nUpdate an AMQP Endpoint in a MinIO Deployment\n\nThe following procedure updates an existing AMQP service endpoint for supporting\nbucket notifications <minio-bucket-notifications> in a MinIO\ndeployment.\n\nPrerequisites\n\nAMQP 0-9-1 Service Endpoint\n\nMinIO relies on the streadway/amqp project for AMQP connectivity. The\nproject is primarily tested against `RabbitMQ <https://www.rabbitmq.com/>`__\ndeployments, though other `AMQP 0-9-1-compatible <https://www.amqp.org/>`__\nservices *may* also work. This procedure *assumes* a RabbitMQ deployment\nas the service endpoint.\n\nIf the AMQP service requires authentication, you *must* provide an appropriate\nusername and password during the configuration process to grant MinIO access\nto the service.\n\nMinIO ``mc`` Command Line Tool\n\nThis procedure uses the mc command line tool for certain actions.\nSee the ``mc`` Quickstart <mc-install> for installation instructions.\n\n1) List Configured AMQP Endpoints In The Deployment\n\nUse the mc admin config get command to list the currently\nconfigured AMQP service endpoints in the deployment:\n\n :class: copyable\n\n mc admin config get ALIAS/ notify_amqp\n\nReplace ``ALIAS`` with the alias <alias> of the MinIO deployment.\n\nThe command output resembles the following:\n\n notify_amqp:primary delivery_mode=\"0\" exchange_type=\"\" no_wait=\"off\" queue_dir=\"\" queue_limit=\"0\" url=\"amqp://user:password@hostname:port\" auto_deleted=\"off\" durable=\"off\" exchange=\"\" internal=\"off\" mandatory=\"off\" routing_key=\"\"\n notify_amqp:secondary delivery_mode=\"0\" exchange_type=\"\" no_wait=\"off\" queue_dir=\"\" queue_limit=\"0\" url=\"amqp://user:password@hostname:port\" auto_deleted=\"off\" durable=\"off\" exchange=\"\" internal=\"off\" mandatory=\"off\" routing_key=\"\"\n\nThe notify_amqp key is the top-level configuration key for an\nminio-server-config-bucket-notification-amqp. The\nurl <notify_amqp.url> key specifies the AMQP service endpoint\nfor the given `notify_amqp` key. The ``notify_amqp:<IDENTIFIER>`` suffix\ndescribes the unique identifier for that AMQP service endpoint.\n\nNote the identifier for the AMQP service endpoint you want to update for\nthe next step.\n\n2) Update the AMQP Endpoint\n\nUse the mc admin config set command to set the new configuration\nfor the AMQP service endpoint:\n\n :class: copyable\n\n mc admin config set ALIAS/ notify_amqp:<IDENTIFIER> \\\n url=\"amqp://user:password@hostname:port\" \\\n exchange=\"<string>\" \\\n exchange_type=\"<string>\" \\\n routing_key=\"<string>\" \\\n mandatory=\"<string>\" \\\n durable=\"<string>\" \\\n no_wait=\"<string>\" \\\n internal=\"<string>\" \\\n auto_deleted=\"<string>\" \\\n delivery_mode=\"<string>\" \\\n queue_dir=\"<string>\" \\\n queue_limit=\"<string>\" \\\n comment=\"<string>\"\n\nThe notify_amqp url <notify_amqp.url> configuration setting is the\n*minimum* required for an AMQP service endpoint. All other configuration\nsettings are *optional*. See minio-server-config-bucket-notification-amqp\nfor a complete list of AMQP configuration settings.\n\n3) Restart the MinIO Deployment\n\nYou must restart the MinIO deployment to apply the configuration changes.\nUse the mc admin service restart command to restart the deployment.\n\n :class: copyable\n\n mc admin service restart ALIAS\n\nReplace ``ALIAS`` with the alias <alias> of the deployment to\nrestart.\n\nThe minio server process prints a line on startup for each configured AMQP\ntarget similar to the following:\n\n SQS ARNs: arn:minio:sqs::primary:amqp\n\n4) Validate the Changes\n\nPerform an action on a bucket which has an event configuration using the updated\nAMQP service endpoint and check the AMQP service for the notification data. The\naction required depends on which events <mc event add --event> were\nspecified when configuring the bucket notification.\n\nFor example, if the bucket notification configuration includes the\n``s3:ObjectCreated:Put`` event, you can use the\nmc cp command to create a new object in the bucket and trigger\na notification.\n\n :class: copyable\n\n mc cp ~/data/new-object.txt ALIAS/BUCKET", "project": "minio-docs", "source": "source/administration/monitoring/publish-events-to-amqp.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "Publish Events to Elasticsearch\n\n :local:\n :depth: 1\n\nMinIO supports publishing :ref:`bucket notification\n<minio-bucket-notifications>` events to an\n`Elasticsearch <https://www.elastic.co/>`__ service endpoint.\n\nMinIO relies on the elastic/go-elasticsearch v7 project for Elastic\nconnectivity.\n\nAdd a Elasticsearch Endpoint to a MinIO Deployment\n\nThe following procedure adds a new Elasticsearch service endpoint for supporting\nbucket notifications <minio-bucket-notifications> in a MinIO\ndeployment.\n\nPrerequisites\n\nElasticsearch v7.0 and later\n\nMinIO relies on the olivere/elastic v7 project for Elastic\nconnectivity. The ``elastic/v7`` library specifically targets Elasticsearch\nv7.0 and is *not compatible with earlier Elasticsearch versions*.\n\nMinIO ``mc`` Command Line Tool\n\nThis procedure uses the mc command line tool for certain actions.\nSee the ``mc`` Quickstart <mc-install> for installation instructions.\n\n1) Add the Elasticsearch Endpoint to MinIO\n\nYou can configure a new Elasticsearch service endpoint using either environment variables\n*or* by setting runtime configuration settings.\n\n MinIO supports specifying the Elasticsearch service endpoint and associated\n configuration settings using\n :ref:`environment variables\n <minio-server-envvar-bucket-notification-elasticsearch>`. The\n minio server process applies the specified settings on its\n next startup.\n\n The following example code sets *all* environment variables\n related to configuring an Elasticsearch service endpoint. The minimum\n *required* variables are:\n\n - MINIO_NOTIFY_ELASTICSEARCH_ENABLE\n - MINIO_NOTIFY_ELASTICSEARCH_URL\n - MINIO_NOTIFY_ELASTICSEARCH_INDEX\n - MINIO_NOTIFY_ELASTICSEARCH_FORMAT\n\n :class: copyable\n\n set MINIO_NOTIFY_ELASTICSEARCH_ENABLE_<IDENTIFIER>=\"on\"\n set MINIO_NOTIFY_ELASTICSEARCH_URL_<IDENTIFIER>=\"<ENDPOINT>\"\n set MINIO_NOTIFY_ELASTICSEARCH_INDEX_<IDENTIFIER>=\"<string>\"\n set MINIO_NOTIFY_ELASTICSEARCH_FORMAT_<IDENTIFIER>=\"<string>\"\n set MINIO_NOTIFY_ELASTICSEARCH_USERNAME_<IDENTIFIER>=\"<string>\"\n set MINIO_NOTIFY_ELASTICSEARCH_PASSWORD_<IDENTIFIER>=\"<string>\"\n set MINIO_NOTIFY_ELASTICSEARCH_QUEUE_DIR_<IDENTIFIER>=\"<string>\"\n set MINIO_NOTIFY_ELASTICSEARCH_QUEUE_LIMIT_<IDENTIFIER>=\"<string>\"\n set MINIO_NOTIFY_ELASTICSEARCH_COMMENT_<IDENTIFIER>=\"<string>\"\n\n :class: copyable\n\n export MINIO_NOTIFY_ELASTICSEARCH_ENABLE_<IDENTIFIER>=\"on\"\n export MINIO_NOTIFY_ELASTICSEARCH_URL_<IDENTIFIER>=\"<ENDPOINT>\"\n export MINIO_NOTIFY_ELASTICSEARCH_INDEX_<IDENTIFIER>=\"<string>\"\n export MINIO_NOTIFY_ELASTICSEARCH_FORMAT_<IDENTIFIER>=\"<string>\"\n export MINIO_NOTIFY_ELASTICSEARCH_USERNAME_<IDENTIFIER>=\"<string>\"\n export MINIO_NOTIFY_ELASTICSEARCH_PASSWORD_<IDENTIFIER>=\"<string>\"\n export MINIO_NOTIFY_ELASTICSEARCH_QUEUE_DIR_<IDENTIFIER>=\"<string>\"\n export MINIO_NOTIFY_ELASTICSEARCH_QUEUE_LIMIT_<IDENTIFIER>=\"<string>\"\n export MINIO_NOTIFY_ELASTICSEARCH_COMMENT_<IDENTIFIER>=\"<string>\"\n\n - Replace ``<IDENTIFIER>`` with a unique descriptive string for the\n TARGET service endpoint. Use the same ``<IDENTIFIER>`` value for all\n environment variables related to the new target service endpoint.\n The following examples assume an identifier of ``PRIMARY``.\n\n If the specified ``<IDENTIFIER>`` matches an existing Elasticsearch\n service endpoint on the MinIO deployment, the new settings *override*\n any existing settings for that endpoint. Use\n mc admin config get notify_elasticsearch <mc admin config get>\n to review the currently configured Elasticsearch endpoints on the MinIO\n deployment.\n\n - Replace ``<ENDPOINT>`` with the URL of the Elasticsearch service endpoint.\n For example:\n\n See :ref:`Elasticsearch Service for Bucket Notifications\n <minio-server-envvar-bucket-notification-elasticsearch>` for complete\n documentation on each environment variable.\n\n MinIO supports adding or updating Elasticsearch endpoints on a running\n minio server process using the mc admin config set command\n and the notify_elasticsearch configuration key. You must restart the\n minio server process to apply any new or updated configuration\n settings.\n\n The following example code sets *all* settings related to configuring an\n Elasticsearch service endpoint. The minimum *required* settings are:\n\n - url <notify_elasticsearch.url>\n - index <notify_elasticsearch.index>\n - format <notify_elasticsearch.format>\n\n :class: copyable\n\n mc admin config set ALIAS/ notify_elasticsearch:IDENTIFIER \\\n url=\"ENDPOINT\" \\\n index=\"<string>\" \\\n format=\"<string>\" \\\n username=\"<string>\" \\\n password=\"<string>\" \\\n queue_dir=\"<string>\" \\\n queue_limit=\"<string>\" \\\n comment=\"<string>\"\n\n - Replace ``IDENTIFIER`` with a unique descriptive string for the\n Elasticsearch service endpoint. The following examples in this procedure\n assume an identifier of ``PRIMARY``.\n\n If the specified ``IDENTIFIER`` matches an existing Elasticsearch service\n endpoint on the MinIO deployment, the new settings *override*\n any existing settings for that endpoint. Use\n mc admin config get notify_elasticsearch <mc admin config get>\n to review the currently configured Elasticsearch endpoints on the MinIO\n deployment.\n\n - Replace ``ENDPOINT`` with the URL of the Elasticsearch service endpoint.\n For example:\n\n ``https://user:password@hostname:port``\n\n See :ref:`Elasticsearch Bucket Notification Configuration Settings\n <minio-server-config-bucket-notification-elasticsearch>` for complete\n documentation on each setting.\n\n1) Restart the MinIO Deployment\n\nYou must restart the MinIO deployment to apply the configuration changes.\nUse the mc admin service restart command to restart the deployment.\n\n :class: copyable\n\n mc admin service restart ALIAS\n\nReplace ``ALIAS`` with the alias <alias> of the deployment to\nrestart.\n\nThe minio server process prints a line on startup for each configured Elasticsearch\ntarget similar to the following:\n\n SQS ARNs: arn:minio:sqs::primary:elasticsearch\n\nYou must specify the ARN resource when configuring bucket notifications with\nthe associated Elasticsearch deployment as a target.\n\n :start-after: start-bucket-notification-find-arn\n :end-before: end-bucket-notification-find-arn\n\n3) Configure Bucket Notifications using the Elasticsearch Endpoint as a Target\n\nUse the mc event add command to add a new bucket notification\nevent with the configured Elasticsearch service as a target:\n\n :class: copyable\n\n mc event add ALIAS/BUCKET arn:minio:sqs::primary:elasticsearch \\\n --event EVENTS\n\n- Replace ``ALIAS`` with the alias <alias> of a MinIO deployment.\n- Replace ``BUCKET`` with the name of the bucket in which to configure the\n event.\n- Replace ``EVENTS`` with a comma-separated list of :ref:`events\n <mc-event-supported-events>` for which MinIO triggers notifications.\n\nUse mc event ls to view all configured bucket events for\na given notification target:\n\n :class: copyable\n\n mc event ls ALIAS/BUCKET arn:minio:sqs::primary:elasticsearch\n\n4) Validate the Configured Events\n\nPerform an action on the bucket for which you configured the new event and\ncheck the Elasticsearch service for the notification data. The action required\ndepends on which events <mc event add --event> were specified\nwhen configuring the bucket notification.\n\nFor example, if the bucket notification configuration includes the\n``s3:ObjectCreated:Put`` event, you can use the\nmc cp command to create a new object in the bucket and trigger\na notification.\n\n :class: copyable\n\n mc cp ~/data/new-object.txt ALIAS/BUCKET\n\nUpdate an Elasticsearch Endpoint in a MinIO Deployment\n\nThe following procedure updates an existing Elasticsearch service endpoint for supporting\nbucket notifications <minio-bucket-notifications> in a MinIO\ndeployment.\n\nPrerequisites\n\nElasticsearch v7.0 and later\n\nMinIO relies on the olivere/elastic v7 project for Elastic\nconnectivity. The ``elastic/v7`` library specifically targets Elasticsearch\nv7.0 and is *not compatible with earlier Elasticsearch versions*.\n\nMinIO ``mc`` Command Line Tool\n\nThis procedure uses the mc command line tool for certain actions.\nSee the ``mc`` Quickstart <mc-install> for installation instructions.\n\n1) List Configured Elasticsearch Endpoints In The Deployment\n\nUse the mc admin config get command to list the currently\nconfigured Elasticsearch service endpoints in the deployment:\n\n :class: copyable\n\n mc admin config get ALIAS/ notify_elasticsearch\n\nReplace ``ALIAS`` with the alias <alias> of the MinIO deployment.\n\nThe command output resembles the following:\n\n notify_elasticsearch:primary queue_dir=\"\" queue_limit=\"0\" url=\"https://user:password@hostname:port\" format=\"namespace\" index=\"\"\n notify_elasticsearch:secondary queue_dir=\"\" queue_limit=\"0\" url=\"https://user:password@hostname:port\" format=\"namespace\" index=\"\"\n\nThe notify_elasticsearch key is the top-level configuration key for\nan minio-server-config-bucket-notification-elasticsearch. The\nurl <notify_elasticsearch.url> key specifies the Elasticsearch\nservice endpoint for the given `notify_elasticsearch` key. The\n``notify_elasticsearch:<IDENTIFIER>`` suffix describes the unique identifier for\nthat Elasticsearch service endpoint.\n\nNote the identifier for the Elasticsearch service endpoint you want to update for\nthe next step.\n\n2) Update the Elasticsearch Endpoint\n\nUse the mc admin config set command to set the new configuration\nfor the Elasticsearch service endpoint:\n\n :class: copyable\n\n mc admin config set ALIAS/ notify_elasticsearch:<IDENTIFIER> \\\n url=\"https://user:password@hostname:port\" \\\n index=\"<string>\" \\\n format=\"<string>\" \\\n username=\"<string>\" \\\n password=\"<string>\" \\\n queue_dir=\"<string>\" \\\n queue_limit=\"<string>\" \\\n comment=\"<string>\"\n\nThe notify_elasticsearch url <notify_elasticsearch.url> configuration\nsetting is the *minimum* required for an Elasticsearch service endpoint. All\nother configuration settings are *optional*. See\nminio-server-config-bucket-notification-elasticsearch for a complete list\nof Elasticsearch configuration settings.\n\n3) Restart the MinIO Deployment\n\nYou must restart the MinIO deployment to apply the configuration changes.\nUse the mc admin service restart command to restart the deployment.\n\n :class: copyable\n\n mc admin service restart ALIAS\n\nReplace ``ALIAS`` with the alias <alias> of the deployment to\nrestart.\n\nThe minio server process prints a line on startup for each configured\nElasticsearch target similar to the following:\n\n SQS ARNs: arn:minio:sqs::primary:elasticsearch\n\n4) Validate the Changes\n\nPerform an action on a bucket which has an event configuration using the updated\nElasticsearch service endpoint and check the Elasticsearch service for the\nnotification data. The action required depends on which\nevents <mc event add --event> were specified when configuring the bucket\nnotification.\n\nFor example, if the bucket notification configuration includes the\n``s3:ObjectCreated:Put`` event, you can use the\nmc cp command to create a new object in the bucket and trigger\na notification.\n\n :class: copyable\n\n mc cp ~/data/new-object.txt ALIAS/BUCKET", "project": "minio-docs", "source": "source/administration/monitoring/publish-events-to-elasticsearch.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "- /monitoring/bucket-notifications/publish-events-to-amqp.rst\n\n /reference/minio-cli/minio-mc/mc-rm.rst\n /reference/minio-cli/minio-mc/mc-mv.rst\n /reference/minio-cli/minio-mc/mc-mirror.rst\n\n|command| relies on the mc removal API for deleting objects. As part of\nremoving the last object in a bucket prefix, mc also recursively removes\neach empty part of the prefix up to the bucket root. mc only applies the\nrecursive removal to prefixes created *implicitly* as part of object write\noperations - that is, the prefix was not created using an explicit directory\ncreation command such as mc mb.\n\nFor example, consider a bucket ``photos`` with the following object prefixes:\n\n- ``photos/2021/january/myphoto.jpg``\n- ``photos/2021/february/myotherphoto.jpg``\n- ``photos/NYE21/NewYears.jpg``\n\n``photos/NYE21`` is the *only* prefix explicitly created using mc mb.\nAll other prefixes were *implicitly* created as part of writing the object\nlocated at that prefix.\n\nIf an mc command removes ``myphoto.jpg``, the removal API automatically\ntrims the empty ``/january`` prefix. If a subsequent mc command removes\n``myotherphoto.jpg``, the removal API automatically trims both the ``/february``\nprefix *and* the now-empty ``/2021`` prefix. If an mc command removes\n``NewYears.jpg``, the ``/NYE21`` prefix remains in place since it was\n*explicitly* created.\n\nIf using |command| for operations on a filesystem, mc applies this same\nbehavior by recursively trimming empty directory paths up to the root. However,\nthe mc remove API cannot distinguish between an explicitly created\ndirectory path and an implicitly created one. If |command| deletes the last\nobject at a filesystem path, mc recursively deletes all empty directories\nwithin that path up to the root as part of the removal operation.\n\n - administration/object-management.rst\n - administration/concepts.rst\n - operations/concepts.rst\n - operations/data-recovery.rst\n - operations/checklists/hardware.rst\n - operations/checklists/software.rst\n - operations/concepts/availability-and-resiliency.rst\n - operations/concepts/erasure-coding.rst\n - operations/data-recover/recover-after-drive-failure.rst\n - operations/data-recover/recover-after-node-failure.rst\n - operations/install-deploy-manage/deploy-minio-multi-node-multi-drive.rst\n - operations/install-deploy-manage/deploy-minio-single-node-multi-drive.rst\n - operations/install-deploy-manage/deploy-minio-single-node-single-drive.rst\n - operations/install-deploy-manage/deploy-minio-tenant.rst\n - operations/install-deploy-manage/expand-minio-deployment.rst\n - operations/install-deploy-manage/expand-minio-tenant.rst\n - glossary.rst\n\n :class: warning\n\n MinIO **requires** *exclusive* access to the drives or volumes provided for object storage.\n No other processes, software, scripts, or persons should perform *any* actions directly on the drives or volumes provided to MinIO or the objects or files MinIO places on them.\n\n Unless directed by MinIO Engineering, do not use scripts or tools to directly modify, delete, or move any of the data shards, parity shards, or metadata files on the provided drives, including from one drive or node to another.\n Such operations are very likely to result in widespread corruption and data loss beyond MinIO's ability to heal.", "project": "minio-docs", "source": "source/includes/common-admonitions.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "This procedure deploys a Single-Node Single-Drive <minio-installation-comparison> MinIO server onto |OS| for early development and evaluation of MinIO Object Storage and its S3-compatible API layer.\n\nFor instructions on deploying to production environments, see deploy-minio-distributed.\n\nPrerequisites\n\n- `Podman <https://podman.io/getting-started/installation.html>`_ or `Docker <https://docs.docker.com/get-docker/>`_ installed.\n- Read, write, and delete access to the folder or drive used for the persistent volume.\n\nProcedure\n\n#. Start the container\n\n Select a container type to view instructions to create the container.\n Instructions are available for either GNU/Linux and MacOS or for Windows.\n\n :name: podman-root-rootless\n\n These steps work for both rootfull and rootless containers.\n\n :class: copyable\n\n mkdir -p ~/minio/data\n\n podman run \\\n -p 9000:9000 \\\n -p 9001:9001 \\\n -v ~/minio/data:/data \\\n -e \"MINIO_ROOT_USER=ROOTNAME\" \\\n -e \"MINIO_ROOT_PASSWORD=CHANGEME123\" \\\n quay.io/minio/minio server /data --console-address \":9001\"\n\n The example above works this way:\n\n - ``podman run`` starts the container.\n The process is attached to the terminal session and ends when exiting the terminal.\n - ``-p`` binds a local port to a container port.\n - ``-v`` sets a file path as a persistent volume location for the container to use.\n When MinIO writes data to ``/data``, that data mirrors to the local path ``~/minio/data``, allowing it to persist between container restarts.\n You can set any file path to which the user has read, write, and delete permissions to use.\n - ``-e`` sets the environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD, respectively.\n These set the root user credentials <minio-users-root>.\n Change the example values to use for your container.\n\n :class: copyable\n\n podman run \\\n -p 9000:9000 \\\n -p 9001:9001 \\\n -v D:\\minio\\data:/data \\\n -e \"MINIO_ROOT_USER=ROOTNAME\" \\\n -e \"MINIO_ROOT_PASSWORD=CHANGEME123\" \\\n quay.io/minio/minio server /data --console-address \":9001\"\n\n The example above works this way:\n\n - ``podman run`` starts the container.\n - ``-p`` binds a local port to a container port.\n - ``-v`` sets a file path as a persistent volume location for the container to use.\n When MinIO writes data to ``/data``, that data mirrors to the local path ``D:\\minio\\data``, allowing it to persist between container restarts.\n You can set any file path to which the user has read, write, and delete permissions to use.\n - ``-e`` sets the environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD, respectively.\n These set the root user credentials <minio-users-root>.\n Change the example values to use for your container.\n\n :name: docker-rootfull\n\n :class: copyable\n\n mkdir -p ~/minio/data\n\n docker run \\\n -p 9000:9000 \\\n -p 9001:9001 \\\n --name minio \\\n -v ~/minio/data:/data \\\n -e \"MINIO_ROOT_USER=ROOTNAME\" \\\n -e \"MINIO_ROOT_PASSWORD=CHANGEME123\" \\\n quay.io/minio/minio server /data --console-address \":9001\"\n\n The example above works this way:\n\n - ``mkdir`` creates a new local directory at ``~/minio/data`` in your home directory.\n - ``docker run`` starts the MinIO container.\n - ``-p`` binds a local port to a container port.\n - ``-name`` creates a name for the container.\n - ``-v`` sets a file path as a persistent volume location for the container to use.\n When MinIO writes data to ``/data``, that data mirrors to the local path ``~/minio/data``, allowing it to persist between container restarts.\n You can replace ``~/minio/data`` with another local file location to which the user has read, write, and delete access.\n - ``-e`` sets the environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD, respectively.\n These set the root user credentials <minio-users-root>.\n Change the example values to use for your container.\n\n :class: copyable\n\n docker run \\\n -p 9000:9000 \\\n -p 9001:9001 \\\n --name minio1 \\\n -v D:\\minio\\data:/data \\\n -e \"MINIO_ROOT_USER=ROOTUSER\" \\\n -e \"MINIO_ROOT_PASSWORD=CHANGEME123\" \\\n quay.io/minio/minio server /data --console-address \":9001\"\n\n The example above works this way:\n\n - ``docker run`` starts the MinIO container.\n - ``-p`` binds a local port to a container port.\n - ``-v`` sets a file path as a persistent volume location for the container to use.\n When MinIO writes data to ``/data``, that data mirrors to the local path ``D:\\minio\\data``, allowing it to persist between container restarts.\n You can replace ``D:\\minio\\data`` with another local file location to which the user has read, write, and delete access.\n - ``-e`` sets the environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD, respectively.\n These set the root user credentials <minio-users-root>.\n Change the example values to use for your container.\n\n :name: docker-rootless\n\n :class: copyable\n\n mkdir -p ${HOME}/minio/data\n\n docker run \\\n -p 9000:9000 \\\n -p 9001:9001 \\\n --user $(id -u):$(id -g) \\\n --name minio1 \\\n -e \"MINIO_ROOT_USER=ROOTUSER\" \\\n -e \"MINIO_ROOT_PASSWORD=CHANGEME123\" \\\n -v ${HOME}/minio/data:/data \\\n quay.io/minio/minio server /data --console-address \":9001\"\n\n The example above works this way:\n\n - ``mkdir`` creates a new local directory at ``~/minio/data`` in your home directory.\n - ``docker run`` starts the MinIO container.\n - ``-p`` binds a local port to a container port.\n - ``-user`` sets the username for the container to the policies for the current user and user group.\n - ``-name`` creates a name for the container.\n - ``-v`` sets a file path as a persistent volume location for the container to use.\n When MinIO writes data to ``/data``, that data actually writes to the local path ``~/minio/data`` where it can persist between container restarts.\n You can replace ``${HOME}/minio/data`` with another location in the user's home directory to which the user has read, write, and delete access.\n - ``-e`` sets the environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD, respectively.\n These set the root user credentials <minio-users-root>.\n Change the example values to use for your container.\n\n Prerequisite:\n\n - Windows `Group Managed Service Account <https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/manage-serviceaccounts>`_ already defined.\n\n :class: copyable\n\n docker run \\\n -p 9000:9000 \\\n -p 9001:9001 \\\n --name minio1 \\\n --security-opt \"credentialspec=file://path/to/file.json\"\n -e \"MINIO_ROOT_USER=ROOTUSER\" \\\n -e \"MINIO_ROOT_PASSWORD=CHANGEME123\" \\\n -v D:\\data:/data \\\n quay.io/minio/minio server /data --console-address \":9001\"\n\n The example above works this way:\n\n - ``docker run`` starts the MinIO container.\n - ``-p`` binds a local port to a container port.\n - ``-name`` creates a name for the container.\n - ``--security-opt`` grants access to the container via a ``credentialspec`` file for a `Group Managed Service Account (gMSA) <https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/gmsa-run-container>`_\n - ``-v`` sets a file path as a persistent volume location for the container to use.\n When MinIO writes data to ``/data``, that data actually writes to the local path ``D:\\data`` where it can persist between container restarts.\n You can replace ``D:\\data`` with another local file location to which the user has read, write, and delete access.\n - ``-e`` sets the environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD, respectively.\n These set the root user credentials <minio-users-root>.\n Change the example values to use for your container.\n\n#. Connect your Browser to the MinIO Server\n\n Access the minio-console by going to a browser and going to ``http://127.0.0.1:9000`` or one of the Console addresses specified in the minio server command's output.\n For example, Console: http://192.0.2.10:9001 http://127.0.0.1:9001 in the example output indicates two possible addresses to use for connecting to the Console.\n\n While port ``9000`` is used for connecting to the API, MinIO automatically redirects browser access to the MinIO Console.\n\n Log in to the Console with the credentials you defined in the MINIO_ROOT_USER and MINIO_ROOT_PASSWORD environment variables.\n Each MinIO server includes its own embedded MinIO Console.\n\n#. `(Optional)` Install the MinIO Client\n\n The MinIO Client <minio-client> allows you to work with your MinIO volume from the commandline.\n\n Select your operating system for instructions.\n\n The MinIO Client <minio-client> allows you to work with your MinIO server from the commandline.\n\n Download the mc client and install it to a location on your system ``PATH`` such as\n ``/usr/local/bin``. You can alternatively run the binary from the download location.\n\n :class: copyable\n\n wget https://dl.min.io/client/mc/release/linux-amd64/mc\n chmod +x mc\n sudo mv mc /usr/local/bin/mc\n\n Use mc alias set to create a new alias associated to your local deployment.\n You can run mc commands against this alias:\n\n :class: copyable\n\n mc alias set local http://127.0.0.1:9000 {MINIO_ROOT_USER} {MINIO_ROOT_PASSWORD}\n mc admin info local\n\n Replace ``{MINIO_ROOT_USER}`` and ``{MINIO_ROOT_PASSWORD}`` with the credentials you defined for the container with the ``-e`` flags.\n\n The mc alias set takes four arguments:\n\n - The name of the alias\n - The hostname or IP address and port of the MinIO server\n - The Access Key for a MinIO user <minio-users>\n - The Secret Key for a MinIO user <minio-users>\n\n For additional details about this command, see alias.\n\n The MinIO Client <minio-client> allows you to work with your MinIO volume from the commandline.\n\n Run the following command to install the latest stable MinIO Client package using `Homebrew <https://brew.sh>`_.\n\n :class: copyable\n\n brew install minio/stable/mc\n\n Run the following commands to install the latest stable MinIO Client package using a binary package for Apple chips.\n\n :class: copyable\n\n curl -O https://dl.min.io/client/mc/release/darwin-arm64/mc\n chmod +x mc\n sudo mv mc /usr/local/bin/mc\n\n Run the following commands to install the latest stable MinIO Client package using a binary package for Intel chips.\n\n :class: copyable\n\n curl -O https://dl.min.io/client/mc/release/darwin-amd64/mc\n chmod +x mc\n sudo mv mc /usr/local/bin/mc\n\n Use mc alias set to quickly authenticate and connect to the MinIO deployment.\n\n :class: copyable\n\n mc alias set local http://127.0.0.1:9000 {MINIO_ROOT_USER} {MINIO_ROOT_PASSWORD}\n mc admin info local\n\n Replace ``{MINIO_ROOT_USER}`` and ``{MINIO_ROOT_PASSWORD}`` with the credentials you defined for the container with the ``-e`` flags.\n\n The mc alias set takes four arguments:\n\n - The name of the alias\n - The hostname or IP address and port of the MinIO server\n - The Access Key for a MinIO user <minio-users>\n - The Secret Key for a MinIO user <minio-users>\n\n For additional details about this command, see alias.\n\n Download the standalone MinIO server for Windows from the following link:\n\n https://dl.min.io/client/mc/release/windows-amd64/mc.exe\n\n Double click on the file to run it.\n Or, run the following in the Command Prompt or PowerShell.\n\n :class: copyable\n\n \\path\\to\\mc.exe --help\n\n Use mc alias set to quickly authenticate and connect to the MinIO deployment.\n\n :class: copyable\n\n mc.exe alias set local http://127.0.0.1:9000 {MINIO_ROOT_USER} {MINIO_ROOT_PASSWORD}\n mc.exe admin info local\n\n Replace ``{MINIO_ROOT_USER}`` and ``{MINIO_ROOT_PASSWORD}`` with the credentials you defined for the container with the ``-e`` flags.\n\n The mc alias set takes four arguments:\n\n - The name of the alias\n - The hostname or IP address and port of the MinIO server\n - The Access Key for a MinIO user <minio-users>\n - The Secret Key for a MinIO user <minio-users>\n\n For additional details about this command, see alias.\n\nNext Steps\n\n- Connect your applications to MinIO <minio-drivers>\n- Configure Object Retention <minio-object-retention>\n- Configure Security <minio-authentication-and-identity-management>\n- Deploy MinIO in a Distributed Environment <deploy-minio-distributed>", "project": "minio-docs", "source": "source/includes/container/quickstart.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "MinIO does not support using mc admin commands with other\nS3-compatible services, regardless of their claimed compatibility with MinIO\ndeployments.", "project": "minio-docs", "source": "source/includes/facts-mc-admin.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "Directs |command| to operate only on the object version(s) that\nexisted at specified point-in-time.\n\n- To rewind to a specific date in the past, specify the date as an\n ISO8601-formatted timestamp. For example: ``--rewind \"2020.03.24T10:00\"``.\n\n- To rewind a duration in time, specify the duration as a string in\n ``#d#hh#mm#ss`` format. For example: ``--rewind \"1d2hh3mm4ss\"``.\n\n|rewind| requires that the specified |alias| be an S3-compatible service\nthat supports minio-bucket-versioning. For MinIO deployments, use\nmc version to enable or disable bucket versioning.\n\nDirects |command| to operate on all object versions that exist in the\nbucket.\n\n|versions| requires that the specified |alias| be an S3-compatible service\nthat supports minio-bucket-versioning. For MinIO deployments, use\nmc version to enable or disable bucket versioning.\n\nDirects |command| to operate only on the specified object version.\n\n|versionid| requires that the specified |alias| be an S3-compatible service\nthat supports minio-bucket-versioning. For MinIO deployments, use\nmc version to enable or disable bucket versioning.\n\n :class: note\n\n |command| requires bucket versioning <minio-bucket-versioning> to\n use this feature. Use mc version to enable versioning on a bucket.", "project": "minio-docs", "source": "source/includes/facts-versioning.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "This procedure assumes an existing supported KMS installation <#supported-kms-targets> accessible from the Kubernetes cluster.\n\n- For deployments within the same Kubernetes cluster as the MinIO Tenant, you can use Kubernetes service names to allow the MinIO Tenant to establish connectivity to the target KMS service.\n\n- For deployments external to the Kubernetes cluster, you must ensure the cluster supports routing communications between Kubernetes services and pods and the external network.\n This may require configuration or deployment of additional Kubernetes network components and/or enabling access to the public internet.\n\nDefer to the documentation for your chosen KMS solution for guidance on deployment and configuration.\n\nYou can use either the MinIO Tenant Console or the MinIO mc CLI to enable bucket-default SSE-KMS with the generated key:\n\n Connect to the MinIO Tenant Console service <create-tenant-connect-tenant> and log in.\n For clients internal to the Kubernetes cluster, you can specify the service DNS name <concepts/services-networking/dns-pod-service/#a-aaaa-records>.\n For clients external to the Kubernetes cluster, specify the hostname of the service exposed by Ingress, Load Balancer, or similar Kubernetes network control component.\n\n Once logged in, create a new Bucket and name it to your preference.\n Select the Gear gear icon to open the management view.\n\n Select the pencil pencil icon next to the Encryption field to open the modal for configuring a bucket default SSE scheme.\n\n Select SSE-KMS, then enter the name of the key created in the previous step.\n\n Once you save your changes, try to upload a file to the bucket.\n When viewing that file in the object browser, note that in the sidebar the metadata includes the SSE encryption scheme and information on the key used to encrypt that object.\n This indicates the successful encrypted state of the object.\n\n Use the MinIO API Service <create-tenant-connect-tenant> to create a new alias <alias> for the MinIO deployment.\n You can then use the mc encrypt set command to enable SSE-KMS encryption for a bucket:\n\n :class: copyable\n\n mc alias set k8s https://minio.minio-tenant-1.svc.cluster-domain.example:443 ROOTUSER ROOTPASSWORD\n\n mc mb k8s/encryptedbucket\n mc encrypt set SSE-KMS encrypted-bucket-key k8s/encryptedbucket\n\n For clients external to the Kubernetes cluster, specify the hostname of the service exposed by Ingress, Load Balancer, or similar Kubernetes network control component.\n\n Write a file to the bucket using mc cp or any S3-compatible SDK with a ``PutObject`` function.\n You can then run mc stat on the file to confirm the associated encryption metadata.\n\n :class: important\n\n If required by your chosen provider, you must unseal the backing vault instance before creating new encryption keys.\n See the documentation for your chosen KMS solution for more information.\n\nMinIO requires that the |EK| for a given bucket or object exist on the root KMS *before* performing |SSE| operations using that key.\nYou can use the mc admin kms key create command against the MinIO Tenant.\n\nYou must ensure your local host can access the MinIO Tenant pods and services before using mc to manage the Tenant.\nFor hosts internal to the Kubernetes cluster, you can use the service DNS name <concepts/services-networking/dns-pod-service/#a-aaaa-records>.\nFor hosts external to the Kubernetes cluster, specify the hostname of the service exposed by Ingress, Load Balancer, or similar Kubernetes network control component.\n\nRun this command in a separate Terminal or Shell:\n\n :class: copyable\n\n # Replace '-n minio' with the namespace of the MinIO deployment\n # If you deployed the Tenant without TLS you may need to change the port range\n\n # You can validate the ports in use by running\n # kubectl get svc/minio -n minio\n\n kubectl port forward svc/minio 443:443 -n minio\n\nThe following commands in a new Terminal or Shell window:\n\n- Connect a local mc client to the Tenant.\n\n- Create the encryption key.\n\nSee mc-install for instructions on installing ``mc`` on your local host.\n\n :class: copyable\n\n # Replace USERNAME and PASSWORD with a user on the tenant with administrative permissions\n # such as the root user\n\n mc alias add k8s https://localhost:443 ROOTUSER ROOTPASSWORD\n\n # Replace my-new-key with the name of the key you want to use for SSE-KMS\n mc admin kms key create k8s encrypted-bucket-key", "project": "minio-docs", "source": "source/includes/k8s/common-minio-kes.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "This procedure deploys a Single-Node Single-Drive MinIO server onto |OS| for early development and evaluation of MinIO Object Storage and its S3-compatible API layer.\n\nUse the MinIO Operator <minio-operator-installation> to deploy and manage production-ready MinIO tenants on Kubernetes.\n\nPrerequisites\n\n- An existing Kubernetes deployment where *at least* one Worker Node has a locally-attached drive.\n- A local ``kubectl`` installation configured to create and access resources on the target Kubernetes deployment.\n- Familiarity with Kubernetes environments\n- Familiarity with using a Terminal or Shell environment\n\nProcedure\n\n#. **Download the MinIO Object**\n\n Download `minio-dev.yaml <https://raw.githubusercontent.com/minio/docs/master/source/extra/examples/minio-dev.yaml>`__ to your host machine:\n\n :class: copyable\n\n curl https://raw.githubusercontent.com/minio/docs/master/source/extra/examples/minio-dev.yaml -O\n\n The file describes two Kubernetes resources:\n\n - A new namespace ``minio-dev``, and\n - A MinIO pod using a drive or volume on the Worker Node for serving data\n\n Select the Overview of the MinIO Object YAML for a more detailed description of the object.\n\n The ``minio-dev.yaml`` contains the following Kubernetes resources:\n\n :language: yaml\n\n The object deploys two resources:\n\n - A new namespace ``minio-dev``, and\n - A MinIO pod using a drive or volume on the Worker Node for serving data\n\n The MinIO resource definition uses Kubernetes Node Selectors and Labels <concepts/scheduling-eviction/assign-pod-node/#built-in-node-labels> to restrict the pod to a node with matching hostname label.\n Use ``kubectl get nodes --show-labels`` to view all labels assigned to each node in the cluster.\n\n The MinIO Pod uses a hostPath <concepts/storage/volumes/#hostpath> volume for storing data. This path *must* correspond to a local drive or folder on the Kubernetes worker node.\n\n Users familiar with Kubernetes scheduling and volume provisioning may modify the ``spec.nodeSelector``, ``volumeMounts.name``, and ``volumes`` fields to meet more specific requirements.\n\n#. **Apply the MinIO Object Definition**\n\n The following command applies the ``minio-dev.yaml`` configuration and deploys the objects to Kubernetes:\n\n :class: copyable\n\n kubectl apply -f minio-dev.yaml\n\n The command output should resemble the following:\n\n namespace/minio-dev created\n pod/minio created\n\n You can verify the state of the pod by running ``kubectl get pods``:\n\n :class: copyable\n\n kubectl get pods -n minio-dev\n\n The output should resemble the following:\n\n NAME READY STATUS RESTARTS AGE\n minio 1/1 Running 0 77s\n\n You can also use the following commands to retrieve detailed information on the pod status:\n\n :class: copyable\n\n kubectl describe pod/minio -n minio-dev\n\n kubectl logs pod/minio -n minio-dev\n\n#. **Temporarily Access the MinIO S3 API and Console**\n\n Use the ``kubectl port-forward`` command to temporarily forward traffic from the MinIO pod to the local machine:\n\n :class: copyable\n\n kubectl port-forward pod/minio 9000 9090 -n minio-dev\n\n The command forwards the pod ports ``9000`` and ``9090`` to the matching port on the local machine while active in the shell.\n The ``kubectl port-forward`` command only functions while active in the shell session.\n Terminating the session closes the ports on the local machine.\n\n The following steps of this procedure assume an active ``kubectl port-forward`` command.\n\n To configure long term access to the pod, configure Ingress <concepts/services-networking/ingress/> or similar network control components within Kubernetes to route traffic to and from the pod. Configuring Ingress is out of the scope for this documentation.\n\n#. **Connect your Browser to the MinIO Server**\n\n Access the minio-console by opening a browser on the local machine and navigating to ``http://127.0.0.1:9001``.\n\n Log in to the Console with the credentials ``minioadmin | minioadmin``.\n These are the default root user <minio-users-root> credentials.\n\n#. **(Optional) Connect the MinIO Client**\n\n If your local machine has mc installed <mc-install>, use the mc alias set command to authenticate and connect to the MinIO deployment:\n\n :class: copyable\n\n mc alias set k8s-minio-dev http://127.0.0.1:9000 minioadmin minioadmin\n mc admin info k8s-minio-dev\n\n - The name of the alias\n - The hostname or IP address and port of the MinIO server\n - The Access Key for a MinIO user <minio-users>\n - The Secret Key for a MinIO user <minio-users>\n\nNext Steps\n\n- Connect your applications to MinIO <minio-drivers>\n- Configure Object Retention <minio-object-retention>\n- Configure Security <minio-authentication-and-identity-management>\n- Deploy MinIO for Production Environments <deploy-minio-distributed>", "project": "minio-docs", "source": "source/includes/k8s/quickstart.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "Object Scanner\n\n :local:\n :depth: 1\n\nOverview\n\nMinIO uses the built-in scanner to check objects for healing and to take any scheduled object actions.\nSuch actions may include:\n\n- calculate data usage on drives\n- evaluate and apply configured lifecycle management <minio-lifecycle-management> or object retention <minio-object-retention> rules\n- perform bucket <minio-bucket-replication> or site <minio-site-replication-overview> replication\n- check objects for missing or corrupted data or parity shards and perform healing <minio-concepts-healing>\n\nThe scanner performs these functions at two levels: cluster and bucket.\nAt the cluster level, the scanner splits all buckets into groups and scans one group of buckets at a time.\nThe scanner starts with any new buckets added since the last scan, then randomizes the scanning of other buckets.\nThe scanner completes checks on all bucket groups before starting over with a new set of scans.\n\nAt the bucket level, the scanner groups items in buckets and scans selected items from that bucket.\nThe scanner selects objects for a scan based on a hash of the object name.\nOver a span of 16 scans, MinIO checks every object in the namespace.\nMinIO fully scans any prefixes known to be new since the last scan.\n\nScan Length\n\nMultiple factors impact the time it takes for a scan to complete.\n\nSome of these factors include:\n\n- Type of drives provided to MinIO\n- Throughput and iops (input/output operations per second) available\n- Number and size of objects\n- Other activity on the MinIO Server\n\nFor example, by default, MinIO pauses the scanner to make I/O operations available for read and write requests.\nThis can lengthen the time it takes for a scan to complete.\n\nMinIO waits between each scan by a factor multiplication of the time it takes each scan operation to complete.\nBy default, the value of this factor is ``10.0``, meaning MinIO waits 10x the length of an operation after one scan completes before starting the next scan.\nThe value of this factor changes depending on the configured scanner speed setting <minio-scanner-speed-options>.\n\nScanner Performance\n\nMany factors impact the scanner performance.\nSome of these factors include:\n\n- available node resources\n- size of the cluster\n- number of erasure sets compared to the number of drives\n- complexity of bucket hierarchy (objects and prefixes).\n\nFor example, a cluster that starts with 100TB of data and then grows to 200TB of data may require more time to scan the entire namespace of buckets and objects given the same hardware and workload.\nLikewise, a single erasure set of 16 drives takes longer to scan than the same number of drives split into two erasure sets of 8 drives each.\n\nMinIO treats the scanner as a background task and pauses it in favor of completing read and write requests on the cluster.\nAs the cluster or workload increases, scanner performance decreases as it yields more frequently to ensure priority of normal S3 operations.\n\n :start-after: start-scanner-speed-config\n :end-before: end-scanner-speed-config\n\nScanner Metrics\n\nMinIO provides a number of `metrics related to the scanner <https://docs.min.io/community/minio-object-store/operations/monitoring/metrics-v2.html#scanner-metrics>`__.\n\nUse ``mc admin scanner info`` to see the current status of the scanner and the time since the last full scan.\nThis can help in understanding the metrics provided by the scanner operation.\n\nScanner metrics, including usage metrics, reflect the last completed scan.\n``PUT`` or ``DELETE`` operations since the last scan do not update in the usage until the next scan of the affected bucket(s).\n\nThe output resembles the following:\n\n Overall Statistics\n Last full scan time: 0d0h14m; Estimated 2885.28/month\n Current cycle: 70464; Started: 2024-04-19 20:02:34.568479139 +0000 UTC\n Active drives: 2\n\n Last Minute Statistics\n Objects Scanned: 620 objects; Avg: 124.929µs; Rate: 892800/day\n Versions Scanned: 620 versions; Avg: 2.801µs; Rate: 892800/day\n Versions Heal Checked: 0 versions; Avg: 0ms\n Read Metadata: 621 objects; Avg: 88.416µs, Size:\n ILM checks: 656 versions; Avg: 663ns\n Check Replication: 656 versions; Avg: 1.061µs\n Verify Deleted: 0 folders; Avg: 0ms\n Yield: 3.086s total; Avg: 4.705ms/obj", "project": "minio-docs", "source": "source/operations/concepts/scanner.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "Decommission Server Pools\n\n :local:\n :depth: 1\n\nMinIO supports decommissioning and removing server pools <minio-intro-server-pool> from a deployment with two or more pools.\nTo decommission, there must be at least one remaining pool with sufficient available space to receive the objects from the decommissioned pools.\n\nStarting with ``RELEASE.2023-01-18T04-36-38Z``, MinIO supports queueing multiple pools <minio-decommission-multiple-pools> in a single decommission command.\nEach listed pool immediately enters a read-only status, but draining occurs one pool at a time.\n\nDecommissioning is designed for removing an older server pool whose hardware is no longer sufficient or performant compared to the pools in the deployment.\nMinIO automatically migrates data from the decommissioned pools to the remaining pools in the deployment based on the ratio of free space available in each pool.\n\nDuring the decommissioning process, MinIO routes read operations (e.g. ``GET``, ``LIST``, ``HEAD``) normally.\nMinIO routes write operations (e.g. ``PUT``, versioned ``DELETE``) to the remaining \"active\" pools in the deployment.\nVersioned objects maintain their ordering throughout the migration process.\n\nThe procedures on this page decommission and remove one or more server pools from a distributed <deploy-minio-distributed> MinIO deployment with *at least* two server pools.\n\n :class: important\n\n Once MinIO begins decommissioning a pool, it marks that pool as *permanently* inactive (\"draining\").\n Cancelling or otherwise interrupting the decommissioning procedure does **not** restore the pool to an active state.\n Use extra caution when decommissioning multiple pools.\n\n Decommissioning is a major administrative operation that requires care in planning and execution, and is not a trivial or 'daily' task.\n\n `MinIO SUBNET <https://min.io/pricing?jmp=docs>`__ users can `log in <https://subnet.min.io/>`__ and create a new issue related to decommissioning.\n Coordination with MinIO Engineering via SUBNET can ensure successful decommissioning, including performance testing and health diagnostics.\n\n Community users can seek support on the `MinIO Community Slack <https://slack.min.io>`__.\n Community Support is best-effort only and has no SLAs around responsiveness.\n\nPrerequisites\n\nBack Up Cluster Settings First\n\nUse the mc admin cluster bucket export and mc admin cluster iam export commands to take a snapshot of the bucket metadata and IAM configurations respectively prior to starting decommissioning.\nYou can use these snapshots to restore bucket/IAM settings to recover from user or process errors as necessary.\n\nNetworking and Firewalls\n\nEach node should have full bidirectional network access to every other node in\nthe deployment. For containerized or orchestrated infrastructures, this may\nrequire specific configuration of networking and routing components such as\ningress or load balancers. Certain operating systems may also require setting\nfirewall rules. For example, the following command explicitly opens the default\nMinIO server API port ``9000`` on servers using ``firewalld``:\n\n :class: copyable\n\n firewall-cmd --permanent --zone=public --add-port=9000/tcp\n firewall-cmd --reload\n\nIf you set a static MinIO Console <minio-console> port (e.g. ``:9001``)\nyou must *also* grant access to that port to ensure connectivity from external\nclients.\n\nMinIO **strongly recomends** using a load balancer to manage connectivity to the\ncluster. The Load Balancer should use a \"Least Connections\" algorithm for\nrouting requests to the MinIO deployment, since any MinIO node in the deployment\ncan receive, route, or process client requests.\n\nThe following load balancers are known to work well with MinIO:\n\n- `NGINX <https://www.nginx.com/products/nginx/load-balancing/>`__\n- `HAProxy <https://cbonte.github.io/haproxy-dconv/2.3/intro.html#3.3.5>`__\n\nConfiguring firewalls or load balancers to support MinIO is out of scope for\nthis procedure.\n\nDeployment Must Have Sufficient Storage\n\nThe decommissioning process migrates objects from the target pool to other pools in the deployment.\nThe total available storage on the deployment *must* exceed the total storage of the decommissioned pool.\n\nUse the `Erasure Code Calculator <https://min.io/product/erasure-code-calculator>`__ to determine the usable storage capacity.\nThen reduce that by the size of the objects already on the deployment.\n\nFor example, consider a deployment with the following distribution of used and free storage:\n\n :stub-columns: 1\n :widths: 30 30 30\n :width: 100%\n\n * - Pool 1\n - 100TB Used\n - 200TB Total\n\n * - Pool 2\n - 100TB Used\n - 200TB Total\n\n * - Pool 3\n - 100TB Used\n - 200TB Total\n\nDecommissioning Pool 1 requires distributing the 100TB of used storage across the remaining pools.\nPool 2 and Pool 3 each have 100TB of unused storage space and can safely absorb the data stored on Pool 1.\n\nHowever, if Pool 1 were full (e.g. 200TB of used space), decommissioning would\ncompletely fill the remaining pools and potentially prevent any further write\noperations.\n\nConsiderations\n\nReplacing a Server Pool\n\nFor hardware upgrade cycles where you replace old pool hardware with a new pool, you should add the new pool through expansion <expand-minio-distributed> before starting the decommissioning of the old pool.\nAdding the new pool first allows the decommission process to transfer objects in a balanced way across all available pools, both existing and new.\n\nComplete any planned hardware expansion <expand-minio-distributed> prior to decommissioning older hardware pools.\n\nDecommissioning requires that a cluster's topology remain stable throughout the pool draining process.\nDo **not** attempt to perform expansion and decommission changes in a single step.\n\nDecommissioning is Resumable\n\nMinIO resumes decommissioning if interrupted by transient issues such as\ndeployment restarts or network failures.\n\nFor manually cancelled or failed decommissioning attempts, MinIO\nresumes only after you manually re-initiate the decommissioning operation.\n\nThe pool remains in the decommissioning state *regardless* of the interruption.\nA pool can *never* return to active status after decommissioning begins.\n\nDecommissioning is Non-Disruptive\n\nRemoving a decommissioned server pool requires restarting *all* MinIO\nnodes in the deployment at around the same time.\n\n :start-after: start-nondisruptive-upgrade-desc\n :end-before: end-nondisruptive-upgrade-desc\n\nDecommissioning Ignores Expired Objects and Trailing ``DeleteMarker``\n\nStarting with RELEASE.2023-05-27T05-56-19Z, decommissioning ignores objects where the only remaining version is a ``DeleteMarker``.\nThis avoids creating empty metadata on the remaining server pool(s) for objects that are effectively fully deleted.\n\nStarting with RELEASE.2023-06-23T20-26-00Z, decommissioning also ignores object versions which have expired based on the configured lifecycle rules <minio-lifecycle-management-expiration> for the parent bucket.\nStarting with RELEASE.2023-06-29T05-12-28Z, you can monitor ignored delete markers and expired objects during the decommission process with mc admin trace --call decommission <mc admin trace --call>.\n\nOnce the decommissioning process completes, you can safely shut down that pool.\nSince the only remaining data was scheduled for deletion *or* was only a ``DeleteMarker``, you can safely clear or destroy those drives as per your internal procedures.\n\nBehavior\n\nFinal Listing Check\n\nAt the end of the decommission process, MinIO checks for a list of items on the pool.\nIf the list returns empty, MinIO marks the decommission as successfully completed.\nIf any objects return, MinIO returns an error that the decommission process failed.\n\nIf the decommission fails, customers should open a |SUBNET| issue for further assistance before retrying the decommission.\nCommunity users without a SUBNET subscription can retry the decommission process or seek additional support through the `MinIO Community Slack <https://slack.min.io/>`__.\nMinIO provides Community Support at best-effort only and provides no SLA (Service Level Agreement) around responsiveness.\n\nDecommissioning a Server with Tiering Enabled\n\nFor deployments with tiering enabled and active, decommissioning moves the object references to a new active pool.\nApplications can continue issuing GET requests against those objects where MinIO handles transparently retrieving them from the remote tier.\n\nIn older MinIO versions, tiering configurations prevent decommissioning.\n\nDecommission a Server Pool\n\n1) Review the MinIO Deployment Topology\n\nThe mc admin decommission command returns a list of all\npools in the MinIO deployment:\n\n :class: copyable\n\n mc admin decommission status myminio\n\nThe command returns output similar to the following:\n\n ┌─────┬────────────────────────────────────────────────────────────────┬──────────────────────────────────┬────────┐\n │ ID │ Pools │ Capacity │ Status │\n │ 1st │ https://minio-{01...04}.example.com:9000/mnt/disk{1...4}/minio │ 10 TiB (used) / 10 TiB (total) │ Active │\n │ 2nd │ https://minio-{05...08}.example.com:9000/mnt/disk{1...4}/minio │ 60 TiB (used) / 100 TiB (total) │ Active │\n │ 3rd │ https://minio-{09...12}.example.com:9000/mnt/disk{1...4}/minio │ 40 TiB (used) / 100 TiB (total) │ Active │\n └─────┴────────────────────────────────────────────────────────────────┴──────────────────────────────────┴────────┘\n\nThe example deployment above has three pools. Each pool has four servers\nwith four drives each.\n\nIdentify the target pool for decommissioning and review the current capacity.\nThe remaining pools in the deployment *must* have sufficient total\ncapacity to migrate all object stored in the decommissioned pool.\n\nIn the example above, the deployment has 210TiB total storage with 110TiB used.\nThe first pool (``minio-{01...04}``) is the decommissioning target, as it was\nprovisioned when the MinIO deployment was created and is completely full. The\nremaining newer pools can absorb all objects stored on the first pool without\nsignificantly impacting total available storage.\n\n2) Start the Decommissioning Process\n\n :class: warning\n\n Once MinIO begins decommissioning a pool, it marks that pool as *permanently*\n inactive (\"draining\"). Cancelling or otherwise interrupting the\n decommissioning procedure does **not** restore the pool to an active\n state.\n\n Review and validate that you are decommissioning the correct pool\n *before* running the following command.\n\nUse the mc admin decommission start command to begin decommissioning\nthe target pool. Specify the alias <alias> of the deployment and the\nfull description of the pool to decommission, including all hosts, disks, and file paths.\n\n :class: copyable\n\n mc admin decommission start myminio/ https://minio-{01...04}.example.net:9000/mnt/disk{1...4}/minio\n\nThe example command begins decommissioning the matching server pool on the\n``myminio`` deployment.\n\nDuring the decommissioning process, MinIO continues routing read operations\n(``GET``, ``LIST``, ``HEAD``) to the pool for those objects not\nyet migrated. MinIO routes all new write operations (``PUT``) to the\nremaining pools in the deployment.\n\nLoad balancers, reverse proxy, or other network control components which\nmanage connections to the deployment do not need to modify their configurations\nat this time.\n\n3) Monitor the Decommissioning Process\n\nUse the mc admin decommission status command to monitor the\ndecommissioning process.\n\n :class: copyable\n\n mc admin decommission status myminio\n\nThe command returns output similar to the following:\n\n ┌─────┬────────────────────────────────────────────────────────────────┬──────────────────────────────────┬──────────┐\n │ ID │ Pools │ Capacity │ Status │\n │ 1st │ https://minio-{01...04}.example.com:9000/mnt/disk{1...4}/minio │ 10 TiB (used) / 10 TiB (total) │ Draining │\n │ 2nd │ https://minio-{05...08}.example.com:9000/mnt/disk{1...4}/minio │ 60 TiB (used) / 100 TiB (total) │ Active │\n │ 3rd │ https://minio-{09...12}.example.com:9000/mnt/disk{1...4}/minio │ 40 TiB (used) / 100 TiB (total) │ Active │\n └─────┴────────────────────────────────────────────────────────────────┴──────────────────────────────────┴──────────┘\n\nYou can retrieve more detailed information by specifying the description of\nthe server pool to the command:\n\n :class: copyable\n\n mc admin decommission status myminio https://minio-{01...04}.example.com:9000/mnt/disk{1...4}/minio\n\nThe command returns output similar to the following:\n\n Decommissioning rate at 100MiB/sec [1TiB/10TiB]\n Started: 30 minutes ago\n\nmc admin decommission status marks the Status as\nComplete once decommissioning is completed. You can move on to\nthe next step once decommissioning is completed.\n\nIf Status reads as failed, you can re-run the\nmc admin decommission start command to resume the process.\nFor persistent failures, use mc admin logs or review\nthe ``systemd`` logs (e.g. ``journalctl -u minio``) to identify more specific\nerrors.\n\n4) Remove the Decommissioned Pool from the Deployment Configuration\n\nAs each pool completes decommissioning, you can safely remove it from the\ndeployment configuration. Modify the startup command for each remaining MinIO\nserver in the deployment and remove the decommissioned pool.\n\nThe ``.deb`` or ``.rpm`` packages install a\n`systemd <https://www.freedesktop.org/wiki/Software/systemd/>`__ service file to\n``/lib/systemd/system/minio.service``. For binary installations, this\nprocedure assumes the file was created manually as per the\ndeploy-minio-distributed procedure.\n\nThe ``minio.service`` file uses an environment file located at\n``/etc/default/minio`` for sourcing configuration settings, including the\nstartup. Specifically, the ``MINIO_VOLUMES`` variable sets the startup\ncommand:\n\n :class: copyable\n\n cat /etc/default/minio | grep \"MINIO_VOLUMES\"\n\nThe command returns output similar to the following:\n\n MINIO_VOLUMES=\"https://minio-{1...4}.example.net:9000/mnt/disk{1...4}/minio https://minio-{5...8}.example.net:9000/mnt/disk{1...4}/minio https://minio-{9...12}.example.net:9000/mnt/disk{1...4}/minio\"\n\nEdit the environment file and remove the decommissioned pool from the\n``MINIO_VOLUMES`` value.\n\n5) Update Network Control Plane\n\nUpdate any load balancers, reverse proxies, or other network control planes\nto remove the decommissioned server pool from the connection configuration for\nthe MinIO deployment.\n\nSpecific instructions for configuring network control plane components is\nout of scope for this procedure.\n\n6) Restart the MinIO Deployment\n\nIssue the following commands on each node **simultaneously** in the deployment\nto restart the MinIO service:\n\n :start-after: start-install-minio-restart-service-desc\n :end-before: end-install-minio-restart-service-desc\n\n :start-after: start-nondisruptive-upgrade-desc\n :end-before: end-nondisruptive-upgrade-desc\n\nOnce the deployment is online, use mc admin info to confirm the\nuptime of all remaining servers in the deployment.\n\nDecommission Multiple Server Pools\n\nYou can start the decommission process for multiple server pools when issuing a decommission command.\n\nAfter entering the command:\n\n- MinIO immediately stops write access to all pools to be decommissioned.\n- Decommissioning happens one pool at a time.\n- Each pool completes the decommission draining process before MinIO begins draining the next pool.\n\nTo decommission multiple server pools from one command, add the full description of each server pool to decommission as a comma-separated list.\n\nAll other considerations about decommissioning apply when performing the process on multiple servers.\n\n- Decommissioning is permanent.\n- Once you mark the pools as decommissioned, you **cannot** restore them.\n- Confirm you select the intended pools.\n\n1) Review the MinIO Deployment Topology\n\nThe mc admin decommission command returns a list of all pools in the MinIO deployment:\n\n :class: copyable\n\n mc admin decommission status myminio\n\nThe command returns output similar to the following:\n\n ┌─────┬────────────────────────────────────────────────────────────────┬──────────────────────────────────┬────────┐\n │ ID │ Pools │ Capacity │ Status │\n │ 1st │ https://minio-{01...04}.example.com:9000/mnt/disk{1...4}/minio │ 10 TiB (used) / 10 TiB (total) │ Active │\n │ 2nd │ https://minio-{05...08}.example.com:9000/mnt/disk{1...4}/minio │ 95 TiB (used) / 100 TiB (total) │ Active │\n │ 3rd │ https://minio-{09...12}.example.com:9000/mnt/disk{1...4}/minio │ 40 TiB (used) / 500 TiB (total) │ Active │\n │ 4th │ https://minio-{13...16}.example.com:9000/mnt/disk{1...4}/minio │ 0 TiB (used) / 500 TiB (total) │ Active │\n └─────┴────────────────────────────────────────────────────────────────┴──────────────────────────────────┴────────┘\n\nThe example deployment above has three pools.\nEach pool has four servers with four drives each.\n\nIdentify the target pool for decommissioning and review the current capacity.\nThe remaining pools in the deployment *must* have sufficient total capacity to migrate all object stored in the decommissioned pool.\n\nIn the example above, the deployment has 1110TiB total storage with 145TiB used.\n\n- The first pool (``minio-{01...04}``) is the first decommissioning target, as it was provisioned when the MinIO deployment was created and is completely full.\n- The second pool (``minio-{05...08}``) is the second decommissioning target, as it was also provisioned when the MinIO deployment was created and is nearly full.\n- The fourth pool (``minio-{13...16}``) is a newly added pool with new hardware from a completed server expansion.\n\nThe third and fourth pools can absorb all objects stored on the first pool without significantly impacting total available storage.\n\n Complete any server expansion to add new storage resources _before_ beginning a decommission process.\n\n2) Start the Decommissioning Process\n\n :class: warning\n\n Once MinIO begins decommissioning the pools, it marks those pools as *permanently* inactive (\"draining\").\n Cancelling or otherwise interrupting the decommissioning procedure does **not** restore the pools to an active state.\n\n Review and validate that you are decommissioning the correct pools *before* running the following command.\n\nUse the mc admin decommission start command to begin decommissioning the target pool.\nSpecify the alias <alias> of the deployment and a comma-separated list of the full description of each pool to decommission, including all hosts, disks, and file paths.\n\n :class: copyable\n\n mc admin decommission start myminio/ https://minio-{01...04}.example.net:9000/mnt/disk{1...4}/minio,https://minio-{05...08}.example.net:9000/mnt/disk{1...4}/minio\n\nThe example command begins decommissioning the two listed matching server pools on the ``myminio`` deployment.\n\nDuring the decommissioning process, MinIO continues routing read operations (``GET``, ``LIST``, ``HEAD``) operations to the pools for those objects not yet migrated.\nMinIO routes all new write operations (``PUT``) to the remaining pools in the deployment not scheduled for decommissioning.\n\nDraining of decommissioned pools happens one pool at a time, completing the decommission of each pool in sequence.\nDraining does _not_ happen concurrently for all decommissioning pools.\n\nLoad balancers, reverse proxy, or other network control components which manage connections to the deployment do not need to modify their configurations at this time.\n\n3) Monitor the Decommissioning Process\n\nUse the mc admin decommission status command to monitor the decommissioning process.\n\n :class: copyable\n\n mc admin decommission status myminio\n\nThe command returns output similar to the following:\n\n ┌─────┬────────────────────────────────────────────────────────────────┬──────────────────────────────────┬──────────┐\n │ ID │ Pools │ Capacity │ Status │\n │ 1st │ https://minio-{01...04}.example.com:9000/mnt/disk{1...4}/minio │ 10 TiB (used) / 10 TiB (total) │ Draining │\n │ 2nd │ https://minio-{05...08}.example.com:9000/mnt/disk{1...4}/minio │ 95 TiB (used) / 100 TiB (total) │ Pending │\n │ 3rd │ https://minio-{09...12}.example.com:9000/mnt/disk{1...4}/minio │ 40 TiB (used) / 500 TiB (total) │ Active │\n │ 4th │ https://minio-{13...16}.example.com:9000/mnt/disk{1...4}/minio │ 0 TiB (used) / 500 TiB (total) │ Active │\n └─────┴────────────────────────────────────────────────────────────────┴──────────────────────────────────┴──────────┘\n\nYou can retrieve more detailed information by specifying the description of the server pool to the command:\n\n :class: copyable\n\n mc admin decommission status myminio https://minio-{01...04}.example.com:9000/mnt/disk{1...4}/minio\n\nThe command returns output similar to the following:\n\n Decommissioning rate at 100MiB/sec [1TiB/10TiB]\n Started: 30 minutes ago\n\nmc admin decommission status marks the Status as Complete once decommissioning is completed.\nYou can move on to the next step once MinIO completes decommissioning for all pools.\n\nIf Status reads as failed, you can re-run the mc admin decommission start command to resume the process.\nFor persistent failures, use mc admin logs or review the ``systemd`` logs (e.g. ``journalctl -u minio``) to identify more specific errors.\n\n4) Remove the Decommissioned Pools from the Deployment Configuration\n\nOnce decommissioning completes, you can safely remove the pools from the deployment configuration.\nModify the startup command for each remaining MinIO server in the deployment and remove the decommissioned pool.\n\nThe ``.deb`` or ``.rpm`` packages install a `systemd <https://www.freedesktop.org/wiki/Software/systemd/>`__ service file to ``/lib/systemd/system/minio.service``.\nFor binary installations, this procedure assumes the file was created manually as per the deploy-minio-distributed procedure.\n\nThe ``minio.service`` file uses an environment file located at ``/etc/default/minio`` for sourcing configuration settings, including the startup.\nSpecifically, the ``MINIO_VOLUMES`` variable sets the startup command:\n\n :class: copyable\n\n cat /etc/default/minio | grep \"MINIO_VOLUMES\"\n\nThe command returns output similar to the following:\n\n MINIO_VOLUMES=\"https://minio-{1...4}.example.net:9000/mnt/disk{1...4}/minio https://minio-{5...8}.example.net:9000/mnt/disk{1...4}/minio https://minio-{9...12}.example.net:9000/mnt/disk{1...4}/minio\"\n\nEdit the environment file and remove the decommissioned pools from the ``MINIO_VOLUMES`` value.\n\n5) Update Network Control Plane\n\nUpdate any load balancers, reverse proxies, or other network control planes to remove the decommissioned server pools from the connection configuration for the MinIO deployment.\n\nSpecific instructions for configuring network control plane components is out of scope for this procedure.\n\n6) Restart the MinIO Deployment\n\nIssue the following commands on each node **simultaneously** in the deployment to restart the MinIO service:\n\n :start-after: start-install-minio-restart-service-desc\n :end-before: end-install-minio-restart-service-desc\n\n :start-after: start-nondisruptive-upgrade-desc\n :end-before: end-nondisruptive-upgrade-desc\n\nOnce the deployment is online, use mc admin info to confirm the uptime of all remaining servers in the deployment.", "project": "minio-docs", "source": "source/operations/deployments/baremetal-decommission-server-pool.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "Expand a MinIO Tenant\n\n :local:\n :depth: 1\n\nThis procedure documents expanding the available storage capacity of an existing MinIO tenant by deploying an additional pool of MinIO pods in the Kubernetes infrastructure.\n\n The MinIO Operator Console is deprecated and removed in Operator 6.0.0.\n\n See minio-k8s-modify-minio-tenant for instructions on migrating Tenants installed via the Operator Console to Kustomization.\n\nPrerequisites\n\nMinIO Kubernetes Operator\n\nThis procedure on this page *requires* a valid installation of the MinIO Kubernetes Operator and assumes the local host has a matching installation of the MinIO Kubernetes Operator.\nThis procedure assumes the latest stable Operator, version |operator-version-stable|.\n\nSee deploy-operator-kubernetes for complete documentation on deploying the MinIO Operator.\n\nAvailable Worker Nodes\n\nMinIO deploys additional minio server <minio.server> pods as part of the new Tenant pool.\nThe Kubernetes cluster *must* have sufficient available worker nodes on which to schedule the new pods.\n\nThe MinIO Operator provides configurations for controlling pod affinity and anti-affinity to direct scheduling to specific workers.\n\nPersistent Volumes\n\n :start-after: start-exclusive-drive-access\n :end-before: end-exclusive-drive-access\n\nMinIO can use any Kubernetes Persistent Volume (PV) <concepts/storage/persistent-volumes> that supports the ReadWriteOnce <concepts/storage/persistent-volumes/#access-modes> access mode.\nMinIO's consistency guarantees require the exclusive storage access that ``ReadWriteOnce`` provides.\n\nFor Kubernetes clusters where nodes have Direct Attached Storage, MinIO strongly recommends using the `DirectPV CSI driver <https://min.io/directpv?ref=docs>`__.\nDirectPV provides a distributed persistent volume manager that can discover, format, mount, schedule, and monitor drives across Kubernetes nodes.\nDirectPV addresses the limitations of manually provisioning and monitoring local persistent volumes <concepts/storage/volumes/#local>.\n\n MinIO Tenants on EKS must use the EBS CSI Driver <kubernetes-sigs/aws-ebs-csi-driver> to provision the necessary underlying persistent volumes.\n MinIO strongly recommends using SSD-backed EBS volumes for best performance.\n For more information on EBS resources, see `EBS Volume Types <https://aws.amazon.com/ebs/volume-types/>`__.\n\nProcedure\n\nThe MinIO Operator supports expanding a MinIO Tenant by adding additional pools.\n\n #. Review the Kustomization object which describes the Tenant object (``tenant.yaml``).\n\n The ``spec.pools`` array describes the current pool topology.\n\n #. Add a new entry to the ``spec.pools`` array.\n\n The new pool must reflect your intended combination of Worker nodes, volumes per server, storage class, and affinity/scheduler settings.\n See minio-operator-crd for more complete documentation on Pool-related configuration settings.\n\n #. Apply the updated Tenant configuration\n\n Use the ``kubectl apply`` command to update the Tenant:\n\n kubectl apply -k ~/kustomization/TENANT-NAME\n\n Modify the path to the Kustomization directory to match your local configuration.\n\n #. Review the Helm ``values.yaml`` file.\n\n The ``tenant.pools`` array describes the current pool topology.\n\n #. Add a new entry to the ``tenant.pools`` array.\n\n The new pool must reflect your intended combination of Worker nodes, volumes per server, storage class, and affinity/scheduler settings.\n See minio-tenant-chart-values for more complete documentation on Pool-related configuration settings.\n\n #. Apply the updated Tenant configuration\n\n Use the ``helm upgrade`` command to update the Tenant:\n\n helm upgrade TENANT-NAME minio-operator/tenant -f values.yaml -n TENANT-NAMESPACE\n\n The command above assumes use of the MinIO Operator Chart repository.\n If you installed the Chart manually or by using a different repository name, specify that chart or name in the command.\n\n Replace ``TENANT-NAME`` and ``TENANT-NAMESPACE`` with the name and namespace of the Tenant respectively.\n You can use ``helm list -n TENANT-NAMESPACE`` to validate the Tenant name.\n\nYou can use the ``kubectl get events -n TENANT-NAMESPACE --watch`` to monitor the progress of expansion.\nThe MinIO Operator updates services to route connections appropriately across the new nodes.\nIf you use customized services, routes, ingress, or similar Kubernetes network components, you may need to update those components for the new pod hostname ranges.", "project": "minio-docs", "source": "source/operations/deployments/k8s-expand-minio-tenant-on-kubernetes.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "Configure MinIO for Authentication using OpenID\n\n :local:\n :depth: 1\n\nOverview\n\nMinIO supports using an OpenID Connect (OIDC) compatible IDentity Provider (IDP) such as Okta, KeyCloak, Dex, Google, or Facebook for external management of user identities.\n\nThis page has procedures for configuring OIDC for MinIO deployments in Kubernetes and Baremetal infrastructures.\n\nThis procedure covers:\n\n- Configuring a MinIO cluster for an external OIDC provider.\n- Using the MinIO ``AssumeRoleWithWebIdentity`` Security Token Service (STS) API to generate temporary credentials for use by applications.\n\nThis procedure is generic for OIDC compatible providers.\nDefer to the documentation for the OIDC provider of your choice for specific instructions or procedures on authentication and JWT retrieval.\n\nPrerequisites\n\nOpenID-Connect (OIDC) Compatible IDentity Provider\n\nThis procedure assumes an existing OIDC provider such as Okta, KeyCloak, Dex, Google, or Facebook.\nInstructions on configuring these services are out of scope for this procedure.\n\nThe MinIO cluster must have bidirectional access to the OIDC provider.\n\nReview Access Management Behavior\n\nEnsure each user identity intended for use with MinIO has the appropriate claim <minio-external-identity-management-openid-access-control> configured such that MinIO can associate a policy <minio-policy> to the authenticated user.\nAn OpenID user with no assigned policy has no permission to access any action or resource on the MinIO cluster.\n\nFor JWT claim-based authentication, MinIO only supports OIDC flows using the `OpenID Authorization Code Flow <https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth>`__.\n\nAccess to MinIO Cluster\n\nThis procedure uses mc for performing operations on the MinIO cluster.\nInstall ``mc`` on a machine with network access to the cluster.\nSee the ``mc`` Installation Quickstart <mc-install> for instructions on downloading and installing ``mc``.\nThis procedure assumes a configured alias <mc alias> for the MinIO cluster.\n\nConfigure MinIO with OpenID External Identity Management\n\n1. Create a new OpenID Configuration\n\n Use the mc idp openid add command to create a new OIDC configuration for the MinIO cluster.\n The following example command assumes using the JWT claims returned by the OIDC provider for authorization through policy assignment <minio-external-identity-management-openid-access-control>.\n\n :class: copyable\n\n mc idp openid add ALIAS \\\n client_id=minio-oidc-client-id \\\n client_secret=minio-oidc-client-secret \\\n config_url=\"https://openid-provider.example.net/REALM/.well-known/openid-configuration\" \\\n claim_name=\"minio-policies\" \\\n scopes=\"openid,groups\"\n\n You can also configure ``RoleArn``-based functionality where all authenticated users have a single policy dictated by the ``role_policy`` setting.\n For example, set ``role_policy=\"readOnly\"`` to assign all authenicated users the built-in read-only policy.\n\n2. Review the MinIO Server logs\n\n The MinIO process restarts as part of the new configuration.\n Examine the logs to ensure the OIDC configuration persisted successfully.\n\n If configuring ``role_policy`` for one or more configurations, the output includes an ARN for use with the STS API.\n\n3. Generate S3-Compatible Temporary Credentials using OIDC Credentials\n\n MinIO requires clients authenticate using AWS Signature Version 4 protocol <sig-v4-authenticating-requests.html> with support for the deprecated Signature Version 2 protocol.\n Specifically, clients must present a valid access key and secret key to access any S3 or MinIO administrative API, such as ``PUT``, ``GET``, and ``DELETE`` operations.\n\n Applications can generate temporary access credentials as-needed using the minio-sts-assumerolewithwebidentity Security Token Service (STS) API endpoint and the JSON Web Token (JWT) returned by the OIDC (OpenID Connect) provider.\n\n The application must provide a workflow for logging into the OIDC (OpenID Connect) provider and retrieving the JSON Web Token (JWT) associated to the authentication session.\n Defer to the provider documentation for obtaining and parsing the JWT token after successful authentication. MinIO provides an example Go application web-identity.go <minio/blob/master/docs/sts/web-identity.go> with an example of managing this workflow.\n\n Once the application retrieves the JWT token, use the ``AssumeRoleWithWebIdentity`` endpoint to generate the temporary credentials:\n\n :class: copyable\n\n POST https://minio.example.net?Action=AssumeRoleWithWebIdentity\n &WebIdentityToken=TOKEN\n &Version=2011-06-15\n &DurationSeconds=86400\n &Policy=Policy\n\n - Replace the ``TOKEN`` with the JWT token returned in the previous step.\n - Replace the ``DurationSeconds`` with the duration in seconds until the temporary credentials expire. The example above specifies a period of ``86400`` seconds, or 24 hours.\n - Replace the ``Policy`` with an inline URL-encoded JSON policy <minio-policy> that further restricts the permissions associated to the temporary credentials.\n\n Omit to use the policy associated to the OpenID user policy claim <minio-external-identity-management-openid-access-control>.\n\n You can optionally include the ``RoleArn`` parameter with the ARN string of your preferred single-policy OIDC configuration.\n\n The API response consists of an XML document containing the access key, secret key, session token, and expiration date.\n Applications can use the access key and secret key to access and perform operations on MinIO.\n\n See the minio-sts-assumerolewithwebidentity for reference documentation.", "project": "minio-docs", "source": "source/operations/external-iam/configure-openid-external-identity-management.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "cert-manager\n\n :local:\n :depth: 1\n\nTLS certificate management with cert-manager\n\nThis guide shows you how to install cert-manager for TLS certificate management.\nThe guide assumes a new or fresh MinIO Operator installation.\n\n This guide uses a self-signed ``Cluster Issuer``.\n You can also use `other Issuers supported by cert-manager <https://cert-manager.io/docs/configuration/issuers/>`__.\n\n The main difference is that you must provide that ``Issuer`` CA certificate to MinIO, instead of the CA's mentioned in this guide.\n\nRefer to the `cert-manager documentation <https://cert-manager.io>`__ and your own organization's certificate requirements for more advanced configurations.\n\ncert-manager manages certificates within Kubernetes clusters.\nThe MinIO Operator supports using cert-manager for managing and provisioning certificates as an alternative to the MinIO Operator managing certificates for itself and its tenants.\n\ncert-manager obtains valid certificates from an ``Issuer`` or ``ClusterIssuer`` and can automatically renew certificates prior to expiration.\n\nA ``ClusterIssuer`` issues certificates for multiple namespaces.\nAn ``Issuer`` only mints certificates for its own namespace.\n\nThe following graphic depicts how cert-manager provides certificates in namespaces across a Kubernetes cluster.\n\n- A ``ClusterIssuer`` exists at the root level of the Kubernetes cluster, typically the ``default`` namespace, to provide certificates to all other namespaces.\n- The ``minio-operator`` namespace receives its own, local ``Issuer``.\n- Each tenant's namespace receives its own, local ``Issuer``.\n- The certificates issued by each tenant namespace must be made known to and trusted by the MinIO Operator.\n\n :width: 600px\n :alt: A graph of the namespaces in a Kubernetes cluster showing the relationship between the root level ClusterIssuer and three other namespaces with their own Issuer.\n :align: center\n\nPrerequisites\n\n- A `supported version of Kubernetes <https://kubernetes.io/releases/>`__.\n- `kustomize <https://kustomize.io/>`__ installed\n- ``kubectl`` access to your ``k8s`` cluster\n\nSetup cert-manager\n\nInstall cert-manager\n\nThe following command installs version 1.12.13 using ``kubectl``.\n\n :class: copyable\n\n kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.13/cert-manager.yaml\n\n`Release 1.12.X LTS <https://cert-manager.io/docs/releases/release-notes/release-notes-1.12/>`__ is preferred, but you may install the latest version.\nFor more details on installing cert-manager, see their `installation instructions <https://cert-manager.io/docs/installation/>`__.\n\nCreate a self-signed Cluster Issuer for the cluster\n\nThe ``Cluster Issuer`` is the top level Issuer from which all other certificates in the cluster derive.\n\n1. Request cert-manager to generate this by creating a ``ClusterIssuer`` resource.\n\n Create a file called ``selfsigned-root-clusterissuer.yaml`` with the following contents:\n\n :class: copyable\n\n # selfsigned-root-clusterissuer.yaml\n apiVersion: cert-manager.io/v1\n kind: ClusterIssuer\n metadata:\n name: selfsigned-root\n spec:\n selfSigned: {}\n\n2. Apply the resource to the cluster:\n\n :class: copyable\n\n kubectl apply -f selfsigned-root-clusterissuer.yaml\n\nNext steps\n\nSet up cert-manager for the MinIO Operator <minio-certmanager-operator>.\n\n :titlesonly:\n :hidden:\n\n /operations/cert-manager/cert-manager-operator\n /operations/cert-manager/cert-manager-tenants", "project": "minio-docs", "source": "source/operations/network-encryption/cert-manager.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "Enable Multiple Domain TLS for MinIO\n\n :local:\n :depth: 1\n\nMinIO supports Transport Layer Security (TLS) 1.2+ encryption of incoming and outgoing traffic.\n\n :class: parent\n\n :sync: k8s\n\n The MinIO Operator supports the following approaches to enabling TLS on a MinIO Tenant:\n\n - Automatic TLS provisioning using Kubernetes Cluster Signing Certificates\n - User-specified TLS using Kubernetes secrets\n - Certmanager-managed TLS certificates\n\n The MinIO Operator supports attaching user-specified TLS certificates when deploying <minio-k8s-deploy-minio-tenant-security> or modifying <minio-k8s-modify-minio-tenant-security> the MinIO Tenant.\n\n These custom certificates support `Server Name Indication (SNI) <https://en.wikipedia.org/wiki/Server_Name_Indication>`__, where the MinIO server identifies which certificate to use based on the hostname specified by the connecting client.\n For example, you can generate certificates signed by your organization's preferred Certificate Authority (CA) and attach those to the MinIO Tenant.\n Applications which trust that CA (Certificate Authority) can connect to the MinIO Tenant and fully validate the Tenant TLS certificates.\n\n :sync: baremetal\n\n MinIO automatically detects TLS certificates in the configured or default directory and starts with TLS enabled.\n\n The MinIO server supports multiple TLS certificates, where the server uses `Server Name Indication (SNI) <https://en.wikipedia.org/wiki/Server_Name_Indication>`__ to identify which certificate to use when responding to a client request.\n When a client connects using a specific hostname, MinIO uses SNI (Server Name Indication) to select the appropriate TLS certificate for that hostname.\n\nThis procedure documents enabling TLS for multiple domains in MinIO.\nFor instructions on TLS for single domains, see TODO\n\nPrerequisites\n\nAccess to MinIO Cluster\n\n :sync: k8s\n\n You must have access to the Kubernetes cluster, with administrative permissions associated to your ``kubectl`` configuration.\n\n This procedure assumes your permission sets extends sufficiently to support deployment or modification of MinIO-associated resources on the Kubernetes cluster, including but not limited to pods, statefulsets, replicasets, deployments, and secrets.\n\n :sync: baremetal\n\n This procedure uses mc for performing operations on the MinIO cluster.\n Install ``mc`` on a machine with network access to the cluster.\n See the ``mc`` Installation Quickstart <mc-install> for instructions on downloading and installing ``mc``.\n\n This procedure assumes a configured alias <mc alias> for the MinIO cluster.\n\n This procedure also assumes SSH or similar shell-level access with administrative permissions to each MinIO host server.\n\nTLS Certificates\n\nProvision the necessary TLS certificates with a supported cipher suite <minio-TLS-supported-cipher-suites> for use by MinIO.\n\n :sync: k8s\n\n See minio-tls-kubernetes for more complete guidance on the supported Tenant TLS configurations.\n\n :sync: baremetal\n\n Provision certificate susing your preferred path, such as through your organizations internal Certificate Authority or by using a well-known global provider such as Digicert or Verisign.\n\n You can create self-signed certificates using ``openssl`` or the MinIO certgen <certgen> tool.\n\n For example, the following command generates a self-signed certificate with a set of IP and DNS Subject Alternate Names (SANs) associated to the MinIO Server hosts:\n\n certgen -host \"localhost,minio-*.example.net\"\n\n See minio-tls-baremetal for more complete guidance on certificate generation and placement.\n\nProcedure\n\n :sync: k8s\n\n The MinIO Operator supports three methods of TLS certificate management on MinIO Tenants:\n\n - MinIO automatic TLS certificate generation\n - User-specified TLS certificates\n - ``cert-manager`` managed TLS certificates\n\n You can also deploy MinIO Tenants without TLS enabled.\n\n The following steps apply to both new and existing MinIO Deployments using ``Kustomize``:\n\n 1. Review the Tenant CRD <minio-operator-crd> ``TenantSpec.requestAutoCert`` and ``TenantSpec.certConfig`` fields.\n\n For existing MinIO Tenants, review the Kustomize resources used to create the Tenant and introspect those fields and their current configuration, if any.\n\n 2. Create or Modify your Tenant YAML to set the values of ``requestAutoCert`` and ``certConfig`` as necessary.\n For example:\n\n spec:\n requestAutoCert: true\n certConfig:\n commonName: \"CN=MinioTenantCommonName\"\n organizationName: \"O=MyOrganizationName\"\n dnsNames:\n - 'minio-tenant.domain.tld'\n - '*.kubernete.cluster.dns.path.tld'\n\n The ``spec.certConfig.dnsNames`` should contain a list of SAN (Subject Alternate Names) the TLS certificate covers.\n\n See the Kustomize Tenant base YAML <operator/blob/master/examples/kustomization/base/tenant.yaml> for a baseline template for guidance in creating or modifying your Tenant resource.\n\n 3. Apply the new Kustomization template\n\n Once you apply the changes, the MinIO Operator automatically redeploys the Tenant with the updated configuration.\n\n The following steps apply to both new and existing MinIO Deployments using ``Kustomize``:\n\n 1. Review the Tenant CRD <minio-operator-crd> ``TenantSpec.externalCertsCecret`` fields\n\n For existing MinIO Tenants, review the Kustomize resources used to create the Tenant and introspect that field's current configuration, if any.\n\n 2. Create or Modify your Tenant YAML to reference the appropriate ``cert-manager`` resources.\n\n For example, the following Tenant YAML fragment references a cert-manager resource ``myminio-tls``:\n\n apiVersion: minio.min.io/v2\n kind: Tenant\n metadata:\n name: myminio\n namespace: minio-tenant\n spec:\n ## Disable default tls certificates.\n requestAutoCert: false\n ## Use certificates generated by cert-manager.\n externalCertSecret:\n - name: default-domain\n type: cert-manager.io/v1\n - name: internal-domain\n type: cert-manager.io/v1\n - name: external-domain\n type: cert-manager.io/v1\n\n 3. Apply the new Kustomization Template\n\n Once you apply the changes, the MinIO Operator automatically redeploys the Tenant with the updated configuration.\n\n The following steps apply to both new and existing MinIO deployments using ``Kustomize``:\n\n 1. Review the Tenant CRD <minio-operator-crd> ``TenantSpec.externalCertSecret`` field.\n\n For existing MinIO Tenants, review the Kustomize resources used to create the Tenant and introspect that field's current configuration, if any.\n\n 2. Create or modify your Tenant YAML to reference a secret of type ``kubernetes.io/tls``:\n\n For example, the following Tenant YAML fragment references two TLS secrets for each domain for which the MinIO Tenant accepts connections:\n\n apiVersion: minio.min.io/v2\n kind: Tenant\n metadata:\n name: myminio\n namespace: minio-tenant\n spec:\n ## Disable default tls certificates.\n requestAutoCert: false\n ## Use certificates generated by cert-manager.\n externalCertSecret:\n - name: domain-certificate-1\n type: kubernetes.io/tls\n - name: domain-certificate-2\n type: kubernetes.io/tls\n\n 3. Apply the new Kustomization Template\n\n Once you apply the changes, the MinIO Operator automatically redeploys the Tenant with the updated configuration.\n\n :sync: baremetal\n\n The MinIO Server searches for TLS keys and certificates for each node and uses those credentials for enabling TLS.\n MinIO automatically enables TLS upon discovery and validation of certificates.\n The search location depends on your MinIO configuration:\n\n :sync: baremetal-default\n\n By default, the MinIO server looks for the TLS keys and certificates for each node in the following directory:\n\n ${HOME}/.minio/certs\n\n Where ``${HOME}`` is the home directory of the user running the MinIO Server process.\n You may need to create the ``${HOME}/.minio/certs`` directory if it does not exist.\n\n For ``systemd`` managed deployments this must correspond to the ``USER`` running the MinIO process.\n If that user has no home directory, use the Custom Path option instead.\n\n :sync: baremetal-custom\n\n You can specify a path for the MinIO server to search for certificates using the minio server --certs-dir or ``-S`` parameter.\n\n For example, the following command fragment directs the MinIO process to use the ``/opt/minio/certs`` directory for TLS certificates.\n\n minio server --certs-dir /opt/minio/certs ...\n\n The user running the MinIO service *must* have read and write permissions to this directory.\n\n Place the certificates in the ``/certs`` folder, creating a subfolder in ``/certs`` for each additional domain for which MinIO should present TLS certificates.\n While MinIO has no requirements for folder names, consider creating subfolders whose name matches the domain to improve human readability.\n Place the TLS private and public key for that domain in the subfolder.\n\n /path/to/certs\n private.key\n public.crt\n s3-example.net/\n private.key\n public.crt\n internal-example.net/\n private.key\n public.crt", "project": "minio-docs", "source": "source/operations/network-encryption/enable-multiple-domain-minio-tls.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "Server-Side Object Encryption with KES\n\n :local:\n :depth: 1\n\n :description: Deploy MinIO with Server-Side Object Encryption\n :keywords: encryption, security, hashicorp, keyvault, azure\n\n :class: parent\n\n :sync: k8s\n\n This procedure assumes you have access to a Kubernetes cluster with an active MinIO Operator installation.\n For instructions on running KES, see the KES docs <tutorials/getting-started/>.\n\n As part of this procedure, you will:\n\n #. Create or modify a MinIO deployment with support for |SSE| using |KES|.\n Defer to the Deploy Distributed MinIO <minio-mnmd> tutorial for guidance on production-ready MinIO deployments.\n\n #. Use the MinIO Operator Console to create or manage a MinIO Tenant.\n #. Access the Encryption settings for that tenant and configure |SSE| using a supported Key Management System <#supported-kms-targets>.\n #. Create a new |EK| for use with |SSE|.\n #. Configure automatic bucket-default SSE-KMS <minio-encryption-sse-kms>.\n\n :sync: baremetal\n\n This procedure provides guidance for deploying MinIO configured to use KES and enable Server Side Encryption <minio-sse-data-encryption>.\n For instructions on running KES, see the KES docs <tutorials/getting-started/>.\n\n As part of this procedure, you will:\n\n #. Create a new |EK| for use with |SSE|.\n\n #. Create or modify a MinIO deployment with support for |SSE| using |KES|.\n Defer to the Deploy Distributed MinIO <minio-mnmd> tutorial for guidance on production-ready MinIO deployments.\n\n #. Configure automatic bucket-default SSE-KMS <minio-encryption-sse-kms>\n\n :start-after: start-kes-encrypted-backend-desc\n :end-before: end-kes-encrypted-backend-desc\n\nPrerequisites\n\nAccess to MinIO Cluster\n\n :sync: k8s\n\n You must have access to the Kubernetes cluster, with administrative permissions associated to your ``kubectl`` configuration.\n\n This procedure assumes your permission sets extends sufficiently to support deployment or modification of MinIO-associated resources on the Kubernetes cluster, including but not limited to pods, statefulsets, replicasets, deployments, and secrets.\n\n :sync: baremetal\n\n This procedure uses mc for performing operations on the MinIO cluster.\n Install ``mc`` on a machine with network access to the cluster.\n See the ``mc`` Installation Quickstart <mc-install> for instructions on downloading and installing ``mc``.\n\n This procedure assumes a configured alias <mc alias> for the MinIO cluster.\n\nEnsure KES Access to a Supported KMS Target\n\n :sync: k8s\n\n This procedure assumes an existing supported KMS installation <#supported-kms-targets> accessible from the Kubernetes cluster.\n\n - For deployments within the same Kubernetes cluster as the MinIO Tenant, you can use Kubernetes service names to allow the MinIO Tenant to establish connectivity to the target KMS service.\n\n - For deployments external to the Kubernetes cluster, you must ensure the cluster supports routing communications between Kubernetes services and pods and the external network.\n This may require configuration or deployment of additional Kubernetes network components and/or enabling access to the public internet.\n\n Defer to the documentation for your chosen KMS solution for guidance on deployment and configuration.\n\n :sync: baremetal\n\n This procedure assumes an existing KES installation connected to a supported |KMS| installation accessible, both accessible from the local host.\n Refer to the installation instructions for your supported KMS target <#supported-kms-targets> to deploy KES and connect it to a KMS solution.\n\n :class: important\n\n Some supported |KMS| targets allow you to seal or unseal the vault instance.\n KES returns an error if the configured |KMS| service is sealed.\n\n If you restart or otherwise seal your vault instance, KES cannot perform any cryptographic operations against the vault.\n You must unseal the Vault to ensure normal operations.\n\n See the documentation for your chosen |KMS| solution for more information on whether unsealing may be required.\n\nRefer to the configuration instruction in the KES documentation <> for your chosen supported |KMS|:\n\n- AWS Secrets Manager <integrations/aws-secrets-manager/>\n- Azure KeyVault <integrations/azure-keyvault/>\n- Entrust KeyControl <integrations/entrust-keycontrol/>\n- Fortanix SDKMS <integrations/fortanix-sdkms/>\n- Google Cloud Secret Manager <integrations/google-cloud-secret-manager/>\n- HashiCorp Vault <integrations/hashicorp-vault-keystore/>\n- Thales CipherTrust Manager (formerly Gemalto KeySecure) <integrations/thales-ciphertrust/>\n\nProcedure\n\nThis procedure provides instructions for configuring and enabling Server-Side Encryption using your selected `supported KMS solution <https://docs.min.io/community/minio-kes/#supported-kms-targets>`__ in production environments.\nSpecifically, this procedure assumes the following:\n\n- An existing production-grade KMS target\n- One or more KES servers connected to the KMS target\n- One or more hosts for a new or existing MinIO deployment\n\n :sync: k8s\n\n :sync: baremetal", "project": "minio-docs", "source": "source/operations/server-side-encryption/configure-minio-kes.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "``mc admin bucket remote``\n\n :local:\n :depth: 2\n\n - ``mc admin bucket remote add`` replaced by mc replicate add\n - ``mc admin bucket remote update`` replaced by mc replicate update\n - ``mc admin bucket remote rm`` replaced by mc replicate rm\n - ``mc admin bucket remote ls`` replaced by mc replicate ls\n\n - ``mc admin bucket remote bandwidth`` replaced by mc replicate status\n\n Replication related statistics are moving to the ``mc replicate status`` command.\n\nDescription\n\nThe mc admin bucket remote command manages the ``ARN`` resources\nfor use with bucket replication <mc replicate>.\n\n :class: note\n\n :start-after: start-minio-only\n :end-before: end-minio-only\n\nExamples\n\nAdd a New Replication Target\n\nUse mc admin bucket remote add to create a new replication target\nARN for use with mc replicate add:\n\n :class: copyable\n\n mc admin bucket remote add SOURCE/BUCKET DESTINATION/BUCKET\n\n- Replace SOURCE <mc admin bucket remote add SOURCE> with the\n alias <mc alias> of the MinIO deployment to use as the replication\n target. Replace ``BUCKET`` with the full path of the bucket into which MinIO\n replicates objects from the ``DESTINATION``.\n\n- Replace DESTINATION <mc admin bucket remote add DESTINATION> with the\n alias <mc alias> of the MinIO deployment to use as the\n replication source. Replace ``BUCKET`` with the full path of the bucket from\n which MinIO replicates objects into the ``SOURCE``.\n\nRemove an Existing Replication Target\n\nUse mc admin bucket remote rm to remove a replication target from a\nbucket:\n\n :class: copyable\n\n mc admin bucket remote rm SOURCE/BUCKET --arn ARN\n\n- Replace SOURCE <mc admin bucket remote rm SOURCE> with the\n alias <mc alias> of the MinIO deployment being used as the\n replication source. Replace ``BUCKET`` with the full path of the bucket from\n which MinIO replicates objects.\n\n- Replace ARN <mc admin bucket remote rm ARN> with the\n ARN of the remote target.\n\nRemoving the target halts all in-progress\nbucket replication <mc replicate> to the target.\n\nRetrieve Configured Replication Targets\n\nUse mc replicate ls to list a bucket's configured replication targets:\n\n :class: copyable\n\n mc replicate ls ALIAS/PATH\n\n- Replace ALIAS <mc replicate ls ALIAS> with the alias <mc alias> of the MinIO deployment being used as the\n replication source.\n Replace ``PATH`` with the full path of the bucket from which MinIO replicates objects.\n\nSyntax\n\n :fullpath:\n\n - ``mc admin bucket remote add`` replaced by mc replicate add\n\n Adds a remote target to a bucket on a MinIO deployment. The\n command has the following syntax:\n\n :class: copyable\n\n mc admin bucket remote add SOURCE DESTINATION --service \"replication\" [FLAGS]\n\n The command accepts the following arguments:\n\n *Required*\n\n The full path to the bucket to which the command adds the remote target.\n Specify the alias <mc alias> of a configured MinIO deployment as\n the prefix to the bucket path. For example:\n\n :class: copyable\n\n mc admin bucket remote add play/mybucket\n\n *Required*\n\n The target MinIO deployment and bucket.\n\n Specify the full URL to the destination MinIO deployment and bucket\n using the following format:\n\n :class: copyable\n\n http(s)://ACCESSKEY:SECRETKEY@DESTHOSTNAME/DESTBUCKET\n\n - Replace ``ACCESSKEY`` with the access key for a user on the\n destination MinIO deployment.\n\n - Replace ``SECRETKEY`` with the secret key for a user on the\n destination MinIO deployment.\n\n - Replace ``DESTHOSTNAME`` with the hostname and port of the MinIO\n deployment (i.e. ``minio-server.example.net:9000``).\n\n - Replace ``DESTBUCKET`` with the bucket on the\n destination.\n\n *Required*\n\n Specify ``\"replication\"``.\n\n The region of the ~mc admin bucket remote add DESTINATION.\n\n Mutually exclusive with ~mc admin bucket remote add\n\n The bucket path lookup supported by the destination server. Specify\n one of the following:\n\n - ``on``\n - ``off``\n - ``auto`` (Default)\n\n Mutually exclusive with\n ~mc admin bucket remote add\n\n Enables synchronous replication, where MinIO attempts to replicate\n the object *prior* to returning the PUT object response. Synchronous\n replication may increase the time spent waiting for PUT operations\n to return successfully.\n\n By default, mc admin bucket remote add operates in\n asynchronous mode, where MinIO attempts replicating objects\n *after* returning the PUT object response.\n\n :fullpath:\n\n - ``mc admin bucket remote ls`` replaced by mc replicate ls\n\n Lists all remote targets associated to a bucket on the MinIO deployment.\n Use ``mc admin bucket remote ls --help`` for usage syntax.\n\n :fullpath:\n\n - ``mc admin bucket remote rm`` replaced by mc replicate rm\n\n Removes a remote target for a bucket on the MinIO deployment. The\n command has the following syntax:\n\n :class: copyable\n\n mc admin bucket remote rm SOURCE --arn ARN\n\n The command accepts the following arguments:\n\n *Required*\n\n The full path to the bucket from which the command removes the\n remote target. Specify the\n alias <mc alias> of a configured MinIO deployment as the\n prefix to the bucket path. For example:\n\n :class: copyable\n\n mc admin bucket remote rm play/mybucket\n\n *Required*\n\n The ``ARN`` of the remote target for which the command removes from the\n target bucket. Use mc admin bucket remote ls to list all remote\n targets and their associated ARNs for a specific bucket.", "project": "minio-docs", "source": "source/reference/deprecated/mc-admin-bucket-remote.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "``mc admin profile``\n\n :local:\n :depth: 2\n\n This command has been replaced by mc support profile as of `mc` RELEASE.2023-04-06T16-51-10Z.\n\nDescription\n\nThe mc admin profile command generates profiling data for debugging\npurposes.\n\n :class: note\n\n :start-after: start-minio-only\n :end-before: end-minio-only\n\nProfile Data Format\n\nmc admin profile produces a ``ZIP`` archive ``profile.zip`` that\ncontains one or more ``.pprof`` files. Use the\n`pprof <https://github.com/google/pprof>`__ ``go`` utility to read the\nprofile data.\n\nExamples\n\nProfile Data for Single Resource\n\nUse mc admin profile start with the\n~mc admin profile start type flag to start profiling the\nresource:\n\n :class: copyable\n\n mc admin profile start --type \"TYPE\" ALIAS\n\n- Replace ALIAS <mc admin profile start TARGET> with the\n alias <mc alias> of the MinIO host.\n\n- Replace TYPE <mc admin profile start type> with the resource to\n profile.\n\nUse mc admin profile stop to stop profiling data from the specified\nresource and output the results:\n\n :class: copyable\n\n mc admin profile stop\n\nThe command outputs the profiled data as ``profile.zip``.\n\nProfile Data for Multiple Resources\n\nUse mc admin profile start with the\n~mc admin profile start type flag to start profiling the\nresources:\n\n :class: copyable\n\n mc admin profile start --type \"TYPE,[TYPE...]\" ALIAS\n\n- Replace ALIAS <mc admin profile start TARGET> with the\n alias <mc alias> of the MinIO host.\n\n- Replace TYPE <mc admin profile start type> with the resources to\n profile. Specify multiple resources as a comma-separated list.\n\nUse mc admin profile stop to stop profiling data from the specified\nresources and output the results:\n\n :class: copyable\n\n mc admin profile stop\n\nThe command outputs the profiled data as ``profile.zip``.\n\nSyntax\n\nmc admin profile has the following syntax:\n\n :class: copyable\n\n mc admin profile SUBCOMMAND\n\nmc admin profile supports the following subcommands:\n\n :fullpath:\n\n Starts collecting profiling data on the target MinIO deployment. The\n command has the following syntax:\n\n :class: copyable\n\n mc admin profile start [FLAGS] TARGET\n\n mc admin profile start supports the following arguments:\n\n The alias <mc alias> of a configured MinIO deployment from\n which the command collects profiling data.\n\n The type(s) of profiling data to collect from the\n ~mc admin profile start TARGET MinIO deployment.\n\n Specify one or more of the following supported types as a comma-separated\n list:\n\n - ``cpu``\n - ``mem``\n - ``block``\n - ``mutex``\n - ``trace``\n - ``threads``\n - ``goroutines``\n\n Defaults to ``cpu,mem,block`` if omitted.\n\n :fullpath:\n\n Stops the profiling process and returns the collected data as\n ``profile.zip``. The ``zip`` file contains one or more\n ``.pprof`` files which are readable with programs like the ``go``\n `pprof <https://github.com/google/pprof>`__ utility.\n\n The command has the following syntax:\n\n :class: copyable\n\n mc admin profile stop TARGET\n\n The command supports the following arguments:\n\n The alias <mc alias> of a configured MinIO deployment from\n which the command returns available profiling data.", "project": "minio-docs", "source": "source/reference/deprecated/mc-admin-profile.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "``mc ilm edit``\n\n :local:\n :depth: 2\n\n ``mc ilm edit`` replaced by mc ilm rule edit.\n\nSyntax\n\nThe mc ilm edit command modifies an existing object lifecycle management\nrule on a MinIO bucket.\n\n The following command modifies existing lifecycle management rules for\n the ``mydata`` bucket on the ``myminio`` deployment:\n\n :class: copyable\n\n mc ilm edit --id \"c79ntj94b0t6rukh6lr0\" --expiry-days 90 mydata/myminio\n\n mc ilm edit --id \"c79nu2p4b0t6qko19rgg\" --expired-object-delete-marker mydata/myminio\n\n mc ilm edit --id \"c79n19dn10dnab109fg1\" --transition-days 30 --tier \"COLDTIER\"\n\n The command modifies the specified rules as follows:\n\n - Delete objects more than 90 days old.\n - Delete ``DeleteMarker`` tombstones if that object has no other versions\n remaining.\n - Transition objects more than 30 days old to the ``COLDTIER`` remote\n tier.\n\n The command has the following syntax:\n\n :class: copyable\n\n mc [GLOBALFLAGS] ilm edit \\\n --id \"string\" \\\n [--prefix \"string\"] \\\n [--enable] \\\n [--disable] \\\n [--expiry-days \"string\" | --expired-object-delete-marker] \\\n [--transition-days \"string\"] --tier \"string\" \\\n [--noncurrentversion-expiration-days \"string\"] \\\n [--noncurrentversion-transition-days \"string\" --noncurrentversion-tier \"string\"] \\\n [--tags] \\\n ALIAS\n\n :start-after: start-minio-syntax\n :end-before: end-minio-syntax\n\nParameters\n\n :required:\n\n The alias <alias> and full path to the bucket on the MinIO\n deployment to which to modify the object lifecycle management rule. For\n example:\n\n mc ilm edit myminio/mydata\n\n :required:\n\n The unique ID of the rule. Use mc ilm rule ls to list bucket\n rules and retrieve the ``id`` for the rule you want to modify.\n\n :optional:\n\n Stop using the rule, but retain the rule for future use.\n Objects do not transition or expire when a rule is disabled.\n\n :optional:\n\n Use a rule to transition or expire objects.\n\n :optional:\n\n Restrict the management rule to a specific bucket prefix.\n\n For example:\n\n mc ilm edit --prefix \"meetingnotes/\" myminio/mydata/ --expiry-days \"90\"\n\n The command modifies a rule that expires objects in the ``mydata`` bucket of the ``myminio`` ALIAS after 90 days for any object with the ``meetingnotes/`` prefix.\n\n :optional:\n\n The number of days to retain an object after being created. MinIO\n marks the object for deletion after the specified number of days pass.\n\n Exercise caution when using this option, as its behavior can result in\n immediate expiration of uploaded objects. Any objects created *after*\n the specified expiration date are automatically eligible for expiration.\n Similarly, specifying a calendar date that is *prior* to the current\n system host datetime marks all objects covered by the rule for deletion.\n Consider immediately removing any ILM rule using this option once the\n specified calendar date has passed.\n\n For versioned buckets, the expiry rule applies only to the *current*\n object version. Use the\n ~mc ilm edit --noncurrentversion-expiration-days option\n to apply expiration behavior to noncurrent object versions.\n\n MinIO uses a scanner process <minio-concepts-scanner> to check objects against all configured\n lifecycle management rules. Slow scanning due to high IO workloads or\n limited system resources may delay application of lifecycle management\n rules. See minio-lifecycle-management-scanner for more information.\n\n Mutually exclusive with the following options:\n\n - ~mc ilm edit --expired-object-delete-marker\n\n See minio-object-delete for more information.\n\n :optional:\n\n Specify this option to direct MinIO to remove delete markers for\n objects with no remaining object versions. Specifically, the delete marker is\n the *only* remaining \"version\" of the given object.\n\n This option is mutually exclusive with the following option:\n\n - ~mc ilm edit --tags\n - ~mc ilm edit --expiry-days\n\n MinIO uses a scanner process <minio-concepts-scanner> to check objects against all configured\n lifecycle management rules. Slow scanning due to high IO workloads or\n limited system resources may delay application of lifecycle management\n rules. See minio-lifecycle-management-scanner and minio-object-delete for more information.\n\n :optional:\n\n The number of days to retain an object version after becoming\n *non-current* (i.e. a different version of that object is now the `HEAD`).\n MinIO marks noncurrent object versions for deletion after the specified\n number of days pass.\n\n This option has the same behavior as the\n S3 ``NoncurrentVersionExpiration`` action.\n\n MinIO uses a scanner process <minio-concepts-scanner> to check objects against all configured\n lifecycle management rules. Slow scanning due to high IO workloads or\n limited system resources may delay application of lifecycle management\n rules. See minio-lifecycle-management-scanner for more information.\n\n :optional:\n\n The number of days an object has been non-current (i.e. replaced\n by a newer version of that same object) after which MinIO marks the object\n version as eligible for transition. MinIO transitions the object to the\n configured remote storage tier specified to the\n ~mc ilm edit --tier once the system host datetime\n passes that calendar date.\n\n This option has no effect on non-versioned buckets. Requires specifying\n ~mc ilm edit --noncurrentversion-tier.\n\n This option has the same behavior as the\n S3 ``NoncurrentVersionTransition`` action.\n\n MinIO uses a scanner process <minio-concepts-scanner> to check objects against all configured\n lifecycle management rules. Slow scanning due to high IO workloads or\n limited system resources may delay application of lifecycle management\n rules. See minio-lifecycle-management-scanner for more information.\n\n :optional:\n\n The remote storage tier to which MinIO\n :ref:`transitions noncurrent objects versions\n <minio-lifecycle-management-tiering>`. Specify a remote storage tier created\n by mc admin tier.\n\n MinIO does *not* automatically migrate objects from the previously\n specified remote tier to the new remote tier. MinIO continues to\n route requests for objects stored on the old remote tier.\n\n :optional:\n\n The number of non-current versions of an object to retain before applying expiration.\n Older non-current versions beyond the specified number expire.\n\n By default, MinIO does not retain any non-current versions when an expiration rule applies.\n\n :optional:\n\n The number of non-current versions of an object to keep on the current storage tier.\n Older non-current versions beyond the specified number transition to the specified tier.\n\n By default, MinIO transitions all non-current versions when a transition rule applies.\n\n :optional:\n\n One or more ampersand ``&``-delimited key-value pairs describing\n the object tags to which to apply the lifecycle configuration rule.\n\n This option is mutually exclusive with the following option:\n\n - ~mc ilm edit --expired-object-delete-marker\n\n :optional:\n\n The number of calendar days from object creation after which MinIO\n marks an object as eligible for transition. MinIO transitions the object to\n the configured remote storage tier specified to the\n ~mc ilm edit --tier.\n\n For versioned buckets, the transition rule applies only to the *current*\n object version. Use the\n ~mc ilm edit --noncurrentversion-transition-days option\n to apply transition behavior to noncurrent object versions.\n\n Requires specifying ~mc ilm edit --tier.\n\n MinIO uses a scanner process <minio-concepts-scanner> to check objects against all configured\n lifecycle management rules. Slow scanning due to high IO workloads or\n limited system resources may delay application of lifecycle management\n rules. See minio-lifecycle-management-scanner for more information.\n\n :optional:\n\n The remote storage tier to which MinIO\n transition objects <minio-lifecycle-management-tiering>. Specify a\n remote storage tier created by mc admin tier.\n\n Required if specifying ~mc ilm edit --transition-days.\n\n MinIO does *not* automatically migrate objects from the previously\n specified remote tier to the new remote tier. MinIO continues to\n route requests for objects stored on the old remote tier.\n\nGlobal Flags\n\n :start-after: start-minio-mc-globals\n :end-before: end-minio-mc-globals\n\nExamples\n\nModify an Existing Lifecycle Management Rule\n\nUse mc ilm edit with ~mc ilm edit --id to modify\nan existing object expiration rule:\n\n :class: copyable\n\n mc ilm edit ALIAS/PATH --id \"RULEID\" [FLAGS]\n\n- Replace ALIAS <mc ilm edit ALIAS> with the\n alias <mc alias> of the S3-compatible host.\n\n- Replace PATH <mc ilm edit ALIAS> with the path to the bucket on the\n S3-compatible host.\n\n- Replace ``RULEID`` with the unique ID of the object lifecycle management\n rule.\n Use mc ilm rule ls to find the ``RULEID``.\n\n- Specify any additional flags to add or modify the lifecycle management\n rule. For example, specify\n ~mc ilm edit --transition-days to override the existing\n transition days value for the rule.\n\nDisable a Lifecycle Management Rule\n\nUse mc ilm edit with ~mc ilm edit --disable to stop using an existing management rule.\n\n :class: copyable\n\n mc ilm edit --id \"RULEID\" --disable myminio/mybucket\n\n- Replace ``RULEID`` with the unique ID of the object lifecycle management rule.\n Use mc ilm rule ls to find the ``RULEID``.\n- Replace ``myminio`` with the ALIAS of the deployment where the rule exists.\n- Replace ``mybucket`` with the bucket for the rule.\n\nBehavior\n\nS3 Compatibility\n\n :start-after: start-minio-mc-s3-compatibility\n :end-before: end-minio-mc-s3-compatibility", "project": "minio-docs", "source": "source/reference/deprecated/mc-ilm-edit.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "``mc ilm export``\n\n :local:\n :depth: 2\n\n ``mc ilm export`` replaced by mc ilm rule export.\n\nSyntax\n\nThe mc ilm export command exports the object lifecycle management\nconfiguration for a MinIO bucket.\n\nThe mc ilm export command outputs to ``STDOUT`` by default. You can\noutput the contents to a ``.json`` file for archival or ingestion using\nmc ilm import.\n\n The following command exports the lifecycle management configuration\n of the ``mydata`` bucket on the ``myminio`` deployment to the\n ``mydata-lifecycle-config.json`` file:\n\n :class: copyable\n\n mc ilm export myminio/mydata > mydata-lifecycle-config.json\n\n The command has the following syntax:\n\n :class: copyable\n\n mc [GLOBALFLAGS] ilm export ALIAS > STDOUT\n\n :start-after: start-minio-syntax\n :end-before: end-minio-syntax\n\nParameters\n\n *Required* The alias <alias> and full path to the bucket on the MinIO\n deployment for which to export object lifecycle management rules. For\n example:\n\n mc ilm export myminio/mydata > bucket-lifecycle.json\n\nGlobal Flags\n\n :start-after: start-minio-mc-globals\n :end-before: end-minio-mc-globals\n\nExamples\n\nExport the Bucket Lifecycle Management Configuration\n\n The following command exports the bucket lifecycle management\n configuration to the ``bucket-lifecycle.json`` file:\n\n :class: copyable\n\n mc ilm export myminio/mybucket > bucket-lifecycle.json\n\n :class: copyable\n\n mc ilm export ALIAS > file.json\n\n - Replace ``ALIAS`` with the alias <alias> of the MinIO\n deployment and the bucket for which to export object lifecycle\n management rules:\n\n ``myminio/mydata``\n\n - Replace ``file.json`` with the name of the file to which to export the\n lifecycle management rules.\n\nBehavior\n\nS3 Compatibility\n\n :start-after: start-minio-mc-s3-compatibility\n :end-before: end-minio-mc-s3-compatibility", "project": "minio-docs", "source": "source/reference/deprecated/mc-ilm-export.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "``mc encrypt clear``\n\n :local:\n :depth: 2\n\nSyntax\n\nThe mc encrypt clear command removes the current default\nencryption settings for a bucket.\n\n The following command removes the default encryption settings for\n the ``mydata`` bucket on the MinIO deployment associated with the\n ``myminio`` alias <alias>:\n\n :class: copyable\n\n mc encrypt clear myminio/mydata\n\n The command has the following syntax:\n\n :class: copyable\n\n mc [GLOBALFLAGS] encrypt clear ALIAS\n\n :start-after: start-minio-syntax\n :end-before: end-minio-syntax\n\nParameters\n\n The full path to the bucket on which to remove the default SSE mode.\n Specify the alias <alias> of the MinIO deployment as the prefix to the\n ALIAS path. For example:\n\n mc encrypt clear play/mybucket\n\nGlobal Flags\n\n :start-after: start-minio-mc-globals\n :end-before: end-minio-mc-globals\n\nExamples\n\nRemove the Automatic Server-Side Encryption Settings for a Bucket\n\n :class: copyable\n\n mc encrypt clear myminio/data\n\n :class: copyable\n\n mc encrypt clear ALIAS\n\n - Replace ``ALIAS`` with the alias <alias> of the\n MinIO deployment on which to remove automatic server-side bucket\n encryption.\n\nBehavior\n\nModifying Bucket Encryption Settings Does Not Affect Encrypted Objects\n\nDisabling automatic bucket encryption does *not* decrypt any objects in the\nbucket.\n\nTo permanently decrypt objects in the bucket, you can perform an in-place\ncopy after disabling object decryption. For versioned buckets, the\nprevious object versions remain encrypted.\n\nS3 Compatibility\n\n :start-after: start-minio-mc-s3-compatibility\n :end-before: end-minio-mc-s3-compatibility", "project": "minio-docs", "source": "source/reference/minio-mc/mc-encrypt-clear.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "``mc idp ldap accesskey create``\n\n :local:\n :depth: 2\n\nDescription\n\nThe mc idp ldap accesskey create allows you to add LDAP access key pairs.\n\n The following example creates a new access key pair with the same policy as the authenticated user on the ``minio`` alias <alias>:\n\n :class: copyable\n\n mc idp ldap accesskey create minio/\n\n The command has the following syntax:\n\n :class: copyable\n\n mc [GLOBALFLAGS] idp ldap accesskey create \\\n ALIAS \\\n [--access-key <value>] \\\n [--secret-key <value>] \\\n [--policy <value>] \\\n [--name <value>] \\\n [--description <value>] \\\n [--expiry <value>] \\\n [--expiry-duration <value>]\n\n - Replace ``ALIAS`` with the alias <alias> of a MinIO deployment configured for AD/LDAP integration.\n\n :start-after: start-minio-syntax\n :end-before: end-minio-syntax\n\nParameters\n\n :required:\n\n The alias <alias> of the MinIO deployment configured for AD/LDAP.\n\n For example:\n\n mc idp ldap accesskey create minio\n\n :optional:\n\n An access key to use for the account.\n The access key cannot contain the characters ``=`` (equal sign) or ``,`` (comma).\n\n Requires ~mc idp ldap accesskey create --secret-key\n\n :optional:\n\n A secret to use for the account.\n\n Requires ~mc idp ldap accesskey create --access-key\n\n :optional:\n\n File path to the JSON-formatted policy to use for the account.\n\n If not specified, the account uses the same policy as the authenticated user.\n\n :optional:\n\n A human-readable name to use for the account.\n\n :optional:\n\n Add a description for the service account.\n For example, you might specify the reason the access key exists.\n\n :optional:\n\n Length of time the access key pair should remain valid for use in ``#d#h#s`` format.\n\n For example, ``7d``, ``24h``, ``5d12h30s`` are valid strings.\n\n Mutually exclusive with ~mc idp ldap accesskey create --expiry.\n\n :optional:\n\n The date after which the access key expires.\n Enter the date in YYYY-MM-DD format.\n\n For example, to expire the credentials after December 31, 2024, enter ``2024-12-31``.\n\n Mutually exclusive with ~mc idp ldap accesskey create --expiry-duration.\n\n :optional:\n\n Use mc idp ldap accesskey create-with-login to access the functionality previously provided by this parameter.\n\n Prompts the user to log in using the LDAP credentials to use to generate the access key.\n Specify the URL of the LDAP-configured MinIO Server to use for the login prompt.\n\n Requires an interactive terminal.\n\nGlobal Flags\n\n :start-after: start-minio-mc-globals\n :end-before: end-minio-mc-globals\n\nBehavior\n\nS3 Compatibility\n\n :start-after: start-minio-mc-s3-compatibility\n :end-before: end-minio-mc-s3-compatibility\n\nExamples\n\nCreate a new access-key pair for the authenticated user\n\nThe following command creates a new access key pair to use with the currently authenticated user on the ``minio`` alias.\nThe command outputs a randomly generated access key and secret key.\n\n :class: copyable\n\n mc idp ldap accesskey create minio\n\nCreate a new access-key pair with a custom access key and secret key\n\nThe following command creates a new access key pair with both an access key and secret key that you specify for the user currently authenticated on the ``minio`` alias.\n\n :class: copyable\n\n mc idp ldap accesskey create minio/ --access-key my-access-key-change-me --secret-key my-secret-key-change-me\n\nCreate a new access-key pair that expires after 24 hours\n\nThe following command creates a new access key pair to use with the currently authenticated user on the ``minio`` alias.\nThe credentials expire after 24 hours.\n\nThe command outputs a randomly generated access key and secret key.\n\n :class: copyable\n\n mc idp ldap accesskey create minio --expiry-duration 24h\n\nCreate a new access-key and prompt to login as the user\n\nThe following command creates a new access key pair.\nThe MinIO Client will first ask you to log in as the user the access key is for on the MinIO site configured for LDAP at ``minio.example.com``.\n\nThe command outputs a randomly generated access key and secret key.\n\n :class: copyable\n\n mc idp ldap accesskey create minio --login minio.example.com\n\nCreate a new access-key pair that expires after a date\n\nThe following command creates a new access key pair to use with the currently authenticated user on the ``minio`` alias.\nThe credentials expire after February 29, 2024.\n\nThe command outputs a randomly generated access key and secret key.\n\n :class: copyable\n\n mc idp ldap accesskey create minio --expiry 2024-02-29", "project": "minio-docs", "source": "source/reference/minio-mc/mc-idp-ldap-accesskey-create.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "``mc ilm rule import``\n\n :local:\n :depth: 2\n\n ``mc ilm rule import`` replaces ``mc ilm import``.\n\nSyntax\n\nThe mc ilm rule import command imports an object lifecycle management\nconfiguration and applies it to a MinIO bucket.\n\nThe mc ilm rule import command imports from ``STDIN`` by default.\nYou can input the contents from a ``.json`` file, such as one produced by mc ilm rule export.\n\n The following command imports the lifecycle management configuration from\n ``mydata-lifecycle-config.json`` and applies it to the ``mydata`` bucket on the ``myminio`` deployment:\n\n :class: copyable\n\n mc ilm rule import myminio/mydata < mydata-lifecycle-config.json\n\n The command has the following syntax:\n\n :class: copyable\n\n mc [GLOBALFLAGS] ilm rule import ALIAS < STDIN\n\n :start-after: start-minio-syntax\n :end-before: end-minio-syntax\n\nParameters\n\n :required:\n\n The alias <alias> and full path to the bucket on the MinIO deployment into which to import object lifecycle management rules.\n For example:\n\n mc ilm rule import myminio/mydata < bucket-lifecycle.json\n\nGlobal Flags\n\n :start-after: start-minio-mc-globals\n :end-before: end-minio-mc-globals\n\nExamples\n\nImport the Bucket Lifecycle Management Configuration\n\n The following command imports the bucket lifecycle management\n configuration from the ``bucket-lifecycle.json`` file:\n\n :class: copyable\n\n mc ilm rule import myminio/mybucket < bucket-lifecycle.json\n\n :class: copyable\n\n mc ilm rule import ALIAS < file.json\n\n - Replace ``ALIAS`` with the alias <alias> of the MinIO\n deployment and the bucket into which to import object lifecycle\n management rules:\n\n ``myminio/mydata``\n\n - Replace ``file.json`` with the name of the file from which to import the\n lifecycle management rules.\n\nRequired Permissions\n\nFor permissions required to import rules, refer to the required permissions <minio-mc-ilm-rule-permissions> on the parent command.\n\nBehavior\n\nImporting Configuration Overrides Existing Rules\n\nmc ilm rule import replaces the current bucket lifecycle management\nrules with those defined in the imported JSON configuration.\n\nS3 Compatibility\n\n :start-after: start-minio-mc-s3-compatibility\n :end-before: end-minio-mc-s3-compatibility", "project": "minio-docs", "source": "source/reference/minio-mc/mc-ilm-rule-import.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "``mc ilm tier info``\n\n :local:\n :depth: 2\n\nDescription\n\nThe mc ilm tier info command outputs statistics about a tier or all tiers for a deployment.\n\nRequired Permissions\n\nMinIO requires the following permissions scoped to to the bucket or buckets\nfor which you are creating lifecycle management rules.\n\n- s3:PutLifecycleConfiguration\n- s3:GetLifecycleConfiguration\n\nMinIO also requires the following administrative permissions on the cluster\nin which you are creating remote tiers for object transition lifecycle\nmanagement rules:\n\n- admin:SetTier\n- admin:ListTier\n\nFor example, the following policy provides permission for configuring object\ntransition lifecycle management rules on any bucket in the cluster:.\n\n :language: json\n :class: copyable\n\nSyntax\n\nThe command has the following syntax:\n\n The following example outputs the configuration for an existing remote tier called ``WARM-TIER`` on the ``myminio`` deployment.\n\n :class: copyable\n\n mc ilm tier info myminio WARM-TIER\n\n The command has the following syntax:\n\n :class: copyable\n\n mc ilm tier info TARGET TIER_NAME\n\nParameters\n\nThe command accepts the following arguments:\n\n :required:\n\n The alias <mc alias> of a configured MinIO deployment on which the desired tier exists.\n\n :optional:\n\n The name of an existing remote tier to display.\n\n You **must** specify the tier in all-caps, e.g. ``WARM_TIER``.\n\n If not specified, MinIO lists statistics for all existing tiers on the deployment.\n\nGlobal Flags\n\n :start-after: start-minio-mc-globals\n :end-before: end-minio-mc-globals\n\nExample\n\nDisplay the Statistics for an Existing Tier\n\nThe following example displays the statistics of the tier ``WARM-TIER`` on the ``myminio`` deployment.\n\n :class: copyable\n\n mc ilm tier info myminio WARM-TIER\n\nDisplay the Statistics for all Existing Tiers on a Deployment\n\nThe following example displays the statistics of all existing tiers on the ``myminio`` deployment.\n\n :class: copyable\n\n mc ilm tier info myminio\n\nS3 Compatibility\n\n :start-after: start-minio-mc-s3-compatibility\n :end-before: end-minio-mc-s3-compatibility\n\nRequired Permissions\n\nFor permissions required to review a tier, refer to the required permissions <minio-mc-ilm-tier-permissions> on the parent command.", "project": "minio-docs", "source": "source/reference/minio-mc/mc-ilm-tier-info.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "``mc pipe``\n\n :local:\n :depth: 2\n\nSyntax\n\nThe mc pipe command streams content from `STDIN <https://www.gnu.org/software/libc/manual/html_node/Standard-Streams.html>`__ to a target object.\n\n The following command writes contents of ``STDIN`` to an S3 compatible storage.\n\n :class: copyable\n\n echo \"My Meeting Notes\" | mc pipe s3/engineering/meeting-notes.txt\n\n The command has the following syntax:\n\n :class: copyable\n\n mc [GLOBALFLAGS] pipe \\\n TARGET \\\n [--attr \"string\"] \\\n [--checksum \"string\"] \\\n [--enc-kms \"string\"] \\\n [--enc-s3 \"string\"] \\\n [--enc-c \"string\"] \\\n [--storage-class, --sc \"string\"] \\\n [--tags \"string\"]\n\n :start-after: start-minio-syntax\n :end-before: end-minio-syntax\n\n ``mc pipe`` now supports concurrent uploads for better throughput of large streams.\n\nParameters\n\n :required:\n\n The full path to the alias <minio-mc-alias> or prefix where the command should run.\n\n :optional:\n\n Add custom metadata for the object.\n\n Specify key-value pairs as ``KEY=VALUE\\;``, separating each pair with a back slash and semicolon (``\\;``).\n For example, ``--attr key1=value1\\;key2=value2\\;key3=value3``.\n\n :optional:\n\n Add a checksum to an uploaded object.\n\n Valid values are:\n - ``MD5``\n - ``CRC32``\n - ``CRC32C``\n - ``SHA1``\n - ``SHA256``\n\n The flag requires server trailing headers and works with AWS or MinIO targets.\n\n :start-after: start-minio-mc-sse-options\n :end-before: end-minio-mc-sse-options\n\n :optional:\n\n Set the storage class for the new object at the ~mc pipe TARGET.\n\n See Amazons documentation <AmazonS3/latest/dev/storage-class-intro.html> for more information on S3 storage classes.\n\n :optional:\n\n Applies one or more tags to the TARGET.\n\n Specify an ampersand-separated list of key-value pairs as ``KEY1=VALUE1&KEY2=VALUE2``, where each pair represents one tag to assign to the objects.\n\nGlobal Flags\n\n :start-after: start-minio-mc-globals\n :end-before: end-minio-mc-globals\n\nExamples\n\nWrite Contents of ``STDIN`` to the Local Filesystem\n\nThe following command writes the contents of STDIN to the ``/tmp`` folder on the local filesystem.\n\n :class: copyable\n\n mc pipe /tmp/hello-world.go\n\nCopy an ISO Image to S3 Storage\n\nThe following command first streams the contents of an iso image for Debian and then uses the stream to create the object at an S3 path.\n\n :class: copyable\n\n cat debian-live-11.5.0-amd64-mate.iso | mc pipe s3/opensource-isos/debian-11-5.iso\n\nStream MySQL Database Dump to S3\n\nThe following command first streams a MySQL database and uses the stream to create a backup on S3 with mc pipe:\n\n :class: copyable\n\n mysqldump -u root -p ******* accountsdb | mc pipe s3/sql-backups/backups/accountsdb-sep-28-2022.sql\n\nWrite a File to a Reduced Redundancy Storage Class\n\nThe following command takes the STDIN stream and creates an object on the Reduced Redundancy storage class on S3.\n\n :class: copyable\n\n mc pipe --storage-class REDUCED_REDUNDANCY s3/personalbuck/meeting-notes.txt\n\nCopy a File to a MinIO Deployment with Metadata\n\nThe following command uploads an MP3 file to a MinIO deployment with an ALIAS of ``myminio`` and a ``music`` bucket.\nThe object writes with some metadata for ``Cache-Control`` and ``Artist``.\n\n :class: copyable\n\n cat music.mp3 | mc pipe --attr \"Cache-Control=max-age=90000,min-fresh=9000;Artist=Unknown\" myminio/music/guitar.mp3\n\nSet Tags on Uploaded Objects\n\nThe following command creates an object on a MinIO deployment with an ALIAS of ``myminio`` in bucket ``mybucket`` with two tags.\nMinIO supports adding up to 10 custom tags to an object.\n\n :class: copyable\n\n tar cvf - . | mc pipe --tags \"category=prod&type=backup\" myminio/mybucket/backup.tar", "project": "minio-docs", "source": "source/reference/minio-mc/mc-pipe.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "``mc retention clear``\n\n :local:\n :depth: 2\n\nSyntax\n\nThe mc retention clear command removes the\nWrite-Once Read-Many (WORM) locking <minio-object-locking> settings for\nan object or object(s) in a bucket. You can also remove the default object lock\nsettings for a bucket.\n\nTo change the retention status of an object under\nlegal hold <minio-object-locking-legalhold>, use\nmc legalhold clear.\n\n The following command removes the default object lock configuration for\n the ``mydata`` bucket on the ``myminio`` MinIO deployment:\n\n :class: copyable\n\n mc retention clear --default myminio/mydata\n\n The command has the following syntax:\n\n :class: copyable\n\n mc [GLOBALFLAGS] retention clear \\\n [--default] \\\n [--recursive] \\\n [--rewind \"string\"] \\\n [--version-id \"string\"]* \\\n [--versions] \\\n ALIAS\n\n :start-after: start-minio-syntax\n :end-before: end-minio-syntax\n\n mc retention clear --version-id is mutually exclusive with\n multiple other parameters. See the reference documentation for more\n information.\n\nParameters\n\n :required:\n\n The full path to the object or objects for which to clear\n the object lock configuration. Specify the alias <mc alias> of a\n configured S3-compatible service as the prefix to the ``ALIAS`` bucket\n path. For example:\n\n mc retention clear play/mybucket/object.txt\n\n - If the ``ALIAS`` specifies a bucket or bucket prefix, include\n ~mc retention clear --recursive to clear the object lock\n settings to the bucket contents.\n\n - If the ``ALIAS`` bucket has versioning enabled,\n mc retention clear by default applies to only the latest\n object version. Use ~mc retention clear --version-id or\n ~mc retention clear --versions to clear the object lock\n settings for a specific version or for all versions of the object.\n\n :optional:\n\n Clears the default object lock settings for the bucket specified\n to ~mc retention clear ALIAS.\n\n If specifying ~mc retention clear --default,\n mc retention clear ignores all other flags.\n\n :optional:\n\n Recursively clears the object lock settings for all objects in the\n specified ~mc retention clear ALIAS path.\n\n Mutually exclusive with ~mc retention clear --version-id.\n\n :optional:\n\n :start-after: start-rewind-desc\n :end-before: end-rewind-desc\n\n :optional:\n\n :start-after: start-version-id-desc\n :end-before: end-version-id-desc\n\n Mutually exclusive with any of the following flags:\n\n - ~mc retention clear --versions\n - ~mc retention clear --rewind\n - ~mc retention clear --recursive\n\n :optional:\n\n :start-after: start-versions-desc\n :end-before: end-versions-desc\n\n Use ~mc retention clear --versions and\n ~mc retention clear --rewind together to remove the\n retention settings from all object versions that existed at a\n specific point-in-time.\n\nGlobal Flags\n\n :start-after: start-minio-mc-globals\n :end-before: end-minio-mc-globals\n\nExamples\n\nClear Object Lock Settings for an Object or Object(s)\n\n :class: copyable\n\n mc retention clear ALIAS/PATH\n\n - Replace ALIAS <mc retention clear ALIAS> with the\n alias <mc alias> of a configured S3-compatible host.\n\n - Replace PATH <mc retention clear ALIAS> with the path to the\n object.\n\n Use mc retention clear with\n ~mc retention clear --recursive to clear the retention\n settings from all objects in a bucket:\n\n :class: copyable\n\n mc retention clear --recursive ALIAS/PATH\n\n - Replace ALIAS <mc retention clear ALIAS> with the\n alias <mc alias> of a configured S3-compatible host.\n\n - Replace PATH <mc retention clear ALIAS> with the path to the\n bucket.\n\n :start-after: start-command-requires-locking-desc\n :end-before: end-command-requires-locking-desc\n\nS3 Compatibility\n\n :start-after: start-minio-mc-s3-compatibility\n :end-before: end-minio-mc-s3-compatibilit", "project": "minio-docs", "source": "source/reference/minio-mc/mc-retention-clear.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "``mc retention``\n\n :local:\n :depth: 2\n\nDescription\n\nThe mc retention command configures the Write-Once Read-Many (WORM) locking <minio-object-locking> settings for an object or object(s) in a bucket.\nYou can also set the default object lock settings for a bucket, where all objects without explicit object lock settings inherit the bucket default.\n\nSubcommands\n\nmc retention includes the following subcommands:\n\n :header-rows: 1\n :widths: 30 70\n :width: 100%\n\n * - Subcommand\n - Description\n\n * - ~mc retention clear\n - .. include:: /reference/minio-mc/mc-retention-clear.rst\n :start-after: start-mc-retention-clear-desc\n :end-before: end-mc-retention-clear-desc\n\n * - ~mc retention info\n - .. include:: /reference/minio-mc/mc-retention-info.rst\n :start-after: start-mc-retention-info-desc\n :end-before: end-mc-retention-info-desc\n\n * - ~mc retention set\n - .. include:: /reference/minio-mc/mc-retention-set.rst\n :start-after: start-mc-retention-set-desc\n :end-before: end-mc-retention-set-desc\n\n :titlesonly:\n :hidden:\n\n /reference/minio-mc/mc-retention-set\n /reference/minio-mc/mc-retention-info\n /reference/minio-mc/mc-retention-clear", "project": "minio-docs", "source": "source/reference/minio-mc/mc-retention.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "``mc sql``\n\n :local:\n :depth: 2\n\nSyntax\n\nThe mc sql command provides an S3 Select interface for performing sql queries on objects in the specified MinIO deployment.\n\nSee Selecting content from objects <selecting-content-from-objects> for more information on S3 Select behavior and limitations.\n\n The following command queries all objects in the ``mydata`` bucket on the ``myminio`` MinIO deployment:\n\n :class: copyable\n\n mc sql --recursive --query \"select * from S3Object\" myminio/mydata\n\n The command has the following syntax:\n\n :class: copyable\n\n mc [GLOBALFLAGS] mc sql \\\n --query \"string\" \\\n [--csv-input \"string\"] \\\n [--compression \"string\"] \\\n [--csv-output \"string\"] \\\n [--csv-output-header \"string\"] \\\n [--enc-c \"string\"] \\\n [--json-input \"string\"] \\\n [--json-output \"string\"] \\\n [--recursive] \\\n ALIAS\n\n :start-after: start-minio-syntax\n :end-before: end-minio-syntax\n\nParameters\n\n :required:\n\n The full path to the bucket or object to run the SQL query against.\n Specify the alias <alias> of a configured S3 service as the prefix to the ``ALIAS`` path.\n For example:\n\n mc sql [FLAGS] play/mybucket\n\n :required:\n\n The SQL statement to execute on the specified ~mc sql ALIAS directory or object.\n Wrap the entire SQL query in double quotes ``\"``.\n\n Defaults to ``\"select * from S3Object\"``.\n\n :optional:\n\n The data format for ``.csv`` input objects.\n Specify a string of comma-seperated ``key=value,...`` pairs.\n See mc-sql-csv-format for more information on valid keys.\n\n :optional:\n\n The compression type of the input object.\n Specify one of the following supported values:\n\n - ``GZIP``\n - ``BZIP2``\n - ``NONE`` (default)\n\n Compression schemes supported by MinIO backend only:\n\n - ``ZSTD`` `Zstandard <https://facebook.github.io/zstd/>`__\n - ``LZ4`` `LZ4 <https://lz4.github.io/lz4/>`__ stream\n - ``S2`` `S2 <https://github.com/klauspost/compress/tree/master/s2#s2-compression>`__ framed stream\n - ``SNAPPY`` `Snappy <http://google.github.io/snappy/>`__ framed stream\n\n :optional:\n\n The data format for ``.csv`` output.\n Specify a string of comma-seperated ``key=value,...`` pairs.\n See mc-sql-csv-format for more information on valid keys.\n\n See the S3 API CSVOutput <API_CSVOutput.html> for more information.\n\n :optional:\n\n The header row of the ``.csv`` output file.\n Specify a string of comma-separated fields as ``field1,field2,...``.\n\n Omit to output a ``.csv`` with no header row.\n\n :start-after: start-minio-mc-sse-c-only\n :end-before: end-minio-mc-sse-options\n\n :optional:\n\n The data format for ``.json`` or ``.ndjson`` input objects.\n Specify the type of the JSON contents as ``type=<VALUE>``.\n The value can be either:\n\n - ``DOCUMENT`` - JSON `document <https://www.json.org/json-en.html>`__.\n - ``LINES`` - JSON `lines <http://jsonlines.org/>`__.\n\n See the S3 API JSONInput <API_JSONInput.html> for more information.\n\n :optional:\n\n The data format for the ``.json`` output.\n Supports the ``rd=value`` key, where ``rd`` is the ``RecordDelimiter`` for the JSON document.\n\n Omit to use the default newline character ``\\n``.\n\n See the S3 API JSONOutput <API_JSONOutput.html> for more information.\n\n :optional:\n\n Recursively searches the specified ~mc sql ALIAS directory using the ~mc sql --query SQL statement.\n\nGlobal Flags\n\n :start-after: start-minio-mc-globals\n :end-before: end-minio-mc-globals\n\nExamples\n\nSelect all Columns in all Objects in a Bucket\n\nUse mc sql with the ~mc sql --recursive and ~mc sql --query options to apply the query to all objects in a bucket:\n\n :class: copyable\n\n mc sql --recursive --query \"select * from S3Object\" ALIAS/PATH\n\n- Replace ALIAS <mc sql ALIAS> with the alias <alias> of the MinIO deployment.\n\n- Replace PATH <mc sql ALIAS> with the path to the bucket on the MinIO deployment.\n\nRun an Aggregation Query on an Object\n\nUse mc sql with the ~mc sql --query option to query an object on an MinIO deployment:\n\n mc sql --query \"select count(s.power) from S3Object\" ALIAS/PATH\n\n- Replace ALIAS <mc sql ALIAS> with the alias <alias> of the MinIO deployment.\n\n- Replace PATH <mc sql ALIAS> with the path to the object on the MinIO deployment.\n\nBehavior\n\nInput Formats\n\nmc sql supports the following input formats:\n\n :header-rows: 1\n\n * - Type\n - ``content-type`` Value\n\n * - ``.csv``\n - ``text/csv``\n\n * - ``.json``\n - ``application/json``\n\n * - ``.parquet``\n - none\n\nFor ``.csv`` file types, use mc sql --csv-input to specify the CSV data format.\nSee mc-sql-csv-format for more information on CSV formatting fields.\n\nFor ``.json`` file types, use mc sql --json-input to specify the JSON data format.\n\nFor ``.parquet`` file types, mc sql automatically interprets the data format.\n\nmc sql determines the type by the file extension of the target object.\nFor example, an object named ``data.json`` is interpreted as a JSON file.\n\nYou can query data of a supported type but a different extension if the object has the appropriate ``content-type``.\nFor more information, see mc cp --attr.\n\nCSV Formatting Fields\n\nThe following table lists valid key-value pairs for use with mc sql --csv-input and mc sql --csv-output.\nCertain key pairs are only valid for ~mc sql --csv-input.\nSee the documentation for S3 API CSVInput <API_CSVInput.html> for more information on S3 CSV formatting.\n\n :header-rows: 1\n :widths: 20 20 60\n :width: 100%\n\n * - Key\n - ``--csv-input`` Only\n - Description\n\n * - ``rd``\n -\n - The character that seperates each record (row) in the input ``.csv`` file.\n\n Corresponds to ``RecordDelimiter`` in the S3 API ``CSVInput``.\n\n * - ``fd``\n -\n - The character that seperates each field in a record. Defaults to ``,``.\n\n Corresponds to ``FieldDelimeter`` in the S3 API ``CSVInput``.\n\n * - ``qc``\n -\n - The character used for escaping when the ``fd`` character is part of a value. Defaults to ``\"``.\n\n Corresponds to ``QuoteCharacter`` in the S3 API ``CSVInput``.\n\n * - ``qec``\n -\n - The character used for escaping a quotation mark ``\"`` character inside an already escaped value.\n\n Corresponds to ``QuoteEscapeCharacter`` in the S3 API ``CSVInput``.\n\n * - ``fh``\n - Yes\n - The content of the first line in the ``.csv`` file.\n\n Specify one of the following supported values:\n\n - ``NONE`` - The first line is not a header.\n - ``IGNORE`` - Ignore the first line.\n - ``USE`` - The first line is a header.\n\n For ``NONE`` or ``IGNORE``, you must specify column positions ``_#`` to identify a column in the ~mc sql --query statement.\n\n For ``USE``, you can specify header values to identify a column in the ~mc sql --query statement.\n\n Corresponds to ``FieldHeaderInfo`` in the S3 API ``CSVInput``.\n\n * - ``cc``\n - Yes\n - The character used to indicate a record should be ignored.\n The character *must* appear at the beginning of the record.\n\n Corresponds to ``Comment`` in the S3 API ``CSVInput``.\n\n * - ``qrd``\n - Yes\n - Specify ``TRUE`` to indicate that fields may contain record delimiter values (``rd``).\n\n Defaults to ``FALSE``.\n\n Corresponds to ``AllowQuotedRecordDelimiter`` in the S3 API ``CSVInput``.\n\nS3 Compatibility\n\n :start-after: start-minio-mc-s3-compatibility\n :end-before: end-minio-mc-s3-compatibility", "project": "minio-docs", "source": "source/reference/minio-mc/mc-sql.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "``mc tree``\n\n :local:\n :depth: 2\n\nSyntax\n\nThe mc tree command lists all prefixes inside a MinIO bucket in a tree\nformat. The command optionally supports listing all objects inside of bucket\nat each prefix, including the bucket root.\n\nYou can also use mc tree against a local filesystem directory to\nproduce similar results to the ``tree`` commandline tool.\n\n The following command prints a complete tree of all objects at any\n depth in the ``mydata`` bucket on the ``myminio`` MinIO deployment:\n\n :class: copyable\n\n mc tree --files myminio/mydata\n\n The command has the following syntax:\n\n :class: copyable\n\n mc [GLOBALFLAGS] tree \\\n [--depth int] \\\n [--files] \\\n [--rewind \"string\"] \\\n\n :start-after: start-minio-syntax\n :end-before: end-minio-syntax\n\nParameters\n\n *Required* The alias <alias> of a MinIO deployment and the\n full path to the bucket to list the tree hierarchy. For example:\n\n mc tree myminio/mybucket\n\n You can specify multiple targets to the mc tree command. For\n example:\n\n mc tree myminio/mybucket myminio/myotherbucket\n\n For retrieving the tree heirarchy of a local filesystem directory,\n specify the full path to that directory. For example:\n\n mc tree ~/minio/mydata/\n\n *Optional* Limit the tree depth to the specified integer value.\n\n Defaults to ``-1`` or unlimited depth.\n\n *Optional* Includes files in the object or directory in the mc tree\n output.\n\n :optional:\n\n :start-after: start-rewind-desc\n :end-before: end-rewind-desc\n\nExamples\n\n :class: copyable\n\n mc tree ALIAS/PATH\n\n- Replace ALIAS <mc tree ALIAS> with the alias <alias>\n of the MinIO deployment.\n\n- Replace PATH <mc tree ALIAS> with the path to the bucket on the\n MinIO deployment.\n\nBehavior\n\nS3 Compatibility\n\n :start-after: start-minio-mc-s3-compatibility\n :end-before: end-minio-mc-s3-compatibility", "project": "minio-docs", "source": "source/reference/minio-mc/mc-tree.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "``mc admin kms key``\n\n :local:\n :depth: 2\n\nDescription\n\nThe mc admin kms key command performs cryptographic key management\noperations through the MinIO Key Encryption Service (KES).\n\n :class: note\n\n :start-after: start-minio-only\n :end-before: end-minio-only\n\n Return to this section as part of the KES documentation. There's a lot here\n that only makes sense once we can link to KES overview + config.\n\nSyntax\n\n :fullpath:\n\n Creates a new master key on a Key Management System (KMS).\n\n The command has the following syntax:\n\n :class: copyable\n\n mc admin kms key create TARGET [KEY_NAME]\n\n The command accepts the following arguments:\n\n Specify the alias <mc alias> of a configured MinIO deployment.\n\n The ``TARGET`` deployment **must** include a configured\n MinIO Key Encryption Service (KES) server.\n\n Specify the name of the new master key.\n\n :fullpath:\n\n Requests information on a Key Management System (KMS) master key.\n\n The command has the following syntax:\n\n :class: copyable\n\n mc admin kms key status TARGET [KEY_NAME]\n\n The command accepts the following arguments:\n\n Specify the alias <mc alias> of a configured MinIO deployment.\n\n The ``TARGET`` deployment **must** include a configured MinIO Key\n Encryption Service (KES) server.\n\n Specify the name of a master key on the KMS.\n\n Omit this argument to return the default master key on the\n ~mc admin kms key status TARGET deployment.\n\n :fullpath:\n\n List all Key Management System (KMS) keys for a MinIO instance.\n\n The command has the following syntax:\n\n :class: copyable\n\n mc admin kms key list TARGET\n\n The command accepts the following argument:\n\n Specify the alias <mc alias> of a configured MinIO deployment.\n\n The ``TARGET`` deployment **must** include a configured MinIO Key Encryption Service (KES) server.", "project": "minio-docs", "source": "source/reference/minio-mc-admin/mc-admin-kms-key.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "``mc admin policy attach``\n\n :local:\n :depth: 2\n\nSyntax\n\nAttaches one or more IAM policies to either a MinIO-managed user or a group <minio-users>.\n\n To successfully attach a policy, the referenced user or group must exist.\n\nExactly one ~mc admin policy attach --user or one ~mc admin policy attach --group is required.\n\n The following command attaches the ``readonly`` policy to the user ``james`` on the deployment at alias ``myminio``.\n\n :class: copyable\n\n mc admin policy attach myminio readonly --user james\n\n The command has the following syntax:\n\n :class: copyable\n\n mc admin policy attach \\\n TARGET \\\n POLICY \\\n [POLICY...] \\\n [--user USER | --group GROUP]\n\n :start-after: start-minio-syntax\n :end-before: end-minio-syntax\n\n This command is intended for managing policy associations for MinIO-managed <minio-users> users only.\n\n For attaching policies to OpenID-managed users, see minio-external-identity-management-openid.\n\n For attaching policies to Active Directory/LDAP users or groups, use mc idp ldap policy attach.\n\nParameters\n\nThe mc admin policy attach command accepts the following arguments:\n\n :required:\n\n The alias <mc alias> of a configured MinIO deployment with the user or group for which you want to attach one or more policies.\n\n :required:\n\n The name of the policy to attach to either the user or the group.\n\n You may attach multiple policies at once by separating each policy name with a space.\n\n MinIO deployments include the following built-in policies <minio-policy-built-in> by default:\n\n - readonly\n - readwrite\n - diagnostics\n - writeonly\n\n :optional:\n\n The username of the identity you want to attach the policy or policies to.\n You may only list one user.\n\n You must include either the ``--user`` flag or the ``--group`` flag.\n You may not use the ``--user`` flag at the same time as the ``--group`` flag.\n\n :optional:\n\n The name of the group identity you want to attach the policy or policies to.\n You may only list one group.\n\n All users with membership in the group inherit the policies associated to the group.\n\n You must include either the ``--group`` flag or the ``--user`` flag.\n You may not use the ``--group`` flag at the same time as the ``--user`` flag.\n\nGlobal Flags\n\n :start-after: start-minio-mc-globals\n :end-before: end-minio-mc-globals\n\nExamples\n\nAttach the ``readonly`` policy to user ``james`` on the deployment at alias ``myminio``.\n\n :class: copyable\n\n mc admin policy attach myminio readonly --user james\n\nAttach the ``audit-policy`` and ``acct-policy`` policies to group ``legal`` on the deployment at alias ``myminio``.\n\n :class: copyable\n\n mc admin policy attach myminio audit-policy acct-policy --group legal", "project": "minio-docs", "source": "source/reference/minio-mc-admin/mc-admin-policy-attach.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "``mc admin prometheus metrics``\n\n :local:\n :depth: 2\n\nDescription\n\nThe mc admin prometheus metrics command prints Prometheus metrics for a cluster.\n\nThe output includes additional information about each metric, such as if its value is a ``counter`` or ``gauge``.\n\nFor more complete documentation on using MinIO with Prometheus, see How to monitor MinIO server with Prometheus <minio-metrics-collect-using-prometheus>\n\nStarting with MinIO Server RELEASE.2024-07-15T19-02-30Z and MinIO Client RELEASE.2024-07-11T18-01-28Z, metrics version 3 (v3) <minio-metrics-and-alerts> provides additional endpoints and metrics.\nTo print v3 metrics use the ``--api_version v3`` option.\n\nMinIO recommends new deployments use version 3 (v3) <minio-metrics-and-alerts>.\nExisting deployments can continue to use metrics version 2 <minio-metrics-v2>\n\n :class: note\n\n :start-after: start-minio-only\n :end-before: end-minio-only\n\n The following command prints cluster metrics from the deployment at alias ``myminio``:\n\n :class: copyable\n\n mc admin prometheus metrics myminio cluster\n\n The command has the following syntax:\n\n :class: copyable\n\n mc [GLOBALFLAGS] admin prometheus metrics \\\n ALIAS \\\n [TYPE] \\\n [--api_version v3] \\\n [--bucket <bucket name>]\n\n :start-after: start-minio-syntax\n :end-before: end-minio-syntax\n\nParameters\n\n :required:\n\n The alias <mc alias> of a configured MinIO deployment for which the command prints metrics.\n\n :optional:\n\n To print version 3 (v3) <minio-metrics-and-alerts> metrics, include an ``--api-version v3`` parameter.\n ``v3`` is the only accepted value.\n\n Omit ``--api-version`` to print version 2 (v2) <minio-metrics-v2> metrics.\n\n :optional:\n\n Requires ~mc admin prometheus metrics --api-version.\n For v3 metric types that return bucket-level metrics, specify a bucket name.\n\n ``--bucket`` works for the following v3 metric types:\n\n - ``api``\n - ``replication``\n\n The following example prints API metrics for the bucket ``mybucket``:\n\n :class: copyable\n\n mc admin prometheus metrics ALIAS api --bucket mybucket --api-version v3\n\n :optional:\n\n The type of metrics to print.\n\n Valid values for metrics version 3 are:\n\n - ``api``\n - ``audit``\n - ``cluster``\n - ``debug``\n - ``ilm``\n - ``logger``\n - ``notification``\n - ``replication``\n - ``scanner``\n - ``system``\n\n If not specified, a ``v3`` command returns all metrics.\n\n Valid values for metrics version 2 are:\n\n - ``bucket``\n - ``cluster``\n - ``node``\n - ``resource``\n\n If not specified, a ``v2`` command returns cluster metrics.\n Cluster metrics include rollups of certain node metrics.\n\nGlobal flags\n\n :start-after: start-minio-mc-globals\n :end-before: end-minio-mc-globals\n\nExamples\n\nPrint v3 metrics\n\nUse mc admin prometheus metrics --api-version v3 <mc admin prometheus metrics --api-version> to print all available v3 metrics and their current values for a MinIO deployment:\n\n :class: copyable\n\n mc admin prometheus metrics ALIAS --api-version v3\n\n- Replace ``ALIAS`` with the alias <mc alias> of the MinIO deployment.\n\nTo print a specific type of metrics, include the ~mc admin prometheus metrics TYPE.\nThe following prints all scanner metrics for a deployment:\n\n :class: copyable\n\n mc admin prometheus metrics ALIAS scanner --api-version v3\n\nPrint v3 API or bucket replication metrics\n\nCertain v3 metric types accept a ~mc admin prometheus metrics --bucket parameter to specify the bucket for which to print metrics.\nThe following example prints v3 replication metrics for bucket ``mybucket``:\n\n :class: copyable\n\n mc admin prometheus metrics ALIAS replication --bucket mybucket --api-version v3\n\n- Replace ``ALIAS`` with the alias <mc alias> of the MinIO deployment.\n\nTo print API metrics for the bucket, replace ``replication`` with ``api``.\n\nPrint v2 cluster metrics\n\nBy default, mc admin prometheus metrics prints v2 cluster metrics:\n\n :class: copyable\n\n mc admin prometheus metrics ALIAS\n\n- Replace ``ALIAS`` with the alias <mc alias> of the MinIO deployment.\n\nPrint other types of v2 metrics\n\nTo print another type of v2 metrics, specify the desired ~mc admin prometheus metrics TYPE.\nThe following example prints v2 bucket metrics:\n\n :class: copyable\n\n mc admin prometheus metrics ALIAS bucket\n\nAccepted values are ``bucket``, ``cluster``, ``node``, and ``resource``.", "project": "minio-docs", "source": "source/reference/minio-mc-admin/mc-admin-prometheus-metrics.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "MinIO Client\n\n :local:\n :depth: 1\n\n - `Introduction to the MinIO Client (MC) Commands <https://www.youtube.com/watch?v=pukQgDdXfqA>`__\n - `Installing and Running MinIO on Linux <https://www.youtube.com/watch?v=74usXkZpNt8&list=PLFOIsHSSYIK1BnzVY66pCL-iJ30Ht9t1o>`__\n\nThe MinIO Client mc command line tool provides a modern alternative\nto UNIX commands like ``ls``, ``cat``, ``cp``, ``mirror``, and ``diff`` with\nsupport for both filesystems and Amazon S3-compatible cloud storage services.\n\n :start-after: start-minio-mc-s3-compatibility\n :end-before: minio-mc-s3-compatibility\n\nmc has the following syntax:\n\n mc [GLOBALFLAGS] COMMAND --help\n\nSee minio-mc-commands for a list of supported commands.\n\nVersion Alignment with MinIO Server\n\nThe MinIO Client releases separately from the MinIO Server.\n\nFor best functionality and compatibility, use a MinIO Client version released closely to your MinIO Server version.\nFor example, a MinIO Client released the same day or later than your MinIO Server version.\n\nYou can install a version of the MinIO Client that is more recent than the MinIO Server version.\nHowever, if the MinIO Client version skews too far from the MinIO Server version, you may see increased warnings or errors as a result of the differences.\nFor example, while core S3 APIs around copying (mc cp) may remain unchanged, some features or flags may only be available or stable if the client and server versions are aligned.\n\nQuickstart\n\n1) Install ``mc``\n\nInstall the mc command line tool onto the host machine. Click\nthe tab that corresponds to the host machine operating system or environment:\n\n2) Create an Alias for the S3-Compatible Service\n\n The following example temporarily disables the bash history to mitigate the\n risk of authentication credentials leaking in plain text. This is a basic\n security measure and does not mitigate all possible attack vectors. Defer to\n security best practices for your operating system for inputting sensitive\n information on the command line.\n\nUse the mc alias set command to add an Amazon S3-compatible service\nto the mc configuration <mc-configuration>.\n\n :class: copyable\n\n bash +o history\n mc alias set ALIAS HOSTNAME ACCESS_KEY SECRET_KEY\n bash -o history\n\n- Replace ``ALIAS`` with a name to associate to the S3 service.\n mc commands typically require ``ALIAS`` as an argument for\n identifying which S3 service to execute against.\n\n- Replace ``HOSTNAME`` with the URL endpoint or IP address of the S3 service.\n\n- Replace ``ACCESS_KEY`` and ``SECRET_KEY`` with the access and secret\n keys for a user on the S3 service.\n\nReplace each argument with the required values.\nIf you omit the ``ACCESS_KEY`` and ``SECRET_KEY``, the command prompts you to enter those values in the CLI.\n\nEach of the following tabs contains a provider-specific example:\n\n :class: copyable\n\n mc alias set myminio https://minioserver.example.net ACCESS_KEY SECRET_KEY\n\n :class: copyable\n\n mc alias set myS3 https://s3.{your-region-code}.amazonaws.com/endpoint ACCESS_KEY SECRET_KEY\n\n :class: copyable\n\n mc alias set myGCS https://storage.googleapis.com/endpoint ACCESS_KEY SECRET_KEY\n\n3) Test the Connection\n\nUse the mc admin info command to test the connection to\nthe newly added MinIO deployment:\n\n :class: copyable\n\n mc admin info myminio\n\nThe command returns information on the S3 service if successful. If\nunsuccessful, check each of the following:\n\n- The host machine has connectivity to the S3 service URL (i.e. using ``ping``\n or ``traceroute``).\n\n- The specified ``ACCESSKEY`` and ``SECRETKEY`` correspond to a user on the\n S3 service. The user must have permission to perform actions on the\n service.\n\n For MinIO deployments, see minio-access-management\n for more information on user access permissions. For other S3-compatible\n services, defer to the documentation for that service.\n\nCommand Quick Reference\n\nThe following table lists mc commands:\n\n The MinIO Client also includes an administration extension for managing MinIO deployments.\n See mc admin for more complete documentation.\n\n The below table does not include those commands.\n\n :header-rows: 1\n :widths: 30 70\n :width: 100%\n\n * - Command\n - Description\n\n * - | mc alias list\n | mc alias remove\n | mc alias set\n | mc alias import\n | mc alias export\n - .. include:: /reference/minio-mc/mc-alias.rst\n :start-after: start-mc-alias-desc\n :end-before: end-mc-alias-desc\n\n * - | mc anonymous get\n | mc anonymous get-json\n | mc anonymous links\n | mc anonymous list\n | mc anonymous set\n | mc anonymous set-json\n - .. include:: /reference/minio-mc/mc-anonymous.rst\n :start-after: start-mc-anonymous-desc\n :end-before: end-mc-anonymous-desc\n\n * - | mc batch describe\n | mc batch generate\n | mc batch list\n | mc batch start\n | mc batch status\n - .. include:: /reference/minio-mc/mc-batch.rst\n :start-after: start-mc-batch-desc\n :end-before: end-mc-batch-desc\n\n * - mc cat\n - .. include:: /reference/minio-mc/mc-cat.rst\n :start-after: start-mc-cat-desc\n :end-before: end-mc-cat-desc\n\n * - mc cp\n - .. include:: /reference/minio-mc/mc-cp.rst\n :start-after: start-mc-cp-desc\n :end-before: end-mc-cp-desc\n\n * - mc diff\n - .. include:: /reference/minio-mc/mc-diff.rst\n :start-after: start-mc-diff-desc\n :end-before: end-mc-diff-desc\n\n * - mc du\n - .. include:: /reference/minio-mc/mc-du.rst\n :start-after: start-mc-du-desc\n :end-before: end-mc-du-desc\n\n * - | mc encrypt clear\n | mc encrypt info\n | mc encrypt set\n - .. include:: /reference/minio-mc/mc-encrypt.rst\n :start-after: start-mc-encrypt-desc\n :end-before: end-mc-encrypt-desc\n\n * - | mc event add\n | mc event ls\n | mc event rm\n - .. include:: /reference/minio-mc/mc-event.rst\n :start-after: start-mc-event-desc\n :end-before: end-mc-event-desc\n\n * - mc find\n - .. include:: /reference/minio-mc/mc-find.rst\n :start-after: start-mc-find-desc\n :end-before: end-mc-find-desc\n\n * - mc get\n - .. include:: /reference/minio-mc/mc-get.rst\n :start-after: start-mc-get-desc\n :end-before: end-mc-get-desc\n\n * - mc head\n - .. include:: /reference/minio-mc/mc-head.rst\n :start-after: start-mc-head-desc\n :end-before: end-mc-head-desc\n\n * - | mc idp ldap accesskey\n | mc idp ldap accesskey create-with-login\n | mc idp ldap add\n | mc idp ldap disable\n | mc idp ldap enable\n | mc idp ldap info\n | mc idp ldap ls\n | mc idp ldap policy\n | mc idp ldap rm\n | mc idp ldap update\n - .. include:: /reference/minio-mc/mc-idp-ldap.rst\n :start-after: start-mc-idp-ldap-desc\n :end-before: end-mc-idp-ldap-desc\n\n * - | mc idp openid add\n | mc idp openid disable\n | mc idp openid enable\n | mc idp openid info\n | mc idp openid ls\n | mc idp openid rm\n | mc idp openid update\n - .. include:: /reference/minio-mc/mc-idp-openid.rst\n :start-after: start-mc-idp-openid-desc\n :end-before: end-mc-idp-openid-desc\n\n * - | mc idp ldap policy attach\n | mc idp ldap policy detach\n | mc idp ldap policy entities\n - .. include:: /reference/minio-mc/mc-idp-ldap-policy.rst\n :start-after: start-mc-idp-ldap-policy-desc\n :end-before: end-mc-idp-ldap-policy-desc\n\n * - | mc ilm restore\n | mc ilm rule add\n | mc ilm rule edit\n | mc ilm rule export\n | mc ilm rule import\n | mc ilm rule ls\n | mc ilm rule rm\n | mc ilm tier add\n | mc ilm tier check\n | mc ilm tier info\n | mc ilm tier ls\n | mc ilm tier rm\n | mc ilm tier update\n - .. include:: /reference/minio-mc/mc-ilm.rst\n :start-after: start-mc-ilm-desc\n :end-before: end-mc-ilm-desc\n\n * - | mc legalhold clear\n | mc legalhold info\n | mc legalhold set\n - .. include:: /reference/minio-mc/mc-legalhold.rst\n :start-after: start-mc-legalhold-desc\n :end-before: end-mc-legalhold-desc\n\n * - | mc license info\n | mc license register\n | mc license update\n - .. include:: /reference/minio-mc/mc-license.rst\n :start-after: start-mc-license-desc\n :end-before: end-mc-license-desc\n\n * - mc ls\n - .. include:: /reference/minio-mc/mc-ls.rst\n :start-after: start-mc-ls-desc\n :end-before: end-mc-ls-desc\n\n * - mc mb\n - .. include:: /reference/minio-mc/mc-mb.rst\n :start-after: start-mc-mb-desc\n :end-before: end-mc-mb-desc\n\n * - mc mirror\n - .. include:: /reference/minio-mc/mc-mirror.rst\n :start-after: start-mc-mirror-desc\n :end-before: end-mc-mirror-desc\n\n * - mc mv\n - .. include:: /reference/minio-mc/mc-mv.rst\n :start-after: start-mc-mv-desc\n :end-before: end-mc-mv-desc\n\n * - mc od\n - .. include:: /reference/minio-mc/mc-od.rst\n :start-after: start-mc-od-desc\n :end-before: end-mc-od-desc\n\n * - mc ping\n - .. include:: /reference/minio-mc/mc-ping.rst\n :start-after: start-mc-ping-desc\n :end-before: end-mc-ping-desc\n\n * - mc pipe\n - .. include:: /reference/minio-mc/mc-pipe.rst\n :start-after: start-mc-pipe-desc\n :end-before: end-mc-pipe-desc\n\n * - mc put\n - .. include:: /reference/minio-mc/mc-put.rst\n :start-after: start-mc-put-desc\n :end-before: end-mc-put-desc\n\n * - mc rb\n - .. include:: /reference/minio-mc/mc-rb.rst\n :start-after: start-mc-rb-desc\n :end-before: end-mc-rb-desc\n\n * - mc ready\n - .. include:: /reference/minio-mc/mc-ready.rst\n :start-after: start-mc-ready-desc\n :end-before: end-mc-ready-desc\n\n * - | mc replicate add\n | mc replicate backlog\n | mc replicate export\n | mc replicate import\n | mc replicate ls\n | mc replicate resync\n | mc replicate rm\n | mc replicate status\n | mc replicate update\n - .. include:: /reference/minio-mc/mc-replicate.rst\n :start-after: start-mc-replicate-desc\n :end-before: end-mc-replicate-desc\n\n * - | mc retention clear\n | mc retention info\n | mc retention set\n - .. include:: /reference/minio-mc/mc-retention.rst\n :start-after: start-mc-retention-desc\n :end-before: end-mc-retention-desc\n\n * - mc rm\n - .. include:: /reference/minio-mc/mc-rm.rst\n :start-after: start-mc-rm-desc\n :end-before: end-mc-rm-desc\n\n * - | mc share download\n | mc share ls\n | mc share upload\n - .. include:: /reference/minio-mc/mc-share.rst\n :start-after: start-mc-share-desc\n :end-before: end-mc-share-desc\n\n * - mc sql\n - .. include:: /reference/minio-mc/mc-sql.rst\n :start-after: start-mc-sql-desc\n :end-before: end-mc-sql-desc\n\n * - mc stat\n - .. include:: /reference/minio-mc/mc-stat.rst\n :start-after: start-mc-stat-desc\n :end-before: end-mc-stat-desc\n\n * - | mc support callhome\n | mc support diag\n | mc support inspect\n | mc support perf\n | mc support profile\n | mc support proxy\n | mc support top api\n | mc support top disk\n | mc support top locks\n | mc support upload\n - .. include:: /reference/minio-mc/mc-support.rst\n :start-after: start-mc-support-desc\n :end-before: end-mc-support-desc\n\n * - | mc tag list\n | mc tag remove\n | mc tag set\n - .. include:: /reference/minio-mc/mc-tag.rst\n :start-after: start-mc-tag-desc\n :end-before: end-mc-tag-desc\n\n * - mc tree\n - .. include:: /reference/minio-mc/mc-tree.rst\n :start-after: start-mc-tree-desc\n :end-before: end-mc-tree-desc\n\n * - mc undo\n - .. include:: /reference/minio-mc/mc-undo.rst\n :start-after: start-mc-undo-desc\n :end-before: end-mc-undo-desc\n\n * - mc update\n - .. include:: /reference/minio-mc/mc-update.rst\n :start-after: start-mc-update-desc\n :end-before: end-mc-update-desc\n\n * - | mc version enable\n | mc version info\n | mc version suspend\n - .. include:: /reference/minio-mc/mc-version.rst\n :start-after: start-mc-version-desc\n :end-before: end-mc-version-desc\n\n * - mc watch\n - .. include:: /reference/minio-mc/mc-watch.rst\n :start-after: start-mc-watch-desc\n :end-before: end-mc-watch-desc\n\nConfiguration File\n\nmc uses a ``JSON`` formatted configuration file used for storing\ncertain kinds of information, such as the aliases <mc alias> for\neach configured S3-compatible service.\n\nFor Linux and macOS, the default configuration file location is\n``~/.mc/config.json``.\n\nFor Windows, mc attempts to construct a default file path by trying\nspecific environment variables. If a variable is unset, mc moves\nto the next variable. If all attempts fail, mc returns an error.\nThe following list describes each possible file path location in the order\nmc checks them:\n\n#. ``HOME\\.mc\\config.json``\n#. ``USERPROFILE\\.mc\\config.json``\n#. ``HOMEDRIVE+HOMEPATH\\.mc\\config.json``\n\nYou can use the ``--config-dir``\n\nCertificates\n\nThe MinIO Client stores certificates and CAs for deployments to the following paths:\n\nLinux, macOS, and other Unix-like systems:\n\n ~/.mc/certs/ # certificates\n ~/.mc/certs/CAs/ # Certificate Authorities\n\nWindows systems:\n\n C:\\Users\\[username]\\mc\\certs\\ # certificates\n C:\\Users\\[username]\\mc\\certs\\CAs\\ # Certificate Authorities\n\nWhen creating a new alias <minio-mc-alias>, the MinIO Client fetches the peer certificate, computes the public key fingerprint, and asks the user whether to accept the deployment's certificate.\nIf you decide to trust the certificate, the MinIO Client adds the certificate to the certificate authority path listed above.\n\n In testing environments, you can bypass the certificate check for selected MinIO Client commands by passing the ``--insecure`` flag.\n\nPattern Matching\n\nSome commands and flags allow for pattern matching.\nWhen enabled, a pattern can include either of these wildcards for character replacement:\n\n- ``*`` to represent a string of characters to match, either in the middle or end.\n- ``?`` to represent a single character.\n\nFor example, refer to the following examples for wildcard uses and their results.\n\n :header-rows: 1\n :widths: 40 30 30\n :width: 100%\n\n * - Pattern\n - Text\n - Match Result\n\n * - ``abc*``\n - ab\n - Match\n\n * - ``abc*``\n - abd\n - Not a match\n\n * - ``abc*c``\n - abcd\n - Match\n\n * - ``ab*??d``\n - abxxc\n - Match\n\n * - ``ab*??d``\n - abxc\n - Match\n\n * - ``ab??d``\n - abxc\n - Match\n\n * - ``ab??d``\n - abc\n - Match\n\n * - ``ab??d``\n - abcxdd\n - Not a match\n\nGlobal Options\n\nAll commands <minio-mc-commands> support the following global options.\nYou can also define some of these options using Environment Variables <minio-server-envvar-mc>.\n\n The path to a ``JSON`` formatted configuration file that\n mc uses for storing data. See mc-configuration for\n more information on how mc uses the configuration file.\n\n Alternatively, set the environment variable MC_CONFIG_DIR.\n\n Enables verbose output to the console.\n\n For example, the following operation adds verbose output to the\n mc ls command:\n\n :class: copyable\n\n mc --debug ls play\n\n Alternatively, set the environment variable MC_DEBUG.\n\n Disable the pager functionality of the MinIO Client in the CLI.\n When used, output prints to raw ``STDOUT`` instead.\n\n Disables TLS/SSL certificate verification. Allows TLS connectivity to\n servers with invalid certificates. Exercise caution when using this\n option against untrusted S3 hosts.\n\n Alternatively, set the environment variable MC_INSECURE.\n\n Enables `JSON lines <http://jsonlines.org/>`_ formatted output to the\n console.\n\n For example, the following operation adds JSON Lines output to the\n mc ls command:\n\n :class: copyable\n\n mc --json ls play\n\n Alternatively, set the environment variable MC_JSON.\n\n Disables the built-in color theme for console output. Useful for dumb\n terminals.\n\n Alternatively, set the environment variable MC_NO_COLOR.\n\n Suppresses console output.\n\n Alternatively, set the environment variable MC_QUIET.\n\n Creates a custom DNS mapping to resolve a HOST to a specified IP address.\n\n Use the following syntax:\n\n --resolve HOST[:PORT]=IP\n\n For example:\n\n :class: copyable\n\n mc alias set --resolve myminio.example.com:9000=192.168.188.118 'myminio' 'https://myminio.example.com:9000' 'miniouser' 'miniosecret'\n\n Repeat the flag multiple times to add additional custom DNS mappings.\n\n Displays the current version of mc.\n\n :optional:\n\n Displays a summary of command usage on the terminal.\n\n :titlesonly:\n :hidden:\n\n /reference/minio-mc/minio-client-settings\n /reference/minio-mc/mc-alias\n /reference/minio-mc/mc-anonymous\n /reference/minio-mc/mc-batch\n /reference/minio-mc/mc-cat\n /reference/minio-mc/mc-cp\n /reference/minio-mc/mc-diff\n /reference/minio-mc/mc-du\n /reference/minio-mc/mc-encrypt\n /reference/minio-mc/mc-event\n /reference/minio-mc/mc-find\n /reference/minio-mc/mc-get\n /reference/minio-mc/mc-head\n /reference/minio-mc/mc-idp-ldap\n /reference/minio-mc/mc-idp-ldap-accesskey\n /reference/minio-mc/mc-idp-ldap-accesskey-create-with-login\n /reference/minio-mc/mc-idp-ldap-policy\n /reference/minio-mc/mc-idp-openid\n /reference/minio-mc/mc-ilm\n /reference/minio-mc/mc-legalhold\n /reference/minio-mc/mc-license\n /reference/minio-mc/mc-ls\n /reference/minio-mc/mc-mb\n /reference/minio-mc/mc-mirror\n /reference/minio-mc/mc-mv\n /reference/minio-mc/mc-od\n /reference/minio-mc/mc-ping\n /reference/minio-mc/mc-pipe\n /reference/minio-mc/mc-put\n /reference/minio-mc/mc-rb\n /reference/minio-mc/mc-ready\n /reference/minio-mc/mc-replicate\n /reference/minio-mc/mc-retention\n /reference/minio-mc/mc-rm\n /reference/minio-mc/mc-share\n /reference/minio-mc/mc-sql\n /reference/minio-mc/mc-stat\n /reference/minio-mc/mc-support\n /reference/minio-mc/mc-tag\n /reference/minio-mc/mc-tree\n /reference/minio-mc/mc-undo\n /reference/minio-mc/mc-update\n /reference/minio-mc/mc-version\n /reference/minio-mc/mc-watch", "project": "minio-docs", "source": "source/reference/minio-mc.rst", "commit": "0f20cb5c667a6a5c833e6b369addb9a08f0440a7", "license": "CC-BY-4.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "`cainjector` helps to configure the CA certificates for:\n[Mutating Webhooks],\n[Validating Webhooks]\n[Conversion Webhooks] and [API Services]\n\nIn particular, `cainjector` populates the `caBundle` field of four API types:\n`ValidatingWebhookConfiguration`,\n`MutatingWebhookConfiguration`\n`CustomResourceDefinition` and `APIService`.\nThe first three resource types are used to configure how the Kubernetes API server connects to webhooks.\nThis `caBundle` data is loaded by the Kubernetes API server and used to verify the serving certificates of webhook API servers.\n`APIService` is used to represent an [Extension API Server]. `caBundle` of `APIService` can be populated with CA cert that can be used to validate the API server's serving certificate.\n\nWe will refer to these four API types as *injectable* resources.\n\nAn *injectable* resource MUST have one of these annotations:\n`cert-manager.io/inject-ca-from`,\n`cert-manager.io/inject-ca-from-secret`, or\n`cert-manager.io/inject-apiserver-ca`, depending on the injection *source*.\nThis is explained in more detail below.\n\n`cainjector` copies CA data from one of three *sources*:\na Kubernetes `Secret`,\na cert-manager `Certificate`, or from\nthe Kubernetes API server CA certificate (which `cainjector` itself uses to verify its TLS connection to the Kubernetes API server).\n\nIf the *source* is a Kubernetes `Secret`, that resource MUST also have an `cert-manager.io/allow-direct-injection: \"true\"` annotation.\nThe three *source* types are explained in more detail below.\n\n## Examples\n\nHere are examples demonstrating how to use the three `cainjector` *sources*.\nIn each case we use `ValidatingWebhookConfiguration` as the *injectable*,\nbut you can substitute `MutatingWebhookConfiguration` or `CustomResourceDefinition` definition instead.\n\n### Injecting CA data from a Certificate resource\n\nHere is an example of a `ValidatingWebhookConfiguration`\nconfigured with the annotation `cert-manager.io/inject-ca-from`,\nwhich will make `cainjector` populate the `caBundle` field using CA data from a cert-manager `Certificate`.\n\nNOTE: This example does not deploy a webhook server,\nit only deploys a partial webhook configuration,\nbut it should be sufficient to help you understand what `cainjector` does:\n\n```yaml\napiVersion: v1\nkind: Namespace\nmetadata:\n name: example1\n\n---\n\napiVersion: admissionregistration.k8s.io/v1\nkind: ValidatingWebhookConfiguration\nmetadata:\n name: webhook1\n annotations:\n cert-manager.io/inject-ca-from: example1/webhook1-certificate\nwebhooks:\n- name: webhook1.example.com\n admissionReviewVersions:\n - v1\n clientConfig:\n service:\n name: webhook1\n namespace: example1\n path: /validate\n port: 443\n sideEffects: None\n\n---\n\napiVersion: cert-manager.io/v1\nkind: Certificate\nmetadata:\n name: webhook1-certificate\n namespace: example1\nspec:\n secretName: webhook1-certificate\n dnsNames:\n - webhook1.example1\n issuerRef:\n name: selfsigned\n\n---\n\napiVersion: cert-manager.io/v1\nkind: Issuer\nmetadata:\n name: selfsigned\n namespace: example1\nspec:\n selfSigned: {}\n```\n\nYou should find that the `caBundle` value is now identical to the CA value in the `Secret` for the `Certificate`:\n\n```\nkubectl get validatingwebhookconfigurations.admissionregistration.k8s.io webhook1 -o yaml | grep caBundle\nkubectl -n example1 get secret webhook1-certificate -o yaml | grep ca.crt\n```\n\nAnd after a short time, the Kubernetes API server will read that new `caBundle` value and use it to verify a TLS connection to the webhook server.\n\n### Injecting CA data from a Secret resource\n\nHere is another example of a `ValidatingWebhookConfiguration`\nthis time configured with the annotation `cert-manager.io/inject-ca-from-secret`,\nwhich will make `cainjector` populate the `caBundle` field using CA data from a Kubernetes `Secret`.\n\nNOTE: This example does not deploy a webhook server,\nit only deploys a partial webhook configuration,\nbut it should be sufficient to help you understand what `cainjector` does:\n\n```yaml\napiVersion: v1\nkind: Namespace\nmetadata:\n name: example2\n\n---\n\napiVersion: admissionregistration.k8s.io/v1\nkind: ValidatingWebhookConfiguration\nmetadata:\n name: webhook2\n annotations:\n cert-manager.io/inject-ca-from-secret: example2/example-ca\nwebhooks:\n- name: webhook2.example.com\n admissionReviewVersions:\n - v1\n clientConfig:\n service:\n name: webhook2\n namespace: example2\n path: /validate\n port: 443\n sideEffects: None\n\n---\n\napiVersion: v1\nkind: Secret\nmetadata:\n name: example-ca\n namespace: example2\n annotations:\n cert-manager.io/allow-direct-injection: \"true\"\ntype: kubernetes.io/tls\ndata:\n ca.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM5akNDQWQ2Z0F3SUJBZ0lRTkdJZ24yM3BQYVpNbk9MUjJnVmZHakFOQmdrcWhraUc5dzBCQVFzRkFEQVYKTVJNd0VRWURWUVFERXdwRmVHRnRjR3hsSUVOQk1CNFhEVEl3TURreU5ERTFOREEwTVZvWERUSXdNVEl5TXpFMQpOREEwTVZvd0ZURVRNQkVHQTFVRUF4TUtSWGhoYlhCc1pTQkRRVENDQVNJd0RRWUpLb1pJaHZjTkFRRUJCUUFECmdnRVBBRENDQVFvQ2dnRUJBS2F3RzVoMzlreHdyNEl0WCtHaDNYVWQrdTVJc2ZlSFdoTTc4TTRQTmZFeXhQMXoKRmNLN1d0MHJFMkwwNUppYmQ4ZjNpb3k5OXNnQ3I4OEw2SWxYZTB0RnkzNysxenJ4TFluR2hDQnZzZjltd0hLbgpIVTEvNERwQjROZkhPbFllNE9tbHVoNE9HdmZINU1EbDh5OWZGMjhXRXVBQ2dwdmpCUWxvRDNlVjJ5UmJvQ2kyCmtSTDJWYTFZL0FQZEpWK21VYkFvZmg0bllmUmNLRTJsSUg0RG5ZdXFPU3JaaituZUQ2M2RTSktxcHQ5K2luN2YKNHljZ2pQYU93MmdyKzhLK291QTlSQTV1VDI3SVNJcUJDcEV6elRqbVBUUWNvUTYxZGF0aDZkc1lsTEU4aWZWUwp4RWZuVEdQKy94M0FXQXR4eU5lanVuZGFXbVNFL3h5OHh0K0FxblVDQXdFQUFhTkNNRUF3RGdZRFZSMFBBUUgvCkJBUURBZ0trTUE4R0ExVWRFd0VCL3dRRk1BTUJBZjh3SFFZRFZSME9CQllFRkowNkc5eEc2V1VBTHB6T3JYaHAKV2dsTm5qMkFNQTBHQ1NxR1NJYjNEUUVCQ3dVQUE0SUJBUUI3ZG9CZnBLR3o4VlRQSnc0YXhpdisybzJpMHE1SQpSRzU2UE81WnhKQktZQlRROElHQmFOSm1yeGtmNTJCV0ttUGp4cXlNSGRwWjVBU00zOUJkZVUzRGtEWHp4RkgwCjM5RU12UnhIUERyMGQ4cTFFbndQT0xZY1hzNjJhYjdidE11cTJUMFNNZzRYMkY5VmNKTW5YdjlrNnA0VGZNR3MKVThCQnJhVGhUZm53ejBsWXMyblFjdzNmZjZ1bG1wWlk4K3BTak1aVDNJZHZOMFA4Y2hOdUlmUFRHWDJmSlo2NQpxcUUrelRoU3hIeXFTOTVoczhsd1lRRUhGQlVsalRnMCtQZThXL0hOSXZBOU9TYWw1U3UvdlhydmcxN04xdHVyCk5XcWRyZU5OVm1ubXMvTFJodmthWTBGblRvbFNBRkNXWS9GSDY5ZzRPcThiMHVyK3JVMHZOZFFXCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K\n tls.key: \"\"\n tls.crt: \"\"\n```\n\nYou should find that the `caBundle` value is now identical to the `ca.crt` value in the `Secret`:\n\n```\nkubectl get validatingwebhookconfigurations.admissionregistration.k8s.io webhook2 -o yaml | grep caBundle\n```\n\nAnd after a short time, the Kubernetes API server will read that new `caBundle` value and use it to verify a TLS connection to the webhook server.\n\nThis `Secret` based injection mechanism can operate independently of the `Certificate` based mechanism described earlier.\nIt will work without the cert-manager CRDs installed\nand it will work if the cert-manager CRDs and associated webhook servers are not yet configured.\n\nNOTE: For this reason, cert-manager uses the `Secret` based injection mechanism to bootstrap its own webhook server.\nThe cert-manager webhook server generates its own private key and self-signed certificate and places them in a `Secret` when it starts up.\n\n### Injecting the Kubernetes API Server CA\n\nHere is another example of a `ValidatingWebhookConfiguration`\nthis time configured with the annotation `cert-manager.io/inject-apiserver-ca: \"true\"`,\nwhich will make `cainjector` populate the `caBundle` field using the same CA certificate used by the Kubernetes API server.\n\nNOTE: This example does not deploy a webhook server,\nit only deploys a partial webhook configuration,\nbut it should be sufficient to help you understand what `cainjector` does:\n\n```yaml\napiVersion: v1\nkind: Namespace\nmetadata:\n name: example3\n\n---\n\napiVersion: admissionregistration.k8s.io/v1\nkind: ValidatingWebhookConfiguration\nmetadata:\n name: webhook3\n annotations:\n cert-manager.io/inject-apiserver-ca: \"true\"\nwebhooks:\n- name: webhook3.example.com\n admissionReviewVersions:\n - v1\n clientConfig:\n service:\n name: webhook3\n namespace: example3\n path: /validate\n port: 443\n sideEffects: None\n\n```\n\nYou should find that the `caBundle` value is now identical to the CA used in your `KubeConfig` file:\n\n```\nkubectl get validatingwebhookconfigurations.admissionregistration.k8s.io webhook3 -o yaml | grep caBundle\nkubectl config view --minify --raw | grep certificate-authority-data\n```\n\nAnd after a short time, the Kubernetes API server will read that new `caBundle` value and use it to verify a TLS connection to the webhook server.\n\nNOTE: In this case you will have to ensure that your webhook is configured to serve a TLS certificate that has been signed by the Kubernetes cluster CA.\nThe disadvantages of this mechanism are that: you will require access to the private key of the Kubernetes cluster CA and you will need to manually rotate the webhook certificate.\n\n[Validating Webhooks]: https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#validatingadmissionwebhook\n[Mutating Webhooks]: https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#mutatingadmissionwebhook\n[Conversion Webhooks]: https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/#webhook-conversion\n[API Services]: https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/api-service-v1/\n[Extension API Server]: https://kubernetes.io/docs/tasks/extend-kubernetes/setup-extension-api-server/", "project": "cert-manager-website", "source": "content/docs/concepts/ca-injector.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "`Issuers`, and `ClusterIssuers`, are Kubernetes resources that represent\ncertificate authorities (CAs) that are able to generate signed certificates by honoring\ncertificate signing requests. All cert-manager certificates require a referenced\nissuer that is in a ready condition to attempt to honor the request.\n\nAn example of an `Issuer` type is `CA`. A simple `CA` `Issuer` is as follows:\n\n```yaml\napiVersion: cert-manager.io/v1\nkind: Issuer\nmetadata:\n name: ca-issuer\n namespace: mesh-system\nspec:\n ca:\n secretName: ca-key-pair\n```\n\nThis is a simple `Issuer` that will sign certificates based on a private key.\nThe certificate stored in the secret `ca-key-pair` can then be used to trust\nnewly signed certificates by this `Issuer` in a Public Key Infrastructure (PKI)\nsystem.\n\n## Namespaces\n\nAn `Issuer` is a namespaced resource, and it is not possible to issue\ncertificates from an `Issuer` in a different namespace. This means you will need\nto create an `Issuer` in each namespace you wish to obtain `Certificates` in.\n\nIf you want to create a single `Issuer` that can be consumed in multiple\nnamespaces, you should consider creating a `ClusterIssuer` resource. This is\nalmost identical to the `Issuer` resource, however is non-namespaced so it\ncan be used to issue `Certificates` across all namespaces.\n\n## Supported Issuers\n\ncert-manager supports a number of 'in-tree', as well as 'out-of-tree' `Issuer`\ntypes. An exhaustive list of these `Issuer` types can be found in the\ncert-manager [configuration documentation](../configuration/README.md).", "project": "cert-manager-website", "source": "content/docs/concepts/issuer.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "## Configuring DNS01 Challenge Provider\n\nThis page contains details on the different options available on the `Issuer`\nresource's DNS01 challenge solver configuration.\n\nFor more information on configuring ACME `Issuers` and their API format, read the\n[ACME Issuers](../README.md) documentation.\n\nDNS01 provider configuration must be specified on the `Issuer` resource, similar\nto the examples in the setting up documentation.\n\nYou can read about how the DNS01 challenge type works on the [Let's Encrypt\nchallenge types\npage](https://letsencrypt.org/docs/challenge-types/#dns-01-challenge).\n\n```yaml\napiVersion: cert-manager.io/v1\nkind: Issuer\nmetadata:\n name: example-issuer\nspec:\n acme:\n email: user@example.com\n server: https://acme-staging-v02.api.letsencrypt.org/directory\n privateKeySecretRef:\n name: example-issuer-account-key\n solvers:\n - dns01:\n cloudDNS:\n project: my-project\n serviceAccountSecretRef:\n name: prod-clouddns-svc-acct-secret\n key: service-account.json\n```\n\nEach issuer can specify multiple different DNS01 challenge providers, and\nit is also possible to have multiple instances of the same DNS provider on a\nsingle `Issuer` (e.g. two CloudDNS accounts could be set, each with their own\nname).\n\nFor more information on utilizing multiple solver types on a single `Issuer`,\nread the multiple-solver-types section.\n\n## Setting Nameservers for DNS01 Self Check\n\ncert-manager will check the correct DNS records exist before attempting a DNS01\nchallenge. By default cert-manager will use the recursive nameservers taken\nfrom `/etc/resolv.conf` to query for the authoritative nameservers, which it will\nthen query directly to verify the DNS records exist.\n\nIf this is not desired (for example with multiple authoritative nameservers or\nsplit-horizon DNS), the cert-manager controller exposes two flags that allows\nyou alter this behavior:\n\n`--dns01-recursive-nameservers` Comma separated string with host and port of the\nrecursive nameservers cert-manager should query.\n\n`--dns01-recursive-nameservers-only` Forces cert-manager to only use the\nrecursive nameservers for verification. Enabling this option could cause the DNS01\nself check to take longer due to caching performed by the recursive nameservers.\n\nExample usage:\n```bash\n--dns01-recursive-nameservers-only --dns01-recursive-nameservers=8.8.8.8:53,1.1.1.1:53\n```\n\nIf you're using the `cert-manager` helm chart, you can set recursive nameservers\nthrough `.Values.extraArgs` or at the command at helm install/upgrade time\nwith `--set`:\n\n```bash\n--set 'extraArgs={--dns01-recursive-nameservers-only,--dns01-recursive-nameservers=8.8.8.8:53\\,1.1.1.1:53}'\n```\n\n## Delegated Domains for DNS01\n\nBy default, cert-manager will not follow CNAME records pointing to subdomains.\n\nIf granting cert-manager access to the root DNS zone is not desired, then the\n`_acme-challenge.example.com` subdomain can instead be delegated to some other,\nless privileged domain (`less-privileged.example.org`). This could be achieved in the following way. Say, one has two zones:\n\n* `example.com`\n* `less-privileged.example.org`\n\n1. Create a CNAME record pointing to this less privileged domain:\n```\n_acme-challenge.example.com IN CNAME _acme-challenge.less-privileged.example.org.\n```\n\n2. Grant cert-manager rights to update less privileged `less-privileged.example.org` zone\n\n3. Provide configuration/credentials for updating this less privileged zone\nand add an additional field into the relevant `dns01` solver. Note that `selector`\nfield is still working for the original `example.com`, while credentials are provided for\n`less-privileged.example.org`\n\n```yaml\napiVersion: cert-manager.io/v1\nkind: Issuer\nmetadata:\n ...\nspec:\n acme:\n ...\n solvers:\n - selector:\n dnsZones:\n - 'example.com'\n dns01:\n # Valid values are None and Follow\n cnameStrategy: Follow\n route53:\n region: eu-central-1\n accessKeyID:\n hostedZoneID:\n secretAccessKeySecretRef:\n ...\n```\n\nIf you have a multitude of (sub)domains requiring separate certificates,\nit is possible to share an aliased less-privileged domain. To achieve it one should\ncreate a CNAME record for each (sub)domain like this:\n\n```txt\n_acme-challenge.example.com IN CNAME _acme-challenge.less-privileged.example.org.\n_acme-challenge.www.example.com IN CNAME _acme-challenge.less-privileged.example.org.\n_acme-challenge.foo.example.com IN CNAME _acme-challenge.less-privileged.example.org.\n_acme-challenge.bar.example.com IN CNAME _acme-challenge.less-privileged.example.org.\n```\n\nWith this configuration cert-manager will follow CNAME records recursively in order to determine\nwhich DNS zone to update during DNS01 challenges.\n\n> ⚠️ With `cnameStrategy: Follow`, cert-manager follows *any* CNAME record\n> found at `_acme-challenge. `, including one synthesized by a\n> wildcard record. For example, a record like\n> `*.example.com IN CNAME lb.example.org` also answers CNAME queries for\n> `_acme-challenge.example.com`, so cert-manager will try to create the\n> challenge TXT record at `lb.example.org` — typically failing with an error\n> such as Route 53's\n> `RRSet with DNS name lb.example.org. is not permitted in zone example.com.`.\n> To avoid this, create an explicit record at `_acme-challenge. `\n> (an exact-match name prevents wildcard synthesis), or use the default\n> `cnameStrategy: None` if you are not delegating challenges to another\n> zone.\n\n## Supported DNS01 providers\n\nA number of different DNS providers are supported for the ACME `Issuer`. Below\nis a listing of available providers, their `.yaml` configurations, along with\nadditional Kubernetes and provider specific notes regarding their usage.\n\n- [ACMEDNS](./acme-dns.md)\n- [Akamai](./akamai.md)\n- [AzureDNS](./azuredns.md)\n- [CloudFlare](./cloudflare.md)\n- [Google](./google.md)\n- [Route53](./route53.md)\n- [DigitalOcean](./digitalocean.md)\n- [RFC2136](./rfc2136.md)\n\n## Webhook\n\ncert-manager also supports out of tree DNS providers using an external webhook.\nLinks to these supported providers along with their documentation are below:\n\n- [`AliDNS-Webhook`](https://github.com/pragkent/alidns-webhook)\n- [`bizflycloud-certmanager-dns-webhook`](https://github.com/bizflycloud/bizflycloud-certmanager-dns-webhook)\n- [`cert-manager-alidns-webhook`](https://github.com/DEVmachine-fr/cert-manager-alidns-webhook)\n- [`cert-manager-webhook-abion`](https://github.com/abiondevelopment/cert-manager-webhook-abion)\n- [`cert-manager-webhook-arvan`](https://github.com/kiandigital/cert-manager-webhook-arvan)\n- [`cert-manager-webhook-bunny`](https://github.com/aardbol/cert-manager-webhook-bunny)\n- [`cert-manager-webhook-civo`](https://github.com/okteto/cert-manager-webhook-civo)\n- [`cert-manager-webhook-dnspod`](https://github.com/qqshfox/cert-manager-webhook-dnspod)\n- [`cert-manager-webhook-dnsimple`](https://github.com/neoskop/cert-manager-webhook-dnsimple)\n- [`cert-manager-webhook-exoscale`](https://github.com/glasskube/cert-manager-webhook-exoscale)\n- [`cert-manager-webhook-gandi`](https://github.com/SINTEF/cert-manager-webhook-gandi)\n- [`cert-manager-webhook-glesys`](https://github.com/sthlmio/cert-manager-webhook-glesys)\n- [`cert-manager-webhook-hetzner`](https://github.com/vadimkim/cert-manager-webhook-hetzner)\n- [`cert-manager-webhook-ibmcis`](https://github.com/jb-dk/cert-manager-webhook-ibmcis)\n- [`cert-manager-webhook-infomaniak`](https://github.com/Infomaniak/cert-manager-webhook-infomaniak)\n- [`cert-manager-webhook-inwx`](https://gitlab.com/smueller18/cert-manager-webhook-inwx)\n- [`cert-manager-webhook-ionos-cloud`](https://github.com/ionos-cloud/cert-manager-webhook-ionos-cloud)\n- [`cert-manager-webhook-linode`](https://github.com/linode/cert-manager-webhook-linode)\n- [`cert-manager-webhook-loopia`](https://github.com/Identitry/cert-manager-webhook-loopia)\n- [`cert-manager-webhook-netcup`](https://github.com/aellwein/cert-manager-webhook-netcup)\n- [`cert-manager-webhook-oci`](https://gitlab.com/dn13/cert-manager-webhook-oci) (Oracle Cloud Infrastructure)\n- [`cert-manager-webhook-ovh`](https://github.com/aureq/cert-manager-webhook-ovh)\n- [`cert-manager-webhook-opentelekomcloud`](https://github.com/akyriako/cert-manager-webhook-opentelekomcloud)\n- [`cert-manager-webhook-pdns`](https://github.com/zachomedia/cert-manager-webhook-pdns)\n- [`cert-manager-webhook-rackspace`](https://github.com/rackerlabs/cert-manager-webhook-rackspace)\n- [`cert-manager-webhook-regery`](https://github.com/darioackermann/cert-manager-webhook-regery)\n- [`cert-manager-webhook-scaleway`](https://github.com/scaleway/cert-manager-webhook-scaleway)\n- [`cert-manager-webhook-selectel`](https://github.com/selectel/cert-manager-webhook-selectel)\n- [`cert-manager-webhook-softlayer`](https://github.com/cgroschupp/cert-manager-webhook-softlayer)\n- [`cert-manager-webhook-solidserver`](https://github.com/niklas-letz/cert-manager-webhook-solidserver)\n- [`cert-manager-webhook-vercel`](https://github.com/rhythmbhiwani/cert-manager-webhook-vercel)\n- [`cert-manager-webhook-yandex-cloud`](https://github.com/malinink/cert-manager-webhook-yandex-cloud)\n- [`cert-manager-webhook-zilore`](https://gitlab.com/zilore/cert-manager-webhook-zilore)\n- [`stackit-cert-manager-webhook`](https://github.com/stackitcloud/stackit-cert-manager-webhook)\n\nYou can find more information on how to configure webhook providers [here](./webhook.md).\n\nTo create a new unsupported DNS provider, follow the development documentation [here](../../../contributing/dns-providers.md).", "project": "cert-manager-website", "source": "content/docs/configuration/acme/dns01/README.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "cert-manager can create and then delete DNS-01 records in Azure DNS but it needs to authenticate to Azure first.\nThere are four authentication methods available:\n\n- [Managed Identity Using AAD Workload Identity](#managed-identity-using-aad-workload-identity) (recommended)\n- [Managed Identity Using AAD Pod Identities](#managed-identity-using-aad-pod-identities) (deprecated)\n- [Managed Identity Using AKS Kubelet Identity](#managed-identity-using-aks-kubelet-identity)\n- [Service Principal](#service-principal)\n\n## Managed Identity Using AAD Workload Identity\n\n> ℹ️ This feature is available in cert-manager `>= v1.11.0`.\n>\n> 📖 Read the [AKS + LoadBalancer + Let's Encrypt tutorial](../../../tutorials/getting-started-aks-letsencrypt/README.md) for an end-to-end example of this authentication method.\n\nAzure AD workload identity (preview) on Azure Kubernetes Service (AKS) allows cert-manager to authenticate to Azure using a Kubernetes ServiceAccount Token and then to manage DNS-01 records in Azure DNS.\nThis is the recommended authentication method because it is more secure and easier to maintain than the other methods.\n\n### Reconfigure the cluster\n\nEnable the workload identity federation features on your cluster.\nIf you have an Azure AKS cluster you can use the following command:\n\n```bash\naz aks update \\\n --name ${CLUSTER} \\\n --enable-oidc-issuer \\\n --enable-workload-identity\n```\n\n> ℹ️ You can [install the Azure workload identity extension on other managed and self-managed clusters](https://azure.github.io/azure-workload-identity/docs/installation.html) if you are not using Azure AKS.\n>\n> 📖 Read [Deploy and configure workload identity on an Azure Kubernetes Service (AKS) cluster](https://learn.microsoft.com/en-us/azure/aks/workload-identity-deploy-cluster) for more information about the `--enable-workload-identity` feature.\n>\n### Reconfigure cert-manager\n\nLabel the cert-manager controller Pod for the attention of the Azure Workload Identity webhook,\nwhich will result in the cert-manager controller Pod having an extra volume containing a Kubernetes ServiceAccount token which it will use to authenticate with Azure.\n\nIf you installed cert-manager using Helm, the label can be configured using Helm values:\n\n```yaml\n# values.yaml\npodLabels:\n azure.workload.identity/use: \"true\"\n```\n\nIf successful, the cert-manager Pod will have some new environment variables set,\nand the Azure workload-identity ServiceAccount token as a projected volume:\n\n```bash\nkubectl describe pod -n cert-manager -l app.kubernetes.io/component=controller\n```\n\n```terminal\nContainers:\n ...\n cert-manager-controller:\n ...\n Environment:\n ...\n AZURE_CLIENT_ID:\n AZURE_TENANT_ID: f99bd6a4-665c-41cf-aff1-87a89d5c62d4\n AZURE_FEDERATED_TOKEN_FILE: /var/run/secrets/azure/tokens/azure-identity-token\n AZURE_AUTHORITY_HOST: https://login.microsoftonline.com/\n Mounts:\n /var/run/secrets/azure/tokens from azure-identity-token (ro)\nVolumes:\n ...\n azure-identity-token:\n Type: Projected (a volume that contains injected data from multiple sources)\n TokenExpirationSeconds: 3600\n```\n\n> 📖 Read about [the role of the Mutating Admission Webhook](https://azure.github.io/azure-workload-identity/docs/installation/mutating-admission-webhook.html) in Azure AD Workload Identity for Kubernetes.\n\n### Create a Managed Identity\n\nIn order for cert-manager to use the Azure API and manipulate the records in the Azure DNS zone,\nit needs an Azure account and the best type of account to use is called a \"Managed Identity\".\nThis account does not come with a password or an API key and it is designed for use by machines rather than humans.\n\nChoose a managed identity name and create the Managed Identity:\n\n```bash\nexport IDENTITY_NAME=cert-manager\nexport IDENTITY_RESOURCE_GROUP= # ❗ Replace with your Azure resource group\naz identity create --name \"${IDENTITY_NAME}\" --resource-group \"${IDENTITY_RESOURCE_GROUP}\"\n```\n\nGrant it permission to modify the DNS zone records:\n\n```bash\nexport IDENTITY_CLIENT_ID=$(az identity show --name \"${IDENTITY_NAME}\" --resource-group \"${IDENTITY_RESOURCE_GROUP}\" --query 'clientId' -o tsv)\naz role assignment create \\\n --role \"DNS Zone Contributor\" \\\n --assignee $IDENTITY_CLIENT_ID \\\n --scope $(az network dns zone show --name $DOMAIN_NAME -o tsv --query id)\n```\n\n> 📖 Read [What are managed identities for Azure resources?](https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview)\n> for an overview of managed identities and their uses.\n>\n> 📖 Read [Azure built-in roles](https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles) to learn about the \"DNS Zone Contributor\" role.\n>\n> 📖 Read more about [the `az identity` command](https://learn.microsoft.com/en-us/cli/azure/identity).\n\n### Add a Federated Identity\n\nNow associate a federated identity with the managed identity that you created earlier.\ncert-manager will authenticate to Azure using a short lived Kubernetes ServiceAccount token,\nand it will be able to impersonate the managed identity that you created in the previous step.\n\n```bash\nexport SERVICE_ACCOUNT_NAME=cert-manager # ℹ️ This is the default Kubernetes ServiceAccount used by the cert-manager controller.\nexport SERVICE_ACCOUNT_NAMESPACE=cert-manager # ℹ️ This is the default namespace for cert-manager.\nexport SERVICE_ACCOUNT_ISSUER=$(az aks show --resource-group $AZURE_DEFAULTS_GROUP --name $CLUSTER --query \"oidcIssuerProfile.issuerUrl\" -o tsv)\naz identity federated-credential create \\\n --name \"cert-manager\" \\\n --identity-name \"${IDENTITY_NAME}\" \\\n --resource-group \"${IDENTITY_RESOURCE_GROUP}\" \\\n --issuer \"${SERVICE_ACCOUNT_ISSUER}\" \\\n --subject \"system:serviceaccount:${SERVICE_ACCOUNT_NAMESPACE}:${SERVICE_ACCOUNT_NAME}\"\n```\n\n- `--subject`: is the distinguishing name of the Kubernetes ServiceAccount.\n- `--issuer`: is a URL from which the Azure will download the JWT signing certificate and other metadata\n\n> 📖 Read about [Workload identity federation](https://learn.microsoft.com/en-us/azure/active-directory/develop/workload-identity-federation) in the Microsoft identity platform documentation.\n>\n> 📖 Read more about [the `az identity federated-credential` command](https://learn.microsoft.com/en-us/cli/azure/identity/federated-credential).\n\n### Configure a ClusterIssuer\n\nFor example:\n\n```yaml\napiVersion: cert-manager.io/v1\nkind: ClusterIssuer\nmetadata:\n name: letsencrypt-staging\nspec:\n acme:\n server: https://acme-staging-v02.api.letsencrypt.org/directory\n email: $EMAIL_ADDRESS\n privateKeySecretRef:\n name: letsencrypt-staging\n solvers:\n - dns01:\n azureDNS:\n hostedZoneName: $AZURE_ZONE_NAME\n resourceGroupName: $AZURE_RESOURCE_GROUP\n subscriptionID: $AZURE_SUBSCRIPTION_ID\n environment: AzurePublicCloud\n managedIdentity:\n # client ID of the managed identity; overrides AZURE_CLIENT_ID from the environment\n clientID: $IDENTITY_CLIENT_ID\n # # optional: tenant ID of the managed identity; overrides AZURE_TENANT_ID from the environment.\n # tenantID: $IDENTITY_TENANT_ID\n```\n\n> ℹ️ `managedIdentity.clientID` and `managedIdentity.tenantID` override the values that the Azure Workload Identity webhook injects via environment variables (`AZURE_CLIENT_ID` and `AZURE_TENANT_ID`).\n\nThe following variables need to be filled in.\n\n```bash\n# An email address to which Let's Encrypt will send renewal reminders.\nexport EMAIL_ADDRESS=\n# The Azure DNS zone in which the DNS-01 records will be created and deleted.\nexport AZURE_ZONE_NAME=\n# The Azure resource group containing the DNS zone.\nexport AZURE_RESOURCE_GROUP=\n# The Azure billing account name and ID for the DNS zone.\nexport AZURE_SUBSCRIPTION=\nexport AZURE_SUBSCRIPTION_ID=$(az account show --name $AZURE_SUBSCRIPTION --query 'id' -o tsv)\n```\n\n#### ⚠️ Using 'Ambient Credentials' with ClusterIssuer and Issuer resources\n\nThis authentication method is an example of what cert-manager calls 'ambient credentials'.\nAmbient credentials are enabled by default for ClusterIssuer resources, but disabled by default for Issuer resources.\nThis is to prevent unprivileged users, who have permission to create Issuer resources, from issuing certificates using credentials that cert-manager incidentally has access to.\nClusterIssuer resources are cluster scoped (not namespaced) and only platform administrators should be granted permission to create them.\n\nIf you are using this authentication mechanism and ambient credentials are not enabled, you will see this error:\n\n```bash\nerror instantiating azuredns challenge solver: ClientID was omitted without providing one of `--cluster-issuer-ambient-credentials` or `--issuer-ambient-credentials`. These are necessary to enable Azure Managed Identities\n```\n\n> ⚠️ It is possible (but not recommended) to enable this authentication mechanism for `Issuer` resources, by setting the `--issuer-ambient-credentials` flag on the cert-manager controller to true.\n\n## Managed Identity Using AAD Pod Identities\n\n> ⚠️ The [open source Azure AD pod-managed identity (preview) in Azure Kubernetes Service has been deprecated as of 10/24/2022](https://github.com/Azure/aad-pod-identity#-announcement).\n> Use Workload Identity instead.\n\n[AAD Pod Identities](https://azure.github.io/aad-pod-identity) allows assigning a [Managed Identity](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview) to a pod. This removes the need for adding explicit credentials into the cluster to create the required DNS records.\n\n> Note: When using Pod identity, even though assigning multiple identities to a single pod is allowed, currently cert-manager does not support this as it is not able to identify which identity to use.\n\nFirstly an identity should be created that has access to contribute to the DNS Zone.\n\n- Example creation using `azure-cli` and `jq`:\n\n```bash\n# Choose a unique Identity name and existing resource group to create identity in.\nIDENTITY=$(az identity create --name $IDENTITY_NAME --resource-group $IDENTITY_GROUP --output json)\n\n# Gets principalId to use for role assignment\nPRINCIPAL_ID=$(echo $IDENTITY | jq -r '.principalId')\n\n# Used for identity binding\nCLIENT_ID=$(echo $IDENTITY | jq -r '.clientId')\nRESOURCE_ID=$(echo $IDENTITY | jq -r '.id')\n\n# Get existing DNS Zone Id\nZONE_ID=$(az network dns zone show --name $ZONE_NAME --resource-group $ZONE_GROUP --query \"id\" -o tsv)\n\n# Create role assignment\naz role assignment create --role \"DNS Zone Contributor\" --assignee $PRINCIPAL_ID --scope $ZONE_ID\n```\n\n- Example creation using Terraform\n\n```terraform\nvariable resource_group_name {}\nvariable location {}\nvariable dns_zone_id {}\n\n# Creates Identity\nresource \"azurerm_user_assigned_identity\" \"dns_identity\" {\n name = \"cert-manager-dns01\"\n resource_group_name = var.resource_group_name\n location = var.location\n}\n\n# Creates Role Assignment\nresource \"azurerm_role_assignment\" \"dns_contributor\" {\n scope = var.dns_zone_id\n role_definition_name = \"DNS Zone Contributor\"\n principal_id = azurerm_user_assigned_identity.dns_identity.principal_id\n}\n\n# Client Id Used for identity binding\noutput \"identity_client_id\" {\n value = azurerm_user_assigned_identity.dns_identity.client_id\n}\n\n# Resource Id Used for identity binding\noutput \"identity_resource_id\" {\n value = azurerm_user_assigned_identity.dns_identity.id\n}\n```\n\nNext we need to ensure we have installed [AAD Pod Identity](https://azure.github.io/aad-pod-identity) using their walk-through. This will install the CRDs and deployment required to assign the identity.\n\nNow we can create the identity resource and binding using the below manifest as an example:\n\n```yaml\napiVersion: \"aadpodidentity.k8s.io/v1\"\nkind: AzureIdentity\nmetadata:\n annotations:\n # recommended to use namespaced identities https://azure.github.io/aad-pod-identity/docs/configure/match_pods_in_namespace/\n aadpodidentity.k8s.io/Behavior: namespaced\n name: certman-identity\n namespace: cert-manager # change to your preferred namespace\nspec:\n type: 0 # MSI\n resourceID: # Resource Id From Previous step\n clientID: # Client Id from previous step\n---\napiVersion: \"aadpodidentity.k8s.io/v1\"\nkind: AzureIdentityBinding\nmetadata:\n name: certman-id-binding\n namespace: cert-manager # change to your preferred namespace\nspec:\n azureIdentity: certman-identity\n selector: certman-label # This is the label that needs to be set on cert-manager pods\n```\n\nNext we need to ensure the cert-manager pod has a relevant label to use the pod identity binding. This can be done by editing the deployment and adding the below into the `.spec.template.metadata.labels` field\n\n```yaml\nspec:\n template:\n metadata:\n labels:\n aadpodidbinding: certman-label # must match selector in AzureIdentityBinding\n```\n\nOr by using the helm values `podLabels`\n\n```yaml\npodLabels:\n aadpodidbinding: certman-label\n```\n\nLastly when we create the certificate issuer we only need to specify the `hostedZoneName`, `resourceGroupName` and `subscriptionID` fields for the DNS zone. Example below:\n\n```yaml\napiVersion: cert-manager.io/v1\nkind: Issuer\nmetadata:\n name: example-issuer\nspec:\n acme:\n ...\n solvers:\n - dns01:\n azureDNS:\n subscriptionID: AZURE_SUBSCRIPTION_ID\n resourceGroupName: AZURE_DNS_ZONE_RESOURCE_GROUP\n hostedZoneName: AZURE_DNS_ZONE\n # Azure Cloud Environment, default to AzurePublicCloud\n environment: AzurePublicCloud\n```\n\nThis authentication mechanism is what cert-manager considers 'ambient credentials'. Use of ambient credentials is disabled by default for cert-manager `Issuer`s. This to ensure unprivileged users who have permission to create issuers cannot issue certificates using any credentials cert-manager incidentally has access to. To enable this authentication mechanism for `Issuer`s, you will need to set `--issuer-ambient-credentials` flag on cert-manager controller to true. (There is a corresponding `--cluster-issuer-ambient-credentials` flag which is set to `true` by default).\n\nIf you are using this authentication mechanism and ambient credentials are not enabled, you will see this error:\n\n```bash\nerror instantiating azuredns challenge solver: ClientID was omitted without providing one of `--cluster-issuer-ambient-credentials` or `--issuer-ambient-credentials`. These are necessary to enable Azure Managed Identities\n```\n\n## Managed Identity Using AKS Kubelet Identity\n\nWhen creating an AKS cluster in Azure there is the option to use a managed identity that is assigned to the kubelet. This identity is assigned to the underlying node pool in the AKS cluster and can then be used by the cert-manager pods to authenticate to Azure Active Directory.\n\nThere are some caveats with this approach, these mainly being:\n\n- Any permissions granted to this identity will also be accessible to all containers running inside the Kubernetes cluster.\n- Using AKS extensions like `Kube Dashboard`, `Virtual Node`, or `HTTP Application Routing` (see full list [here](https://docs.microsoft.com/en-us/azure/aks/use-managed-identity#summary-of-managed-identities)) will create additional identities that are assigned to your node pools. If your node pools have more than one identity assigned, you will need to specify either `clientID` or `resourceID` to select the correct one.\n\nTo set this up, firstly you will need to retrieve the identity that the kubelet is using by querying the AKS cluster. This can then be used to create the appropriate permissions in the DNS zone.\n\n- Example commands using `azure-cli`:\n\n```bash\n# Get AKS Kubelet Identity\nPRINCIPAL_ID=$(az aks show -n $CLUSTERNAME -g $CLUSTER_GROUP --query \"identityProfile.kubeletidentity.objectId\" -o tsv)\n\n# Get existing DNS Zone Id\nZONE_ID=$(az network dns zone show --name $ZONE_NAME --resource-group $ZONE_GROUP --query \"id\" -o tsv)\n\n# Create role assignment\naz role assignment create --role \"DNS Zone Contributor\" --assignee $PRINCIPAL_ID --scope $ZONE_ID\n```\n\n- Example terraform:\n\n```terraform\nvariable dns_zone_id {}\n\n# Creating the AKS cluster, abbreviated.\nresource \"azurerm_kubernetes_cluster\" \"cluster\" {\n ...\n # Creates Identity associated to kubelet\n identity {\n type = \"SystemAssigned\"\n }\n ...\n}\n\nresource \"azurerm_role_assignment\" \"dns_contributor\" {\n scope = var.dns_zone_id\n role_definition_name = \"DNS Zone Contributor\"\n principal_id = azurerm_kubernetes_cluster.cluster.kubelet_identity[0].object_id\n skip_service_principal_aad_check = true # Allows skipping propagation of identity to ensure assignment succeeds.\n}\n```\n\nThen when creating the cert-manager issuer we need to specify the `hostedZoneName`, `resourceGroupName` and `subscriptionID` fields for the DNS Zone.\n\nWe also need to specify `managedIdentity.clientID` or `managedIdentity.resourceID` if multiple managed identities are assigned to the node pools.\n\nThe value for `managedIdentity.clientID` can be fetched by running this command:\n\n```bash\naz aks show -n $CLUSTERNAME -g $CLUSTER_GROUP --query \"identityProfile.kubeletidentity.clientId\" -o tsv\n```\n\nExample below:\n\n```yaml\napiVersion: cert-manager.io/v1\nkind: Issuer\nmetadata:\n name: example-issuer\nspec:\n acme:\n ...\n solvers:\n - dns01:\n azureDNS:\n subscriptionID: AZURE_SUBSCRIPTION_ID\n resourceGroupName: AZURE_DNS_ZONE_RESOURCE_GROUP\n hostedZoneName: AZURE_DNS_ZONE\n # Azure Cloud Environment, default to AzurePublicCloud\n environment: AzurePublicCloud\n # optional, only required if node pools have more than 1 managed identity assigned\n managedIdentity:\n # client id of the node pool managed identity (can not be set at the same time as resourceID)\n clientID: YOUR_MANAGED_IDENTITY_CLIENT_ID\n # resource id of the managed identity (can not be set at the same time as clientID)\n # resourceID: YOUR_MANAGED_IDENTITY_RESOURCE_ID\n```\n\n## Service Principal\n\nConfiguring the AzureDNS DNS01 Challenge for a Kubernetes cluster requires\ncreating a service principal in Azure.\n\nTo create the service principal you can use the following script (requires\n`azure-cli` and `jq`):\n\n```bash\n# Choose a name for the service principal that contacts azure DNS to present the challenge.\nAZURE_CERT_MANAGER_NEW_SP_NAME=NEW_SERVICE_PRINCIPAL_NAME\n# This is the name of the resource group that you have your dns zone in.\nAZURE_DNS_ZONE_RESOURCE_GROUP=AZURE_DNS_ZONE_RESOURCE_GROUP\n# The DNS zone name. It should be something like domain.com or sub.domain.com.\nAZURE_DNS_ZONE=AZURE_DNS_ZONE\n\nDNS_SP=$(az ad sp create-for-rbac --name $AZURE_CERT_MANAGER_NEW_SP_NAME --output json)\nAZURE_CERT_MANAGER_SP_APP_ID=$(echo $DNS_SP | jq -r '.appId')\nAZURE_CERT_MANAGER_SP_PASSWORD=$(echo $DNS_SP | jq -r '.password')\nAZURE_TENANT_ID=$(echo $DNS_SP | jq -r '.tenant')\nAZURE_SUBSCRIPTION_ID=$(az account show --output json | jq -r '.id')\n```\n\nFor security purposes, it is appropriate to utilize RBAC to ensure that you\nproperly maintain access control to your resources in Azure. The service\nprincipal that is generated by this tutorial has fine-grained access to ONLY the\nDNS Zone in the specific resource group specified. It requires this permission\nso that it can read/write the \\_acme\\_challenge TXT records to the zone.\n\nLower the Permissions of the service principal.\n\n```bash\naz role assignment delete --assignee $AZURE_CERT_MANAGER_SP_APP_ID --role Contributor\n```\n\nGive Access to DNS Zone.\n\n```bash\nDNS_ID=$(az network dns zone show --name $AZURE_DNS_ZONE --resource-group $AZURE_DNS_ZONE_RESOURCE_GROUP --query \"id\" --output tsv)\naz role assignment create --assignee $AZURE_CERT_MANAGER_SP_APP_ID --role \"DNS Zone Contributor\" --scope $DNS_ID\n```\n\nCheck Permissions. As the result of the following command, we would like to see just one object in the permissions array with \"DNS Zone Contributor\" role.\n\n```bash\naz role assignment list --all --assignee $AZURE_CERT_MANAGER_SP_APP_ID\n```\n\nA secret containing service principal password should be created on Kubernetes to facilitate presenting the challenge to Azure DNS. You can create the secret with the following command:\n\n```bash\nkubectl create secret generic azuredns-config --from-literal=client-secret=$AZURE_CERT_MANAGER_SP_PASSWORD\n```\n\nGet the variables for configuring the issuer.\n\n```bash\necho \"AZURE_CERT_MANAGER_SP_APP_ID: $AZURE_CERT_MANAGER_SP_APP_ID\"\necho \"AZURE_CERT_MANAGER_SP_PASSWORD: $AZURE_CERT_MANAGER_SP_PASSWORD\"\necho \"AZURE_SUBSCRIPTION_ID: $AZURE_SUBSCRIPTION_ID\"\necho \"AZURE_TENANT_ID: $AZURE_TENANT_ID\"\necho \"AZURE_DNS_ZONE: $AZURE_DNS_ZONE\"\necho \"AZURE_DNS_ZONE_RESOURCE_GROUP: $AZURE_DNS_ZONE_RESOURCE_GROUP\"\n```\n\nTo configure the issuer, substitute the capital cased variables with the values\nfrom the previous script. You can get the subscription id from the Azure portal.\n\n```yaml\napiVersion: cert-manager.io/v1\nkind: Issuer\nmetadata:\n name: example-issuer\nspec:\n acme:\n ...\n solvers:\n - dns01:\n azureDNS:\n clientID: AZURE_CERT_MANAGER_SP_APP_ID\n clientSecretSecretRef:\n # The following is the secret we created in Kubernetes. Issuer will use this to present challenge to Azure DNS.\n name: azuredns-config\n key: client-secret\n subscriptionID: AZURE_SUBSCRIPTION_ID\n tenantID: AZURE_TENANT_ID\n resourceGroupName: AZURE_DNS_ZONE_RESOURCE_GROUP\n hostedZoneName: AZURE_DNS_ZONE\n # Azure Cloud Environment, default to AzurePublicCloud\n environment: AzurePublicCloud\n```", "project": "cert-manager-website", "source": "content/docs/configuration/acme/dns01/azuredns.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "The following list contains all known cert-manager issuer integrations.\n\n| Tier | Controller | Docs | Issuer | cert-manager version used in tutorial[^1] | Released within 12 months[^2] | Is Open Source |\n|------|-----------------------------|-------------------------------------|------------------------------------------------------------------------|---------------------------------------------------|--------------------------------------|----------------|\n| 🥇 | acme-issuer (in-tree) | [📄][config:acme-issuer] | [ACME][ca:acme] | [latest][production:acme-issuer] | [✔️][release:cert-manager] | ✔️ |\n| 🥇 | venafi-enhanced-issuer | [📄][config:venafi-enhanced-issuer] | [CyberArk Certificate Manager][ca:venafi-enhanced-issuer] | [v1.12.1][production:venafi-enhanced-issuer] | [✔️][release:venafi-enhanced-issuer] | ❌ |\n| 🥇 | origin-ca-issuer | [📄][config:origin-ca-issuer] | [Cloudflare Origin CA][ca:origin-ca-issuer] | [supported][production:origin-ca-issuer] | [✔️][release:origin-ca-issuer] | ✔️ |\n| 🥈 | adcs-issuer | [📄][config:adcs-issuer] | [Microsoft Active Directory Certificate Service][ca:adcs-issuer] | - | [✔️][release:adcs-issuer] | ✔️ |\n| 🥈 | akeyless-issuer | [📄][config:akeyless-issuer] | [Akeyless PKI][ca:akeyless-issuer] | - | [✔️][release:akeyless-issuer] | ✔️ |\n| 🥈 | aws-privateca-issuer | [📄][config:aws-privateca-issuer] | [AWS Private Certificate Authority][ca:aws-privateca-issuer] | - | [✔️][release:aws-privateca-issuer] | ✔️ |\n| 🥈 | ca-issuer (in-tree) | [📄][config:ca-issuer] | CA issuer | - | [✔️][release:cert-manager] | ✔️ |\n| 🥈 | czertainly-issuer | [📄][config:czertainly-issuer] | [CZERTAINLY][ca:czertainly-issuer] | [supported][production:czertainly-issuer] | [✔️][release:czertainly-issuer] | ✔️ |\n| 🥈 | command-issuer | [📄][config:command-issuer] | [Keyfactor Command][ca:command-issuer] | - | [✔️][release:command-issuer] | ✔️ |\n| 🥈 | cview-issuer | [📄][config:cview-issuer] | [CView-issuer][ca:cview-issuer] | - | [✔️][release:cview-issuer] | ❌ |\n| 🥈 | digi-issuer | [📄][config:digi-issuer] | [DigiCert][ca:digi-issuer] | - | [✔️][release:digi-issuer] | ✔️ |\n| 🥈 | ejbca-issuer | [📄][config:ejbca-issuer] | [EJBCA][ca:ejbca-issuer] | - | [✔️][release:ejbca-issuer] | ✔️ |\n| 🥈 | google-cas-issuer | [📄][config:google-cas-issuer] | [Google Cloud Certificate Authority Service][ca:google-cas-issuer] | - | [✔️][release:google-cas-issuer] | ✔️ |\n| 🥈 | gs-atlas-issuer | [📄][config:gs-atlas-issuer] | [GlobalSign CA][ca:gs-atlas-issuer] | - | [✔️][release:gs-atlas-issuer] | ✔️ |\n| 🥈 | horizon-issuer | [📄][config:horizon-issuer] | [EVERTRUST Horizon][ca:horizon-issuer] | - | [✔️][release:horizon-issuer] | ✔️ |\n| 🥈 | ncm-issuer | [📄][config:ncm-issuer] | [Nokia Netguard Certificate Manager][ca:ncm-issuer] | - | [✔️][release:ncm-issuer] | ✔️ |\n| 🥈 | selfsigned-issuer (in-tree) | [📄][config:selfsigned-issuer] | Self-Signed issuer | - | [✔️][release:cert-manager] | ✔️ |\n| 🥈 | step-issuer | [📄][config:step-issuer] | [Certificate Authority server][ca:step-issuer] | - | [✔️][release:step-issuer] | ✔️ |\n| 🥈 | vault-issuer (in-tree) | [📄][config:vault-issuer] | [HashiCorp Vault][ca:vault-issuer] | - | [✔️][release:cert-manager] | ✔️ |\n| 🥈 | venafi-issuer (in-tree) | [📄][config:venafi-issuer] | [Venafi TLS Protect][ca:venafi-issuer] | - | [✔️][release:cert-manager] | ✔️ |\n| 🥈 | cfssl-issuer | [📄][config:cfssl-issuer] | [CFSSL][ca:cfssl-issuer] | - | [✔️][release:cfssl-issuer] | ✔️ |\n| 🥈 | cfmtls-issuer | [📄][config:cfmtls-issuer] | [CFMTLS][ca:cfmtls-issuer] | - | [✔️][release:cfmtls-issuer] | ✔️ |\n| 🥈 | zerossl-issuer | [📄][config:zerossl-issuer] | [ZeroSSL][ca:zerossl-issuer] | - | [✔️][release:zerossl-issuer] | ✔️ |\n| 🥉 | tcs-issuer | [📄][config:tcs-issuer] | [Intel's SGX technology][ca:tcs-issuer] | - | [❌][release:tcs-issuer] | ✔️ |\n| 🥉 | freeipa-issuer | [📄][config:freeipa-issuer] | [FreeIPA][ca:freeipa-issuer] | - | [❌][release:freeipa-issuer] | ✔️ |\n| 🥉 | kms-issuer | [📄][config:kms-issuer] | [AWS KMS][ca:kms-issuer] | - | [❌][release:kms-issuer] | ✔️ |\n| 🥉 | keyvault-issuer | [📄][config:keyvault-issuer] | [Azure Key Vault][ca:keyvault-issuer] | - | [❌][release:keyvault-issuer] | ✔️ |\n\n[production:venafi-enhanced-issuer]: https://docs.venafi.cloud/vaas/k8s-components/c-vei-overview/\n[production:acme-issuer]: ../tutorials/getting-started-aks-letsencrypt/README.md\n[production:origin-ca-issuer]: https://github.com/cloudflare/origin-ca-issuer/blob/trunk/README.org\n[production:czertainly-issuer]: https://docs.czertainly.com/docs/certificate-key/integration-guides/cert-manager-issuer/overview\n\n[//]: # (Configuration docs)\n\n[config:venafi-enhanced-issuer]: https://docs.venafi.cloud/vaas/k8s-components/t-vei-install/\n[config:acme-issuer]: ./acme/README.md\n[config:aws-privateca-issuer]: https://github.com/cert-manager/aws-privateca-issuer\n[config:selfsigned-issuer]: ./selfsigned.md\n[config:ca-issuer]: ./ca.md\n[config:vault-issuer]: ./vault.md\n[config:venafi-issuer]: ./venafi.md\n[config:step-issuer]: https://github.com/smallstep/step-issuer\n[config:origin-ca-issuer]: https://github.com/cloudflare/origin-ca-issuer\n[config:ncm-issuer]: https://github.com/nokia/ncm-issuer\n[config:tcs-issuer]: https://github.com/intel/trusted-certificate-issuer\n[config:google-cas-issuer]: https://github.com/cert-manager/google-cas-issuer\n[config:gs-atlas-issuer]: https://github.com/globalsign/atlas-cert-manager\n[config:ejbca-issuer]: https://github.com/Keyfactor/ejbca-cert-manager-issuer\n[config:command-issuer]: https://github.com/Keyfactor/command-cert-manager-issuer\n[config:horizon-issuer]: https://github.com/evertrust/horizon-issuer\n[config:kms-issuer]: https://github.com/Skyscanner/kms-issuer\n[config:freeipa-issuer]: https://github.com/guilhem/freeipa-issuer\n[config:adcs-issuer]: https://djkormo.github.io/adcs-issuer/\n[config:akeyless-issuer]: https://github.com/akeyless-community/akeyless-cert-manager-issuer\n[config:cfssl-issuer]: https://gerrit.wikimedia.org/r/plugins/gitiles/operations/software/cfssl-issuer\n[config:cfmtls-issuer]: https://github.com/k8stooling/cfmtls-issuer\n[config:zerossl-issuer]: https://github.com/topfreegames/zerossl-issuer\n[config:cview-issuer]: https://secure-ly.github.io/cview-issuer-chart\n[config:czertainly-issuer]: https://docs.czertainly.com/docs/certificate-key/integration-guides/cert-manager-issuer/create-czertainly-issuer\n[config:keyvault-issuer]: https://github.com/gonicus/azure-keyvault-issuer\n[config:digi-issuer]: https://github.com/digicert/digi-issuer\n\n[//]: # (CA docs)\n\n[ca:acme]: https://datatracker.ietf.org/doc/html/rfc8555\n[ca:venafi-enhanced-issuer]: https://www.cyberark.com/products/certificate-manager/\n[ca:adcs-issuer]: https://docs.microsoft.com/en-us/windows-server/networking/core-network-guide/cncg/server-certs/install-the-certification-authority\n[ca:akeyless-issuer]: https://docs.akeyless.io/docs/ssh-and-pkitls-certificates\n[ca:aws-privateca-issuer]: https://aws.amazon.com/certificate-manager/private-certificate-authority/\n[ca:command-issuer]: https://www.keyfactor.com/products/command/\n[ca:ejbca-issuer]: https://www.ejbca.org/\n[ca:google-cas-issuer]: https://cloud.google.com/certificate-authority-service/\n[ca:gs-atlas-issuer]: https://www.globalsign.com/en/atlas\n[ca:horizon-issuer]: https://evertrust.fr/horizon\n[ca:ncm-issuer]: https://www.nokia.com/networks/security-portfolio/netguard/certificate-manager\n[ca:step-issuer]: https://github.com/smallstep/certificates\n[ca:tcs-issuer]: https://www.intel.com/content/www/us/en/developer/tools/software-guard-extensions/overview.html\n[ca:vault-issuer]: https://www.vaultproject.io/\n[ca:venafi-issuer]: https://www.cyberark.com/products/certificate-manager/\n[ca:cfssl-issuer]: https://github.com/cloudflare/cfssl\n[ca:cfmtls-issuer]: https://developers.cloudflare.com/ssl/client-certificates/create-a-client-certificate/\n[ca:zerossl-issuer]: https://zerossl.com/\n[ca:freeipa-issuer]: https://www.freeipa.org\n[ca:kms-issuer]: https://aws.amazon.com/kms/\n[ca:origin-ca-issuer]: https://developers.cloudflare.com/ssl/origin-configuration/origin-ca\n[ca:cview-issuer]: https://secure-ly.github.io/cview-issuer-chart\n[ca:czertainly-issuer]: https://www.czertainly.com\n[ca:keyvault-issuer]: https://learn.microsoft.com/en-us/azure/key-vault/keys/about-keys\n[ca:digi-issuer]: https://www.digicert.com/\n\n[//]: # (Release pages)\n\n[release:venafi-enhanced-issuer]: https://docs.venafi.cloud/vaas/k8s-components/c-vei-releases/\n[release:cert-manager]: ../releases/README.md\n[release:aws-privateca-issuer]: https://github.com/cert-manager/aws-privateca-issuer/releases\n[release:step-issuer]: https://github.com/smallstep/step-issuer/releases\n[release:origin-ca-issuer]: https://github.com/cloudflare/origin-ca-issuer/releases\n[release:ncm-issuer]: https://github.com/nokia/ncm-issuer/releases\n[release:tcs-issuer]: https://github.com/intel/trusted-certificate-issuer/releases\n[release:google-cas-issuer]: https://github.com/cert-manager/google-cas-issuer\n[release:gs-atlas-issuer]: https://github.com/globalsign/atlas-cert-manager/releases\n[release:ejbca-issuer]: https://github.com/Keyfactor/ejbca-cert-manager-issuer/tags\n[release:command-issuer]: https://github.com/Keyfactor/command-cert-manager-issuer/releases\n[release:horizon-issuer]: https://github.com/evertrust/horizon-issuer/releases\n[release:kms-issuer]: https://github.com/Skyscanner/kms-issuer/releases\n[release:freeipa-issuer]: https://github.com/guilhem/freeipa-issuer/releases\n[release:adcs-issuer]: https://github.com/djkormo/adcs-issuer/releases\n[release:akeyless-issuer]: https://github.com/akeyless-community/akeyless-cert-manager-issuer/releases\n[release:cfssl-issuer]: https://gerrit.wikimedia.org/r/plugins/gitiles/operations/software/cfssl-issuer/+refs\n[release:cfmtls-issuer]: https://github.com/k8stooling/cfmtls-issuer/releases/\n[release:zerossl-issuer]: https://github.com/topfreegames/zerossl-issuer/releases\n[release:cview-issuer]: https://github.com/secure-ly/cview-issuer-chart/releases\n[release:czertainly-issuer]: https://github.com/CZERTAINLY/CZERTAINLY-Cert-Manager-Issuer/releases\n[release:keyvault-issuer]: https://github.com/gonicus/azure-keyvault-issuer/releases\n[release:digi-issuer]: https://github.com/digicert/digi-issuer/releases\n\n- The issuers are sorted by their tier and then alphabetically.\n- \"in-tree\" issuers are issuers that are shipped with cert-manager itself.\n- These issuers are known to support and honor [approval](https://cert-manager.io/docs/concepts/certificaterequest/#approval).\n\nIf you've created an issuer which you'd like to share,\n[raise a Pull Request](https://github.com/cert-manager/website/pulls) to have it added here!\n\n## Issuer Tier system\n\nThe cert-manager project has a tier system for issuers. This is to help users\nunderstand the maturity of the issuer.\nThe tiers are 🥇, 🥈 and 🥉.\n\nNOTE: The cert-manager maintainers can decide to change the criteria and number\nof tiers at any time.\n\n### 🥇 Tier (Production-ready)\n\n- The issuer has an end-to-end tutorial on how to set it up with cert-manager for use in production.\nAt the time of checking[^1], the used cert-manager version has to be still supported (see [Supported Releases](../releases/README.md)).\nAn end-to-end tutorial must include:\n 1. a short explanation on how to install cert-manager (including the used version and a link to [https://cert-manager.io/docs/installation/](../installation/))\n 2. all required steps to install the issuer\n 3. an explanation on how to configure the issuer's Custom Resources\n 4. an explanation on how to issue a certificate using the issuer (using a Certificate resource)\n\n### 🥈 Tier (Maintained)\n\n- The issuer has had a release in the last 12 months (at the time of checking all issuers[^2]).\n\n### 🥉 Tier (Unmaintained)\n\nOther\n\n[^1]: checked on 3rd of October 2024\n[^2]: checked on 3rd of October 2024\n\n## Building New External Issuers\n\nIf you're interested in building a new external issuer, check the [development documentation](../contributing/external-issuers.md).", "project": "cert-manager-website", "source": "content/docs/configuration/issuers.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "cert-manager aims to abide by the same API compatibility policy as upstream Kubernetes APIs as documented in the [Kubernetes Deprecation Policy](https://kubernetes.io/docs/reference/using-api/deprecation-policy/#deprecating-parts-of-the-api).\n\nThis is to ensure a smooth upgrade and downgrade experience for users, i.e to make sure that users' cert-manager custom resources keep functioning in the same way\nafter an upgrade or downgrade of cert-manager.\n\nIn some cases, we may need to require users to take actions before upgrading or may need to diverge from the API compatibility promise but we'll treat this as an absolute\nlast resort. In general the main criteria by which we'd determine whether a change is acceptable would be user value.\n\nHere are the breaking changes we have made to the `v1` API:\n* [cert-manger 1.18](../releases/release-notes/release-notes-1.18.md): The default value of `Certificate.Spec.PrivateKey.RotationPolicy` changed from `Never` to `Always`.\n\n## Alpha / Beta API Versions\n\nAs in upstream Kubernetes, We don't commit to preserving alpha or beta API versions indefinitely.\n\nIn cert-manager v1.7 [all alpha and beta API versions prior to `v1` were removed](https://github.com/cert-manager/cert-manager/pull/4635).\n\nNB: The Kubernetes deprecation policy notes that API removal introduces an issue with objects stored at the removed versions. To fix this, we wrote a [custom tool](https://cert-manager.io/docs/releases/upgrading/remove-deprecated-apis/) that users could run once to migrate their resources.", "project": "cert-manager-website", "source": "content/docs/contributing/api-compatibility.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "cert-manager, like most Go projects, delegates almost all stylistic choices to `gofmt`,\nwith `goimports` on top for organizing imports. Broadly speaking, if you set your editor to run\n`goimports` when you save a file, your code will be stylistically correct.\n\ncert-manager generally also follows the Kubernetes\n[coding conventions](https://www.kubernetes.dev/docs/guide/coding-convention/) and the Google\n[Go code review comments](https://github.com/golang/go/wiki/CodeReviewComments).\n\n## Organizing Imports\n\nImports should be organized into 3 blocks, with each block separated by two newlines:\n\n```go\nimport (\n \"stdlib\"\n\n \"external\"\n\n \"internal\"\n)\n```\n\nAn example might be the following, taken from\n[`pkg/acme/accounts/client.go`](https://github.com/cert-manager/cert-manager/blob/0c71fe7795858b96cabcddabf706d997cd2fba3f/pkg/acme/accounts/client.go):\n\n```go\nimport (\n \"crypto/rsa\"\n \"crypto/tls\"\n \"net\"\n \"net/http\"\n \"time\"\n\n acmeapi \"golang.org/x/crypto/acme\"\n\n acmecl \"github.com/cert-manager/cert-manager/pkg/acme/client\"\n acmeutil \"github.com/cert-manager/cert-manager/pkg/acme/util\"\n cmacme \"github.com/cert-manager/cert-manager/pkg/apis/acme/v1\"\n \"github.com/cert-manager/cert-manager/pkg/metrics\"\n \"github.com/cert-manager/cert-manager/pkg/util\"\n)\n```\n\nOnce this manual split of standard library, external and internal imports has been made, it will be\nenforced automatically by `goimports` when executed in the future.\n\n## UK vs. US spelling\n\nFor the sake of consistency, cert-manager uses en-US spelling for the\ndocumentation in https://cert-manager.io as well as within the cert-manager\ncodebase. A comprehensive list of en-GB → en-US word substitution is available\non Ubuntu's\n[`WordSubstitution`](https://wiki.ubuntu.com/EnglishTranslation/WordSubstitution)\npage.", "project": "cert-manager-website", "source": "content/docs/contributing/coding-conventions.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "**Event**: [ContribFest: Dive Into cert-manager and Start Contributing!](https://kccnceu2026.sched.com/event/2EF7L/contribfest-dive-into-cert-manager-and-start-contributing-richard-wall-mladen-rusev-palo-alto-networks)\n**Date**: Tuesday, March 24, 2026\n**Time**: 16\\:15 - 17\\:30 CET\n**Location**: KubeCon + CloudNativeCon Europe 2026, Amsterdam, Netherlands\n**Presenters**: Richard Wall & Mladen Rusev (Palo Alto Networks)\n\n---\n\nWelcome to the cert-manager ContribFest at KubeCon EU 2026! Whether you're joining us in person in Amsterdam or participating remotely, we're excited to help you make your first contribution to cert-manager.\n\n## Getting Started\n\n📋 **[Good First Issues Shortlist](shortlist.md)** — Curated list of beginner-friendly issues across cert-manager projects\n\n🛠️ **[Setup Guide](setup.md)** — Get your development environment ready (local setup recommended)\n\n📅 **[Session Agenda](agenda.md)** — What to expect during the 75-minute session\n\n## What is ContribFest?\n\nContribFest is an opportunity to join project maintainers and community contributors to explore good first issues, hunt bugs, discuss improvements, and pair program with maintainers to contribute directly to CNCF projects.\n\nAt this year's cert-manager ContribFest, Palo Alto Networks' Richard Wall and Mladen Rusev will be on hand to show users of all experience levels how to get involved with the cert-manager project.\n\n## Join the Community\n\n- **Slack**: Join [Kubernetes Slack](https://slack.k8s.io/) and find us in `#cert-manager-dev`\n- **BlueSky**: [@cert-manager.bsky.social](https://bsky.app/profile/cert-manager.bsky.social)\n- **Mastodon**: [`@CertManager@infosec.exchange`](https://infosec.exchange/@CertManager)\n- **Twitter/X**: [@certmanager](https://twitter.com/certmanager)\n\n## Planning Resources\n\n- **Tracking Issue**: [`cert-manager#8641`](https://github.com/cert-manager/cert-manager/issues/8641)\n- **Planning Board**: [ContribFest KubeCon EU 2026](https://github.com/orgs/cert-manager/projects/10) (maintainers only)\n\n---\n\n**See you at ContribFest! 🎉**", "project": "cert-manager-website", "source": "content/docs/contributing/contribfest-kubecon-eu-2026/README.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "**Event**: [ContribFest: Dive Into cert-manager and Start Contributing!](https://kccnceu2026.sched.com/event/2EF7L/contribfest-dive-into-cert-manager-and-start-contributing-richard-wall-mladen-rusev-palo-alto-networks)\n**Date**: Tuesday, March 24, 2026\n**Time**: 16\\:15 - 17\\:30 CET (75 minutes)\n**Presenters**: Richard Wall & Mladen Rusev (Palo Alto Networks)\n\n---\n\n## Session Goals\n\n### For Maintainers\n- **Grow the contributor base**: Welcome new contributors to the cert-manager community\n- **Get help with backlog issues**: Make progress on good-first-issue backlog\n- **Build community engagement**: Create positive first-contribution experiences\n- **Identify potential new maintainers**: Find contributors who might become long-term participants\n\n### For Attendees\n- **Learn Kubernetes internals hands-on**: See how cert-manager works under the hood\n- **Get a CNCF contribution on resume**: Real contribution to a graduated CNCF project\n- **Network with maintainers**: Direct access to project experts\n- **Gain confidence contributing to open source**: Supportive environment for first-timers\n\n**⚠️ PRESENTER REMINDER**: State these goals clearly during the introduction!\n\n---\n\n## Pre-Session Checklist\n\n### For Maintainers (Before Event)\n\n- [ ] Test Slack #cert-manager-dev channel access (in case attendees need help)\n- [ ] Ensure shortlist gist is publicly accessible\n- [ ] Make GitHub Project public (or keep private and use gist only)\n- [ ] Prepare printed/projected shortlist for in-person reference\n- [ ] Have cert-manager laptop stickers/swag ready (if available)\n\n### For Attendees (Recommended Setup)\n\nWe recommend attendees prepare before the session to maximize hands-on time:\n\n- [ ] Bring laptop with:\n - Git installed and configured\n - GitHub account with SSH/HTTPS access configured\n - Go 1.21+ (for Go issues) or Node.js 20+ (for website issues)\n - Code editor (VS Code, vim, etc.)\n- [ ] Join [Kubernetes Slack](https://slack.k8s.io/) and find `#cert-manager-dev`\n- [ ] Review the [Contributor Guide](https://cert-manager.io/docs/contributing/)\n- [ ] Browse the [good first issues shortlist](shortlist.md)\n\n---\n\n## Session Outline\n\n### 16\\:15 - 16\\:25 | Welcome & Introduction (10 min)\n\n**Presenters introduce themselves and the session:**\n\n- Welcome to ContribFest and cert-manager!\n- Who are we? (Richard & Mladen backgrounds)\n- What is cert-manager?\n - Graduated CNCF project\n - X.509 certificate management for Kubernetes\n - Widely deployed, active community\n- **STATE THE GOALS** (see above)\n - Why we're here as maintainers\n - What attendees will gain from this session\n\n**Quick poll:**\n- Who's used cert-manager in production?\n- Who's contributed to open-source before?\n- Who's here for their first contribution?\n\n---\n\n### 16\\:25 - 16\\:40 | Getting Started (15 min)\n\n**Quick setup check and orientation:**\n\n1. **Environment Check** (5 min)\n - Raise hands: who has Go installed? Node.js? Git configured?\n - Point to setup guide if needed (post link in Slack)\n - Helpers circulate to assist with setup issues\n\n2. **Finding an Issue** (10 min)\n - Walk through the [shortlist](shortlist.md)\n - Explain categories:\n - **No Go Required**: Docs, Helm, YAML (good for beginners)\n - **Go — Well Scoped**: Self-contained Go fixes\n - **Stretch Goals**: Larger features for experienced contributors\n - How to claim an issue:\n - Comment on the GitHub issue: \"I'd like to work on this for ContribFest\"\n - Ask questions in comments or Slack\n - **Live demo**: Walk through one \"No Go Required\" issue from start to PR\n\n---\n\n### 16\\:40 - 17\\:20 | Hands-On Contribution Time (40 min)\n\n**Attendees work on their chosen issues:**\n\n- Maintainers circulate to help with:\n - Choosing an appropriate issue\n - Setting up development environment\n - Understanding the codebase\n - Testing changes\n - Creating pull requests\n\n**Milestones to celebrate:**\n- First repo clone\n- First local build\n- First test run\n- First commit\n- First PR opened\n\n**Slack channel**:\n- Post in `#cert-manager-dev` with questions\n- Tag Richard (`@wallrj`) or Mladen (`@mladen-rusev-cyberark`) for help\n\n**Common questions to address:**\n- \"I'm stuck on Go module errors\" → Point to contributor guide's Go setup\n- \"How do I run tests?\" → Show repo-specific test commands\n- \"Is this change correct?\" → Quick code review on the spot\n- \"I don't know Go, what can I do?\" → Steer to website/docs issues\n\n---\n\n### 17\\:20 - 17\\:30 | Wrap-Up & Next Steps (10 min)\n\n**Celebrate contributions:**\n- Quick round: Who opened their first PR?\n- Who made their first cert-manager contribution?\n- Who learned something new about Kubernetes?\n\n**What happens next:**\n- Maintainers will review all ContribFest PRs within the next week\n- Continue working on your issue after the session — no rush!\n- Join `#cert-manager-dev` for ongoing support\n- Follow cert-manager on social media for updates\n\n**Stay connected:**\n- [Slack](https://cert-manager.io/docs/contributing/#slack): `#cert-manager` and `#cert-manager-dev`\n- [BlueSky](https://bsky.app/profile/cert-manager.bsky.social): @cert-manager.bsky.social\n- [Mastodon](https://infosec.exchange/@CertManager): @CertManager@infosec.exchange\n- [Twitter/X](https://twitter.com/certmanager): @certmanager\n- [Contributor meetings](https://cert-manager.io/docs/contributing/): Bi-weekly on Wednesdays\n\n**Thank you for contributing!**\n\n---\n\n## Presenter Notes\n\n### Richard's Responsibilities\n\n- **Introduction** (5 min): Project overview, state the goals\n- **Demo** (10 min): Walk through filing a PR for a docs issue\n- **Hands-on support**: Focus on website/docs contributors\n- **Wrap-up** (5 min): Celebrate wins, next steps\n\n### Mladen's Responsibilities\n\n- **Introduction** (5 min): Maintainer perspective, state the goals from contributor angle\n- **Issue selection guidance** (5 min): Help match attendees to issues\n- **Hands-on support**: Focus on Go code contributors\n- **Wrap-up** (5 min): Review process, how to get PRs merged\n\n### Helper Instructions (if we have additional helpers)\n\n- Circulate during hands-on time\n- Watch for:\n - People staring at screens without typing → offer help\n - Git/GitHub authentication issues\n - Build/test errors\n - \"This seems too hard\" → suggest easier issue\n- Keep track of firsts (first PR, first contribution, etc.) for wrap-up celebration\n\n### Backup Plan\n\nIf we have fewer attendees than expected:\n- More 1\\:1 pairing with maintainers\n- Go deeper on specific issues\n- Extended Q&A about cert-manager architecture\n\nIf we have more attendees than expected:\n- Split into two tracks: docs/website and Go code\n- Pair newcomers with experienced contributors\n- Focus on getting PRs filed (reviews can happen async)\n\n---\n\n## Resources to Have Ready\n\n- Shortlist: [Good First Issues](shortlist.md)\n- Tracking issue: https://github.com/cert-manager/cert-manager/issues/8641\n- Planning board: https://github.com/orgs/cert-manager/projects/10\n- Contributor guide: https://cert-manager.io/docs/contributing/\n- Slack invite: https://slack.k8s.io/\n\n---\n\n## Post-Session Follow-Up\n\nWithin 1 week:\n- [ ] Review all ContribFest PRs\n- [ ] Tag PRs with `contribfest` label\n- [ ] Post thank-you message in Slack with stats (X PRs opened, Y contributors)\n- [ ] Share photos/highlights on social media\n- [ ] Update tracking issue with outcomes\n\nWithin 1 month:\n- [ ] Blog post: \"ContribFest Recap\" with stats and contributor shout-outs\n- [ ] Follow up with contributors whose PRs stalled\n- [ ] Invite active ContribFest contributors to join community meetings", "project": "cert-manager-website", "source": "content/docs/contributing/contribfest-kubecon-eu-2026/agenda.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "How to reproduce and refine the issue shortlist in `shortlist.md`.\n\n---\n\n## Prerequisites\n\n- `gh` CLI, authenticated: `gh auth status`\n- `jq`: `/usr/bin/jq`\n\n---\n\n## Step 1: Discover active repos\n\nList all public cert-manager repos, then manually exclude archived, inactive, or\nnon-code repos (e.g. `community`, `website` may warrant separate treatment):\n\n```bash\ngh repo list cert-manager --limit 100 --json name,isArchived,updatedAt \\\n --jq '.[] | select(.isArchived == false) | [.updatedAt, .name] | @tsv' | sort -r\n```\n\nThe repos included in the 2026-03-21 fetch were:\n\n```\ncert-manager/approver-policy\ncert-manager/aws-privateca-issuer\ncert-manager/cert-manager # main repo — fetched separately (see note below)\ncert-manager/cmctl\ncert-manager/csi-driver\ncert-manager/csi-driver-spiffe\ncert-manager/google-cas-issuer\ncert-manager/issuer-lib\ncert-manager/istio-csr\ncert-manager/openshift-routes\ncert-manager/trust-manager\ncert-manager/website\n```\n\n---\n\n## Step 2: Fetch issues\n\n### Satellite repos (supports reactionGroups for thumbs-up counts)\n\n```bash\nREPOS=\"approver-policy aws-privateca-issuer cmctl csi-driver csi-driver-spiffe google-cas-issuer issuer-lib istio-csr openshift-routes trust-manager website\"\n\nfor repo in $REPOS; do\n gh issue list \\\n --repo cert-manager/$repo \\\n --state open \\\n --limit 200 \\\n --json number,title,updatedAt,comments,assignees,reactionGroups,url,labels \\\n --jq \"[.[] | {\n repo: \\\"cert-manager/$repo\\\",\n number: .number,\n title: .title,\n url: .url,\n updatedAt: .updatedAt,\n thumbsUp: ((.reactionGroups[] | select(.content == \\\"THUMBS_UP\\\") | .users.totalCount) // 0),\n comments: .comments,\n assigned: (.assignees | length > 0),\n goodFirstIssue: (.labels | map(.name) | contains([\\\"good first issue\\\"])),\n labels: (.labels | map(.name))\n }]\"\ndone > /tmp/issues-raw.json\n\n/usr/bin/jq -s 'add' /tmp/issues-raw.json > issues-satellite.json\n```\n\n### Main cert-manager/cert-manager repo\n\nThe `reactionGroups` field causes GraphQL timeouts on this large repo.\nFetch without it (thumbsUp will be 0):\n\n```bash\ngh issue list \\\n --repo cert-manager/cert-manager \\\n --state open \\\n --limit 200 \\\n --json number,title,updatedAt,comments,assignees,url,labels \\\n --jq '[.[] | {\n repo: \"cert-manager/cert-manager\",\n number: .number,\n title: .title,\n url: .url,\n updatedAt: .updatedAt,\n thumbsUp: 0,\n comments: (.comments | length),\n assigned: (.assignees | length > 0),\n goodFirstIssue: (.labels | map(.name) | contains([\"good first issue\"])),\n labels: (.labels | map(.name))\n }]' > issues-main.json\n```\n\n### Merge\n\n```bash\n/usr/bin/jq -s '.[0] + .[1]' issues-satellite.json issues-main.json > issues.json\n/usr/bin/jq length issues.json # sanity check total count\n```\n\n---\n\n## Step 3: Explore the data\n\n### All good-first-issue labelled issues, sorted by thumbs-up\n\n```bash\n/usr/bin/jq -r '\n [\"REPO\", \"#\", \"TITLE\", \"👍\", \"💬\", \"ASSIGNED\"],\n (\n .[]\n | select(.goodFirstIssue == true)\n | [.repo, .number, .title[:55], .thumbsUp, .comments, (if .assigned then \"yes\" else \"\" end)]\n )\n | @tsv\n' issues.json | column -t -s $'\\t'\n```\n\n### All issues with any thumbs-up, not yet assigned\n\n```bash\n/usr/bin/jq -r '\n [\"REPO\", \"#\", \"TITLE\", \"👍\", \"💬\", \"GFI\"],\n (\n .[]\n | select(.thumbsUp > 0 and .assigned == false)\n | [.repo, .number, .title[:55], .thumbsUp, .comments, (if .goodFirstIssue then \"★\" else \"\" end)]\n )\n | @tsv\n' issues.json | sort -t $'\\t' -k4 -rn | column -t -s $'\\t'\n```\n\n### Issues by repo\n\n```bash\n/usr/bin/jq -r '[.[].repo] | group_by(.) | map({repo: .[0], count: length}) | .[] | [.repo, .count] | @tsv' \\\n issues.json | column -t -s $'\\t'\n```\n\n### Filter to a specific repo\n\n```bash\n/usr/bin/jq -r '.[] | select(.repo == \"cert-manager/cert-manager\") | [.number, .title[:60]] | @tsv' \\\n issues.json | column -t -s $'\\t'\n```\n\n---\n\n## Step `3b`: Search for TODO/FIXME/XXX comments in source code\n\nGitHub issues don't capture everything. Searching source code for TODO comments can surface\nwell-scoped, forgotten tasks that are good first issues but have never been filed.\n\n```bash\n# Search all Go source (excluding tests and vendor) across all checked-out repos\nrg \"// (TODO|FIXME|XXX)[:\\s]\" \\\n --type go \\\n --glob \"!*_test.go\" \\\n --glob \"!*/test/*\" \\\n --glob \"!*/vendor/*\" \\\n /home/richard/projects/github.com/cert-manager/\n```\n\nAssess each result by reading the surrounding context (10–20 lines) and asking:\n- Is the fix described clearly enough to attempt without deep domain knowledge?\n- Is the change contained within one or two files?\n- Would completing it meaningfully improve the project?\n\nTODOs that describe **design decisions**, **migration risks**, or **future features** are\ngenerally not suitable. TODOs that describe a **specific missing check**, **wrong log message**,\nor **obvious extension point** often are.\n\nIf a good TODO has no corresponding GitHub issue, file one (with `good first issue` +\n`help wanted` labels) so it appears in future issue searches and can be tracked.\n\n---\n\n## Step `3c`: AI-assisted code review\n\nAs a final sweep, we used [Claude Code](https://claude.ai/code) (Anthropic's AI coding\nassistant) to review the source code of all active cert-manager repos directly. With the\nrepos checked out locally, Claude was asked to search for common Go code quality patterns\nthat are easy to fix but hard to discover through issue searches alone:\n\n- Leaked `http.Response` bodies (missing `defer resp.Body.Close()`)\n- Deprecated API usage hidden behind `//nolint` suppressions\n- Dead code in interfaces flagged by TODO comments\n- Error variable naming convention violations (`errname` linter bypasses)\n- Unchecked error returns and misused `context.Background()` / `context.TODO()`\n\nFor each candidate, the surrounding code was read to confirm the fix was real, bounded,\nand not already covered by an open issue or PR. Candidates that passed that check were\ndrafted as GitHub issues and filed with `good first issue` + `help wanted` labels.\n\nThis approach surfaced two issues that would not have been found by the GitHub issue\nsearch or the TODO grep alone:\n\n- [`cert-manager#8645`](https://github.com/cert-manager/cert-manager/issues/8645) — dead `RenewCertificate` method in the Venafi connector interface\n- [`cmctl#442`](https://github.com/cert-manager/cmctl/issues/442) — response body leak on error path in the CRL revocation check\n\nNote on the `cmctl` issue: the `bodyclose` linter was already enabled in `.golangci.yaml`\nbut did not flag it, because its flow analysis considers a body \"handled\" if `Close()` is\ncalled anywhere in the function — even if that call is unreachable on some paths. This is\na known gap; a proposal to fix the upstream analyzer is tracked at\n[`golang/go#75902`](https://github.com/golang/go/issues/75902).\n\n---\n\n## Step 4: Curating the shortlist\n\nAfter generating the data queries above, each candidate issue was reviewed manually:\n\n1. Read the issue body via `gh issue view --repo `\n2. Read the relevant source code to verify the fix is actually well-scoped\n3. Assessed on three axes:\n - **Scope**: Can a new contributor complete it in ~1 hour with guidance?\n - **Clarity**: Is the problem and expected fix clearly described?\n - **Reward**: Does fixing it meaningfully improve the project?\n\nIssues were grouped into:\n- **No Go required** — docs, Helm, YAML changes only\n- **Go — well scoped** — self-contained Go changes with a clear fix path\n- **Stretch goals** — larger features suitable as take-home work\n- **Excluded** — issues that are misleadingly labelled or lack a clear fix path\n\n---\n\n## Step 5: Check for existing PRs\n\nBefore finalizing the shortlist, check each candidate issue for linked pull requests.\nAn issue with an open PR needs a different call to action (\"review this PR\" rather than\n\"fix this issue\"). An issue with a merged PR may already be resolved and should be dropped.\n\n```bash\n# Search for PRs that close a given issue (adjust repo and number as needed)\ngh pr list \\\n --repo cert-manager/cert-manager \\\n --search \"closes:#8363 OR fixes:#8363\" \\\n --state all \\\n --json number,title,state,mergedAt \\\n --jq '.[] | [.state, .number, .title] | @tsv'\n```\n\nNote: this search can return false positives (e.g. automated dependency bumps whose\nPR descriptions happen to include a matching issue number). Filter results by title —\ndependency bumps from Renovate/Dependabot are always labelled \"Bump the all group...\"\nor similar.\n\nFor each real match, check the PR's review state:\n\n```bash\ngh pr view --repo cert-manager/ \\\n --json title,state,reviewDecision,reviews,author \\\n --jq '{title, state, author: .author.login, reviewDecision,\n reviews: (.reviews | map({author: .author.login, state: .state}))}'\n```\n\nAnnotate the shortlist accordingly:\n- **Merged PR** → drop the issue from the shortlist (already fixed)\n- **Open PR, no reviews** → note it; attendees can review rather than re-implement\n- **Open PR, changes requested** → note it; attendees can help address feedback\n- **Closed PR (not merged)** → treat the issue as still open\n\n---\n\n## Step 6: Create a GitHub Project\n\nOnce the shortlist is finalized, load all issues into a GitHub Project so maintainers\ncan track status and attendees (once the project is made public) can browse by difficulty.\n\n```bash\n# Create the project under the org\ngh project create --owner cert-manager --title \"ContribFest KubeCon EU 2026\" --format json\n\n# Add each shortlisted issue (repeat for all issues)\ngh project item-add --owner cert-manager \\\n --url https://github.com/cert-manager/cert-manager/issues/8642\n\n# List items to get their node IDs (needed for field edits)\ngh project item-list --owner cert-manager --format json \\\n --jq '.items[] | {id: .id, title: .title, url: .content.url}'\n\n# Create single-select fields\ngh project field-create --owner cert-manager \\\n --name \"Category\" --data-type \"SINGLE_SELECT\" \\\n --single-select-options \"No Go Required,Go — Well Scoped,Stretch Goal\" --format json\n\ngh project field-create --owner cert-manager \\\n --name \"Difficulty\" --data-type \"SINGLE_SELECT\" \\\n --single-select-options \"Easy,Easy-Medium,Medium,Hard\" --format json\n\n# Set fields on each item (use node IDs and option IDs from the create output)\ngh project item-edit --id --project-id \\\n --field-id --single-select-option-id\n\n# When ready to share publicly:\ngh project edit --owner cert-manager --visibility PUBLIC\n```\n\nThe project for KubeCon EU 2026 is at: https://github.com/orgs/cert-manager/projects/10\n\n---\n\n## Refreshing the data\n\nTo update `issues.json` before a future event, re-run Steps 1–2, then repeat\nSteps 3–5 to re-evaluate the shortlist. Pay particular attention to:\n- Issues that have been closed since the last fetch\n- New `good first issue` labels added by maintainers\n- PRs that were open at the last refresh but have since merged or stalled\n\n```bash\n# Quick state check for all shortlisted issues at once\nfor repo_issue in \\\n \"cert-manager/cert-manager 8363\" \\\n \"cert-manager/cert-manager 8434\" \\\n \"cert-manager/cert-manager 8642\" \\\n \"cert-manager/cert-manager 8643\" \\\n \"cert-manager/cert-manager 8644\" \\\n \"cert-manager/cert-manager 8645\" \\\n \"cert-manager/approver-policy 713\" \\\n \"cert-manager/cmctl 128\" \\\n \"cert-manager/cmctl 264\" \\\n \"cert-manager/cmctl 442\" \\\n \"cert-manager/csi-driver 256\" \\\n \"cert-manager/csi-driver-spiffe 128\"; do\n repo=$(echo $repo_issue | cut -d' ' -f1)\n number=$(echo $repo_issue | cut -d' ' -f2)\n state=$(gh issue view $number --repo $repo --json state --jq '.state')\n echo \"$state $repo #$number\"\ndone\n```", "project": "cert-manager-website", "source": "content/docs/contributing/contribfest-kubecon-eu-2026/methods.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "## Creating DNS Providers\n\nDue to the large number of requests to support DNS providers to resolve DNS\nchallenges, it became impractical and infeasible to maintain and test all DNS\nproviders in the main cert-manager repository.\n\nFor this reason, it was decided that new DNS providers should be supported out-of-tree\nby way of external webhooks.\n\nTo implement an external DNS provider webhook, it is recommended to base your\nimplementation on the [cert-manager webhook-example](https://github.com/cert-manager/webhook-example).\n\nThere's further information available in the configuration section:\n\n- [ACME DNS01 via webhook](../configuration/acme/dns01/README.md#webhook)\n- [Configuring an ACME issuer with external webhook](../configuration/acme/dns01/webhook.md)\n\nIf you're struggling with creating a new DNS webhook, reach out on [Slack](./README.md#slack)!", "project": "cert-manager-website", "source": "content/docs/contributing/dns-providers.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "cert-manager is written in Go, and uses Go modules. You _can_ import it as a Go module, and in some cases\nthat's fine or even encouraged, but as a rule we generally recommend against importing cert-manager.\n\nGenerally speaking, except for the cases listed below under [When You Might Import cert-manager](#when-you-might-import-cert-manager),\ncode in the cert-manager repository is *not* covered under any Go module compatibility guarantee. We can and will make breaking\nchanges, even in publicly exported Go code and even in a minor or patch release of cert-manager. We have made breaking changes like\nthis in the past.\n\nNote that this doesn't affect _running_ cert-manager. Our commitment on compatibility is to not break the runtime\nfunctionality of cert-manager, and we take that seriously.\n\nIf you're certain that you *do* need to import cert-manager as a module, see [Module Import Paths](#module-import-paths)\nbelow for a note on how to do that.\n\n## When You Might Import cert-manager\n\nYou might need to import cert-manager if you're writing Go code which:\n\n- uses cert-manager custom resources, so you want to import something under `pkg/apis`\n- implements an external DNS solver webhook, as in the [webhook-example](https://github.com/cert-manager/webhook-example)\n- implements an external issuer, as in the [sample-external-issuer](https://github.com/cert-manager/sample-external-issuer)\n\nIf you think you really need to import other parts of the code, please do reach out and [talk to us](./README.md#slack) so we're\naware of this need! We'll always try to avoid breakage where we can.\n\n## Module Import Paths\n\nFor all supported versions of cert-manager, the module import path is `github.com/cert-manager/cert-manager`.\n\nHistorically, the cert-manager repository was created on GitHub as `https://github.com/jetstack/cert-manager`, and was later\nmigrated to `https://github.com/cert-manager/cert-manager`.\n\nThis means that the Go module import path you need may be different if you're trying to use an older version of cert-manager.\n\nFor cert-manager 1.8 and later, use the new path listed above.\n\nFor cert-manager versions older than 1.8 use the old path: `github.com/jetstack/cert-manager`", "project": "cert-manager-website", "source": "content/docs/contributing/importing.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "The cert-manager project has a number of [satellite projects](https://github.com/cert-manager)\nthat extend the project's functionality, and complement the core cert-manager feature-set.\n\nThese tools help with security, compliance and control.\n\n- [istio-csr](https://github.com/cert-manager/istio-csr) ([docs](../usage/istio-csr/README.md)): Secure Istio service mesh with istio-csr which is\n an agent that allows for [Istio](https://istio.io) workload and control plane\n components to be secured using cert-manager.\n- [approver-policy](https://github.com/cert-manager/approver-policy) ([docs](../policy/approval/approver-policy/README.md)):\n a cert-manager **approver** that will automatically approve or deny\n certificate requests based on defined policy.\n- [csi-driver](https://github.com/cert-manager/csi-driver) ([docs](../usage/csi-driver/README.md)):\n a Container Storage Interface (CSI) driver plugin for Kubernetes to work along\n cert-manager. The goal for this plugin is to seamlessly request and mount\n certificate key pairs to pods. This is useful for facilitating mTLS, or\n otherwise securing connections of pods with guaranteed present certificates\n whilst having all of the features that cert-manager provides.\n- [csi-driver-spiffe](https://github.com/cert-manager/csi-driver-spiffe) ([docs](../usage/csi-driver-spiffe/README.md)):\n another CSI driver plugin to work along cert-manager. This CSI driver\n transparently delivers [SPIFFE](https://spiffe.io/)\n [SVIDs](https://spiffe.io/docs/latest/spiffe-about/spiffe-concepts/#spiffe-verifiable-identity-document-svid)\n in the form of X.509 certificate key pairs to mounting Kubernetes Pods. The\n end result is all and any Pod running in Kubernetes can securely request their\n SPIFFE identity document from a Trust Domain with minimal configuration.\n- [trust-manager](https://github.com/cert-manager/trust-manager) ([docs](../trust/trust-manager/README.md)): the easiest way to manage TLS trust bundles in Kubernetes and OpenShift clusters.", "project": "cert-manager-website", "source": "content/docs/contributing/projects.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "Learn how to optimize cert-manager for your cluster.\n\n## Overview\n\nThe defaults in the Helm chart and YAML manifests are intended for general use.\nYou may want to modify the configuration to suit the size and usage of your Kubernetes cluster.\n\n## Set appropriate memory requests and limits\n\n**When Certificate resources are the dominant use-case**,\nsuch as when workloads need to mount the TLS Secret or when gateway-shim is used,\nthe memory consumption of the cert-manager controller will be roughly\nproportional to the total size of those Secret resources that contain the TLS\nkey pairs.\nWhy? Because the cert-manager controller caches the entire content of these Secret resources in memory.\nIf large TLS keys are used (e.g. RSA 4096) the memory use will be higher than if smaller TLS keys are used (e.g. ECDSA).\n\nThe other Secrets in the cluster, such as those used for Helm chart configurations or for other workloads,\nwill not significantly increase the memory consumption, because cert-manager will only cache the metadata of these Secrets.\n\n**When `CertificateRequest` resources are the dominant use-case**,\nsuch as with csi-driver or with istio-csr,\nthe memory consumption of the cert-manager controller will be much lower,\nbecause there will be fewer TLS Secrets and fewer resources to be cached.\n\n> 📖️ Read [What Everyone Should Know About Kubernetes Memory Limits](https://home.robusta.dev/blog/kubernetes-memory-limit),\n> to learn how to right-size the memory requests.\n\n## Disable client-side rate limiting for Kubernetes API requests\n\nBy default cert-manager [throttles the rate of requests to the Kubernetes API server](https://github.com/cert-manager/cert-manager/blob/b61de55abda95a4c273be0c8d3e6025fe8511573/internal/apis/config/controller/v1alpha1/defaults.go#L59-L60) to 20 queries per second.\nHistorically this was intended to prevent cert-manager from overwhelming the Kubernetes API server,\nbut modern versions of Kubernetes implement [API Priority and Fairness](https://kubernetes.io/docs/concepts/cluster-administration/flow-control/),\nwhich obviates the need for client side throttling.\nYou can increase the threshold of the client-side rate limiter using the following helm values:\n\n```yaml\n# helm-values.yaml\nconfig:\n kubernetesAPIQPS: 10000\n kubernetesAPIBurst: 10000\n```\n\n> ℹ️ This does not technically disable the client-side rate-limiting but configures the QPS and Burst values high enough that they are never reached.\n>\n> 🔗 Read [`cert-manager#6890`: Allow client-side rate-limiting to be disabled](https://github.com/cert-manager/cert-manager/issues/6890);\n> a proposal for a cert-manager configuration option to disable client-side rate-limiting.\n>\n> 🔗 Read [`kubernetes#111880`: Disable client-side rate-limiting when AP&F is enabled](https://github.com/kubernetes/kubernetes/issues/111880);\n> a proposal that the `kubernetes.io/client-go` module should automatically use server-side rate-limiting when it is enabled.\n>\n> 🔗 Read about other projects that disable client-side rate limiting: [Flux](https://github.com/fluxcd/pkg/issues/269).\n>\n> 📖 Read [API documentation for ControllerConfiguration](../reference/api-docs.md#controller.config.cert-manager.io/v1alpha1.ControllerConfiguration) for a description of the `kubernetesAPIQPS` and `kubernetesAPIBurst` configuration options.\n\n## Restrict the use of large RSA keys\n\nCertificates with large RSA keys cause cert-manager to use more CPU resources.\nWhen there are insufficient CPU resources, the reconcile queue length grows,\nwhich delays the reconciliation of all Certificates.\nA user who has permission to create a large number of RSA 4096 certificates,\nmight accidentally or maliciously cause a denial of service for other users on the cluster.\n\n> 📖 Learn [how to enforce an Approval Policy](../policy/approval/README.md), to prevent the use of large RSA keys.\n>\n> 📖 Learn [how to set Certificate defaults automatically](../tutorials/certificate-defaults/README.md), using tools like Kyverno.\n\n## Set `revisionHistoryLimit: 1` on all Certificate resources\n\n> ℹ️ Not needed with cert-manager `>= v1.18.0`, because the default value was changed to `1`.\n\nBy default, cert-manager will keep all the `CertificateRequest` resources that **it** creates\n([`revisionHistoryLimit`](../reference/api-docs.md#cert-manager.io/v1.CertificateSpec)):\n\n> The maximum number of `CertificateRequest` revisions that are maintained in\n> the Certificate's history. Each revision represents a single\n> `CertificateRequest` created by this Certificate, either when it was\n> created, renewed, or Spec was changed. Revisions will be removed by oldest\n> first if the number of revisions exceeds this number.\n> If set, `revisionHistoryLimit` must be a value of `1` or greater. If unset\n> (`nil`), revisions will not be garbage collected. Default value is `nil`.\n\nOn a busy cluster these will eventually overwhelm your Kubernetes API server;\nbecause of the memory and CPU required to cache them all and the storage required to save them.\n\nUse a tool like Kyverno to override the `Certificate.spec.revisionHistoryLimit` for all namespaces.\n\n> 📖 Adapt [the Kyverno policies in the tutorial: how to set Certificate defaults automatically](../tutorials/certificate-defaults/README.md),\n> to override rather than default the `revisionHistoryLimit` field.\n>\n> 📖 Learn [how to set `revisionHistoryLimit` when using Annotated Ingress resources](../usage/ingress.md#supported-annotations).\n>\n> 🔗 Read [`cert-manager#3958`: Sane defaults for Certificate revision history limit](https://github.com/cert-manager/cert-manager/issues/3958);\n> a proposal to change the default `revisionHistoryLimit`, which will obviate this particular recommendation.\n\n## Enable Server-Side Apply\n\nBy default, cert-manager [uses Update requests](https://kubernetes.io/docs/reference/using-api/api-concepts/#update-mechanism-update)\nto create and modify resources like `CertificateRequest` and `Secret`,\nbut on a busy cluster there will be frequent conflicts as the control loops in cert-manager each try to update the status of various resources.\n\nYou will see errors, like this one, in the logs:\n\n> `I0419 14:11:51.325377 1 controller.go:162] \"re-queuing item due to optimistic locking on resource\" logger=\"cert-manager.certificates-trigger\" key=\"team-864-p6ts6/app-7\" error=\"Operation cannot be fulfilled on certificates.cert-manager.io \\\"app-7\\\": the object has been modified; please apply your changes to the latest version and try again\"`\n\nThis error is relatively harmless because the update attempt is retried,\nbut it slows down the reconciliation because each error triggers an exponential back off mechanism,\nwhich causes increasing delays between retries.\n\nThe solution is to turn on the [Server-Side Apply Feature](../installation/configuring-components.md#feature-gates),\nwhich causes cert-manager to use [HTTP PATCH using Server-Side Apply](https://kubernetes.io/docs/reference/using-api/api-concepts/#update-mechanism-server-side-apply) when ever it needs to modify an API resource.\nThis avoids all conflicts because each cert-manager controller sets only the fields that it owns.\n\nYou can enable the server-side apply feature gate with the following Helm chart values:\n\n```yaml\n# helm-values.yaml\nconfig:\n featureGates:\n ServerSideApply: true\n```\n\n> 📖 Read [Using Server-Side Apply in a controller](https://kubernetes.io/docs/reference/using-api/server-side-apply/#using-server-side-apply-in-a-controller),\n> to learn about the advantages of server-side apply for software like cert-manager.", "project": "cert-manager-website", "source": "content/docs/devops-tips/scaling-cert-manager.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "\n\ncert-manager integrates with a large number of different certificate issuers, each\nissuer has full autonomy over what issued certificates look like and what properties\nthey have. cert-manager does not require or enforce any specific relationship between\nthe properties in a CertificateRequest/ CertificateSigningRequest and the properties\nin the issued certificate (except for the public key which must match).\n\nFor the core [SelfSigned](../configuration/selfsigned.md) and [CA](../configuration/ca.md) issuers,\ncert-manager implements its own issuing policy. This policy is very simple and is not configurable.\nAll the requested properties will be copied into the issued certificate.\n\nAnother example is the [Let's Encrypt CA issuer](https://letsencrypt.org/) which also implements its own issuing policy. This policy is more complex than a 1:1\ncopy of the requested properties. For example, the Let's Encrypt issuer will always\n[issue certificates with a 90 day validity period](https://letsencrypt.org/2015/11/09/why-90-days).\nAlso, it only supports a [limited set of (extended) key usages](https://community.letsencrypt.org/t/custom-extendedkeyusage-stripped-from-csr-while-generating-cert/17759/2).", "project": "cert-manager-website", "source": "content/docs/policy/issuing.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "You can generally tune [Certificate](../usage/certificate.md) requests by adding annotations to\n[Ingress](../usage/ingress.md) and [Gateway](../usage/gateway.md) resources.\n\n## acme.cert-manager.io/http01-edit-in-place\n- [Ingress](../usage/ingress.md)\n\nthis controls whether the ingress is modified 'in-place', or a new one is created\nspecifically for the HTTP01 challenge. If present, and set to `\"true\"`, the existing\ningress will be modified. Any other value, or the absence of the annotation assumes\n`\"false\"`.\nThis annotation will also add the annotation\n`\"cert-manager.io/issue-temporary-certificate\": \"true\"` onto created certificates\nwhich will cause a\n[temporary certificate](../usage/certificate.md#temporary-certificates-whilst-issuing)\nto be set on the resulting `Secret` until the final signed certificate has been\nreturned.\nThis is useful for keeping compatibility with the `ingress-gce` component.\n\n## acme.cert-manager.io/http01-ingress-class\n- [Ingress](../usage/ingress.md)\n\nAllows the `kubernetes.io/ingress.class` annotation to be configured.\nCustomizing this is useful when you are trying\nto secure internal services, and need to solve challenges using a different ingress class\nto that of the ingress. If not specified and the `acme-http01-edit-in-place` annotation is\nnot set, this defaults to the `http01.ingress.class` defined in the Issuer resource.\n\n## acme.cert-manager.io/http01-ingress-ingressclassname\n\n- [Ingress](../usage/ingress.md)\n\nAllows the Ingress's `spec.ingressClassName` to be configured.\nCustomizing this is useful when you are trying\nto secure internal services, and need to solve challenges using a different ingress class\nto that of the ingress. If not specified and the `acme-http01-edit-in-place` annotation is\nnot set, this defaults to the `http01.ingress.ingressClassName` defined in the Issuer resource.\n\n## acme.cert-manager.io/http01-parentrefkind\n\n- [Certificate](../usage/certificate.md)\n\nThis annotation is automatically added by cert-manager to Certificate resources\nwhen they are created from a [Gateway](../usage/gateway.md) or\n[ListenerSet](../usage/gateway.md#listenerset) resource. It stores the kind of\nthe parent resource (either `Gateway` or `ListenerSet`) that triggered the\ncreation of the Certificate. This is used internally by the ACME HTTP-01 solver\nto know where to attach the temporary HTTPRoute for the challenge.\n\n## acme.cert-manager.io/http01-parentrefname\n\n- [Certificate](../usage/certificate.md)\n\nThis annotation is automatically added by cert-manager to Certificate resources\nwhen they are created from a [Gateway](../usage/gateway.md) or\n[ListenerSet](../usage/gateway.md#listenerset) resource. It stores the name of\nthe parent resource that triggered the creation of the Certificate. This is used\ninternally by the ACME HTTP-01 solver to know where to attach the temporary\nHTTPRoute for the challenge.\n\n## cert-manager.io/allow-direct-injection\n- `Secret`\n\nallows the `cainjector` to inject secret `CA certificate` contents into other objects that have `cert-manager.io/inject-ca-from-secret`.\n\n## cert-manager.io/alt-names\n- [Certificate](../usage/certificate.md)\n\nthis annotation allows you to configure `spec.dnsNames` field for\nthe Certificate to be generated.\nSupports comma-separated values e.g. \"example.com,example.org\"\n\n## cert-manager.io/certificate-name\n- [CertificateRequest](../usage/certificaterequest.md)\n\nname of the related certificate.\n\n## cert-manager.io/certificate-revision\n- [CertificateRequest](../usage/certificaterequest.md)\n\nthe iteration the certificate request.\n\n## cert-manager.io/cluster-issuer\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthe name of a cert-manager.io ClusterIssuer that should issue the required certificate.\n\n## cert-manager.io/common-name\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to configure `spec.commonName` for the Certificate\nto be generated.\n\n## cert-manager.io/duration\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to configure `spec.duration` field for the\nCertificate to be generated.\n\n## cert-manager.io/email-sans\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to configure `spec.emailAddresses` field for\nthe Certificate to be generated.\nSupports comma-separated values e.g. \"me@example.com,you@example.com\"\n\n## cert-manager.io/ip-sans\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to configure `spec.ipAddresses` field for\nthe Certificate to be generated.\nSupports comma-separated values e.g. \"198.51.100.1,198.51.100.2\"\n\n## cert-manager.io/issuer-group\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthe API group of the external issuer controller, for example\n`awspca.cert-manager.io`. This is only necessary for out-of-tree issuers.\n\n## cert-manager.io/issuer-kind\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthe kind of the external issuer resource, for example `AWSPCAIssuer`. This\nis only necessary for out-of-tree issuers.\n\n## cert-manager.io/issuer-name\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthe name of a cert-manager.io Issuer that should issue the required certificate.\n\n## cert-manager.io/issuer\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthe name of the issuer that should issue the required certificate.\n\n## cert-manager.io/issue-temporary-certificate\n- [Certificate](../usage/certificate.md)\n\ncause a [temporary\ncertificate](../usage/certificate.md#temporary-certificates-whilst-issuing) to\nbe set on the resulting `Secret` until the final signed certificate has been\nreturned.\nThis is useful for keeping compatibility with the `ingress-gce` component.\n\n## cert-manager.io/inject-apiserver-ca\n\n- CustomResourceDefinitions\n- MutatingWebhooksConfigurations\n- ValidatingWebhooksConfigurations\n- APIServices\n\ncause the `cainjector` to [inject the **CA certificate** for the Kubernetes apiserver into the resource](../concepts/ca-injector.md#injecting-the-kubernetes-api-server-ca).\n\n## cert-manager.io/inject-ca-from\n\n- CustomResourceDefinitions\n- MutatingWebhooksConfigurations\n- ValidatingWebhooksConfigurations\n- APIServices\n\ncause the `cainjector` to [inject the **CA certificate**](../concepts/ca-injector.md#injecting-ca-data-from-a-certificate-resource).\n\n## cert-manager.io/inject-ca-from-secret\n\n- CustomResourceDefinitions\n- MutatingWebhooksConfigurations\n- ValidatingWebhooksConfigurations\n- APIServices\n\ncause the `cainjector` to [inject a **CA Certificate** from a secret](../concepts/ca-injector.md#injecting-ca-data-from-a-secret-resource).\n\n## cert-manager.io/private-key-algorithm\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to configure `spec.privateKey.algorithm` field to set\nthe algorithm for private key generation for a Certificate.\nValid values are `RSA`, `ECDSA` and `Ed25519`.\nIf unset an algorithm `RSA` will be used.\n\n## cert-manager.io/private-key-encoding\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to configure `spec.privateKey.encoding` field to set\nthe encoding for private key generation for a Certificate.\nValid values are `PKCS1` and `PKCS8`. If unset an algorithm `PKCS1` will be used.\n\n## cert-manager.io/private-key-rotation-policy\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to configure `spec.privateKey.rotationPolicy` field\nto set the rotation policy of the private key for a Certificate.\nValid values are `Never` and `Always`. If unset a rotation policy `Never` will\nbe used.\n\n## cert-manager.io/private-key-secret-name\n- [CertificateRequest](../usage/certificaterequest.md)\n\nreferences the secret that stores the private key used to sign a x509\ncertificate signing request.\n\n## cert-manager.io/private-key-size\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to configure `spec.privateKey.size` field to set the\nsize of the private key for a Certificate.\nIf algorithm is set to `RSA`, valid values are `2048`, `4096` or `8192`, and\nwill default to `2048` if not specified.\nIf algorithm is set to `ECDSA`, valid values are `256`, `384` or `521`, and\nwill default to `256` if not specified.\nIf algorithm is set to `Ed25519`, size is ignored.\n\n## cert-manager.io/renew-before\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to configure `spec.renewBefore` field for the\nCertificate to be generated.\n\n## cert-manager.io/renew-before-percentage\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to configure `spec.renewBeforePercentage` field for the\nCertificate to be generated.\n\n## cert-manager.io/revision-history-limit\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to configure `spec.revisionHistoryLimit` field to\nlimit the number of CertificateRequests to be kept for a Certificate.\nMinimum value is 1. If unset all CertificateRequests will be kept.\n\n## cert-manager.io/secret-template\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to set the secretTemplate field in the generated Certificate.\n\n## cert-manager.io/subject-countries\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to configure `spec.subject.countries` field for the\nCertificate to be generated.\nSupports comma-separated values e.g. \"Country 1,Country 2\"\n\n## cert-manager.io/subject-localities\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to configure `spec.subject.localities` field for the\nCertificate to be generated.\nSupports comma-separated values e.g. \"City 1,City 2\"\n\n## cert-manager.io/subject-organizationalunits\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to configure `spec.subject.organizationalUnits` field\nfor the Certificate to be generated.\nSupports comma-separated values e.g. \"IT Services,Cloud Services\"\n\n## cert-manager.io/subject-organizations\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to configure `spec.subject.organizations` field for\nthe Certificate to be generated.\nSupports comma-separated values e.g. \"Company 1,Company 2\"\n\n## cert-manager.io/subject-postalcodes\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to configure `spec.subject.postalCodes` field for\nthe Certificate to be generated.\nSupports comma-separated values e.g. \"123ABC,456DEF\"\n\n## cert-manager.io/subject-provinces\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to\nconfigure `spec.subject.provinces` field for the Certificate to be generated.\nSupports comma-separated values e.g. \"Province 1,Province 2\"\n\n## cert-manager.io/subject-serialnumber\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to\nconfigure `spec.subject.serialNumber` field for the Certificate to be\ngenerated.\nSupports comma-separated values e.g. \"10978342379280287615,1111144445555522228888\"\n\n## cert-manager.io/subject-streetaddresses\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to\nconfigure `spec.subject.streetAddresses` field for the Certificate to be\ngenerated.\nSupports comma-separated values e.g. \"123 Example St,456 Other Blvd\"\n\n## cert-manager.io/uri-sans\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to configure `spec.uris` field for\nthe Certificate to be generated.\nSupports comma-separated values e.g. \"spiffe://cluster.local/ns/sandbox/sa/example\"\n\n## cert-manager.io/usages\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\nthis annotation allows you to configure `spec.usages` field for the Certificate\nto be generated. Pass a string with comma-separated values i.e.\n\"key agreement,digital signature, server auth\".\n\n## experimental.cert-manager.io/request-duration\n- [CertificateRequest](../usage/certificaterequest.md)\n\nannotation used to request a particular duration.\n\n## experimental.cert-manager.io/request-is-ca\n- [CertificateRequest](../usage/certificaterequest.md)\n\nannotation used to request a certificate be marked as CA.\n\n## experimental.cert-manager.io/private-key-secret-name\n- [CertificateRequest](../usage/certificaterequest.md)\n\nannotation key used by the 'self signing' issuer type to self-sign certificates to reference a Secret resource containing the private key used to sign the request.\n\n## kubernetes.io/ingress.class\n- [Ingress](../usage/ingress.md)\n\n[deprecated](https://kubernetes.io/docs/concepts/services-networking/ingress/#deprecated-annotation). You should use `spec`.`ingressClassName` instead.\n\n## kubernetes.io/tls-acme\n- [Ingress](../usage/ingress.md)\n\nthis annotation requires additional configuration of the\n[ingress-shim](../usage/ingress.md#optional-configuration).\nNamely, a default `Issuer` must be specified as arguments to the ingress-shim\ncontainer.\n\n## venafi.cert-manager.io/custom-fields\n- [Certificate](../usage/certificate.md)\n- [Ingress](../usage/ingress.md)\n- [Gateway](../usage/gateway.md)\n\npass JSON encoded custom fields to the CyberArk issuer.\n\n## venafi.cert-manager.io/pickup-id\n- [CertificateRequest](../usage/certificaterequest.md)\n\nrecords the Pickup ID of a certificate signing request in CyberArk Certificate Manager.", "project": "cert-manager-website", "source": "content/docs/reference/annotations.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "The `v0.10` release comes quick on the heels of `v0.9`. It continues the work on\nthe new `CertificateRequest` resource type, moving us towards a world where\nout-of-tree Issuer types are first class citizens.\n\nAs a project, we're pushing towards a 'stable' API release and eventually, a\n`v1.0` release. This release, and the releases to follow over the coming months,\nlay the foundation for these milestones. Keep an eye on the releases page over\nthe coming months for some exciting new developments!\n\nYou can get started using the new `CertificateRequest` controllers by enabling\nthe `CertificateRequestControllers` feature gate - all Issuer types are now\nsupported, and your feedback is extremely valuable before we switch the new\nimplementation to be the default in `v0.11`!\n\nWe've also simplified the way we bootstrap TLS certificates for the 'webhook'\ncomponent. Now, instead of creating an `Issuer` and `Certificate` resource for the\nwebhook (requiring you to disable validation on the cert-manager namespace),\nwe've implemented a dedicated `webhookbootstrap` controller which will manage\nTLS assets for the webhook.\n\n---\n\nThis release includes changes from:\n\n* `Alejandro Garrido Mota`\n* `Alpha`\n* `Hans Kristian Flaatten`\n* `James Munnelly`\n* `Jonas-Taha El Sesiy`\n* `JoshVanL`\n* `Marcello Romani`\n* `Moritz Johner`\n* `Nicolas Kowenski`\n* `Olaf Klischat`\n* `Vasilis Remmas`\n* `stuart.warren`\n* `zeeZ`\n\n## Notable Items\n\n### All Issuer types now supported with `CertificateRequests`\n\nThe `CertificateRequest` design proposal, first implemented in `v0.9`, changes the\nway we request certificates from `Issuers` in order to allow out-of-tree Issuer\ntypes.\nThis required us to refactor and adapt our existing in-tree `Issuer` types to\nfollow a similar pattern.\n\nThe `v0.10` release finishes this refactoring so that all `Issuer` types now\nsupport the new format.\n\nAs the feature is currently still in an 'alpha' state, you must set the\n`issuerRef.group` field on your Certificate resources to `certmanager.k8s.io`,\nas well as enabling the `CertificateRequestControllers` feature gate on the\n`controller` component of cert-manager.\n\n### Simplified webhook TLS bootstrapping\n\nIn past releases, we've managed TLS for the webhook component by creating an\ninternal self signed and CA issuer that is used to mint serving certificates\nfor the apiserver to authenticate the webhook's identity.\n\nThis introduced a number of complexities in our installation process and has\ncaused trouble for users in the past.\n\nIn order to simplify this process and to support running a CRD conversion\nwebhook in future (to provide seamless migration between API versions), we've\nintroduced a dedicated `webhookbootstrap` controller that relies on flags and\nSecret resources in order to configure TLS for the webhook.\n\nThis will mean easier installation as well as future-proofing for our upcoming\nplans in future releases.\n\n### `KeyUsages` on Certificate resources\n\nIn order to support a more diverse set of applications, including apps that\nrequire client-auth certificates, a new field `keyUsages` has been added which\naccepts a list of usages that must be present on a Certificate.\n\nThese will be automatically added when certificates are issued, just like any\nother field on the Certificate.\n\nThanks to Stuart Warren from Ocado for this change!\n\n### Preparation for `v1alpha2` and beyond\n\nOver the last few releases, we've been making a number of significant changes\nto our API types (i.e. moving ACME configuration from Certificate resources\nonto the Issuer resource). This has involved deprecating some old API fields.\n\nIn a future release, we'll be removing these deprecated fields altogether,\nrequiring users to update their manifests to utilize the new way to specify\nconfiguration.\n\nA number of steps have been taken in our own code base to support this change,\nand in a future release, you'll be required to update **all** your manifests for\nthis new format. Future API revisions (e.g. `v1beta1` and `v1`) will be\nautomatically converted using a Kubernetes conversion webhook (available in\nbeta from Kubernetes 1.15 onward).\n\n## Action Required\n\nNo special actions are required as part of this release.\n\n## Changelog\n\n### General\n\n- Add `DisableDeprecatedACMECertificates` feature gate to disable the old deprecated ACME configuration format ([#1923](https://github.com/cert-manager/cert-manager/pull/1923), [`@munnerz`](https://github.com/munnerz))\n- chart: fix formatting of values table in `README.md` ([#1936](https://github.com/cert-manager/cert-manager/pull/1936), [`@Starefossen`](https://github.com/Starefossen))\n- Add internal API version and implement machinery for defaulting & conversion ([#2002](https://github.com/cert-manager/cert-manager/pull/2002), [`@munnerz`](https://github.com/munnerz))\n- Fix concurrent map write panic in certificates controller ([#1980](https://github.com/cert-manager/cert-manager/pull/1980), [`@munnerz`](https://github.com/munnerz))\n- `cainjector`: allow injecting CAs directly from Secret resources ([#1990](https://github.com/cert-manager/cert-manager/pull/1990), [`@munnerz`](https://github.com/munnerz))\n- Mark `spec` and `status` as non-required fields in CRDs ([#1957](https://github.com/cert-manager/cert-manager/pull/1957), [`@munnerz`](https://github.com/munnerz))\n- Add ability to specify key usages and extended key usages in certificates ([#1996](https://github.com/cert-manager/cert-manager/pull/1996), [`@stuart-warren`](https://github.com/stuart-warren))\n\n### ACME Issuer\n\n- Add option to assume role in Route53 DNS01 provider ([#1917](https://github.com/cert-manager/cert-manager/pull/1917), [`@moolen`](https://github.com/moolen))\n- Fix documentation for AzureDNS service principal creation ([#1960](https://github.com/cert-manager/cert-manager/pull/1960), [`@elsesiy`](https://github.com/elsesiy))\n\n### Webhook\n\n- Use dedicated controller for webhook TLS bootstrapping ([#1993](https://github.com/cert-manager/cert-manager/pull/1993), [`@munnerz`](https://github.com/munnerz))\n\n### `CertificateRequest`\n\n- Add ACME `CertificateRequest` controller implementation ([#1943](https://github.com/cert-manager/cert-manager/pull/1943), [`@JoshVanL`](https://github.com/JoshVanL))\n- Add Vault `CertificateRequest` controller implementation ([#1934](https://github.com/cert-manager/cert-manager/pull/1934), [`@JoshVanL`](https://github.com/JoshVanL))\n- Add `SelfSigned` `CertificateRequest` controller implementation ([#1906](https://github.com/cert-manager/cert-manager/pull/1906), [`@JoshVanL`](https://github.com/JoshVanL))\n- Add Venafi `CertificateRequest` controller implementation ([#1968](https://github.com/cert-manager/cert-manager/pull/1968), [`@JoshVanL`](https://github.com/JoshVanL))\n- Don't validate `issuerRef.kind` field if `issuerRef.group `is set in order to support out-of-tree Issuer types ([#1949](https://github.com/cert-manager/cert-manager/pull/1949), [`@munnerz`](https://github.com/munnerz))\n- Adds `CertificateRequest` `FailureTime`. The Certificate controller will re-try failed `CertificateRequests` at least one hour after this failed time. ([#1979](https://github.com/cert-manager/cert-manager/pull/1979), [`@JoshVanL`](https://github.com/JoshVanL))\n\n### Monitoring\n\n- Added variable to specify custom namespace where to deploy `ServiceMonitor` resource ([#1970](https://github.com/cert-manager/cert-manager/pull/1970), [`@mogaal`](https://github.com/mogaal))\n- helm: fix labels and add Service for Prometheus `ServiceMonitor` ([#1942](https://github.com/cert-manager/cert-manager/pull/1942), [`@Starefossen`](https://github.com/Starefossen))", "project": "cert-manager-website", "source": "content/docs/releases/release-notes/release-notes-0.10.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "## Issue with older versions of `kubectl`\n`kubectl` versions with patch versions lower than `v1.18.8` `v1.17.11` or `v1.16.14` have issues updating the `v0.16` CRD files, due to [a bug when handling deeply nested CRDs](https://github.com/kubernetes/kubernetes/issues/91615).\nThis bug will make `kubectl apply -f [...]` hang.\n\nThis bug only happens during a re-apply of the v0.16 CRDs. Initial upgrade does not cause issues. If you have this issue please upgrade your `kubectl` to the latest patch release.\nVersions of `kubectl` of `v1.15.x` or below are not being supported anymore as these are unsupported by the Kubernetes community.\n\n### Helm\nHelm users who use `installCRDs=true` MUST upgrade to Helm `v3.3.1` before upgrading.\n\nFrom here on you can follow the [regular upgrade process](../../installation/upgrade.md).", "project": "cert-manager-website", "source": "content/docs/releases/upgrading/upgrading-0.15-0.16.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "Version 0.5 of cert-manager introduces a new 'webhook' component, which is used\nby the Kubernetes apiserver to validate our CRD resource types.\n\nThis should help in future to reduce errors caused by misconfigured Certificate\nand Issuer resources.\n\nWhen upgrading from a previous release using Helm, it is **essential** that\nyou perform one extra step before upgrading.\n\n## Disabling resource validation on the cert-manager namespace\n\nBefore upgrading, you should add the `certmanager.k8s.io/disable-validation: \"true\"`\nlabel to the `cert-manager` namespace.\n\nThis will allow the system resources that cert-manager requires to bootstrap\nTLS to be created in its own namespace.", "project": "cert-manager-website", "source": "content/docs/releases/upgrading/upgrading-0.4-0.5.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "#### Validation of the `rotationPolicy` field\n\nThe field `spec.privateKey.rotationPolicy` on Certificate resources is now validated. Valid options are Never and Always.\n\nBefore upgrading to 1.8.0, you will need to check that all the Certificate YAML manifests you have stored in Git if you are using a GitOps flow (or any other \"source of truth\") have a correct `rotationPolicy` value. To help you find out which Certificate YAML manifests need updating, you can run the following command:\n\n```sh\nkubectl get cert -A -ojson | jq -r \\\n '.items[] | select(.spec.privateKey) | select(.spec.privateKey.rotationPolicy | . != \"Always\" and . != \"Never\") | \"\\(.metadata.name) in namespace \\(.metadata.namespace) has rotationPolicy=\\(.spec.privateKey.rotationPolicy)\"'\n```\n\nThis command will show you, the name and namespace of each Certificate resource that needs to be updated in Git. For example:\n\n```text\nsmoketest-cert in namespace default has rotationPolicy=Foo\n```\n\n#### Server-Side Apply\n\nServer-Side Apply is an alpha feature of cert-manager introduced in 1.8. By\ndefault, the feature is disabled, in which case you can skip this section.\n\nIf you are using Server-Side Apply, i.e., you are running the cert-manager\ncontroller with the flag\n\n```text\n--feature-gates=ServerSideApply=true\n```\n\nThen you need to take action before upgrading to cert-manager 1.8. You will have\nto make sure that there are no Challenge resources currently in the cluster. If\nthere are some, you will need to manually delete them once they are in a 'valid'\nstate.\n\nThe reason the Challenge resources need to be removed before upgrading to 1.8\nwhen using the new Server-Side Apply feature is that cert-manager post-1.8 is\nnot able to clean up Challenge resources that were created pre-1.8.\n\nIf running Kubernetes versions before `v1.22`, the\n[`ServerSideApply`](https://kubernetes.io/docs/reference/using-api/server-side-apply/)\nfeature gate _must_ be enabled in the cluster. This beta feature is enabled by\ndefault on supported versions before `v1.22`.\n\n#### Migrating from the Gateway API v1alpha1 to v1alpha2\n\nThis section only applies to you if you are using the feature gate\n`ExperimentalGatewayAPISupport`.\n\ncert-manager 1.8 drops support for the Gateway API v1alpha1, and now only\nsupports v1alpha2.\n\nBefore upgrading cert-manager, you will need to:\n\n1. remove all existing Gateway API v1alpha1 resources,\n2. upgrade the Gateway API CRDs to v1alpha2,\n3. re-create the Gateway API resources with the v1alpha2.\n\nThis manual intervention is needed because the Gateway API project does not\ncome with a conversion webhook that would allow an easier migration from\nv1alpha1 to v1alpha2.\n\nAfter upgrading cert-manager to 1.8, you will need to remove the `labels` field,\nand add the `parentRefs`:\n\n```diff\n apiVersion: cert-manager.io/v1\n kind: Issuer\n metadata:\n name: letsencrypt\n namespace: default\n spec:\n acme:\n solvers:\n - http01:\n gatewayHTTPRoute:\n- labels:\n- gateway: traefik\n+ parentRefs:\n+ - name: traefik\n+ namespace: traefik\n+ kind: Gateway\n```\n\n## Now, Follow the Regular Upgrade Process\n\nFrom here on you can follow the [regular upgrade process](../../installation/upgrade.md).", "project": "cert-manager-website", "source": "content/docs/releases/upgrading/upgrading-1.7-1.8.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "In this section, you will learn troubleshooting techniques that will help you find the root cause if your Certificate fails to be issued or renewed.\n\nThis section also includes the following guides:\n\n* [Troubleshooting Problems with ACME / Let's Encrypt Certificates](./acme.md):\n Learn more about how the ACME issuer works and how to diagnose problems with it.\n* [Troubleshooting Problems with the Webhook](./webhook.md):\n Learn how to diagnose problems with the cert-manager webhook.\n\n## Overview\n\nWhen troubleshooting cert-manager your best friend is `kubectl describe`, this will give you information on the resources as well as recent events. It is not advised to use the logs as these are quite verbose and only should be looked at if the following steps do not provide help.\n\ncert-manager consists of multiple custom resources that live inside your Kubernetes cluster, these resources are linked together and are often created by one another. When such an event happens it will be reflected in a Kubernetes event, you can see these per-namespace using `kubectl get event`, or in the output of `kubectl describe` when looking at a single resource.\n\n## Troubleshooting a failed certificate request\n\nThere are several resources that are involved in requesting a certificate.\n\n```\n\n ( +---------+ )\n ( | Ingress | ) Optional ACME Only!\n ( +---------+ )\n | |\n | +-------------+ +--------------------+ | +-------+ +-----------+\n |-> | Certificate |----> | CertificateRequest | ----> | | Order | ----> | Challenge |\n +-------------+ +--------------------+ | +-------+ +-----------+\n |\n```\n\nThe cert-manager flow all starts at a `Certificate` resource, you can create this yourself or your Ingress resource will do this for you if you have the [correct annotations](../usage/ingress.md) set.\n\n### 1. Checking the Certificate resource\nFirst we have to check if we have a `Certificate` resource created in our namespace. We can get these using `kubectl get certificate`.\n```console\n$ kubectl get certificate\nNAME READY AGE\nexample-com-tls False 1h\n```\n\nIf none is present and you plan to use the [ingress-shim](../usage/ingress.md): check the ingress annotations more about that is in the [ingress troubleshooting guide](../usage/ingress.md#troubleshooting).\nIf you are not using the ingress-shim: check the output of the command you used to create the certificate.\n\nIf you see one with ready status `False` you can get more info using `kubectl describe certificate`, if the status is `True` that means that cert-manager has successfully issued a certificate.\n```console\n$ kubectl describe certificate\n[...]\nStatus:\n Conditions:\n Last Transition Time: 2020-05-15T21:45:22Z\n Message: Issuing certificate as Secret does not exist\n Reason: DoesNotExist\n Status: False\n Type: Ready\n Next Private Key Secret Name: example-tls-wtlww\nEvents:\n Type Reason Age From Message\n ---- ------ ---- ---- -------\n Normal Issuing 105s cert-manager Issuing certificate as Secret does not exist\n Normal Generated 105s cert-manager Stored new private key in temporary Secret resource \"example-tls-wtlww\"\n Normal Requested 104s cert-manager Created new CertificateRequest resource \"example-tls-bw5t9\"\n```\n\nHere you will find more info about the current certificate status under `Status` as well as detailed information about what happened to it under `Events`. Both will help you determine the current state of the certificate.\nThe last status is `Created new CertificateRequest resource`, it is worth taking a look at in which state `CertificateRequest` is to get more info on why our `Certificate` isn't getting issued.\n\n### 2. Checking the `CertificateRequest`\nThe `CertificateRequest` resource represents a CSR in cert-manager and passes this CSR on onto the issuer.\nYou can find the name of the `CertificateRequest` in the `Certificate` event log or using `kubectl get certificaterequest`\n\nTo get more info we again run `kubectl describe`:\n```console\n$ kubectl describe certificaterequest\nAPI Version: cert-manager.io/v1\nKind: CertificateRequest\nSpec:\n Request: [...]\n Issuer Ref:\n Group: cert-manager.io\n Kind: ClusterIssuer\n Name: letencrypt-production\nStatus:\n Conditions:\n Last Transition Time: 2020-05-15T21:45:36Z\n Message: Waiting on certificate issuance from order example-tls-fqtfg-1165244518: \"pending\"\n Reason: Pending\n Status: False\n Type: Ready\nEvents:\n Type Reason Age From Message\n ---- ------ ---- ---- -------\n Normal OrderCreated 8m20s cert-manager Created Order resource example-tls-fqtfg-1165244518\n```\n\nHere we will see any issue regarding the Issuer configuration as well as Issuer responses.\n\n### 3. Check the issuer state\nIf in the above steps you saw an issuer not ready error you can do the same steps again for (cluster)issuer resources:\n```console\n$ kubectl describe issuer\n$ kubectl describe clusterissuer\n```\n\nThese will allow you to get any error messages regarding accounts or network issues with your issuer.\nTroubleshooting ACME issuers is described in more detail in [Troubleshooting Issuing ACME Certificates](./acme.md).\n\n### 4. ACME Troubleshooting\nACME (e.g. Let's Encrypt) issuers have 2 additional resources inside cert-manager: `Orders` and `Challenges`.\nTroubleshooting these is described in [Troubleshooting Issuing ACME Certificates](./acme.md).", "project": "cert-manager-website", "source": "content/docs/troubleshooting/README.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "The files in this folder are deprecated and will be removed in the future.\nPlease use the files linked in the new istio-csr installation documentation.\n\nWe have to keep these files for now because they are linked from the old installation documentation.\nThe following links were part of the old installation documentation:\n\n```\nkubectl apply -f https://raw.githubusercontent.com/cert-manager/website/master/content/docs/tutorials/istio-csr/example/example-issuer.yaml\n\ncurl -sSL https://raw.githubusercontent.com/cert-manager/website/master/content/docs/tutorials/istio-csr/example/istio-config-getting-started.yaml > istio-install-config.yaml\n```", "project": "cert-manager-website", "source": "content/docs/tutorials/istio-csr/example/DEPRECATED.md", "commit": "cda032e36a7de880aa455ce6bbdb24aa4c3e061f", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "If one disk used by one of the Longhorn replicas is full, that replica will go to the error state, and Longhorn will rebuild another replica on another node/disk.\n\nTo recover from a full disk,\n\n1. Disable the scheduling for the full disk.\n\n Longhorn should have already marked the disk as `unschedulable`.\n\n This step is to make sure the disk will not be scheduled to by accident after more space is freed up.\n\n2. Identify the replicas in the error state on the disk using the Longhorn UI's disk page.\n3. Remove the replicas in the error state.\n\n## Recommended after Recovery\n\nWe recommend adding more disks or more space to the node that had this situation.", "project": "longhorn-website", "source": "content/docs/1.14.0/advanced-resources/data-recovery/full-disk.md", "commit": "34fc6c7bb8e4a161a33af83bbda32d8dc267dbe4", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "If you want to restrict Longhorn components to only run on a particular set of nodes, you can set node selector for all Longhorn components.\nFor example, you want to install Longhorn in a cluster that has both Linux nodes and Windows nodes but Longhorn cannot run on Windows nodes.\nIn this case, you can set the node selector to restrict Longhorn to only run on Linux nodes.\n\nFor more information about how node selector work, refer to the [official Kubernetes documentation.](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector)\n\n# Setting up Node Selector for Longhorn\nLonghorn consists of user-deployed components (for example, Longhorn Manager, Longhorn Driver, and Longhorn UI) and system-managed components (for example, Instance Manager, Backing Image Manager, Share Manager, CSI Driver, and Engine Image).\nYou need to set node selector for both types of components. See more details below.\n\n### Setting up Node Selector During installing Longhorn\n1. Set the node selector for user-deployed components (for example, Longhorn Manager, Longhorn Driver, and Longhorn UI).\n * If you install Longhorn through Rancher, you must copy and paste the following parameters into the YAML on the Rancher UI (click **Edit as YAML** during the installation) to apply the value to all user-deployed components.\n ```yaml\n global:\n nodeSelector:\n label-key1: \"label-value1\"\n ```\n * You can also specify the node selector for each user-deployed component and it will orverride the global setting.\n ```yaml\n longhornManager:\n nodeSelector:\n label-key1: \"label-value1\"\n longhornGlobalManager:\n nodeSelector:\n label-key1: \"label-value1\"\n longhornDriver:\n nodeSelector:\n label-key1: \"label-value1\"\n longhornUI:\n nodeSelector:\n label-key1: \"label-value1\"\n ```\n * If you install Longhorn by using `kubectl` to apply [the deployment YAML](https://raw.githubusercontent.com/longhorn/longhorn/v/deploy/longhorn.yaml), you need to modify the node selector section for Longhorn Manager, Longhorn Global Manager, Longhorn UI, and Longhorn Driver Deployer.\n Then apply the YAMl files.\n * If you install Longhorn using Helm, you can change the Helm values for `global.nodeSelector`, `longhornManager.nodeSelector`, `longhornGlobalManager.nodeSelector`, `longhornUI.nodeSelector`, `longhornDriver.nodeSelector` in the `values.yaml` file before installing the chart.\n\n2. Set the node selector for system-managed components (for example, Instance Manager, Backing Image Manager, Share Manager, CSI Driver, and Engine Image).\n\n Follow the [Customize default settings](../customizing-default-settings/) to set node selector by changing the value for the `system-managed-components-node-selector` default setting\n > Note: Because of the limitation of Rancher 2.5.x, if you are using Rancher UI to install Longhorn, you need to click `Edit As Yaml` and add setting `systemManagedComponentsNodeSelector` to `defaultSettings`.\n >\n > For example:\n > ```yaml\n > defaultSettings:\n > systemManagedComponentsNodeSelector: \"label-key1:label-value1\"\n > ```\n\n### Setting up Node Selector After Longhorn has been installed\n\n> **Warning**:\n> * Since all Longhorn components will be restarted, the Longhorn system is unavailable temporarily.\n> * When all Longhorn volumes are detached, the customized settings are immediately applied to the system-managed components (for example, Instance manager, CSI driver and Engine images).\n> * When one or more Longhorn volumes are still attached, the customized setting is applied to the Instance Manager only when no engines and replica instances are running. You are required to reconfigure the setting after detaching the remaining volumes. Alternatively, you can wait for the next setting synchronization, which will occur in an hour.\n> * Don't operate the Longhorn system while node selector settings are updated and Longhorn components are being restarted.\n\n1. Prepare\n * To ensure that your preferred settings are immediately applied, stop all workloads and detach all Longhorn volumes before applying it.\n\n2. Set the node selector for user-deployed components (for example, Longhorn Manager, Longhorn Driver, and Longhorn UI).\n * If you install Longhorn through Rancher, you must copy and paste the following parameters into the YAML on the Rancher UI (click **Edit as YAML** during the upgrade) to apply the value to all user-deployed components.\n ```yaml\n global:\n nodeSelector:\n label-key1: \"label-value1\"\n ```\n * You can also specify the node selector for each user-deployed component and it will override the global setting.\n ```yaml\n longhornManager:\n nodeSelector:\n label-key1: \"label-value1\"\n longhornGlobalManager:\n nodeSelector:\n label-key1: \"label-value1\"\n longhornDriver:\n nodeSelector:\n label-key1: \"label-value1\"\n longhornUI:\n nodeSelector:\n label-key1: \"label-value1\"\n ```\n * If you install Longhorn by using `kubectl` to apply [the deployment YAML](https://raw.githubusercontent.com/longhorn/longhorn/v/deploy/longhorn.yaml), you need to modify the node selector section for Longhorn Manager, Longhorn Global Manager, Longhorn UI, and Longhorn Driver Deployer.\n Then reapply the YAMl files.\n * If you install Longhorn using Helm, you can change the Helm values for `global.nodeSelector`, `longhornManager.nodeSelector`, `longhornGlobalManager.nodeSelector`, `longhornUI.nodeSelector`, `longhornDriverDeployer.nodeSelector` in the `values.yaml` file, and then run `helm upgrade` to upgrade to the new version of the chart.\n\n3. Set the node selector for system-managed components (for example, Instance Manager, Backing Image Manager, Share Manager, CSI Driver, and Engine Image).\n\n The node selector setting can be found at Longhorn UI under **Settings > System Managed Components Node Selector.**\n\n4. Clean up\n\n If you are changing node selector in a way so that Longhorn cannot run on some nodes that Longhorn is currently running on,\n those nodes will become `down` state after this process. Verify that there is no replica left on those nodes.\n Disable scheduling for those nodes, and delete them in Longhorn UI\n\n## History\nAvailable since v1.1.1\n* [Original feature request](https://github.com/longhorn/longhorn/issues/2199)", "project": "longhorn-website", "source": "content/docs/1.14.0/advanced-resources/deploy/node-selector.md", "commit": "34fc6c7bb8e4a161a33af83bbda32d8dc267dbe4", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "## Use the Prebuilt Binary\n\n1. Download the binary:\n ```bash\n # Choose your architecture (amd64 or arm64).\n ARCH=\"amd64\"\n\n # Download the release binary.\n curl -LO \"https://github.com/longhorn/cli/releases/download/v/longhornctl-linux-${ARCH}\"\n ```\n1. Validate the binary:\n ```bash\n # Download the checksum for your architecture.\n curl -LO \"https://github.com/longhorn/cli/releases/download/v/longhornctl-linux-${ARCH}.sha256\"\n\n # Verify the downloaded binary matches the checksum.\n echo \"$(cat longhornctl-linux-${ARCH}.sha256 | awk '{print $1}') longhornctl-linux-${ARCH}\" | sha256sum --check\n ```\n1. Install the binary:\n ```bash\n sudo install longhornctl-linux-${ARCH} /usr/local/bin/longhornctl\n ```\n1. Verify installation:\n ```bash\n longhornctl version\n ```\n\n## Build From Source\n\nSee [this document](https://github.com/longhorn/cli/tree/?tab=readme-ov-file#build-from-source) in the GitHub repository.", "project": "longhorn-website", "source": "content/docs/1.14.0/advanced-resources/longhornctl/install-longhornctl.md", "commit": "34fc6c7bb8e4a161a33af83bbda32d8dc267dbe4", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "Longhorn supports volume encryption in both `Filesystem` and `Block` modes. Backups created from encrypted volumes are also encrypted.\n\nVolume encryption uses the Linux kernel module `dm_crypt`, the `cryptsetup` utility, and Kubernetes Secrets. `dm_crypt` and `cryptsetup` create and manage encrypted devices. A Secret stores the encryption key and the kubelet supplies that key to the Longhorn node component when the volume is staged, published, or expanded.\n\n# Requirements\n\nTo use encrypted volumes, ensure that the `dm_crypt` kernel module is loaded and that `cryptsetup` is installed on every worker node that can run an encrypted volume.\n\n# Setting up Kubernetes Secrets and StorageClasses\n\nLonghorn uses Kubernetes Secrets for encryption keys. Kubernetes resolves StorageClass Secret parameters when it creates a PV. Configure the node-side Secret parameters on the StorageClass so the resulting PV contains the references needed by the kubelet.\nMetadata-only updates to an existing StorageClass remain possible. StorageClass parameter changes require a same-name replacement because parameters are immutable.\n\nIn the following example, the encryption key is specified as string data in `CRYPTO_KEY_VALUE`. Using string data avoids Base64 encoding before submitting the Secret with kubectl.\n\nBesides `CRYPTO_KEY_VALUE`, `CRYPTO_KEY_CIPHER`, `CRYPTO_KEY_HASH`, `CRYPTO_KEY_SIZE`, `CRYPTO_PBKDF`, `CRYPTO_PBKDF_FORCE_ITERATIONS`, and `CRYPTO_PBKDF_MEMORY` customize volume encryption.\n\n- `CRYPTO_KEY_CIPHER`: Cipher specification. The default for LUKS is `aes-xts-plain64`.\n- `CRYPTO_KEY_HASH`: Passphrase hash for `open`. The default is `sha256`.\n- `CRYPTO_KEY_SIZE`: Key size in bits, as a multiple of 8. The default is `256`.\n- `CRYPTO_PBKDF`: Password-Based Key Derivation Function for the LUKS keyslot. The default is `argon2i`.\n- `CRYPTO_PBKDF_FORCE_ITERATIONS`: Fixed PBKDF iteration count. In FIPS mode, an explicit value such as `200000` helps meet PBKDF2 policy requirements. The Longhorn default is `200000`.\n- `CRYPTO_PBKDF_MEMORY`: Memory cost in KB for memory-hard algorithms such as Argon2. The default is `0` and this parameter is ignored when PBKDF2 is used.\n\nFor more information, see [`cryptsetup(8)`](https://man7.org/linux/man-pages/man8/cryptsetup.8.html).\n\n- Example of an encryption Secret:\n\n ```yaml\n apiVersion: v1\n kind: Secret\n metadata:\n name: longhorn-crypto\n namespace: longhorn-system\n stringData:\n CRYPTO_KEY_VALUE: \"Your encryption passphrase\"\n CRYPTO_KEY_PROVIDER: \"secret\"\n CRYPTO_KEY_CIPHER: \"aes-xts-plain64\"\n CRYPTO_KEY_HASH: \"sha256\"\n CRYPTO_KEY_SIZE: \"256\"\n CRYPTO_PBKDF: \"argon2i\"\n CRYPTO_PBKDF_FORCE_ITERATIONS: \"200000\"\n CRYPTO_PBKDF_MEMORY: \"0\"\n ```\n\n- Example of a StorageClass with a global node-side Secret:\n\n ```yaml\n kind: StorageClass\n apiVersion: storage.k8s.io/v1\n metadata:\n name: longhorn-crypto-global\n provisioner: driver.longhorn.io\n allowVolumeExpansion: true\n parameters:\n numberOfReplicas: \"3\"\n staleReplicaTimeout: \"2880\" # 48 hours in minutes\n fromBackup: \"\"\n encrypted: \"true\"\n csi.storage.k8s.io/node-publish-secret-name: \"longhorn-crypto\"\n csi.storage.k8s.io/node-publish-secret-namespace: \"longhorn-system\"\n csi.storage.k8s.io/node-stage-secret-name: \"longhorn-crypto\"\n csi.storage.k8s.io/node-stage-secret-namespace: \"longhorn-system\"\n csi.storage.k8s.io/node-expand-secret-name: \"longhorn-crypto\"\n csi.storage.k8s.io/node-expand-secret-namespace: \"longhorn-system\"\n ```\n\n- Example of a StorageClass with a volume-specific node-side Secret:\n\n ```yaml\n kind: StorageClass\n apiVersion: storage.k8s.io/v1\n metadata:\n name: longhorn-crypto-per-volume\n provisioner: driver.longhorn.io\n allowVolumeExpansion: true\n parameters:\n numberOfReplicas: \"3\"\n staleReplicaTimeout: \"2880\" # 48 hours in minutes\n fromBackup: \"\"\n encrypted: \"true\"\n csi.storage.k8s.io/node-publish-secret-name: ${pvc.name}\n csi.storage.k8s.io/node-publish-secret-namespace: ${pvc.namespace}\n csi.storage.k8s.io/node-stage-secret-name: ${pvc.name}\n csi.storage.k8s.io/node-stage-secret-namespace: ${pvc.namespace}\n csi.storage.k8s.io/node-expand-secret-name: ${pvc.name}\n csi.storage.k8s.io/node-expand-secret-namespace: ${pvc.namespace}\n ```\n\nKeep the original Secret and all node-side references when updating a StorageClass. Never include Secret values in a manifest export, support bundle, or issue report.\n\n# Secret access for encrypted volumes\n\nThe CSI controller sidecars run with the dedicated `longhorn-csi-service-account`. The base `longhorn-csi-role` and `longhorn-csi-bind` remain Secret-free because the sidecars are separate from the Longhorn manager and node plugin.\n\nThe released Helm chart and static installation manifests grant this service account **cluster-wide `get` access to core Kubernetes Secrets by default** through `longhorn-csi-secret-role` and `longhorn-csi-secret-bind`. The ClusterRole contains only `get` on `secrets`, and the ClusterRoleBinding names exactly `longhorn-csi-service-account` in the Longhorn release namespace. This broad grant is intentional for CSI sidecar compatibility; review it against your cluster's Secret access policy. The grant is static and applies to fresh and upgraded installations regardless of StorageClass parameters.\n\nThe grant is installation-controlled, not startup-dynamic. `longhorn-driver-deployer` does not create or remove it based on StorageClass scans, and no deployer restart is needed when StorageClasses change. Deleting it is not automatically reversed by the deployer; only a later apply with the grant enabled can recreate it. Helm users who do not want controller-side Secret access must set `csi.allowControllerSecretAccess=false`; Helm then renders neither `longhorn-csi-secret-role` nor `longhorn-csi-secret-bind`. For a manifest installation, delete `longhorn-csi-secret-bind` and keep it out of every future apply; the now-unbound role may also be removed. If access is disabled, preserve existing node-side Secret references and encryption Secrets.\n\nBefore disabling access, clean historical provisioner-side Secret parameters from StorageClasses; otherwise new provisioning with those classes can fail. Review custom controller-side Secret requirements separately.\n\nAdministrators who choose to opt out can optionally use the [encrypted-volume Secret migration guide](/kb/how-to-migrate-encrypted-volumes-to-node-only-secrets) to remove historical `csi.storage.k8s.io/provisioner-secret-*` parameters from Longhorn StorageClasses. This is a StorageClass-only migration: parameters are immutable, so each class is recreated under the same name while preserving node-side Secret parameters, labels, annotations, default-class designation, and other fields. It does not require PV or PVC recreation, encryption-key changes, backup, detach, rebind, or PV replacement.\n\nThe migration is documented only for historical provisioner-only parameters. Do not assume that custom `controller-publish-secret-*`, `controller-expand-secret-*`, generic Secret parameters, deprecated parameter spellings, or other custom controller configurations become safe or preserve controller-side behavior after an SC-only cleanup. A best-effort Secret read during a later deletion may be logged as denied by the external-provisioner, but deletion continues; do not restore broad controller access or remove PV deletion annotations to suppress that message.\n\n# Using an Encrypted Volume\n\nCreate a PVC using a StorageClass configured with `encrypted: \"true\"` and the required node-side Secret references. PVC provisioning can use the controller-side grant for CSI sidecar compatibility, while the kubelet fetches the node-side Secret and supplies the key during staging and publishing. A missing or inaccessible key prevents staging or restaging. The node-expand Secret is also required for online filesystem expansion.\n\n# Filesystem Expansion\n\nLonghorn supports [online and offline expansion](../../../nodes-and-volumes/volumes/expansion/#encrypted-volume) for encrypted volumes.\n\nFor online expansion, the external-resizer grows the Longhorn backend through `ControllerExpandVolume`; the controller operation does not consume the encryption key. The kubelet then fetches the Secret named by `csi.storage.k8s.io/node-expand-secret-name` and `csi.storage.k8s.io/node-expand-secret-namespace` for `NodeExpandVolume`, where Longhorn grows the encrypted device and filesystem. Preserve these node-side parameters. Removing a controller-expand reference is not a substitute for the required node-expand reference.\n\nFor offline expansion, the backend grows without the key. When the workload next stages the volume, the kubelet supplies the Secret referenced by the node-stage parameters and Longhorn opens the encrypted device and performs the required filesystem resize.\n\n> **Notice**\n> - Longhorn v1.8.0 does not support expansion of V2 volumes.\n\n# History\n\n- Encryption of volumes in `Filesystem` mode available starting v1.2.0 ([#1859](https://github.com/longhorn/longhorn/issues/1859))\n- Encryption of volumes in `Block` mode available starting v1.6.0 ([#4883](https://github.com/longhorn/longhorn/issues/4883))", "project": "longhorn-website", "source": "content/docs/1.14.0/advanced-resources/security/volume-encryption.md", "commit": "34fc6c7bb8e4a161a33af83bbda32d8dc267dbe4", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "We recommend the following setup for deploying Longhorn in production.\n\n> **Important:** We recommend enabling only one data engine (V1 or V2) per cluster. When both data engines are enabled simultaneously, each node runs separate instance-manager pods for V1 and V2, each with its own guaranteed CPU reservation. This significantly increases CPU overhead per node (the V2 instance-manager pod alone consumes at least 1 dedicated CPU core, which is configurable, for the `spdk_tgt` process). If your workloads do not require both engines, disable the unused one to conserve resources. For more information about guaranteed CPU reservations and how CPU consumption differs between V1 and V2 upgrade flows, see [Guaranteed Instance Manager CPU](#guaranteed-instance-manager-cpu).\n\n- [Minimum Recommended Hardware](#minimum-recommended-hardware)\n - [V1 Data Engine](#v1-data-engine)\n - [V2 Data Engine](#v2-data-engine)\n- [Architecture](#architecture)\n- [Operating System](#operating-system)\n- [Kubernetes](#kubernetes)\n - [Kubernetes Version](#kubernetes-version)\n - [CoreDNS Setup](#coredns-setup)\n - [CNI Plugin Compatibility](#cni-plugin-compatibility)\n- [Nodes and Disk Setup](#nodes-and-disk-setup)\n - [Use a Dedicated Disk](#use-a-dedicated-disk)\n - [Minimal Available Storage and Over-provisioning](#minimal-available-storage-and-over-provisioning)\n - [Disk Space Management](#disk-space-management)\n - [Setting up Extra Disks](#setting-up-extra-disks)\n - [V2 Data Engine: Block-Type Disks](#v2-data-engine-block-type-disks)\n- [Configuring Default Disks Before and After Installation](#configuring-default-disks-before-and-after-installation)\n- [Volumes Performance Optimization](#volumes-performance-optimization)\n - [IO Performance](#io-performance)\n - [Space Efficiency](#space-efficiency)\n - [Disaster Recovery](#disaster-recovery)\n- [Deploying Workloads](#deploying-workloads)\n- [Volumes Maintenance](#volumes-maintenance)\n- [Guaranteed Instance Manager CPU](#guaranteed-instance-manager-cpu)\n - [V1 Data Engine](#v1-data-engine-1)\n - [V2 Data Engine](#v2-data-engine-1)\n- [StorageClass](#storageclass)\n- [Scheduling Settings](#scheduling-settings)\n - [Replica Node Level Soft Anti-Affinity](#replica-node-level-soft-anti-affinity)\n - [Allow Volumes Creation with Degraded Availability](#allow-volumes-creation-with-degraded-availability)\n - [Replica Auto-Balance](#replica-auto-balance)\n\n## Minimum Recommended Hardware\n\n### V1 Data Engine\n\n- 3 nodes\n- 4 vCPUs per node\n- 4 GiB per node\n- SSD/NVMe or similar performance block device on the node for storage (recommended)\n- HDD/Spinning Disk or similar performance block device on the node for storage (verified)\n - 500/250 max IOPS per volume (1 MiB I/O)\n - 500/250 max throughput per volume (MiB/s)\n\n> **Warning**: While Longhorn can function with HDDs (spinning disks) as storage, it is important to understand that **latency** plays a much more important role in volume stability than IOPS or throughput. This is because HDDs are mechanical, relying on spinning platters and moving read/write heads to access data. This physical movement introduces inherent delays (seek time and rotational delay), leading to much higher latency compared to the SSDs or NVMe drives, which utilize flash memory and have no moving parts. This can directly cause instability, especially when multiple input-output intensive tasks are running, such as:\n>\n> - Foreground IOs to the replicas\n> - Foreground IOs from the replicas\n> - Rebuilding volumes\n> - Backups or other workloads\n>\n> The increased latency due to the use of HDDs, combined with other input-output workloads, can lead to **volume instability**. Therefore, we recommend **SSD or NVMe** drives for better performance and stability, especially for production workloads.\n>\n> The mentioned IOPS and throughput (500/250 max IOPS per volume and 500/250 max throughput per volume) are intended as general references based on the test setup but **should not be treated as hard requirements**. Latency, not just throughput, is the most important factor in ensuring system stability.\n\n### V2 Data Engine\n\nIn addition to the V1 requirements above, nodes hosting V2 volumes have these additional requirements:\n\n- 3 nodes\n- **Additional 1 CPU core per node** dedicated to each V2 instance-manager pod (the `spdk_tgt` process uses intensive polling and consumes 100% of a dedicated CPU core)\n- **Additional 2 GiB memory per node** reserved for huge pages (1024 × 2 MiB-sized pages)\n- **Local NVMe SSDs** are strongly recommended for V2 volumes to achieve optimal storage performance\n- Linux kernel 6.7 or later for NVMe/TCP support and better stability.\n- Required kernel modules: `vfio_pci`, `uio_pci_generic`, `nvme-tcp`\n- AMD64 CPUs require SSE4.2 instruction support\n> **Warning**:\n>\n> If you are using AWS EC2 Burstable Performance Instances (such as AWS EC2 T-series), it is highly recommended to set `CpuCredits=unlimited`. The V2 Data Engine's SPDK target process is CPU-intensive. Exhausting CPU credits can lead to severe CPU throttling, which may cause I/O operations to become severely delayed or stuck, making V2 volumes unresponsive. If you are using burstable VMs on other cloud providers, ensure equivalent CPU credit or bursting settings are carefully configured to prevent CPU throttling.\n\n> **Note**: The V2 Data Engine leverages the Storage Performance Development Kit (SPDK) with user space NVMe drivers that provide zero-copy, highly parallel, direct access to SSDs. Using local NVMe disks is strongly recommended for enabling V2 volumes to achieve optimal storage performance. For the full setup guide, see [V2 Data Engine Requirements](../deploy/install/#v2-data-engine-requirements).\n\n## Architecture\n\nLonghorn supports the following architectures:\n\n1. AMD64\n1. ARM64\n\n## Operating System\n\n> **Note:** CentOS Linux has been removed from the verified OS list below, as it has been discontinued in favor of CentOS Stream [[ref](https://www.redhat.com/en/blog/faq-centos-stream-updates#Q5)], a rolling-release Linux distribution. Our focus for verifying RHEL-based downstream open source distributions will be enterprise-grade, such as Rocky and Oracle Linux.\n\nThe following Linux OS distributions and versions have been verified during the v release testing. However, this does not imply that Longhorn exclusively supports these distributions. Essentially, Longhorn should function well on any certified Kubernetes cluster running on Linux nodes with a wide range of general-purpose operating systems, as well as verified container-optimized operating systems like SLE Micro.\n\n| No. | OS | Versions\n|-----|------------------------------| --------\n| 1. | Ubuntu | 26.04\n| 2. | SUSE Linux Enterprise Server | 16.0\n| 3. | SUSE Linux Enterprise Micro | 6.1\n| 4. | Red Hat Enterprise Linux | 10.2\n| 5. | Oracle Linux | 10.2\n| 6. | Rocky Linux | 10.2\n| 7. | Talos Linux | 1.13.4\n| 8. | Container-Optimized OS (GKE) | 125\n\nLonghorn relies heavily on kernel functionality and performs better on some kernel versions. The following activities,\nin particular, benefit from usage of specific kernel versions.\n\n- Optimizing or improving the filesystem: Use a kernel with version `v5.8` or later. See [Issue\n #2507](https://github.com/longhorn/longhorn/issues/2507#issuecomment-857195496) for details.\n- Enabling the [Freeze Filesystem for Snapshot](../references/settings#freeze-filesystem-for-snapshot) setting: Use a\n kernel with version `5.17` or later to ensure that a volume crash during a filesystem freeze cannot lock up a node.\n- Enabling the [V2 Data Engine](../deploy/install/#v2-data-engine-requirements): Use a kernel with version `5.19` or later to ensure NVMe/TCP support. Use a kernel with version `6.7` or later for improved stability (avoids potential memory corruption from SPDK upstream issue [#3116](https://github.com/spdk/spdk/issues/3116#issuecomment-1890984674)).\n\nThe list below contains known broken kernel versions that users should avoid using:\n\n| No. | Version | Distro | Additional Context\n|-----|------------------|-----------------| ------------------\n| 1. | 6.5.6 | Vanilla kernel | Related to this bug https://longhorn.io/kb/troubleshooting-rwx-volume-fails-to-attached-caused-by-protocol-not-supported/\n| 2. | 5.15.0-94 | Ubuntu | Related to this bug https://longhorn.io/kb/troubleshooting-rwx-volume-fails-to-attached-caused-by-protocol-not-supported/\n| 3. | 6.5.0-21 | Ubuntu | Related to this bug https://longhorn.io/kb/troubleshooting-rwx-volume-fails-to-attached-caused-by-protocol-not-supported/\n| 4. | 6.5.0-1014-aws | Ubuntu | Related to this bug https://longhorn.io/kb/troubleshooting-rwx-volume-fails-to-attached-caused-by-protocol-not-supported/\n\n## Kubernetes\n\n### Kubernetes Version\n\nPlease ensure your Kubernetes cluster is at least v1.21 before upgrading to Longhorn v because this is the minimum version Longhorn v supports.\n\nWe recommend running your Kubernetes cluster on one of the following versions. These versions are the active supported versions prior to the Longhorn release, and have been tested with Longhorn v.\n\n| Release | Released | End-of-life\n|---------|--------------| -----------\n| 1.36 | 22 Apr 2026 | 28 Jun 2027\n| 1.35 | 17 Dec 2025 | 28 Feb 2027\n| 1.34 | 27 Aug 2025 | 27 Oct 2026\n| 1.33 | 23 Apr 2025 | 28 Jun 2026\n\nReferenced to https://endoflife.date/kubernetes.\n\n### CoreDNS Setup\n\nEnsure that CoreDNS runs with at least 2 replicas to maintain high availability. This setup minimizes interruptions in the DNS resolution if one CoreDNS pod experiences a temporary disruption.\n\n### CNI Plugin Compatibility\n\nLonghorn v has been verified with [restrictInternalTraffic](https://github.com/longhorn/longhorn/blob/0c1d5ab907b0d7fa6232e05f9cb4ef6733cf7cbe/chart/values.yaml#L39) enabled, which enforces network policies for internal Longhorn components so that only authorized components can communicate with each other, against the following Kubernetes distribution and CNI plugin combinations.\n\n| Kubernetes Distribution | CNI Plugin |\n|-------------------------| ----------|\n| K3s | Flannel |\n| K3s | Calico |\n| K3s | Cilium |\n| RKE2 | Canal |\n| RKE2 | Calico |\n| RKE2 | Cilium |\n\n## Nodes and Disk Setup\n\nWe recommend the following setup for nodes and disks.\n\n### Use a Dedicated Disk\n\nIt's recommended to dedicate a disk for Longhorn storage for production, instead of using the root disk.\n\n### Minimal Available Storage and Over-provisioning\n\nIf you need to use the root disk, use the default `minimal available storage percentage` setup which is 25%, and set `overprovisioning percentage` to 100% to minimize the chance of DiskPressure.\n\nIf you're using a dedicated disk for Longhorn, you can lower the setting `minimal available storage percentage` to 10%.\n\nFor the Over-provisioning percentage, it depends on how much space your volume uses on average. For example, if your workload only uses half of the available volume size, you can set the Over-provisioning percentage to `200`, which means Longhorn will consider the disk to have twice the schedulable size as its full size minus the reserved space.\n\n### Disk Space Management\n\nSince Longhorn doesn't currently support sharding between the different disks, we recommend using [LVM](https://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux)) to aggregate all the disks for Longhorn into a single partition, so it can be easily extended in the future.\n\n### Setting up Extra Disks\n\nAny extra disks must be written in the `/etc/fstab` file to allow automatic mounting after the machine reboots.\n\nDon't use a symbolic link for the extra disks. Use `mount --bind` instead of `ln -s` and make sure it's in the `fstab` file. For details, see [the section about multiple disk support.](../nodes-and-volumes/nodes/multidisk/#use-an-alternative-path-for-a-filesystem-type-disk-on-the-node)\n\n### V2 Data Engine: Block-Type Disks\n\nUnlike the V1 Data Engine which uses `filesystem-type` disks, the V2 Data Engine stores volume data on `block-type` disks. The following best practices apply to V2 block-type disk setup:\n\n- **Use local NVMe disks**: SPDK is equipped with a user space NVMe driver that provides zero-copy, highly parallel, direct access to SSDs. Using local NVMe disks is strongly recommended for V2 volumes.\n\n- **Ensure disk is clean before adding**: Starting with v1.11.0, Longhorn prevents adding block disks that contain an existing file system or partition table. Run `wipefs -a /path/to/block/device` before adding a disk.\n\n- **IOMMU group isolation**: For SPDK to claim a disk via `vfio-pci`, the NVMe device must be in an isolatable IOMMU group. If the device shares an IOMMU group with a PCIe bridge, it cannot be used with the SPDK NVMe driver and must be used in **AIO mode** instead.\n\n- **Huge pages configuration**: Ensure 2 GiB of 2 MiB-sized huge pages (1024 pages) are configured persistently on each V2 node via kernel boot parameters. See [Enable HugePages](../deploy/install/#enable-hugepages) for detailed instructions.\n\n- **Kernel modules**: Ensure `vfio_pci`, `uio_pci_generic`, and `nvme-tcp` modules are loaded and configured to load automatically at boot. See [Load Kernel Modules](../deploy/install/#load-kernel-modules) for detailed instructions.\n\nFor the complete V2 Data Engine setup guide, see [V2 Data Engine Requirements](../deploy/install/#v2-data-engine-requirements).\n\n## Configuring Default Disks Before and After Installation\n\nTo use a directory other than the default `/var/lib/longhorn` for storage, the `Default Data Path` setting can be changed before installing the system. For details on changing pre-installation settings, refer to [this section.](../advanced-resources/deploy/customizing-default-settings)\n\nThe [Default node/disk configuration](../nodes-and-volumes/nodes/default-disk-and-node-config) feature can be used to customize the default disk after installation. Customizing the default configurations for disks and nodes is useful for scaling the cluster because it eliminates the need to configure Longhorn manually for each new node if the node contains more than one disk, or if the disk configuration is different for new nodes. Remember to enable `Create default disk only on labeled node` if applicable.\n\n## Volumes Performance Optimization\n\nBefore configuring workloads, ensure that you have set up the following basic requirements for optimal volume performance.\n\n- SATA/NVMe SSDs or disk drives with similar performance\n- 10 Gbps network bandwidth between nodes\n- Dedicated Priority Class for system-managed and user-deployed Longhorn components. By default, Longhorn installs the default Priority Class `longhorn-critical`.\n\nThe following sections outline other recommendations for production environments.\n\n### IO Performance\n\n- **Storage network**: Use a [dedicated storage network](../advanced-resources/deploy/storage-network/#setting-storage-network) to improve IO performance and stability.\n\n- **Longhorn disk**: Use a [dedicated disk](../nodes-and-volumes/nodes/multidisk/#add-a-disk) for Longhorn storage instead of using the root disk.\n\n- **Replica count**: Set the [default replica count](../references/settings/#default-replica-count) to \"2\" to achieve data availability with better disk space usage or less impact to system performance. This practice is especially beneficial to data-intensive applications.\n\n- **Storage tag**: Use [storage tags](../nodes-and-volumes/nodes/storage-tags) to define storage tiering for data-intensive applications. For example, only high-performance disks can be used for storing performance-sensitive data.\n\n- **Data locality**: Use `best-effort` as the default [data locality](../high-availability/data-locality) of Longhorn StorageClasses.\n\n For applications that support data replication (for example, a distributed database), you can use the `strict-local` option to ensure that only one replica is created for each volume. This practice prevents the extra disk space usage and IO performance overhead associated with volume replication.\n\n For data-intensive applications, you can use pod scheduling functions such as node selector or taint toleration. These functions allow you to schedule the workload to a specific storage-tagged node together with one replica.\n\n### Space Efficiency\n\n- **Recurring snapshots**: Periodically clean up system-generated snapshots and retain only the number of snapshots that makes sense for your implementation.\n\n For applications with replication capability, periodically [delete all types of snapshots](../concepts/#243-deleting-snapshots).\n\n- **Recurring filesystem trim**: Periodically [trim the filesystem](../nodes-and-volumes/volumes/trim-filesystem) inside volumes to reclaim disk space.\n\n- **Snapshot space management**: [Configure global and volume-specific settings](../snapshots-and-backups/snapshot-space-management) to prevent unexpected disk space exhaustion.\n\n### Disaster Recovery\n\n- **Recurring backups**: Create [recurring backup jobs](../snapshots-and-backups/scheduling-backups-and-snapshots/) for mission-critical application volumes.\n\n- **System backup**: Create periodic [system backups](../advanced-resources/system-backup-restore/backup-longhorn-system/#create-longhorn-system-backup).\n\n## Deploying Workloads\n\nIf you're using `ext4` as the filesystem of the volume, we recommend adding a liveness check to workloads to help automatically recover from a network-caused interruption, a node reboot, or a Docker restart. See [this section](../high-availability/recover-volume) for details.\n\n## Volumes Maintenance\n\nUsing Longhorn's built-in backup feature is highly recommended. You can save backups to an object store such as S3 or to an NFS server. Saving to an object store is preferable because it generally offers better reliability. Another advantage is that you do not need to mount and unmount the target, which can complicate failover and upgrades.\n\nFor each volume, schedule at least one recurring backup. If you must run Longhorn in production without a backupstore, then schedule at least one recurring snapshot for each volume.\n\nLonghorn system will create snapshots automatically when rebuilding a replica. Recurring snapshots or backups can also automatically clean up the system-generated snapshot.\n\n## Guaranteed Instance Manager CPU\n\nWe recommend setting the CPU request for Longhorn instance manager pods.\n\n### V1 Data Engine\n\nThe `Guaranteed Instance Manager CPU` setting allows you to reserve a percentage of the total allocatable CPU resources on each node for each instance manager pod when the V1 Data Engine is enabled. The default value is 12.\n\nYou can also set a specific milli CPU value for instance manager pods on a particular node by updating the node's `Instance Manager CPU Request` field.\n\n> **Note:** This field will overwrite the above setting for the specified node.\n\nRefer to [Guaranteed Instance Manager CPU](../references/settings/#guaranteed-instance-manager-cpu) for more details.\n\n### V2 Data Engine\n\nThe `Guaranteed Instance Manager CPU` setting allows you to reserve a percentage of the total allocatable CPU resources on each node for each instance manager pod when the V2 Data Engine is enabled. This reservation applies to the entire V2 instance manager pod.\n\nThe primary CPU consumer in the pod is the Storage Performance Development Kit (SPDK) target daemon (`spdk_tgt`). The [Data Engine CPU Mask](../references/settings#data-engine-cpu-mask) and [Data Engine Number of CPU Cores](../references/settings#data-engine-number-of-cpu-cores) settings control how many CPU cores `spdk_tgt` uses.\n\nIt is necessary that the effective V2 instance manager pod CPU request reserve at least the same number of CPU cores configured for `spdk_tgt`, based on the node's allocatable CPU capacity. For example, reserving 2 CPU cores on a node with 8 allocatable CPUs requires an effective CPU request of at least 25% or 2 CPU cores.\n\nReserving sufficient CPU is essential for maintaining engine and replica stability, especially during periods of high node workload. The default value of the `Guaranteed Instance Manager CPU` setting is 12%.\n\n> **Note:** When both V1 and V2 Data Engines are enabled on the same node, separate instance-manager pods are created for each engine. Plan CPU resources accordingly to ensure each instance-manager pod has sufficient CPU allocation.\n\n## StorageClass\n\nWe don't recommend modifying the default StorageClass named `longhorn`, since the change of parameters might cause issues during an upgrade later. If you want to change the parameters set in the StorageClass, you can create a new StorageClass by referring to the [StorageClass examples](../references/examples/#storageclass).\n\n## Scheduling Settings\n\n### Replica Node Level Soft Anti-Affinity\n\n> Recommend: `false`\n\nThis setting should be set to `false` in production environment to ensure the best availability of the volume. Otherwise, one node down event may bring down more than one replicas of a volume.\n\n### Allow Volumes Creation with Degraded Availability\n\n> Recommend: `false`\n\nThis setting should be set to `false` in production environment to ensure every volume have the best availability when created. Because with the setting set to `true`, the volume creation won't error out even there is only enough room to schedule one replica. So there is a risk that the cluster is running out of the spaces but the user won't be made aware immediately.\n\n### Replica Auto-Balance\n\n> Recommend: `least-effort`\n\nFor production environments, we recommend setting Replica Auto-Balance to `least-effort`. This setting ensures that at least one replica is placed on a different node in each zone, providing extra high availability (HA).\n\nIn certain edge cases, you might consider using the `best-effort`, which continuously attempts to evenly distribute replicas across nodes and zones. However, this setting can lead to frequent rebuilds if the cluster is unstable.\n\nFor most users, having multiple replicas without Replica Auto-Balance setting is sufficient to achieve basic HA, especially if you prefer to avoid excessive rebuilds and resource usage.", "project": "longhorn-website", "source": "content/docs/1.14.0/best-practices.md", "commit": "34fc6c7bb8e4a161a33af83bbda32d8dc267dbe4", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "> **Note**: As of November 2025, the Kubernetes project has announced the retirement of the ingress-nginx controller. For details, [see the official announcement](https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/).\n>\n> **Recommended Alternatives**:\n> To ensure continued support and security, we recommend using one of the following methods to expose the Longhorn UI:\n> * **Traefik Ingress**: The current default for RKE2/K3s environments. See [Create an Ingress with Traefik](../longhorn-ingress-traefik).\n> * **Gateway API**: The modern, successor to Ingress for advanced routing. See [Create an HTTPRoute with Gateway API](../longhorn-httproute).\n\nIf you install Longhorn on a Kubernetes cluster with kubectl or Helm, you will need to create an Ingress to allow external traffic to reach the Longhorn UI.\n\nAuthentication is not enabled by default for kubectl and Helm installations. In these steps, you'll learn how to create an Ingress with basic authentication using annotations for the nginx ingress controller.\n\n1. Create a basic auth file `auth`. It's important the file generated is named auth (actually - that the secret has a key `data.auth`), otherwise the Ingress returns a 503.\n ```\n $ USER= ; PASSWORD= ; echo \"${USER}:$(openssl passwd -stdin -apr1 > auth\n ```\n2. Create a secret:\n ```\n $ kubectl -n longhorn-system create secret generic basic-auth --from-file=auth\n ```\n3. Create an Ingress manifest `longhorn-ingress.yml` :\n > Since v1.2.0, Longhorn supports uploading backing image from the UI, so please specify `nginx.ingress.kubernetes.io/proxy-body-size: 10000m` as below to ensure uploading images work as expected.\n\n ```\n apiVersion: networking.k8s.io/v1\n kind: Ingress\n metadata:\n name: longhorn-ingress\n namespace: longhorn-system\n annotations:\n # type of authentication\n nginx.ingress.kubernetes.io/auth-type: basic\n # prevent the controller from redirecting (308) to HTTPS\n nginx.ingress.kubernetes.io/ssl-redirect: 'false'\n # name of the secret that contains the user/password definitions\n nginx.ingress.kubernetes.io/auth-secret: basic-auth\n # message to display with an appropriate context why the authentication is required\n nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required '\n # custom max body size for file uploading like backing image uploading\n nginx.ingress.kubernetes.io/proxy-body-size: 10000m\n spec:\n ingressClassName: nginx\n rules:\n - http:\n paths:\n - pathType: Prefix\n path: \"/\"\n backend:\n service:\n name: longhorn-frontend\n port:\n number: 80\n ```\n4. Create the Ingress:\n ```\n $ kubectl -n longhorn-system apply -f longhorn-ingress.yml\n ```\n\ne.g.:\n```\n$ USER=foo; PASSWORD=bar; echo \"${USER}:$(openssl passwd -stdin -apr1 > auth\n$ cat auth\nfoo:$apr1$FnyKCYKb$6IP2C45fZxMcoLwkOwf7k0\n\n$ kubectl -n longhorn-system create secret generic basic-auth --from-file=auth\nsecret/basic-auth created\n$ kubectl -n longhorn-system get secret basic-auth -o yaml\napiVersion: v1\ndata:\n auth: Zm9vOiRhcHIxJEZueUtDWUtiJDZJUDJDNDVmWnhNY29Md2tPd2Y3azAK\nkind: Secret\nmetadata:\n creationTimestamp: \"2020-05-29T10:10:16Z\"\n name: basic-auth\n namespace: longhorn-system\n resourceVersion: \"2168509\"\n selfLink: /api/v1/namespaces/longhorn-system/secrets/basic-auth\n uid: 9f66233f-b12f-4204-9c9d-5bcaca794bb7\ntype: Opaque\n\n$ echo \"\napiVersion: networking.k8s.io/v1\nkind: Ingress\nmetadata:\n name: longhorn-ingress\n namespace: longhorn-system\n annotations:\n # type of authentication\n nginx.ingress.kubernetes.io/auth-type: basic\n # prevent the controller from redirecting (308) to HTTPS\n nginx.ingress.kubernetes.io/ssl-redirect: 'false'\n # name of the secret that contains the user/password definitions\n nginx.ingress.kubernetes.io/auth-secret: basic-auth\n # message to display with an appropriate context why the authentication is required\n nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required '\nspec:\n rules:\n - http:\n paths:\n - pathType: Prefix\n path: \"/\"\n backend:\n service:\n name: longhorn-frontend\n port:\n number: 80\n\" | kubectl -n longhorn-system create -f -\ningress.networking.k8s.io/longhorn-ingress created\n\n$ kubectl -n longhorn-system get ingress\nNAME HOSTS ADDRESS PORTS AGE\nlonghorn-ingress * 45.79.165.114,66.228.45.37,97.107.142.125 80 2m7s\n\n$ curl -v http://97.107.142.125/\n* Trying 97.107.142.125...\n* TCP_NODELAY set\n* Connected to 97.107.142.125 (97.107.142.125) port 80 (#0)\n> GET / HTTP/1.1\n> Host: 97.107.142.125\n> User-Agent: curl/7.64.1\n> Accept: */*\n>\n\n 401 Authorization Required\n\n 401 Authorization Required\n openresty/1.15.8.1\n\n* Connection #0 to host 97.107.142.125 left intact\n* Closing connection 0\n\n$ curl -v http://97.107.142.125/ -u foo:bar\n* Trying 97.107.142.125...\n* TCP_NODELAY set\n* Connected to 97.107.142.125 (97.107.142.125) port 80 (#0)\n* Server auth using Basic with user 'foo'\n> GET / HTTP/1.1\n> Host: 97.107.142.125\n> Authorization: Basic Zm9vOmJhcg==\n> User-Agent: curl/7.64.1\n> Accept: */*\n>\n\n......\n```\n\n## Additional Steps for AWS EKS Kubernetes Clusters\n\nYou will need to create an ELB (Elastic Load Balancer) to expose the nginx Ingress controller to the Internet. Additional costs may apply.\n\n1. Create pre-requisite resources according to the [nginx ingress controller documentation.](https://kubernetes.github.io/ingress-nginx/deploy/#prerequisite-generic-deployment-command)\n\n2. Create an ELB by following [these steps.](https://kubernetes.github.io/ingress-nginx/deploy/#aws)\n\n## References\n\nhttps://kubernetes.github.io/ingress-nginx/", "project": "longhorn-website", "source": "content/docs/1.14.0/deploy/accessing-the-ui/longhorn-ingress.md", "commit": "34fc6c7bb8e4a161a33af83bbda32d8dc267dbe4", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "## Prerequisites\n- Your workstation: Install the [Argo CD CLI](https://argo-cd.readthedocs.io/en/stable/cli_installation/).\n- Kubernetes cluster:\n - Ensure that each node fulfills the [installation requirements](../#installation-requirements).\n - Install [Argo CD](https://argo-cd.readthedocs.io/en/stable/).\n\n ```bash\n kubectl create namespace argocd\n kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/core-install.yaml\n ```\n Allow some time for the deployment of Argo CD components in the `argocd` namespace.\n\n> Use [Longhorn Command Line Tool](../../../advanced-resources/longhornctl/) to check the Longhorn environment for potential issues.\n\n## Installing Longhorn\n\n1. Log in to Argo CD.\n\n ```bash\n argocd login --core\n ```\n\n1. Set the current namespace to `argocd`.\n\n ```bash\n kubectl config set-context --current --namespace=argocd\n ```\n\n1. Create the Longhorn Application custom resource.\n\n ```bash\n cat > longhorn-application.yaml <<EOF\n apiVersion: argoproj.io/v1alpha1\n kind: Application\n metadata:\n name: longhorn\n namespace: argocd\n spec:\n syncPolicy:\n syncOptions:\n - CreateNamespace=true\n project: default\n sources:\n - chart: longhorn\n repoURL: https://charts.longhorn.io/\n targetRevision: v # Replace with the Longhorn version you'd like to install or upgrade to\n helm:\n values: |\n preUpgradeChecker:\n jobEnabled: false\n destination:\n server: https://kubernetes.default.svc\n namespace: longhorn-system\n EOF\n kubectl apply -f longhorn-application.yaml\n ```\n\n1. Deploy Longhorn with the configured settings.\n\n ```bash\n argocd app sync longhorn\n ```\n\n1. Verify that Longhorn was installed successfully.\n\n ```bash\n kubectl -n longhorn-system get pod\n ```\n\n Example of a successful Longhorn installation:\n\n ```bash\n NAME READY STATUS RESTARTS AGE\n longhorn-ui-b7c844b49-w25g5 1/1 Running 0 2m41s\n longhorn-manager-pzgsp 1/1 Running 0 2m41s\n longhorn-driver-deployer-6bd59c9f76-lqczw 1/1 Running 0 2m41s\n longhorn-csi-plugin-mbwqz 2/2 Running 0 100s\n csi-snapshotter-588457fcdf-22bqp 1/1 Running 0 100s\n csi-snapshotter-588457fcdf-2wd6g 1/1 Running 0 100s\n csi-provisioner-869bdc4b79-mzrwf 1/1 Running 0 101s\n csi-provisioner-869bdc4b79-klgfm 1/1 Running 0 101s\n csi-resizer-6d8cf5f99f-fd2ck 1/1 Running 0 101s\n csi-provisioner-869bdc4b79-j46rx 1/1 Running 0 101s\n csi-snapshotter-588457fcdf-bvjdt 1/1 Running 0 100s\n csi-resizer-6d8cf5f99f-68cw7 1/1 Running 0 101s\n csi-attacher-7bf4b7f996-df8v6 1/1 Running 0 101s\n csi-attacher-7bf4b7f996-g9cwc 1/1 Running 0 101s\n csi-attacher-7bf4b7f996-8l9sw 1/1 Running 0 101s\n csi-resizer-6d8cf5f99f-smdjw 1/1 Running 0 101s\n instance-manager-b34d5db1fe1e2d52bcfb308be3166cfc 1/1 Running 0 114s\n engine-image-ei-df38d2e5-cv6nc 1/1 Running 0 114s\n ```\n\n1. [Create an NGINX Ingress controller with basic authentication](../../accessing-the-ui/longhorn-ingress) to access the Longhorn UI. Authentication to the Longhorn UI is not enabled by default.\n\n1. [Access the Longhorn UI](../../accessing-the-ui).", "project": "longhorn-website", "source": "content/docs/1.14.0/deploy/install/install-with-argocd.md", "commit": "34fc6c7bb8e4a161a33af83bbda32d8dc267dbe4", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "In this section, you'll learn how to uninstall Longhorn.\n\n- [Prerequisite](#prerequisite)\n- [Uninstalling Longhorn from the Rancher UI](#uninstalling-longhorn-from-the-rancher-ui)\n- [Uninstalling Longhorn using Helm](#uninstalling-longhorn-using-helm)\n- [Uninstalling Longhorn using Helm Controller](#uninstalling-longhorn-using-helm-controller)\n- [Uninstalling Longhorn using Fleet](#uninstalling-longhorn-using-fleet)\n- [Uninstalling Longhorn using Flux](#uninstalling-longhorn-using-flux)\n- [Uninstalling Longhorn using Argo CD](#uninstalling-longhorn-using-argo-cd)\n- [Uninstalling Longhorn using kubectl](#uninstalling-longhorn-using-kubectl)\n- [Troubleshooting](#troubleshooting)\n - [Uninstalling using Rancher UI or Helm failed, I am not sure why](#uninstalling-using-rancher-ui-or-helm-failed-i-am-not-sure-why)\n - [I deleted the Longhorn App from Rancher UI instead of following the uninstallation procedure](#i-deleted-the-longhorn-app-from-rancher-ui-instead-of-following-the-uninstallation-procedure)\n - [Problems with CRDs](#problems-with-crds)\n\n### Prerequisite\nTo prevent Longhorn from being accidentally uninstalled (which leads to data lost),\nwe introduce a new setting, [deleting-confirmation-flag](../../references/settings/#deleting-confirmation-flag).\nIf this flag is **false**, the Longhorn uninstallation job will fail.\nSet this flag to **true** to allow Longhorn uninstallation.\nYou can set this flag using setting page in Longhorn UI or `kubectl -n longhorn-system patch -p '{\"value\": \"true\"}' --type=merge lhs deleting-confirmation-flag`\n\nTo prevent damage to the Kubernetes cluster, we recommend deleting all Kubernetes workloads using Longhorn volumes (PersistentVolume, PersistentVolumeClaim, StorageClass, Deployment, StatefulSet, DaemonSet, etc).\n\n### Uninstalling Longhorn from the Rancher UI\n\nFrom Rancher UI, navigate to `Catalog Apps` tab and delete Longhorn app.\n\n### Uninstalling Longhorn using Helm\n\nRun this command:\n\n```\nhelm uninstall longhorn -n longhorn-system\n```\n\n### Uninstalling Longhorn using Helm Controller\n\nRun this command:\n\n```\nkubectl delete helmchart -n\n```\n\n### Uninstalling Longhorn Using Fleet\n\nRun the following command:\n\n```\nkubectl delete GitRepo longhorn -n fleet-local\n```\n\nAfter the `longhorn-uninstall` job is completed, run the following command:\n\n```\nkubectl delete -f https://raw.githubusercontent.com/longhorn/longhorn/v/deploy/longhorn.yaml\n```\n\n### Uninstalling Longhorn Using Flux\n\nRun the following command:\n\n```\nflux delete helmrelease longhorn-release -n longhorn-system\n```\n\n### Uninstalling Longhorn Using Argo CD\n\nArgo CD currently does not support the PreDelete resource hook. Instead of running `argocd app delete longhorn` directly, you must [uninstall Longhorn using kubectl](#uninstalling-longhorn-using-kubectl) to prevent dangling resources from remaining in the `longhorn-system` namespace.\n\n### Uninstalling Longhorn using kubectl\n\n1. Create the uninstallation job to clean up CRDs from the system and wait for success:\n\n ```\n kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/v/uninstall/uninstall.yaml\n kubectl get job/longhorn-uninstall -n longhorn-system -w\n ```\n\n Example output:\n ```\n $ kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/v/uninstall/uninstall.yaml\n serviceaccount/longhorn-uninstall-service-account created\n clusterrole.rbac.authorization.k8s.io/longhorn-uninstall-role created\n clusterrolebinding.rbac.authorization.k8s.io/longhorn-uninstall-bind created\n job.batch/longhorn-uninstall created\n\n $ kubectl get job/longhorn-uninstall -n longhorn-system -w\n NAME COMPLETIONS DURATION AGE\n longhorn-uninstall 0/1 3s 3s\n longhorn-uninstall 1/1 20s 20s\n ```\n\n2. Remove remaining components:\n ```\n kubectl delete -f https://raw.githubusercontent.com/longhorn/longhorn/v/deploy/longhorn.yaml\n kubectl delete -f https://raw.githubusercontent.com/longhorn/longhorn/v/uninstall/uninstall.yaml\n ```\n\n> **Tip:** If you try `kubectl delete -f https://raw.githubusercontent.com/longhorn/longhorn/v/deploy/longhorn.yaml` first and get stuck there,\npressing `Ctrl C` then running `kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/v/uninstall/uninstall.yaml` can also help you remove Longhorn. Finally, don't forget to cleanup remaining components.\n\n### Troubleshooting\n#### Uninstalling using Rancher UI or Helm failed, I am not sure why\nYou might want to check the logs of the `longhorn-uninstall-xxx` pod inside `longhorn-system` namespace to see why it failed.\nOne reason can be that [deleting-confirmation-flag](../../references/settings/#deleting-confirmation-flag) is `false`.\nYou can set it to `true` by using setting page in Longhorn UI or `kubectl -n longhorn-system patch -p '{\"value\": \"true\"}' --type=merge lhs deleting-confirmation-flag`\nthen retry the Helm/Rancher uninstallation.\n\nIf the uninstallation was an accident (you don't actually want to uninstall Longhorn),\nyou can cancel the uninstallation as the following.\n1. If you use Rancher UI to deploy Longhorn\n 1. Open a kubectl shell on Rancher UI\n 1. Find the latest revision of Longhorn release\n ```shell\n > helm list -n longhorn-system -a\n NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION\n longhorn longhorn-system 2 2022-10-14 01:22:36.929130451 +0000 UTC uninstalling longhorn-100.2.3+up1.3.2-rc1 v1.3.2-rc1\n longhorn-crd longhorn-system 3 2022-10-13 22:19:05.976625081 +0000 UTC deployed longhorn-crd-100.2.3+up1.3.2-rc1 v1.3.2-rc1\n ```\n 1. Rollback to the latest revision\n ```shell\n > helm rollback longhorn 2 -n longhorn-system\n checking 22 resources for changes\n ...\n Rollback was a success! Happy Helming!\n ```\n1. If you use Helm deploy Longhorn\n 1. Open a kubectl terminal\n 1. Find the latest revision of Longhorn release\n ```shell\n ➜ helm list --namespace longhorn-system -a\n NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION\n longhorn longhorn-system 1 2022-10-14 13:45:25.341292504 -0700 PDT uninstalling longhorn-1.4.0-dev v1.4.0-dev\n ```\n 1. Rollback to the latest revision\n ```shell\n ➜ helm rollback longhorn 1 -n longhorn-system\n Rollback was a success! Happy Helming!\n ```\n\n#### I deleted the Longhorn App from Rancher UI instead of following the uninstallation procedure\n\nRedeploy the (same version) Longhorn App. Follow the uninstallation procedure above.\n\n#### Problems with CRDs\n\nIf your CRD instances or the CRDs themselves can't be deleted for whatever reason, run the commands below to clean up. Caution: this will wipe all Longhorn state!\n\n```shell\n# Delete CRD finalizers, instances and definitions\nfor crd in $(kubectl get crd -o jsonpath={.items[*].metadata.name} | tr ' ' '\\n' | grep longhorn.io); do\n kubectl -n ${NAMESPACE} get $crd -o yaml | sed \"s/\\- longhorn.io//g\" | kubectl apply -f -\n kubectl -n ${NAMESPACE} delete $crd --all\n kubectl delete crd/$crd\ndone\n```\n\nIf you encounter the following error, it is possible that an incomplete uninstallation removed the Longhorn validation or modification webhook services, but left the same services registered.\n\n`for: \"STDIN\": error when patching \"STDIN\": Internal error occurred: failed calling webhook \"validator.longhorn.io\": failed to call webhook: Post \"https://longhorn-admission-webhook.longhorn-system.svc:9502/v1/webhook/validation?timeout=10s\": service \"longhorn-admission-webhook\" not found`\n\nYou can run the following commands to check the status of the webhook services.\n\n```shell\n$ kubectl get ValidatingWebhookConfiguration -A\nNAME WEBHOOKS AGE\nlonghorn-webhook-validator 1 46d\nrancher.cattle.io 7 133d\nrke2-ingress-nginx-admission 1 133d\nrke2-snapshot-validation-webhook 1 133d\n\n$ kubectl get MutatingWebhookConfiguration -A\nNAME WEBHOOKS AGE\nlonghorn-webhook-mutator 1 46d\nrancher.cattle.io 4 133d\n```\n\nIf either or both are still registered, you can delete the configuration to remove the services from the patch operation call path.\n\n```shell\n$ kubectl delete ValidatingWebhookConfiguration longhorn-webhook-validator\nvalidatingwebhookconfiguration.admissionregistration.k8s.io \"longhorn-webhook-validator\" deleted\n\n$ kubectl delete MutatingWebhookConfiguration longhorn-webhook-mutator\nmutatingwebhookconfiguration.admissionregistration.k8s.io \"longhorn-webhook-mutator\" deleted\n```\n\nThe script should run successfully after the configuration is deleted.\n\n```shell\nWarning: Detected changes to resource pvc-279e8c3e-bfb0-4233-8899-77b5b178c08c which is currently being deleted.\nvolumeattachment.longhorn.io/pvc-279e8c3e-bfb0-4233-8899-77b5b178c08c configured\nNo resources found\ncustomresourcedefinition.apiextensions.k8s.io \"volumeattachments.longhorn.io\" deleted\n```\n\n---\nPlease see [link](https://github.com/longhorn/longhorn) for more information.", "project": "longhorn-website", "source": "content/docs/1.14.0/deploy/uninstall/_index.md", "commit": "34fc6c7bb8e4a161a33af83bbda32d8dc267dbe4", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "> **Notice**:\n>\n> This engine upgrade procedure applies only to V1 Data Engine volumes. For V2 Data Engine, see [V2 Data Engine Instance Manager Upgrade](../v2-instance-upgrade/).\n\nSince Longhorn v1.1.1, we provide an option to help you automatically upgrade Longhorn volumes to the new default engine version after upgrading Longhorn manager.\nThis feature reduces the amount of manual work you have to do when upgrading Longhorn.\nThere are a few concepts related to this feature as listed below:\n\n## 1. Concurrent Automatic Engine Upgrade Per Node Limit Setting\n\nThis is a setting that controls how Longhorn automatically upgrades volumes' engines to the new default engine image after upgrading Longhorn manager.\nThe value of this setting specifies the maximum number of engines per node that are allowed to upgrade to the default engine image at the same time.\nIf the value is 0, Longhorn will not automatically upgrade volumes' engines to the default version.\nThe bigger this value is, the faster the engine upgrade process finishes.\n\nHowever, giving a bigger value for this setting will consume more CPU and memory of the node during the engine upgrade process.\nWe recommend setting the value to 3 to leave some room for error but don't overwhelm the system with too many failed upgrades.\n\n## 2. The behavior of Longhorn with different volume conditions\n\nIn the following cases, assume that the `concurrent automatic engine upgrade per node limit` setting is bigger than 0.\n\n1. Attached Volumes\n\n If the volume is in attached state and healthy, Longhorn will automatically do a live upgrade for the volume's engine to the new default engine image.\n\n1. Detached Volumes\n\n Longhorn automatically does an offline upgrade for detached volume.\n\n1. Disaster Recovery Volumes\n\n Longhorn doesn't automatically upgrade [disaster recovery volumes](../../../snapshots-and-backups/setup-disaster-recovery-volumes/) to the new default engine image because it would trigger a full restoration for the disaster recovery volumes.\nThe full restoration might affect the performance of other running Longhorn volumes in the system.\nSo, Longhorn leaves it to you to decide when it is the good time to manually upgrade the engine for disaster recovery volumes (e.g., when the system is idle or during the maintenance time).\n\n However, when you activate the disaster recovery volume, it will be activated and then detached.\nAt this time, Longhorn will automatically do offline upgrade for the volume similar to the detached volume case.\n\n## 3. What Happened If The Upgrade Fails?\n\nIf a volume failed to upgrade its engine, the engine image in volume's spec will remain to be different than the engine image in the volume's status.\nLonghorn will continuously retry to upgrade until it succeeds.\n\nIf there are too many volumes that fail to upgrade per node (i.e., more than the `concurrent automatic engine upgrade per node limit` setting),\nLonghorn will stop upgrading volume on that node.\n\n## 4. Liveness and Cleanup of Old Instance Manager Pods During Automatic Upgrade\n\nFor the liveness and cleanup of old instance manager pods during live upgrade, refer to the [Instance Manager Pods During Upgrade](../instance-manager-pods-during-upgrade) documentation.", "project": "longhorn-website", "source": "content/docs/1.14.0/deploy/upgrade/auto-upgrade-engine.md", "commit": "34fc6c7bb8e4a161a33af83bbda32d8dc267dbe4", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "This section describes how to handle planned node maintenance or upgrading Kubernetes version for the cluster.\n\n- [Updating the Node OS or Container Runtime](#updating-the-node-os-or-container-runtime)\n- [Removing a Disk](#removing-a-disk)\n - [Reusing the Node Name](#reusing-the-node-name)\n- [Removing a Node](#removing-a-node)\n- [Upgrading Kubernetes](#upgrading-kubernetes)\n - [In-place Upgrade](#in-place-upgrade)\n - [Managed Kubernetes](#managed-kubernetes)\n- [Node Drain Policy Recommendations](#node-drain-policy-recommendations)\n - [Important Notes](#important-notes)\n - [Block If Contains Last Replica](#block-if-contains-last-replica)\n - [Allow If Last Replica Is Stopped](#allow-if-last-replica-is-stopped)\n - [Always Allow](#always-allow)\n - [Block For Eviction](#block-for-eviction)\n - [Block For Eviction If Contains Last Replica](#block-for-eviction-if-contains-last-replica)\n\n## Updating the Node OS or Container Runtime\n\n1. Cordon the node. Longhorn will automatically disable the node scheduling when a Kubernetes node is cordoned.\n\n1. Drain the node to move the workload to somewhere else.\n\n It is necessary to use `--ignore-daemonsets` to drain the node. The `--ignore-daemonsets` is needed because Longhorn\n deployed some daemonsets such as `Longhorn manager`, `Longhorn CSI plugin`, `engine image`.\n\n While the drain proceeds, engine processes on the node will be migrated with the workload pods to other nodes.\n\n > **Note:** Volumes that are not attached through the CSI flow on the node (for example, manually attached using\n > UI) will not be automatically attached to new nodes by Kubernetes during the draining. Therefore, Longhorn will\n > prevent the node from completing the drain operation. The user will need to detach these volumes manually to\n > unblock the draining.\n\n While the drain proceeds, replica processes on the node will either continue to run or eventually be evicted and\n stopped based on the [Node Drain Policy](#node-drain-policy-recommendations).\n\n > **Note:** By default, if there is one last healthy replica for a volume on the node, Longhorn will prevent the node\n > from completing the drain operation, to protect the last replica and prevent the disruption of the workload. You\n > can control this behavior with the setting [Node Drain Policy](../../references/settings#node-drain-policy), or\n > [evict the replica to other nodes before draining](../../nodes-and-volumes/nodes/disks-or-nodes-eviction). See [Node Drain Policy\n > Recommendations](#node-drain-policy-recommendations) for considerations when selecting a policy.\n\n After the drain is completed, there should be no engine or replica processes running on the node, as the\n instance-manager pod that was running them will be stopped. Depending on the [Node Drain\n Policy](#node-drain-policy-recommendations), replicas scheduled to the node will either appear as `Failed` or be\n removed in favor of replacements. Workloads using Longhorn volumes will function as expected and enough replicas will\n be running elsewhere to meet the requirements of the policy.\n\n > **Note:** Normally you don't need to evict the replicas before the drain operation, as long as you have healthy\n > replicas on other nodes. The replicas can be reused later, once the node back online and uncordoned. See [Node\n > Drain Policy](#node-drain-policy-recommendations) for further guidance.\n\n1. Perform the necessary maintenance, including shutting down or rebooting the node.\n1. Uncordon the node. Longhorn will automatically re-enable the node scheduling. If there are existing replicas on the\n node, Longhorn might use those replicas to speed up the rebuilding process. You can set the [Replica Replenishment\n Wait Interval](../../references/settings#replica-replenishment-wait-interval) setting to customize how long Longhorn\n should wait for potentially reusable replica to be available.\n\n## Removing a Disk\n\nTo remove a disk:\n\n1. Disable the disk scheduling.\n1. Evict all the replicas on the disk.\n1. Delete the disk.\n\n### Reusing the Node Name\n\nThese steps also apply if you've replaced a node using the same node name. Longhorn will recognize that the disks are\ndifferent once the new node is up. You will need to remove the original disks first and add them back for the new node\nif it uses the same name as the previous node.\n\n## Removing a Node\n\nTo remove a node:\n\n1. Disable the disk scheduling.\n1. Evict all the replicas on the node.\n1. Detach all the volumes on the node.\n\n If the node has been drained, all the workloads should be migrated to another node already.\n\n If there are any other volumes remaining attached, detach them before continuing.\n\n1. Remove the node from Longhorn using the `Delete` in the `Node` tab.\n\n Or, remove the node from Kubernetes, using:\n\n kubectl delete node\n\n1. Longhorn will automatically remove the node from the cluster.\n\n## Upgrading Kubernetes\n\n### In-place Upgrade\n\nIn-place upgrade is upgrading method in which nodes are upgraded without being removed from the cluster. Some example\nsolutions that use this upgrade methods are [k3s automated upgrades](https://docs.k3s.io/upgrades/automated), [Rancher's\nKubernetes upgrade\nguide](https://rancher.com/docs/rancher/v2.x/en/cluster-admin/upgrading-kubernetes/#upgrading-the-kubernetes-version),\n[Kubeadm upgrade](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/), etc...\n\nWith the assumption that node and disks are not being deleted/removed, the recommended upgrading guide is:\n\n1. Cordon and drain a node before upgrading Kubernetes components. Draining instructions are similar to the ones at\n [Updating the Node OS or Container Runtime](#updating-the-node-os-or-container-runtime).\n2. The drain `--timeout` should be big enough so that replica rebuildings on healthy nodes can finish between node\n upgrades. The more Longhorn replicas you have on the draining node, the more time it takes for the Longhorn replicas\n to be rebuilt on other healthy nodes. We recommending you to test and select a big enough value or set it to 0 (aka\n never timeout).\n3. The number of nodes upgrading at a time should be smaller than the number of Longhorn replicas for each volume.\n This is so that a running Longhorn volume has at least one healthy replica running at a time.\n4. Consider setting the setting [Node Drain Policy](../../references/settings#node-drain-policy) to\n `allow-if-replica-is-stopped` so that the drain is not blocked by the last healthy replica of a detached volume. See\n [Node Drain Policy Recommendations](#node-drain-policy-recommendations) for considerations when selecting a policy.\n\n### Managed Kubernetes\n\nSee the instruction at [Support Managed Kubernetes Service](../../advanced-resources/support-managed-k8s-service).\n\n## Node Drain Policy Recommendations\n\nThere are currently five Node Drain Policies available for selection. Each has its own benefits and drawbacks. This\nsection provides general guidance on each and suggests situations in which each might be used.\n\n### Important Notes\n\nNode Drain Policy is intended to govern Longhorn behavior when a node is actively being drained. However, there is no\nway for Longhorn to determine the difference between the cordoning and draining of a node, so, depending on the policy,\nLonghorn may take action any time a node is cordoned, even if it is not being drained.\n\nNode drain policy works to prevent the eviction of an instance-manager pod during a drain until certain conditions are\nmet. If the instance-manager pod cannot be evicted, the drain cannot complete. This prevents a user (or automated\nprocess) from continuing to shut down or restart a node if it is not safe to do so. It may be tempting to ignore the\ndrain failure and proceed with maintenance operations if it seems to take too long, but this limits Longhorn's ability\nto protect data. Always look at events and/or logs to try to determine WHY the drain is not progressing and take actions\nto fix the underlying issue.\n\n### Block If Contains Last Replica\n\nThis is the default policy. It is intended to provide a good balance between convenience and data protection. While it\nis in effect, Longhorn will prevent the eviction of an instance-manager pod (and the completion of a drain) on a\ncordoned node that contains the last healthy replica of a volume.\n\nBenefits:\n\n- Protects data by preventing the drain operation from completing until there is a healthy replica available for each\n volume available on another node.\n\nDrawbacks:\n\n- If there is only one replica for the volume, or if its other replicas are unhealthy, the user may need to manually\n (through the UI) request the eviction of replicas from the disk or node.\n- Volumes may be degraded after the drain is complete. If the node is rebooted, redundancy is reduced until it is\n running again. If the node is removed, redundancy is reduced until another replica rebuilds.\n\n### Allow If Last Replica Is Stopped\n\nThis policy is similar to `Block If Contains Last Replica`. It is inherently less safe, but can allow drains to complete\nmore quickly. It only prevents the eviction of an instance-manager pod (and the completion of a drain) on a node that\ncontains the last RUNNING healthy replica.\n\nBenefits:\n\n- Allows the drain operation to proceed in situations where the node being drained is expected to come back online\n (data will not be lost) and the replicas stored on the node's disks are not actively being used.\n\nDrawbacks:\n\n- Similar drawbacks to `Block If Contains Last Replica`.\n- If, for some reason, the node never comes back, data is lost.\n\n### Always Allow\n\nThis policy does not protect data in any way, but allows drains to immediately complete. It never prevents the eviction\nof an instance-manager pod (and the completion of a drain). Do not use it in a production environment.\n\nBenefits:\n\n- The drain operation completes quickly without Longhorn getting in the way.\n\nDrawbacks:\n\n- There is no opportunity for Longhorn to protect data.\n\n### Block For Eviction\n\nThis policy provides the maximum amount of data protection, but can lead to long drain times and unnecessary data\nmovement. It prevents the eviction of an instance-manager pod (and the completion of a drain) as long as any replicas\nremain on a node. In addition, it takes action to automatically evict replicas from the node.\n\nIt is not recommended to leave this policy enabled under normal use, as it will trigger replica eviction any time a\nnode is cordoned. Only enable it during planned maintenance.\n\nA primary use case for this policy is when automatically upgrading clusters in which volumes have no redundancy\n(`numberOfReplicas == 1`). Other policies will prevent the drain until such replicas are manually evicted, which is\ninconvenient for automation.\n\nBenefits:\n\n- Protects data by preventing the drain operation from completing until all replicas have been relocated.\n- Automatically evicts replicas, so the user does not need to do it manually (through the UI).\n- Maintains replica redundancy at all times.\n\nDrawbacks:\n\n- The drain operation is significantly slower than for other behaviors. Every replica must be rebuilt on another node\n before it can complete. Drain timeout must be adjusted as appropriate for the amount of data that will move during\n rebuilding.\n- The drain operation is data-intensive, especially when Replica Auto Balance is enabled, as evicted replicas may be\n moved back to the drained node when/if it comes back online.\n- Like all of these policies, it triggers on cordon, not on drain. If a user regularly cordons nodes without draining\n them, replicas will be rebuilt pointlessly.\n\n### Block For Eviction If Contains Last Replica\n\nThis policy provides the data protection of the default `Block If Contains Last Replica` with the added convenience of\nautomatic eviction. While it is in effect, Longhorn will prevent the eviction of an instance-manager pod (and the\ncompletion of a drain) on a cordoned node that contains the last healthy replica of a volume. In addition, replicas that\nmeet this condition are automatically evicted from the node.\n\nIt is not recommended to leave this policy enabled under normal use, as it may trigger replica eviction any time a\nnode is cordoned. Only enable it during planned maintenance.\n\nA primary use case for this policy is when automatically upgrading clusters in which volumes have no redundancy\n(`numberOfReplicas == 1`). Other policies will prevent the drain until such replicas are manually evicted, which is\ninconvenient for automation.\n\nBenefits:\n\n- Protects data by preventing the drain operation from completing until there is a healthy replica available for each\n volume available on another node.\n- Automatically evicts replicas, so the user does not need to do it manually (through the UI).\n- The drain operation is only as slow and data-intensive as is necessary to protect data.\n\nDrawbacks:\n\n- Volumes may be degraded after the drain is complete. If the node is rebooted, redundancy is reduced until it is\n running again. If the node is removed, redundancy is reduced until another replica rebuilds.\n- Like all of these policies, it triggers on cordon, not on drain. If a user regularly cordons nodes without draining\n them, replicas will be rebuilt pointlessly.", "project": "longhorn-website", "source": "content/docs/1.14.0/maintenance/maintenance.md", "commit": "34fc6c7bb8e4a161a33af83bbda32d8dc267dbe4", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "## Disk Health Metrics\n\nStarting with Longhorn v1.11.0, disk health monitoring metrics are available for both the V1 and V2 data engines. These metrics provide insights into disk health status.\n\n> **Note:**\n> - Health data is collected periodically (every 10 minutes) by Longhorn’s disk monitor.\n> - Some virtualized or cloud environments (e.g., AWS EBS) may not expose full SMART data, resulting in zero values for certain attributes.\n> - Available health attributes may vary depending on the underlying disk type and hardware.\n> - The full set of collected health data is available in the `nodes.longhorn.io` Custom Resources (CRs).\n\n### Data Sources\n\n- **V1 Data Engine**:\n - Health data is collected using the SMART monitoring tool (`smartctl`).\n- **V2 Data Engine**:\n - **NVMe disks:** Health data is retrieved through SPDK.\n - **AIO disks:** Health data is collected using the SMART monitoring tool (`smartctl`).\n\n> **Note:**\n>\n> Health data is sourced differently depending on disk type:\n> - **V1 disks and V2 AIO disks:** via SMART\n> - **V2 NVMe disks:** via SPDK\n>\n> Available attributes and formats may vary by disk type and hardware. For details:\n> - **SMART attributes:** [smartmontools documentation](https://www.smartmontools.org/wiki/TocDoc)\n> - **SPDK NVMe health data:** [bdev_nvme_get_controller_health_info JSON-RPC](https://github.com/spdk/spdk/blob/v25.09/doc/jsonrpc.md.jinja2#L4805-L4856).\n\n### Health Attributes\n\nThe `longhorn_disk_health_attribute_raw` metric exposes raw attribute values with the following labels:\n- `attribute`: Name of the attribute\n- `attribute_id`: Attribute ID, when provided by the collection method.\n- `disk`: Longhorn disk identifier.\n- `node`: Name of the node.\n\n> **Note:**\n>\n> SMART data may not be available on all platforms (particularly cloud providers). If SMART is not supported, health metrics will appear as `0`.\n\n### References\n\n- Related Github [Issue #12016](https://github.com/longhorn/longhorn/issues/12016).", "project": "longhorn-website", "source": "content/docs/1.14.0/monitoring/disk-heath.md", "commit": "34fc6c7bb8e4a161a33af83bbda32d8dc267dbe4", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "- [Access Modes](#access-modes)\n- [Create Longhorn Volumes](#create-longhorn-volumes)\n - [Creating V1 Longhorn Volumes with kubectl](#creating-v1-longhorn-volumes-with-kubectl)\n - [Creating V2 Longhorn Volumes with kubectl (replication)](#creating-v2-longhorn-volumes-with-kubectl-replication)\n - [Creating V2 Longhorn Volumes with kubectl (sharding)](#creating-v2-longhorn-volumes-with-kubectl-sharding)\n - [Binding Workloads to PVs without a Kubernetes StorageClass](#binding-workloads-to-pvs-without-a-kubernetes-storageclass)\n - [Creating Longhorn Volumes with the Longhorn UI](#creating-longhorn-volumes-with-the-longhorn-ui)\n - [PV/PVC Creation for Existing Longhorn Volume](#pvpvc-creation-for-existing-longhorn-volume)\n - [The Failure of the Longhorn Volume Creation](#the-failure-of-the-longhorn-volume-creation)\n\nIn this tutorial, you'll learn how to create Kubernetes persistent storage resources of PersistentVolumes (PVs) and PersistentVolumeClaims (PVCs) that correspond to Longhorn volumes. You will use kubectl to dynamically provision V1 and V2 volumes for workloads using Longhorn storage classes. For help creating volumes from the Longhorn UI, see the Creating Longhorn Volumes with the [Longhorn UI section](#creating-longhorn-volumes-with-the-longhorn-ui).\n\n> This section assumes that you understand how Kubernetes persistent storage works. For more information, see the [Kubernetes documentation.](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)\n\n## Access Modes\n\nLonghorn supports the following Kubernetes PersistentVolume access modes:\n\n- **ReadWriteOnce (RWO)**: The volume can be mounted as read-write by a single node. Multiple pods on the same node can access the volume. This is the default and most common access mode.\n- **ReadWriteOncePod (RWOP)**: The volume can be mounted as read-write by a single pod in the entire cluster. This provides the strongest isolation guarantee, ensuring only one pod can access the volume at any time. Ideal for stateful workloads requiring single-writer access.\n- **ReadWriteMany (RWX)**: The volume can be mounted as read-write by many nodes simultaneously, enabling shared access across multiple pods. See [ReadWriteMany (RWX) Volume](../rwx-volumes) for more details.\n\n> **Note**: ReadOnlyMany (ROX) is not supported by Longhorn. For read-only access from multiple pods, consider using ReadWriteMany with read-only mount options in your pod specification.\n\n## Create Longhorn Volumes\n\n### Creating V1 Longhorn Volumes with kubectl\n\nBefore creating a V1 volume, ensure that Longhorn has at least one available filesystem-type disk. V1 volumes are scheduled only to filesystem-type disks. For more information, see [Add a Filesystem-Type Disk](../../nodes/multidisk/#add-a-filesystem-type-disk).\n\nFirst, you will create a Longhorn StorageClass. The Longhorn StorageClass contains the parameters to provision PVs.\n\nNext, a PersistentVolumeClaim is created that references the StorageClass. Finally, the PersistentVolumeClaim is mounted as a volume within a Pod.\n\nWhen the Pod is deployed, the Kubernetes master will check the PersistentVolumeClaim to make sure the resource request can be fulfilled. If storage is available, the Kubernetes master will create the Longhorn volume and bind it to the Pod.\n\n1. Use following command to create a StorageClass called `longhorn`:\n\n ```shell\n kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/v/examples/storageclass.yaml\n ```\n\n The following example StorageClass is created:\n\n ```yaml\n kind: StorageClass\n apiVersion: storage.k8s.io/v1\n metadata:\n name: longhorn\n provisioner: driver.longhorn.io\n allowVolumeExpansion: true\n parameters:\n numberOfReplicas: \"3\"\n staleReplicaTimeout: \"2880\" # 48 hours in minutes\n fromBackup: \"\"\n fsType: \"ext4\"\n # backupTargetName: \"default\"\n # mkfsParams: \"-I 256 -b 4096 -O ^metadata_csum,^64bit\"\n # diskSelector: \"ssd,fast\"\n # nodeSelector: \"storage,fast\"\n # recurringJobSelector: '[\n # {\n # \"name\":\"snap\",\n # \"isGroup\":true,\n # },\n # {\n # \"name\":\"backup\",\n # \"isGroup\":false,\n # }\n # ]'\n ```\n\n In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass.\n Starting with v1.8.0, the parameter `backupTargetName` can be used to specify the backup target. The name of the default backup target (`default`) is used if `backupTargetName` is not specified.\n Parameters may be omitted from the StorageClass specification. When the storage class is used to create a PV and a volume, parameters that are not specified will generally be set using a default value taken from the global settings. See [Storage Class Parameters](../../../references/storage-class-parameters) for the list of storage class parameters, and [Settings](../../../references/settings) for the full list of global settings.\n\n2. Create a Pod that uses Longhorn volumes by running this command:\n\n ```shell\n kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/v/examples/pod_with_pvc.yaml\n ```\n\n A Pod named `volume-test` is launched, along with a PersistentVolumeClaim named `longhorn-volv-pvc`. The PersistentVolumeClaim references the Longhorn StorageClass:\n\n ```yaml\n apiVersion: v1\n kind: PersistentVolumeClaim\n metadata:\n name: longhorn-volv-pvc\n spec:\n accessModes:\n - ReadWriteOnce\n storageClassName: longhorn\n resources:\n requests:\n storage: 2Gi\n ```\n\n The persistentVolumeClaim is mounted in the Pod as a volume:\n\n ```yaml\n apiVersion: v1\n kind: Pod\n metadata:\n name: volume-test\n namespace: default\n spec:\n containers:\n - name: volume-test\n image: nginx:stable-alpine\n imagePullPolicy: IfNotPresent\n volumeMounts:\n - name: volv\n mountPath: /data\n ports:\n - containerPort: 80\n volumes:\n - name: volv\n persistentVolumeClaim:\n claimName: longhorn-volv-pvc\n ```\n\n### Creating V2 Longhorn Volumes with kubectl (replication)\n\nBefore creating a V2 volume, ensure that the V2 Data Engine is enabled and Longhorn has available block-type disks. V2 volumes are scheduled only to block-type disks. For more information, see [V2 Data Engine](../../../deploy/install/#v2-data-engine-requirements) and [Add a Block-Type Disk](../../nodes/multidisk/#add-a-block-type-disk).\n\n1. Use the following command to create a StorageClass called `longhorn-v2-replicated`:\n\n ```shell\n kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/v/examples/v2/replication/storageclass.yaml\n ```\n\n The following example StorageClass is created:\n\n ```yaml\n kind: StorageClass\n apiVersion: storage.k8s.io/v1\n metadata:\n name: longhorn-v2-replicated\n provisioner: driver.longhorn.io\n allowVolumeExpansion: true\n reclaimPolicy: Delete\n volumeBindingMode: Immediate\n parameters:\n dataEngine: \"v2\"\n # dataLayout is optional for replicated volumes; RAID1 is the default.\n dataLayout.type: \"replicated\"\n dataLayout.mode: \"raid1\"\n numberOfReplicas: \"3\"\n staleReplicaTimeout: \"2880\"\n fsType: \"ext4\"\n ```\n\n The `dataEngine` parameter must be set to `v2` so Longhorn provisions a V2 volume. See [Storage Class Parameters](../../../references/storage-class-parameters) for the list of supported parameters.\n\n2. Create a Pod that uses a V2 Longhorn volume by running this command:\n\n ```shell\n kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/v/examples/v2/replication/pod_with_pvc.yaml\n ```\n\n A Pod named `longhorn-v2-replicated-test` is launched, along with a PersistentVolumeClaim named `longhorn-v2-replicated-pvc`. The PersistentVolumeClaim references the V2 StorageClass:\n\n ```yaml\n apiVersion: v1\n kind: PersistentVolumeClaim\n metadata:\n name: longhorn-v2-replicated-pvc\n namespace: default\n spec:\n accessModes:\n - ReadWriteOnce\n storageClassName: longhorn-v2-replicated\n resources:\n requests:\n storage: 2Gi\n ```\n\n The PersistentVolumeClaim is mounted in the Pod as a volume:\n\n ```yaml\n apiVersion: v1\n kind: Pod\n metadata:\n name: longhorn-v2-replicated-test\n namespace: default\n spec:\n restartPolicy: Always\n containers:\n - name: volume-test\n image: nginx:stable-alpine\n imagePullPolicy: IfNotPresent\n livenessProbe:\n exec:\n command:\n - ls\n - /data/lost+found\n initialDelaySeconds: 5\n periodSeconds: 5\n volumeMounts:\n - name: volv\n mountPath: /data\n ports:\n - containerPort: 80\n volumes:\n - name: volv\n persistentVolumeClaim:\n claimName: longhorn-v2-replicated-pvc\n ```\n\nMore examples are available under the [examples section](../../../references/examples).\n\n### Creating V2 Longhorn Volumes with kubectl (sharding)\n\n> **Note**: Sharding is an Experimental feature. It is intended for evaluation and testing, and is not recommended for production use.\n\nSharding distributes a volume's data across multiple nodes using erasure coding, allowing a volume to exceed the capacity of a single disk or node. It is an alternative to the default replicated layout and is only available with the V2 Data Engine. As with any V2 volume, ensure that the V2 Data Engine is enabled and Longhorn has available block-type disks. In addition, each chunk is placed on a distinct node, so the cluster must have at least `dataChunks + parityChunks` schedulable nodes. For more information, see [Add a Block-Type Disk](../../nodes/multidisk/#add-a-block-type-disk).\n\n1. Use the following command to create a StorageClass called `longhorn-v2-sharded`:\n\n ```shell\n kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/v/examples/v2/sharding/storageclass.yaml\n ```\n\n The following example StorageClass is created. It defines a `4 + 2` erasure-coded array (four data chunks and two parity chunks) that tolerates two simultaneous failures and requires at least six nodes:\n\n ```yaml\n kind: StorageClass\n apiVersion: storage.k8s.io/v1\n metadata:\n name: longhorn-v2-sharded\n provisioner: driver.longhorn.io\n allowVolumeExpansion: true\n reclaimPolicy: Delete\n volumeBindingMode: Immediate\n parameters:\n dataEngine: \"v2\"\n dataLayout.type: \"sharded\"\n dataLayout.mode: \"erasureCoding\"\n dataLayout.dataChunks: \"4\" # k: data chunks\n dataLayout.parityChunks: \"2\" # m: parity chunks = failures tolerated\n dataLayout.stripSizeKB: \"64\" # strip size in KiB; power of two 4-1024, fixed at creation\n numberOfReplicas: \"1\" # must be 1; parity provides fault tolerance\n dataLocality: \"disabled\" # must be disabled; chunks span k+m nodes\n fsType: \"ext4\"\n ```\n\n The `dataLayout.*` parameters define the erasure-coded layout. See [Storage Class Parameters](../../../references/storage-class-parameters) for the full list.\n\n2. Create a Pod that uses the sharded volume by running this command:\n\n ```shell\n kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/v/examples/v2/sharding/pod_with_pvc.yaml\n ```\n\n A Pod named `longhorn-v2-sharded-test` is launched, along with a PersistentVolumeClaim named `longhorn-v2-sharded-pvc`. The PersistentVolumeClaim references the `longhorn-v2-sharded` StorageClass:\n\n ```yaml\n apiVersion: v1\n kind: PersistentVolumeClaim\n metadata:\n name: longhorn-v2-sharded-pvc\n namespace: default\n spec:\n accessModes:\n - ReadWriteOnce\n storageClassName: longhorn-v2-sharded\n resources:\n requests:\n storage: 2Gi\n ```\n\n The Pod mounts the volume at `/data`, the same as the replicated example above.\n\nFor information about data layout parameters, supported and unsupported features, and how sharding compares to replication, see [Sharding Storage](../../../advanced-resources/sharding-storage).\n\n### Binding Workloads to PVs without a Kubernetes StorageClass\n\nIt is possible to use a Longhorn StorageClass to bind a workload to a PV without creating a StorageClass object in Kubernetes.\n\nSince the Storage Class is also a field used to match a PVC with a PV, which doesn't have to be created by a Provisioner, you can create a PV manually with a custom StorageClass name, then create a PVC asking for the same StorageClass name.\n\nWhen a PVC requests a StorageClass that does not exist as a Kubernetes resource, Kubernetes will try to bind your PVC to a PV with the same StorageClass name. The StorageClass will be used like a label to find the matching PV, and only existing PVs labeled with the StorageClass name will be used.\n\nIf the PVC names a StorageClass, Kubernetes will:\n\n1. Look for an existing PV that has the label matching the StorageClass\n2. Look for an existing StorageClass Kubernetes resource. If the StorageClass exists, it will be used to create a PV.\n\n### Creating Longhorn Volumes with the Longhorn UI\n\nSince the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC binding purpose. It's unnecessary for users to create the related StorageClass object.\n\nBy default the StorageClass for Longhorn created PV/PVC is `longhorn-static`. Users can modify it in `Setting - General - Default Longhorn Static StorageClass Name` as they need.\n\nUsers need to manually delete PVC and PV created by Longhorn.\n\n### PV/PVC Creation for Existing Longhorn Volume\n\nNow users can create PV/PVC via our Longhorn UI for the existing Longhorn volumes.\nOnly detached volume can be used by a newly created pod.\n\n### The Failure of the Longhorn Volume Creation\n\nCreating a Longhorn volume can fail for different reasons. The issues are categorized into:\n\n- insufficient storage\n- disk not found\n- disks are unavailable\n- tags not fulfilled\n- node not found\n- nodes are unavailable\n- none of the node candidates contains a ready engine image\n- hard affinity cannot be satisfied\n- replica scheduling failed\n- unused failed replica is not supported\n- replica already scheduled\n- longhorn client operation failed\n- incompatible volume size\n\nThe failure results in the workload failing to use the provisioned PV and showing a warning message\n```\n# kubectl describe pod workload-test\n\nEvents:\n Type Reason Age From Message\n ---- ------ ---- ---- -------\n Warning FailedAttachVolume 14s (x8 over 82s) attachdetach-controller AttachVolume.Attach\n failed for volume \"pvc-e130e369-274d-472d-98d1-f6074d2725e8\" : rpc error: code = Aborted\n desc = volume pvc-e130e369-274d-472d-98d1-f6074d2725e8 is not ready for workloads\n```\n\nIn order to help users understand the error causes, Longhorn summarizes them in the PV annotation, `longhorn.io/volume-scheduling-error`. Failures are combined in this annotation and separated by a semicolon, for example, `longhorn.io/volume-scheduling-error: insufficient storage;disks are unavailable`. The annotation can be checked by using `kubectl describe pv `.\n```\n# kubectl describe pv pvc-e130e369-274d-472d-98d1-f6074d2725e8\nName: pvc-e130e369-274d-472d-98d1-f6074d2725e8\nLabels:\nAnnotations: longhorn.io/volume-scheduling-error: insufficient storage\n pv.kubernetes.io/provisioned-by: driver.longhorn.io\n\n...\n\n```", "project": "longhorn-website", "source": "content/docs/1.14.0/nodes-and-volumes/volumes/create-volumes.md", "commit": "34fc6c7bb8e4a161a33af83bbda32d8dc267dbe4", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "Shut down all Kubernetes Pods using Longhorn volumes in order to detach the volumes. The easiest way to achieve this is by deleting all workloads and recreate them later after upgrade. If this is not desirable, some workloads may be suspended.\n\nIn this section, you'll learn how each workload can be modified to shut down its pods.\n\n#### Deployment\nEdit the deployment with `kubectl edit deploy/ `.\n\nSet `.spec.replicas` to `0`.\n\n#### StatefulSet\nEdit the statefulset with `kubectl edit statefulset/ `.\n\nSet `.spec.replicas` to `0`.\n\n#### DaemonSet\nEdit the daemonset with `kubectl edit ds/ `.\n\nAdd a nodeSelector to the pod spec:\n```yaml\nspec:\n template:\n spec:\n nodeSelector:\n no-schedule: \"true\"\n```\n\n#### Pod\nDelete the pod with `kubectl delete pod/ `.\n\nThere is no way to suspend a pod not managed by a workload controller.\n\n#### CronJob\nEdit the cronjob with `kubectl edit cronjob/ `.\n\nSet `.spec.suspend` to `true`.\n\nWait for any currently executing jobs to complete, or terminate them by deleting relevant pods.\n\n#### Job\nConsider allowing the single-run job to complete.\n\nOtherwise, delete the job with `kubectl delete job/ `.\n\n#### ReplicaSet\nEdit the replicaset with `kubectl edit replicaset/ `.\n\nSet `.spec.replicas` to `0`.\n\n#### ReplicationController\nEdit the replicationcontroller with `kubectl edit rc/ `.\n\nSet `.spec.replicas` to `0`.\n\nWait for the volumes using by the Kubernetes to complete detaching.\n\nThen detach all remaining volumes from Longhorn UI. These volumes were most likely created and attached outside of Kubernetes via Longhorn UI or REST API.", "project": "longhorn-website", "source": "content/docs/1.14.0/nodes-and-volumes/volumes/detaching-volumes.md", "commit": "34fc6c7bb8e4a161a33af83bbda32d8dc267dbe4", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "## Values\n\nThe `values.yaml` file contains items used to tweak a deployment of this chart.\n\n### Cattle Settings\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| global.cattle.systemDefaultRegistry | string | `\"\"` | Default system registry. |\n| global.cattle.windowsCluster.defaultSetting.systemManagedComponentsNodeSelector | string | `\"kubernetes.io/os:linux\"` | Node selector for system-managed Longhorn components. |\n| global.cattle.windowsCluster.defaultSetting.taintToleration | string | `\"cattle.io/os=linux:NoSchedule\"` | Toleration for system-managed Longhorn components. |\n| global.cattle.windowsCluster.enabled | bool | `false` | Setting that allows Longhorn to run on a Rancher Windows cluster. |\n| global.cattle.windowsCluster.nodeSelector | object | `{\"kubernetes.io/os\":\"linux\"}` | Node selector for Linux nodes that can run user-deployed Longhorn components. |\n| global.cattle.windowsCluster.tolerations | list | `[{\"effect\":\"NoSchedule\",\"key\":\"cattle.io/os\",\"operator\":\"Equal\",\"value\":\"linux\"}]` | Toleration for Linux nodes that can run user-deployed Longhorn components. |\n\n### Network Policies\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| networkPolicies.enabled | bool | `false` | Setting that allows you to enable network policies that control access to Longhorn pods. |\n| networkPolicies.restrictInternalTraffic | bool | `true` | Setting that allows you to enable network policies for internal Longhorn components. When enabled, only authorized Longhorn components are allowed to communicate with each other. |\n| networkPolicies.type | string | `\"k3s\"` | Distribution that determines the policy for allowing access for an ingress. (Options: \"k3s\", \"rke2\", \"rke1\") |\n\n### Image Settings\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| image.csi.attacher.repository | string | `\"longhornio/csi-attacher\"` | Repository for the CSI attacher image. When unspecified, Longhorn uses the default value. |\n| image.csi.attacher.tag | string | `\"v4.9.0-20250826\"` | Tag for the CSI attacher image. When unspecified, Longhorn uses the default value. |\n| image.csi.livenessProbe.repository | string | `\"longhornio/livenessprobe\"` | Repository for the CSI liveness probe image. When unspecified, Longhorn uses the default value. |\n| image.csi.livenessProbe.tag | string | `\"v2.16.0-20250826\"` | Tag for the CSI liveness probe image. When unspecified, Longhorn uses the default value. |\n| image.csi.nodeDriverRegistrar.repository | string | `\"longhornio/csi-node-driver-registrar\"` | Repository for the CSI Node Driver Registrar image. When unspecified, Longhorn uses the default value. |\n| image.csi.nodeDriverRegistrar.tag | string | `\"v2.14.0-20250826\"` | Tag for the CSI Node Driver Registrar image. When unspecified, Longhorn uses the default value. |\n| image.csi.provisioner.repository | string | `\"longhornio/csi-provisioner\"` | Repository for the CSI Provisioner image. When unspecified, Longhorn uses the default value. |\n| image.csi.provisioner.tag | string | `\"v5.3.0-20250826\"` | Tag for the CSI Provisioner image. When unspecified, Longhorn uses the default value. |\n| image.csi.resizer.repository | string | `\"longhornio/csi-resizer\"` | Repository for the CSI Resizer image. When unspecified, Longhorn uses the default value. |\n| image.csi.resizer.tag | string | `\"v1.14.0-20250826\"` | Tag for the CSI Resizer image. When unspecified, Longhorn uses the default value. |\n| image.csi.snapshotter.repository | string | `\"longhornio/csi-snapshotter\"` | Repository for the CSI Snapshotter image. When unspecified, Longhorn uses the default value. |\n| image.csi.snapshotter.tag | string | `\"v8.3.0-20250826\"` | Tag for the CSI Snapshotter image. When unspecified, Longhorn uses the default value. |\n| image.longhorn.backingImageManager.repository | string | `\"longhornio/backing-image-manager\"` | Repository for the Backing Image Manager image. When unspecified, Longhorn uses the default value. |\n| image.longhorn.backingImageManager.tag | string | `\"v1.10.0\"` | Tag for the Backing Image Manager image. When unspecified, Longhorn uses the default value. |\n| image.longhorn.engine.repository | string | `\"longhornio/longhorn-engine\"` | Repository for the Longhorn Engine image. |\n| image.longhorn.engine.tag | string | `\"v1.10.0\"` | Tag for the Longhorn Engine image. |\n| image.longhorn.instanceManager.repository | string | `\"longhornio/longhorn-instance-manager\"` | Repository for the Longhorn Instance Manager image. |\n| image.longhorn.instanceManager.tag | string | `\"v1.10.0\"` | Tag for the Longhorn Instance Manager image. |\n| image.longhorn.manager.repository | string | `\"longhornio/longhorn-manager\"` | Repository for the Longhorn Manager image. |\n| image.longhorn.manager.tag | string | `\"v1.10.0\"` | Tag for the Longhorn Manager image. |\n| image.longhorn.shareManager.repository | string | `\"longhornio/longhorn-share-manager\"` | Repository for the Longhorn Share Manager image. |\n| image.longhorn.shareManager.tag | string | `\"v1.10.0\"` | Tag for the Longhorn Share Manager image. |\n| image.longhorn.supportBundleKit.repository | string | `\"longhornio/support-bundle-kit\"` | Repository for the Longhorn Support Bundle Manager image. |\n| image.longhorn.supportBundleKit.tag | string | `\"v0.0.69\"` | Tag for the Longhorn Support Bundle Manager image. |\n| image.longhorn.ui.repository | string | `\"longhornio/longhorn-ui\"` | Repository for the Longhorn UI image. |\n| image.longhorn.ui.tag | string | `\"v1.10.0\"` | Tag for the Longhorn UI image. |\n| image.openshift.oauthProxy.repository | string | `\"\"` | Repository for the OAuth Proxy image. Specify the upstream image (for example, \"quay.io/openshift/origin-oauth-proxy\"). This setting applies only to OpenShift users. |\n| image.openshift.oauthProxy.tag | float | `\"\"` | Tag for the OAuth Proxy image. Specify OCP/OKD version 4.1 or later (including version 4.15, which is available at quay.io/openshift/origin-oauth-proxy:4.15). This setting applies only to OpenShift users. |\n| image.pullPolicy | string | `\"IfNotPresent\"` | Image pull policy that applies to all user-deployed Longhorn components, such as Longhorn Manager, Longhorn driver, and Longhorn UI. |\n\n### Service Settings\n\n| Key | Description |\n|-----|-------------|\n| service.manager.nodePort | NodePort port number for Longhorn Manager. When unspecified, Longhorn selects a free port between 30000 and 32767. |\n| service.manager.type | Service type for Longhorn Manager. |\n| service.ui.nodePort | NodePort port number for Longhorn UI. When unspecified, Longhorn selects a free port between 30000 and 32767. |\n| service.ui.type | Service type for Longhorn UI. (Options: \"ClusterIP\", \"NodePort\", \"LoadBalancer\", \"Rancher-Proxy\") |\n\n### StorageClass Settings\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| persistence.backingImage.dataSourceParameters | string | `nil` | Data source parameters of a backing image used in a Longhorn StorageClass. You can specify a JSON string of a map. (Example: `'{\\\"url\\\":\\\"https://backing-image-example.s3-region.amazonaws.com/test-backing-image\\\"}'`) |\n| persistence.backingImage.dataSourceType | string | `nil` | Data source type of a backing image used in a Longhorn StorageClass. If the backing image exists in the cluster, Longhorn uses this setting to verify the image. If the backing image does not exist, Longhorn creates one using the specified data source type. |\n| persistence.backingImage.enable | bool | `false` | Setting that allows you to use a backing image in a Longhorn StorageClass. |\n| persistence.backingImage.expectedChecksum | string | `nil` | Expected SHA-512 checksum of a backing image used in a Longhorn StorageClass. |\n| persistence.backingImage.name | string | `nil` | Backing image to be used for creating and restoring volumes in a Longhorn StorageClass. When no backing images are available, specify the data source type and parameters that Longhorn can use to create a backing image. |\n| persistence.createStorageClass | bool | `true` | Setting that enables creation of the default Longhorn StorageClass ConfigMap. Set to `false` to skip the creation. |\n| persistence.defaultClass | bool | `true` | Setting that allows you to specify the default Longhorn StorageClass. |\n| persistence.defaultClassReplicaCount | int | `3` | Replica count of the default Longhorn StorageClass. |\n| persistence.defaultDataLocality | string | `\"disabled\"` | Data locality of the default Longhorn StorageClass. (Options: \"disabled\", \"best-effort\") |\n| persistence.defaultFsType | string | `\"ext4\"` | Filesystem type of the default Longhorn StorageClass. |\n| persistence.defaultMkfsParams | string | `\"\"` | mkfs parameters of the default Longhorn StorageClass. |\n| persistence.defaultNodeSelector.enable | bool | `false` | Setting that allows you to enable the node selector for the default Longhorn StorageClass. |\n| persistence.defaultNodeSelector.selector | string | `\"\"` | Node selector for the default Longhorn StorageClass. Longhorn uses only nodes with the specified tags for storing volume data. (Examples: \"storage,fast\") |\n| persistence.disableRevisionCounter | string | `\"true\"` | Setting that disables the revision counter and thereby prevents Longhorn from tracking all write operations to a volume. When salvaging a volume, Longhorn uses properties of the volume-head-xxx.img file (the last file size and the last time the file was modified) to select the replica to be used for volume recovery. |\n| persistence.migratable | bool | `false` | Setting that allows you to enable live migration of a Longhorn volume from one node to another. |\n| persistence.nfsOptions | string | `\"\"` | Set NFS mount options for Longhorn StorageClass for RWX volumes |\n| persistence.reclaimPolicy | string | `\"Delete\"` | Reclaim policy that provides instructions for handling of a volume after its claim is released. (Options: \"Retain\", \"Delete\") |\n| persistence.recurringJobSelector.enable | bool | `false` | Setting that allows you to enable the recurring job selector for a Longhorn StorageClass. |\n| persistence.recurringJobSelector.jobList | list | `[]` | Recurring job selector for a Longhorn StorageClass. Ensure that quotes are used correctly when specifying job parameters. (Example: `[{\"name\":\"backup\", \"isGroup\":true}]`) |\n| persistence.removeSnapshotsDuringFilesystemTrim | string | `\"ignored\"` | Setting that allows you to enable automatic snapshot removal during filesystem trim for a Longhorn StorageClass. (Options: \"ignored\", \"enabled\", \"disabled\") |\n\n### CSI Settings\n\n| Key | Description |\n|-----|-------------|\n| csi.attacherReplicaCount | Replica count of the CSI Attacher. When unspecified, Longhorn uses the default value (\"3\"). |\n| csi.kubeletRootDir | kubelet root directory. When unspecified, Longhorn uses the default value. |\n| csi.provisionerReplicaCount | Replica count of the CSI Provisioner. When unspecified, Longhorn uses the default value (\"3\"). |\n| csi.resizerReplicaCount | Replica count of the CSI Resizer. When unspecified, Longhorn uses the default value (\"3\"). |\n| csi.snapshotterReplicaCount | Replica count of the CSI Snapshotter. When unspecified, Longhorn uses the default value (\"3\"). |\n| csi.volumeGroupSnapshotEnabled | Enables CSI VolumeGroupSnapshot support by turning on the `CSIVolumeGroupSnapshot` feature gate of the CSI Snapshotter. **Prerequisite:** The VolumeGroupSnapshot CRDs (`groupsnapshot.storage.k8s.io`) must be installed first. |\n\n### Longhorn Manager Settings\n\nLonghorn consists of user-deployed components (for example, Longhorn Manager, Longhorn Driver, and Longhorn UI) and system-managed components (for example, Instance Manager, Backing Image Manager, Share Manager, CSI Driver, and Engine Image). The following settings only apply to Longhorn Manager.\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| longhornManager.log.format | string | `\"plain\"` | Format of Longhorn Manager logs. (Options: \"plain\", \"json\") |\n| longhornManager.nodeSelector | object | `{}` | Node selector for Longhorn Manager. Specify the nodes allowed to run Longhorn Manager. |\n| longhornManager.priorityClass | string | `\"longhorn-critical\"` | PriorityClass for Longhorn Manager. |\n| longhornManager.serviceAnnotations | object | `{}` | Annotation for the Longhorn Manager service. |\n| longhornManager.tolerations | list | `[]` | Toleration for Longhorn Manager on nodes allowed to run Longhorn Manager. |\n\n### Longhorn Global Manager Settings\n\nThe following settings apply to the [Longhorn Global Manager](../../terminology/#longhorn-global-manager) Deployment.\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| longhornGlobalManager.affinity | object | `{\"podAntiAffinity\":{\"preferredDuringSchedulingIgnoredDuringExecution\":[{\"podAffinityTerm\":{\"labelSelector\":{\"matchExpressions\":[{\"key\":\"app\",\"operator\":\"In\",\"values\":[\"longhorn-global-manager\"]}]},\"topologyKey\":\"kubernetes.io/hostname\"},\"weight\":1}]}}` | Affinity for global manager pods. The default spreads replicas across nodes. |\n| longhornGlobalManager.annotations | object | `{}` | Annotations for global manager pods. |\n| longhornGlobalManager.nodeSelector | object | `{}` | Node selector for global manager pods. |\n| longhornGlobalManager.podDisruptionBudget | object | `{\"enabled\":false,\"maxUnavailable\":\"\",\"minAvailable\":1}` | Pod Disruption Budget for the global manager. Keeps a minimum number of global manager pods available during voluntary disruptions such as node drains. Effective only when `longhornGlobalManager.replicas` is greater than 1. |\n| longhornGlobalManager.podDisruptionBudget.enabled | bool | `false` | Setting that allows you to enable the Pod Disruption Budget for the global manager. |\n| longhornGlobalManager.podDisruptionBudget.maxUnavailable | string | `\"\"` | Maximum number or percentage of global manager pods that can be unavailable during a disruption. When set, it takes precedence over `longhornGlobalManager.podDisruptionBudget.minAvailable`. |\n| longhornGlobalManager.podDisruptionBudget.minAvailable | int | `1` | Minimum number or percentage of global manager pods that must remain available during a disruption. Mutually exclusive with `longhornGlobalManager.podDisruptionBudget.maxUnavailable`. |\n| longhornGlobalManager.priorityClass | string | `\"longhorn-critical\"` | PriorityClass for the global manager. |\n| longhornGlobalManager.replicas | int | `3` | Replica count for the global manager. One replica is the active leader; the others are warm standbys. |\n| longhornGlobalManager.resources | string | `nil` | Resource requests and limits for global manager pods. Memory scales with the cluster's Pod count (cluster-wide Pod informer cache). |\n| longhornGlobalManager.tolerations | list | `[]` | Node tolerations for global manager pods. |\n\n### Longhorn Driver Settings\n\nLonghorn consists of user-deployed components (for example, Longhorn Manager, Longhorn Driver, and Longhorn UI) and system-managed components (for example, Instance Manager, Backing Image Manager, Share Manager, CSI Driver, and Engine Image). The following settings only apply to Longhorn Driver.\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| longhornDriver.nodeSelector | object | `{}` | Node selector for Longhorn Driver. Specify the nodes allowed to run Longhorn Driver. |\n| longhornDriver.priorityClass | string | `\"longhorn-critical\"` | PriorityClass for Longhorn Driver. |\n| longhornDriver.tolerations | list | `[]` | Toleration for Longhorn Driver on nodes allowed to run Longhorn components. |\n\n### Longhorn UI Settings\n\nLonghorn consists of user-deployed components (for example, Longhorn Manager, Longhorn Driver, and Longhorn UI) and system-managed components (for example, Instance Manager, Backing Image Manager, Share Manager, CSI Driver, and Engine Image). The following settings only apply to Longhorn UI.\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| longhornUI.nodeSelector | object | `{}` | Node selector for Longhorn UI. Specify the nodes allowed to run Longhorn UI. |\n| longhornUI.priorityClass | string | `\"longhorn-critical\"` | PriorityClass for Longhorn UI. |\n| longhornUI.replicas | int | `2` | Replica count for Longhorn UI. |\n| longhornUI.resources | string | `nil` | Resource requests and limits for Longhorn UI pods. |\n| longhornUI.tolerations | list | `[]` | Toleration for Longhorn UI on nodes allowed to run Longhorn components. |\n\n### Ingress Settings\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| ingress.annotations | string | `nil` | Ingress annotations in the form of key-value pairs. |\n| ingress.enabled | bool | `false` | Setting that allows Longhorn to generate ingress records for the Longhorn UI service. |\n| ingress.host | string | `\"sslip.io\"` | Hostname of the Layer 7 load balancer. |\n| ingress.ingressClassName | string | `nil` | IngressClass resource that contains ingress configuration, including the name of the Ingress controller. ingressClassName can replace the kubernetes.io/ingress.class annotation used in earlier Kubernetes releases. |\n| ingress.path | string | `\"/\"` | Default ingress path. You can access the Longhorn UI by following the full ingress path {{host}}+{{path}}. |\n| ingress.pathType | string | `\"ImplementationSpecific\"` | Ingress path type. To maintain backward compatibility, the default value is \"ImplementationSpecific\". |\n| ingress.secrets | string | `nil` | Secret that contains a TLS private key and certificate. Use secrets if you want to use your own certificates to secure ingresses. |\n| ingress.secureBackends | bool | `false` | Setting that allows you to enable secure connections to the Longhorn UI service via port 443. |\n| ingress.tls | bool | `false` | Setting that allows you to enable TLS on ingress records. |\n| ingress.tlsSecret | string | `\"longhorn.local-tls\"` | TLS secret that contains the private key and certificate to be used for TLS. This setting applies only when TLS is enabled on ingress records. |\n\n### Private Registry Settings\n\nYou can install Longhorn in an air-gapped environment with a private registry. For more information, see the **Air Gap Installation** section of the [documentation](https://longhorn.io/docs).\n\n| Key | Description |\n|-----|-------------|\n| privateRegistry.createSecret | Setting that allows you to create a private registry secret. |\n| privateRegistry.registryPasswd | Password for authenticating with a private registry. |\n| privateRegistry.registrySecret | Kubernetes secret that allows you to pull images from a private registry. This setting applies only when creation of private registry secrets is enabled. You must include the private registry name in the secret name. |\n| privateRegistry.registryUrl | URL of a private registry. When unspecified, Longhorn uses the default system registry. |\n| privateRegistry.registryUser | User account used for authenticating with a private registry. |\n\n### Metrics Settings\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| metrics.serviceMonitor.additionalLabels | object | `{}` | Additional labels for the Prometheus ServiceMonitor resource. |\n| metrics.serviceMonitor.annotations | object | `{}` | Annotations for the Prometheus ServiceMonitor resource. |\n| metrics.serviceMonitor.enabled | bool | `false` | Setting that allows the creation of a Prometheus ServiceMonitor resource for Longhorn Manager components. |\n| metrics.serviceMonitor.interval | string | `\"\"` | Interval at which Prometheus scrapes the metrics from the target. |\n| metrics.serviceMonitor.metricRelabelings | list | `[]` | Configures the relabeling rules to apply to the samples before ingestion. See the [Prometheus Operator documentation](https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.Endpoint) for formatting details. |\n| metrics.serviceMonitor.relabelings | list | `[]` | Configures the relabeling rules to apply the target’s metadata labels. See the [Prometheus Operator documentation](https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.Endpoint) for formatting details. |\n| metrics.serviceMonitor.scrapeTimeout | string | `\"\"` | Timeout after which Prometheus considers the scrape to be failed. |\n\n### OS/Kubernetes Distro Settings\n\n#### OpenShift Settings\n\nFor more details, see the [ocp-readme](https://github.com/longhorn/longhorn/blob/master/chart/ocp-readme.md).\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| openshift.enabled | bool | `false` | Setting that allows Longhorn to integrate with OpenShift. |\n| openshift.ui.port | int | `443` | Port for accessing the OpenShift web console. |\n| openshift.ui.proxy | int | `8443` | Port for proxy that provides access to the OpenShift web console. |\n| openshift.ui.route | string | `\"longhorn-ui\"` | Route for connections between Longhorn and the OpenShift web console. |\n\n### Other Settings\n\n| Key | Default | Description |\n|-----|---------|-------------|\n| annotations | `{}` | Annotation for the Longhorn Manager DaemonSet pods. This setting is optional. |\n| defaultBackupStore | `{\"backupTarget\":null,\"backupTargetCredentialSecret\":null,\"pollInterval\":null}` | Setting that allows you to update the default backupstore. |\n| defaultBackupStore.backupTarget | `\"\"` | Endpoint used to access the default backupstore. (Options: \"NFS\", \"CIFS\", \"AWS\", \"GCP\", \"AZURE\") |\n| defaultBackupStore.backupTargetCredentialSecret | `\"\"` | Name of the Kubernetes secret associated with the default backup target. |\n| defaultBackupStore.pollInterval | `\"\"` | Number of seconds that Longhorn waits before checking the default backupstore for new backups. The default value is \"300\". When the value is \"0\", polling is disabled. |\n| enableGoCoverDir | `false` | Setting that allows Longhorn to generate code coverage profiles. |\n| enablePSP | `false` | Setting that allows you to enable pod security policies (PSPs) that allow privileged Longhorn pods to start. This setting applies only to clusters running Kubernetes 1.25 and earlier, and with the built-in Pod Security admission controller enabled. |\n| namespaceOverride | `\"\"` | Specify override namespace, specifically this is useful for using longhorn as sub-chart and its release namespace is not the `longhorn-system`. |\n| preUpgradeChecker.jobEnabled | `true` | Setting that allows Longhorn to perform pre-upgrade checks. Disable this setting when installing Longhorn using Argo CD or other GitOps solutions. |\n| preUpgradeChecker.upgradeVersionCheck | `true` | Setting that allows Longhorn to perform upgrade version checks after starting the Longhorn Manager DaemonSet Pods. Disabling this setting also disables `preUpgradeChecker.jobEnabled`. Longhorn recommends keeping this setting enabled. |\n\n### System Default Settings\n\nDuring installation, you can either allow Longhorn to use the default system settings or use specific flags to modify the default values. After installation, you can modify the settings using the Longhorn UI. For more information, see the **Settings Reference** section of the [documentation](https://longhorn.io/docs).\n\n| Key | Description |\n|-----|-------------|\n| defaultSettings.allowCollectingLonghornUsageMetrics | Setting that allows Longhorn to periodically collect anonymous usage data for product improvement purposes. Longhorn sends collected data to the [Upgrade Responder](https://github.com/longhorn/upgrade-responder) server, which is the data source of the Longhorn Public Metrics Dashboard (https://metrics.longhorn.io). The Upgrade Responder server does not store data that can be used to identify clients, including IP addresses. |\n| defaultSettings.allowEmptyDiskSelectorVolume | Setting that allows scheduling of empty disk selector volumes to any disk. |\n| defaultSettings.allowEmptyNodeSelectorVolume | Setting that allows scheduling of empty node selector volumes to any node. |\n| defaultSettings.allowRecurringJobWhileVolumeDetached | Setting that allows Longhorn to automatically attach a volume and create snapshots or backups when recurring jobs are run. |\n| defaultSettings.allowVolumeCreationWithDegradedAvailability | Setting that allows you to create and attach a volume without having all replicas scheduled at the time of creation. |\n| defaultSettings.autoCleanupRecurringJobBackupSnapshot | Setting that allows Longhorn to automatically clean up the snapshot generated by a recurring backup job. |\n| defaultSettings.autoCleanupSystemGeneratedSnapshot | Setting that allows Longhorn to automatically clean up the system-generated snapshot after replica rebuilding is completed. |\n| defaultSettings.autoDeletePodWhenVolumeDetachedUnexpectedly | Setting that allows Longhorn to automatically delete a workload pod that is managed by a controller (for example, daemonset) whenever a Longhorn volume is detached unexpectedly (for example, during Kubernetes upgrades). After deletion, the controller restarts the pod and then Kubernetes handles volume reattachment and remounting. |\n| defaultSettings.autoSalvage | Setting that allows Longhorn to automatically salvage volumes when all replicas become faulty (for example, when the network connection is interrupted). Longhorn determines which replicas are usable and then uses these replicas for the volume. This setting is enabled by default. |\n| defaultSettings.backingImageCleanupWaitInterval | Number of minutes that Longhorn waits before cleaning up the backing image file when no replicas in the disk are using it. |\n| defaultSettings.backingImageRecoveryWaitInterval | Number of seconds that Longhorn waits before downloading a backing image file again when the status of all image disk files changes to \"failed\" or \"unknown\". |\n| defaultSettings.backupCompressionMethod | Setting that allows you to specify a backup compression method. |\n| defaultSettings.backupConcurrentLimit | Maximum number of worker threads that can concurrently run for each backup. |\n| defaultSettings.concurrentAutomaticEngineUpgradePerNodeLimit | Maximum number of engines that are allowed to concurrently upgrade on each node after Longhorn Manager is upgraded. When the value is \"0\", Longhorn does not automatically upgrade volume engines to the new default engine image version. |\n| defaultSettings.concurrentReplicaRebuildPerNodeLimit | Maximum number of replicas that can be concurrently rebuilt on each node. |\n| defaultSettings.concurrentVolumeBackupRestorePerNodeLimit | Maximum number of volumes that can be concurrently restored on each node using a backup. When the value is \"0\", restoration of volumes using a backup is disabled. |\n| defaultSettings.createDefaultDiskLabeledNodes | Setting that allows Longhorn to automatically create a default disk only on nodes with the label \"node.longhorn.io/create-default-disk=true\" (if no other disks exist). When this setting is disabled, Longhorn creates a default disk on each node that is added to the cluster. |\n| defaultSettings.csiStorageCapacityTracking | Setting that controls CSI storage capacity tracking, which allows the kube-scheduler to filter nodes that cannot fit the requested volume. |\n| defaultSettings.defaultDataLocality | Default data locality. A Longhorn volume has data locality if a local replica of the volume exists on the same node as the pod that is using the volume. |\n| defaultSettings.defaultDataPath | Default path for storing data on a host. The default value is \"/var/lib/longhorn/\". |\n| defaultSettings.defaultLonghornStaticStorageClass | Default Longhorn StorageClass. \"storageClassName\" is assigned to PVs and PVCs that are created for an existing Longhorn volume. \"storageClassName\" can also be used as a label, so it is possible to use a Longhorn StorageClass to bind a workload to an existing PV without creating a Kubernetes StorageClass object. The default value is \"longhorn-static\". |\n| defaultSettings.defaultReplicaCount | Default number of replicas for volumes created using the Longhorn UI. For Kubernetes configuration, modify the `numberOfReplicas` field in the StorageClass. The default value is \"3\". |\n| defaultSettings.deletingConfirmationFlag | Flag that prevents accidental uninstallation of Longhorn. |\n| defaultSettings.detachManuallyAttachedVolumesWhenCordoned | Setting that allows automatic detaching of manually-attached volumes when a node is cordoned. |\n| defaultSettings.disableRevisionCounter | Setting that disables the revision counter and thereby prevents Longhorn from tracking all write operations to a volume. When salvaging a volume, Longhorn uses properties of the \"volume-head-xxx.img\" file (the last file size and the last time the file was modified) to select the replica to be used for volume recovery. This setting applies only to volumes created using the Longhorn UI. |\n| defaultSettings.disableSchedulingOnCordonedNode | Setting that prevents Longhorn Manager from scheduling replicas on a cordoned Kubernetes node. This setting is enabled by default. |\n| defaultSettings.disableSnapshotPurge | Setting that temporarily prevents all attempts to purge volume snapshots. |\n| defaultSettings.engineReplicaTimeout | Timeout between the Longhorn Engine and replicas. Specify a value between \"8\" and \"30\" seconds. The default value is \"8\". |\n| defaultSettings.failedBackupTTL | Number of minutes that Longhorn keeps a failed backup resource. When the value is \"0\", automatic deletion is disabled. |\n| defaultSettings.fastReplicaRebuildEnabled | Setting that allows fast rebuilding of replicas using the checksum of snapshot disk files. Before enabling this setting, you must set the snapshot-data-integrity value to \"enable\" or \"fast-check\". |\n| defaultSettings.freezeFilesystemForSnapshot | Setting that freezes the filesystem on the root partition before a snapshot is created. |\n| defaultSettings.guaranteedInstanceManagerCPU | Percentage of the total allocatable CPU resources on each node to be reserved for each instance manager pod when the V1 Data Engine is enabled. The default value is \"12\". |\n| defaultSettings.kubernetesClusterAutoscalerEnabled | Setting that notifies Longhorn that the cluster is using the Kubernetes Cluster Autoscaler. |\n| defaultSettings.kubernetesMetricsServerMetricsEnabled | Setting that allows Longhorn to query the Kubernetes Metrics Server (`'metrics.k8s.io'`) for pod and node resource usage. |\n| defaultSettings.logLevel | Log levels that indicate the type and severity of logs in Longhorn Manager. The default value is \"Info\". (Options: \"Panic\", \"Fatal\", \"Error\", \"Warn\", \"Info\", \"Debug\", \"Trace\") |\n| defaultSettings.longGRPCTimeOut | Number of seconds that Longhorn allows for the completion of replica rebuilding and snapshot cloning operations. |\n| defaultSettings.nodeDownPodDeletionPolicy | Policy that defines the action Longhorn takes when a volume is stuck with a StatefulSet or Deployment pod on a node that failed. |\n| defaultSettings.nodeDrainPolicy | Policy that defines the action Longhorn takes when a node with the last healthy replica of a volume is drained. |\n| defaultSettings.offlineReplicaRebuilding | Enables automatic rebuilding of degraded replicas while the volume is detached. This setting only takes effect if the individual volume setting is set to `ignored` or `enabled`. |\n| defaultSettings.orphanAutoDeletion | Setting that allows Longhorn to automatically delete an orphaned resource and the corresponding data (for example, stale replicas). Orphaned resources on failed or unknown nodes are not automatically cleaned up. |\n| defaultSettings.priorityClass | PriorityClass for system-managed Longhorn components. This setting can help prevent Longhorn components from being evicted under Node Pressure. Notice that this will be applied to Longhorn user-deployed components by default if there are no priority class values set yet, such as `longhornManager.priorityClass`. |\n| defaultSettings.recurringFailedJobsHistoryLimit | Maximum number of failed recurring backup and snapshot jobs to be retained. When the value is \"0\", a history of failed recurring jobs is not retained. |\n| defaultSettings.recurringJobMaxRetention | Maximum number of snapshots or backups to be retained. |\n| defaultSettings.recurringSuccessfulJobsHistoryLimit | Maximum number of successful recurring backup and snapshot jobs to be retained. When the value is \"0\", a history of successful recurring jobs is not retained. |\n| defaultSettings.removeSnapshotsDuringFilesystemTrim | Setting that allows Longhorn to automatically mark the latest snapshot and its parent files as removed during a filesystem trim. Longhorn does not remove snapshots containing multiple child files. |\n| defaultSettings.replicaAutoBalance | Setting that automatically rebalances replicas when an available node is discovered. |\n| defaultSettings.replicaDiskSoftAntiAffinity | Setting that allows scheduling on disks with existing healthy replicas of the same volume. This setting is enabled by default. |\n| defaultSettings.replicaFileSyncHttpClientTimeout | Number of seconds that an HTTP client waits for a response from a File Sync server before considering the connection to have failed. |\n| defaultSettings.replicaReplenishmentWaitInterval | Number of seconds that Longhorn waits before reusing existing data on a failed replica instead of creating a new replica of a degraded volume. |\n| defaultSettings.replicaSoftAntiAffinity | Setting that allows scheduling on nodes with healthy replicas of the same volume. This setting is disabled by default. |\n| defaultSettings.replicaZoneSoftAntiAffinity | Setting that allows Longhorn to schedule new replicas of a volume to nodes in the same zone as existing healthy replicas. Nodes that do not belong to any zone are treated as existing in the zone that contains healthy replicas. When identifying zones, Longhorn relies on the label \"topology.kubernetes.io/zone= \" in the Kubernetes node object. |\n| defaultSettings.restoreConcurrentLimit | Maximum number of worker threads that can concurrently run for each restore operation. |\n| defaultSettings.restoreVolumeRecurringJobs | Setting that restores recurring jobs from a backup volume on a backup target and creates recurring jobs if none exist during backup restoration. |\n| defaultSettings.snapshotDataIntegrity | Setting that allows you to enable and disable snapshot hashing and data integrity checks. |\n| defaultSettings.snapshotDataIntegrityCronjob | Setting that defines when Longhorn checks the integrity of data in snapshot disk files. You must use the Unix cron expression format. |\n| defaultSettings.snapshotDataIntegrityImmediateCheckAfterSnapshotCreation | Setting that allows disabling of snapshot hashing after snapshot creation to minimize impact on system performance. |\n| defaultSettings.snapshotMaxCount | Maximum snapshot count for a volume. The value should be between 2 to 250 |\n| defaultSettings.storageMinimalAvailablePercentage | Percentage of minimum available disk capacity. When the minimum available capacity exceeds the total available capacity, the disk becomes unschedulable until more space is made available for use. The default value is \"25\". |\n| defaultSettings.storageNetwork | Storage network for in-cluster traffic. When unspecified, Longhorn uses the Kubernetes cluster network. |\n| defaultSettings.storageOverProvisioningPercentage | Percentage of storage that can be allocated relative to hard drive capacity. The default value is \"100\". |\n| defaultSettings.storageReservedPercentageForDefaultDisk | Percentage of disk space that is not allocated to the default disk on each new Longhorn node. |\n| defaultSettings.supportBundleFailedHistoryLimit | Maximum number of failed support bundles that can exist in the cluster. When the value is \"0\", Longhorn automatically purges all failed support bundles. |\n| defaultSettings.systemManagedComponentsNodeSelector | Node selector for system-managed Longhorn components. |\n| defaultSettings.systemManagedPodsImagePullPolicy | Image pull policy for system-managed pods, such as Instance Manager, engine images, and CSI Driver. Changes to the image pull policy are applied only after the system-managed pods restart. |\n| defaultSettings.taintToleration | Taint or toleration for system-managed Longhorn components. Specify values using a semicolon-separated list in `kubectl taint` syntax (Example: key1=value1:effect; key2=value2:effect). |\n| defaultSettings.upgradeChecker | Upgrade Checker that periodically checks for new Longhorn versions. When a new version is available, a notification appears on the Longhorn UI. This setting is enabled by default |\n| defaultSettings.v1DataEngine | Setting that allows you to enable the V1 Data Engine. |\n| defaultSettings.v2DataEngine | Setting that allows you to enable the V2 Data Engine, which is based on the Storage Performance Development Kit (SPDK). |\n| defaultSettings.v2DataEngineGuaranteedInstanceManagerCPU | Number of millicpus on each node to be reserved for each Instance Manager pod when the V2 Data Engine is enabled. The default value is \"1250\". |\n| defaultSettings.v2DataEngineHugepageLimit | Setting that allows you to configure maximum huge page size (in MiB) for the V2 Data Engine. |\n| defaultSettings.v2DataEngineLogFlags | Setting that allows you to configure the log flags of the SPDK target daemon (spdk_tgt) of the V2 Data Engine. |\n| defaultSettings.v2DataEngineLogLevel | Setting that allows you to configure the log level of the SPDK target daemon (spdk_tgt) of the V2 Data Engine. |\n| defaultSettings.autoCleanupSnapshotAfterOnDemandBackupCompleted | Setting that automatically cleans up the snapshot after the on-demand backup is completed. |\n| defaultSettings.autoCleanupSnapshotWhenDeleteBackup | Setting that automatically cleans up the snapshot when the backup is deleted. |", "project": "longhorn-website", "source": "content/docs/1.14.0/references/helm-values.md", "commit": "34fc6c7bb8e4a161a33af83bbda32d8dc267dbe4", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "A [snapshot](../../concepts/#24-snapshots) is the state of a Kubernetes volume at any given moment in time.\n\n## Snapshot Management via UI\n\nTo create a snapshot of an existing cluster, follow these steps:\n\n1. In the top navigation bar of the Longhorn UI, click **Volume**.\n2. Click the name of the volume for which you want to create a snapshot. This leads to the volume detail page.\n3. Click the **Take Snapshot** button.\n\nOnce the snapshot is created, you will see it in the list of snapshots for the volume before the Volume Head.\n\n### Understanding the Snapshot Chain Visualization\n\nOn the **Volume Details** page, the **Snapshots and Backups** section displays the snapshot history as a chain. By default, the **Show System Snapshots** option is **enabled**, meaning all system-created snapshots are displayed automatically.\n\nEach snapshot in the chain is color-coded to indicate its type or status, following a specific priority (highest status is displayed if multiple apply).\n\n| Snapshot Type | Color | Description | Priority (1 = Highest) |\n| :--- | :--- | :--- | :--- |\n| **Error** | Red | Indicates a snapshot that failed during creation or has an issue. | 1 |\n| **Removed** | Light Grey | A snapshot that has been marked for removal or successfully deleted. | 2 |\n| **System-created** | Orange/Yellow | Snapshots automatically created by Longhorn, often for recurring jobs or internal operations. | 3 |\n| **Backup** | Green | A snapshot that has been backed up to a configured backup target. | 4 |\n| **Default** (User-created) | Blue | A standard, user-initiated snapshot taken manually using the **Take Snapshot** button. | 5 |\nBelow is an example of the snapshot chain visualization:\n\n## Snapshot Management with Custom Resources (CRs)\n\nThis section demonstrates how to create, list, restore, and delete Longhorn snapshots directly via `kubectl` using Longhorn’s **Custom Resources (CRs)**.\n\n> **Note**: Longhorn uses its own `Snapshot` CRD under the `longhorn.io` API group (for example, `v1beta2`), not the generic Kubernetes `VolumeSnapshot` from `snapshot.storage.k8s.io`.\n\n### Create a Snapshot\n\n1. **Prepare the manifest**: Create a file named `longhorn-snapshot.yaml`:\n\n ```yaml\n apiVersion: longhorn.io/v1beta2\n kind: Snapshot\n metadata:\n name: longhorn-test-snapshot\n namespace: longhorn-system\n spec:\n volume: pvc-840804d8-6f11-49fd-afae-54bc5be639de # replace with your actual Longhorn volume name\n createSnapshot: true\n ```\n\n2. **Apply the manifest**:\n\n ```bash\n kubectl apply -f longhorn-snapshot.yaml\n ```\n\n Expected output:\n\n ```bash\n snapshot.longhorn.io/longhorn-test-snapshot created\n ```\n\n > **Note**: If the volume is detached, you will see a brief warning about the engine not running. Longhorn automatically retries, and the snapshot will complete once the volume is attached.\n\n### List Snapshots\n\n```bash\nkubectl get snapshots.longhorn.io -l longhornvolume=pvc-840804d8-6f11-49fd-afae-54bc5be639de -n longhorn-system\n```\n\n### Delete a Snapshot\n\n```bash\nkubectl delete snapshot.longhorn.io longhorn-test-snapshot -n longhorn-system\n```\n\nExpected output:\n\n```\nsnapshot.longhorn.io \"longhorn-test-snapshot\" deleted\n```\n\n> **Note**: Longhorn automatically handles the cleanup of the underlying data.\n\n## Data Engine Behavioral Differences\n\nWhen deleting a snapshot that is the direct parent of the **Volume Head** (the current active state), the behavior of the Snapshot Custom Resource (CR) depends on the Data Engine being used:\n\n| Behavior | v1 Data Engine | v2 Data Engine |\n| :--- | :--- | :--- |\n| **CR Persistence** | The Snapshot CR **remains** in the system. | The Snapshot CR is **immediately removed**. |\n| **Status Fields** | `READYTOUSE` becomes `false` and the snapshot is marked as `Removed`. | Not applicable, because the Snapshot CR is deleted. |\n| **Explanation** | v1 volumes cannot physically merge the parent of a live volume head immediately. The CR remains to track the snapshot data until a later merge or cleanup operation. | v2 volumes support live merging of the parent snapshot into the volume head, allowing for immediate cleanup of both data and metadata. |\n\nThis behavioral difference is expected. In **v2 volumes**, the immediate disappearance of the Snapshot CR indicates that the engine has successfully finalized the deletion and merged the data.\n\nFor a broader comparison, see [Data Engine Comparison](../../data-engine-comparison/).", "project": "longhorn-website", "source": "content/docs/1.14.0/snapshots-and-backups/setup-a-snapshot.md", "commit": "34fc6c7bb8e4a161a33af83bbda32d8dc267dbe4", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "Since v1.4.0, Longhorn replaced the in-house support bundle generation with a general-purpose [support bundle kit](https://github.com/rancher/support-bundle-kit).\n\nYou can click the `Generate Support Bundle` at the bottom of Longhorn UI to download a zip file containing cluster manifests and logs.\n\nDuring support bundle generation, Longhorn will create a Deployment for the support bundle manager.\n\n> **Note:** The support bundle manager will use a dedicated `longhorn-support-bundle` service account and `longhorn-support-bundle` cluster role binding with `cluster-admin` access for bundle collection.\n\nWith the support bundle, you can simulate a mocked Kubernetes cluster that is interactable with the `kubectl` command. See [simulator command](https://github.com/rancher/support-bundle-kit#simulator-command) for more details.\n\n## Limitations\n\nLonghorn currently does not support concurrent generation of multiple support bundles. We recommend waiting until the completion of the ongoing support bundle before initiating a new one. If a new support bundle is created while another one is still in progress, Longhorn will overwrite the older support bundle.\n\n## History\n[Original Feature Request](https://github.com/longhorn/longhorn/issues/2759)\n\nAvailable since v1.4.0", "project": "longhorn-website", "source": "content/docs/1.14.0/troubleshoot/support-bundle.md", "commit": "34fc6c7bb8e4a161a33af83bbda32d8dc267dbe4", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "# CloudNativePG documentation\n\nCloudNativePG documentation is written in Markdown from the `docs` folder. The\n`src` folder contains the sources with the `.md` extension.\n\nWe have adopted [Docusaurus](https://docusaurus.io/) as an open\nsource solution to build the documentation starting from Markdown\nformat.\n\nBefore you submit a pull request for the documentation, you must have\ngone through the following steps:\n\n1. local test of the documentation\n2. run through the spell checker\n\n## How to locally test the documentation\n\nTo ensure your documentation changes look correct before creating a Pull\nRequest, you can build and view the documentation locally using Docker.\n\nExecute the following command in your terminal. This command uses the same\ninfrastructure as the official CloudNativePG documentation website, mounting\nyour local files for preview:\n\n```bash\ndocker run --rm -ti -p 3000:3000 \\\n -v ./src:/website/docs \\\n ghcr.io/cloudnative-pg/docs:latest\n```\n\nOnce the server is running, open your browser and navigate to the local\ndocumentation preview at: `http://127.0.0.1:3000/docs/next/`.\n\nThoroughly check your changes—put yourself in the end user's shoes to verify\nclarity and accuracy. Complete a final spell check, and then proceed with\nsubmitting your pull request.\n\n## How to run the spell checker\n\nEvery time you work on the documentation, please run from the top directory:\n\n``` bash\nmake spellcheck\n```\n\nThis will run a spell checker and highlight all the words that need to be\neither fixed or added to the `.wordlist-en-custom.txt` file.\n\n## Reminders\n\nIf you added samples to `docs/src/samples` or modified existing samples, please\nconsider if they should be included in the curated [list of examples](src/samples.md)\n\nAnd please help keeping the samples in the curated list, as well as any samples\nnamed `cluster-example-*` in runnable condition.\nThese can be a big help for beginners.\n\n## License\n\nThe CloudNativePG documentation and all the work under the `docs` folder is\nlicensed under a Creative Commons Attribution 4.0 International License.", "project": "cloudnative-pg", "source": "docs/README.md", "commit": "e9eec0d3b49adb088f6fbcfa024d4ea288105c6e", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "# Before you start\n\nBefore we get started, it is essential to go over some terminology that is\nspecific to Kubernetes and PostgreSQL.\n\n## Kubernetes terminology\n\n[Node](https://kubernetes.io/docs/concepts/architecture/nodes/)\n: A *node* is a worker machine in Kubernetes, either virtual or physical, where\n all services necessary to run pods are managed by the control plane node(s).\n\n[Postgres Node](architecture.md#reserving-nodes-for-postgresql-workloads)\n: A *Postgres node* is a Kubernetes worker node dedicated to running PostgreSQL\n workloads. This is achieved by applying the `node-role.kubernetes.io` label and\n taint, as [proposed by CloudNativePG](architecture.md#reserving-nodes-for-postgresql-workloads).\n It is also referred to as a `postgres` node.\n\n[Pod](https://kubernetes.io/docs/concepts/workloads/pods/pod/)\n: A *pod* is the smallest computing unit that can be deployed in a Kubernetes\n cluster and is composed of one or more containers that share network and\n storage.\n\n[Service](https://kubernetes.io/docs/concepts/services-networking/service/)\n: A *service* is an abstraction that exposes as a network service an\n application that runs on a group of pods and standardizes important features\n such as service discovery across applications, load balancing, failover, and so\n on.\n\n[Secret](https://kubernetes.io/docs/concepts/configuration/secret/)\n: A *secret* is an object that is designed to store small amounts of sensitive\n data such as passwords, access keys, or tokens, and use them in pods.\n\n[Storage Class](https://kubernetes.io/docs/concepts/storage/storage-classes/)\n: A *storage class* allows an administrator to define the classes of storage in\n a cluster, including provisioner (such as AWS EBS), reclaim policies, mount\n options, volume expansion, and so on.\n\n[Persistent Volume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)\n: A *persistent volume* (PV) is a resource in a Kubernetes cluster that\n represents storage that has been either manually provisioned by an\n administrator or dynamically provisioned by a *storage class* controller. A PV\n is associated with a pod using a *persistent volume claim* and its lifecycle is\n independent of any pod that uses it. Normally, a PV is a network volume,\n especially in the public cloud. A [*local persistent volume*\n (LPV)](https://kubernetes.io/docs/concepts/storage/volumes/#local) is a\n persistent volume that exists only on the particular node where the pod that\n uses it is running.\n\n[Persistent Volume Claim](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims)\n: A *persistent volume claim* (PVC) represents a request for storage, which\n might include size, access mode, or a particular storage class. Similar to how\n a pod consumes node resources, a PVC consumes the resources of a PV.\n\n[Namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/)\n: A *namespace* is a logical and isolated subset of a Kubernetes cluster and\n can be seen as a *virtual cluster* within the wider physical cluster.\n Namespaces allow administrators to create separated environments based on\n projects, departments, teams, and so on.\n\n[RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/)\n: *Role Based Access Control* (RBAC), also known as *role-based security*, is a\n method used in computer systems security to restrict access to the network and\n resources of a system to authorized users only. Kubernetes has a native API to\n control roles at the namespace and cluster level and associate them with\n specific resources and individuals.\n\n[CRD](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/)\n: A *custom resource definition* (CRD) is an extension of the Kubernetes API\n and allows developers to create new data types and objects, *called custom\n resources*.\n\n[Operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/)\n: An *operator* is a custom resource that automates those steps that are\n normally performed by a human operator when managing one or more applications\n or given services. An operator assists Kubernetes in making sure that the\n resource's defined state always matches the observed one.\n\n[`kubectl`](https://kubernetes.io/docs/reference/kubectl/overview/)\n: `kubectl` is the command-line tool used to manage a Kubernetes cluster.\n\nCloudNativePG requires a Kubernetes version supported by the community. Please refer to the\n[\"Supported releases\"](supported_releases.md) page for details.\n\n## PostgreSQL terminology\n\nInstance\n: A Postgres server process running and listening on a pair \"IP address(es)\"\n and \"TCP port\" (usually 5432).\n\nPrimary\n: A PostgreSQL instance that can accept both read and write operations.\n\nReplica\n: A PostgreSQL instance replicating from the only primary instance in a\n cluster and is kept updated by reading a stream of Write-Ahead Log (WAL)\n records. A replica is also known as *standby* or *secondary* server. PostgreSQL\n relies on physical streaming replication (async/sync) and file-based log\n shipping (async).\n\nHot Standby\n: PostgreSQL feature that allows a *replica* to accept read-only workloads.\n\nCluster\n: To be intended as High Availability (HA) Cluster: a set of PostgreSQL\n instances made up by a single primary and an optional arbitrary number of\n replicas.\n\nReplica Cluster\n: A CloudNativePG `Cluster` that is in continuous recovery mode from a selected\n PostgreSQL cluster, normally residing outside the Kubernetes cluster. It is a\n feature that enables multi-cluster deployments in private, public, hybrid, and\n multi-cloud contexts.\n\nDesignated Primary\n: A PostgreSQL standby instance in a replica cluster that is in continuous\n recovery from another PostgreSQL cluster and that is designated to become\n primary in case the replica cluster becomes primary.\n\nSuperuser\n: In PostgreSQL a *superuser* is any role with both `LOGIN` and `SUPERUSER`\n privileges. For security reasons, CloudNativePG performs administrative tasks\n by connecting to the `postgres` database as the `postgres` user via `peer`\n authentication over the local Unix Domain Socket.\n\n[WAL](https://www.postgresql.org/docs/current/wal-intro.html)\n: Write-Ahead Logging (WAL) is a standard method for ensuring data integrity in\n database management systems.\n\nPVC group\n: A PVC group in CloudNativePG's terminology is a group of related PVCs\n belonging to the same PostgreSQL instance, namely the main volume containing\n the PGDATA (`storage`) and the volume for WALs (`walStorage`).\n\n RTO\n: Acronym for \"recovery time objective\", the amount of time a system can be\n unavailable without adversely impacting the application.\n\n RPO\n: Acronym for \"recovery point objective\", a calculation of the level of\n acceptable data loss following a disaster recovery scenario.\n\n## Cloud terminology\n\nRegion\n: A *region* in the Cloud is an isolated and independent geographic area\n organized in *availability zones*. Zones within a region have very little\n round-trip network latency.\n\nZone\n: An *availability zone* in the Cloud (also known as *zone*) is an area in a\n region where resources can be deployed. Usually, an availability zone\n corresponds to a data center or an isolated building of the same data center.\n\n## What to do next\n\nNow that you have familiarized with the terminology, you can decide to\n[test CloudNativePG on your laptop using a local cluster](quickstart.md) before\ndeploying the operator in your selected cloud environment.", "project": "cloudnative-pg", "source": "docs/src/before_you_start.md", "commit": "e9eec0d3b49adb088f6fbcfa024d4ea288105c6e", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "# Bootstrap\n\nThis section describes the options available to create a new\nPostgreSQL cluster and the design rationale behind them.\nThere are primarily two ways to bootstrap a new cluster:\n\n- from scratch (`initdb`)\n- from an existing PostgreSQL cluster, either directly (`pg_basebackup`)\n or indirectly through a physical base backup (`recovery`)\n\nThe `initdb` bootstrap also provides the option to import one or more\ndatabases from an existing PostgreSQL cluster, even if it's outside\nKubernetes or running a different major version of PostgreSQL.\nFor more detailed information about this feature, please refer to the\n[\"Importing Postgres databases\"](database_import.md) section.\n\n:::info[Important]\n Bootstrapping from an existing cluster enables the creation of a\n **replica cluster**—an independent PostgreSQL cluster that remains in\n continuous recovery, stays synchronized with the source cluster, and\n accepts read-only connections.\n For more details, refer to the [Replica Cluster section](replica_cluster.md).\n:::\n\n:::warning\n CloudNativePG requires both the `postgres` user and database to\n always exist. Using the local Unix Domain Socket, it needs to connect\n as the `postgres` user to the `postgres` database via `peer` authentication in\n order to perform administrative tasks on the cluster.\n **DO NOT DELETE** the `postgres` user or the `postgres` database!!!\n:::\n\n:::info\n CloudNativePG is gradually introducing support for\n [Kubernetes' native `VolumeSnapshot` API](https://github.com/cloudnative-pg/cloudnative-pg/issues/2081)\n for both incremental and differential copy in backup and recovery\n operations - if supported by the underlying storage classes.\n Please see [\"Recovery from Volume Snapshot objects\"](recovery.md#recovery-from-volumesnapshot-objects)\n for details.\n:::\n\n## The `bootstrap` section\n\nThe *bootstrap* method can be defined in the `bootstrap` section of the cluster\nspecification. CloudNativePG currently supports the following bootstrap methods:\n\n- `initdb`: initialize a new PostgreSQL cluster (default)\n- `recovery`: create a PostgreSQL cluster by restoring from a base backup of an\n existing cluster and, if needed, replaying all the available WAL files or up to\n a given *point in time*\n- `pg_basebackup`: create a PostgreSQL cluster by cloning an existing one of\n the same major version using `pg_basebackup` through the streaming\n replication protocol. This method is particularly useful for migrating\n databases to CloudNativePG, although meeting all requirements can be\n challenging. Be sure to review the warnings in the\n [`pg_basebackup` subsection](#bootstrap-from-a-live-cluster-pg_basebackup)\n carefully.\n\nOnly one bootstrap method can be specified in the manifest.\nAttempting to define multiple bootstrap methods will result in validation errors.\n\nIn contrast to the `initdb` method, both `recovery` and `pg_basebackup`\ncreate a new cluster based on another one (either offline or online) and can be\nused to spin up replica clusters. They both rely on the definition of external\nclusters.\nRefer to the [replica cluster section](replica_cluster.md) for more information.\n\nGiven the amount of possible backup methods and combinations of backup\nstorage that the CloudNativePG operator provides for `recovery`, please refer to\nthe dedicated [\"Recovery\" section](recovery.md) for guidance on each method.\n\n:::note[API reference]\n Please refer to the [\"API reference for the `bootstrap` section](cloudnative-pg.v1.md#bootstrapconfiguration)\n for more information.\n:::\n\n## The `externalClusters` section\n\nThe `externalClusters` section of the cluster manifest can be used to configure\naccess to one or more PostgreSQL clusters as *sources*.\nThe primary use cases include:\n\n1. **Importing Databases:** Specify an external source to be utilized during\n the [importation of databases](database_import.md) via logical backup and\n restore, as part of the `initdb` bootstrap method.\n2. **Cross-Region Replication:** Define a cross-region PostgreSQL cluster\n employing physical replication, capable of extending across distinct Kubernetes\n clusters or traditional VM/bare-metal environments.\n3. **Recovery from Physical Base Backup:** Recover, fully or at a\n given Point-In-Time, a PostgreSQL cluster by referencing a physical base\n backup.\n\n:::info\n Ongoing development will extend the functionality of `externalClusters` to\n accommodate additional use cases, such as logical replication and foreign\n servers in future releases.\n:::\n\nAs far as bootstrapping is concerned, `externalClusters` can be used\nto define the source PostgreSQL cluster for either the `pg_basebackup`\nmethod or the `recovery` one. An external cluster needs to have:\n\n- a name that identifies the external cluster, to be used as a reference via the\n `source` option\n- at least one of the following:\n\n - information about streaming connection\n - information about the **recovery object store**, which is a Barman Cloud\n compatible object store that contains:\n - the WAL archive (required for Point In Time Recovery)\n - the catalog of physical base backups for the Postgres cluster\n\n:::note\n A recovery object store is normally an AWS S3, Azure Blob Storage,\n or Google Cloud Storage source that is managed by Barman Cloud.\n:::\n\nWhen only the streaming connection is defined, the source can be used for the\n`pg_basebackup` method. When only the recovery object store is defined, the\nsource can be used for the `recovery` method. When both are defined, any of\nthe two bootstrap methods can be chosen. The following table summarizes your\noptions:\n\n| Content of externalClusters | pg_basebackup | recovery |\n|:----------------------------|:-------------:|:--------:|\n| Only streaming | ✓ | |\n| Only object store | | ✓ |\n| Streaming and object store | ✓ | ✓ |\n\nFurthermore, in case of `pg_basebackup` or full `recovery` point in time, the\ncluster is eligible for replica cluster mode. This means that the cluster is\ncontinuously fed from the source, either via streaming, via WAL shipping\nthrough the PostgreSQL's `restore_command`, or any of the two.\n\n:::note[API reference]\n Please refer to the [\"API reference for the `externalClusters` section](cloudnative-pg.v1.md#externalcluster)\n for more information.\n:::\n\n### Password files\n\nWhenever a password is supplied within an `externalClusters` entry,\nCloudNativePG autonomously manages a [PostgreSQL password file](https://www.postgresql.org/docs/current/libpq-pgpass.html)\nfor it, residing at `/controller/external/NAME/pgpass` in each instance.\n\nThis approach enables CloudNativePG to securely establish connections with an\nexternal server without exposing any passwords in the connection string.\nInstead, the connection safely references the aforementioned file through the\n`passfile` connection parameter.\n\n## Bootstrap an empty cluster (`initdb`)\n\nThe `initdb` bootstrap method is used to create a new PostgreSQL cluster from\nscratch. It is the default one unless specified differently.\n\nThe following example contains the full structure of the `initdb`\nconfiguration:\n\n```yaml\napiVersion: postgresql.cnpg.io/v1\nkind: Cluster\nmetadata:\n name: cluster-example-initdb\nspec:\n instances: 3\n\n bootstrap:\n initdb:\n database: app\n owner: app\n secret:\n name: app-secret\n\n storage:\n size: 1Gi\n```\n\nThe above example of bootstrap will:\n\n1. create a new `PGDATA` folder using PostgreSQL's native `initdb` command\n2. create an *unprivileged* user named `app`\n3. set the password of the latter (`app`) using the one in the `app-secret`\n secret (make sure that `username` matches the same name of the `owner`)\n4. create a database called `app` owned by the `app` user.\n\nThanks to the *convention over configuration paradigm*, you can let the\noperator choose a default database name (`app`) and a default application\nuser name (same as the database name), as well as randomly generate a\nsecure password for both the superuser and the application user in\nPostgreSQL.\n\nAlternatively, you can generate your password, store it as a secret,\nand use it in the PostgreSQL cluster - as described in the above example.\n\nThe supplied secret must comply with the specifications of the\n[`kubernetes.io/basic-auth` type](https://kubernetes.io/docs/concepts/configuration/secret/#basic-authentication-secret).\nAs a result, the `username` in the secret must match the one of the `owner`\n(for the application secret) and `postgres` for the superuser one.\n\nThe following is an example of a `basic-auth` secret:\n\n```yaml\napiVersion: v1\ndata:\n username: YXBw\n password: cGFzc3dvcmQ=\nkind: Secret\nmetadata:\n name: app-secret\ntype: kubernetes.io/basic-auth\n```\n\nThe application database is the one that should be used to store application\ndata. Applications should connect to the cluster with the user that owns\nthe application database.\n\n:::info[Important]\n If you need to create additional users, please refer to\n [\"Declarative database role management\"](declarative_role_management.md).\n:::\n\nIn case you don't supply any database name, the operator will proceed\nby convention and create the `app` database, and adds it to the cluster\ndefinition using a *defaulting webhook*.\nThe user that owns the database defaults to the database name instead.\n\nThe application user is not used internally by the operator, which instead\nrelies on the superuser to reconcile the cluster with the desired status.\n\n### Passing Options to `initdb`\n\nThe PostgreSQL data directory is initialized using the\n[`initdb` PostgreSQL command](https://www.postgresql.org/docs/current/app-initdb.html).\n\nCloudNativePG enables you to customize the behavior of `initdb` to modify\nsettings such as default locale configurations and data checksums.\n\n:::warning\n CloudNativePG acts only as a direct proxy to `initdb` for locale-related\n options, due to the ongoing and significant enhancements in PostgreSQL's locale\n support. It is your responsibility to ensure that the correct options are\n provided, following the PostgreSQL documentation, and to verify that the\n bootstrap process completes successfully.\n:::\n\nTo include custom options in the `initdb` command, you can use the following\nparameters:\n\nbuiltinLocale\n: When `builtinLocale` is set to a value, CloudNativePG passes it to the\n `--builtin-locale` option in `initdb`. This option controls the builtin locale, as\n defined in [\"Locale Support\"](https://www.postgresql.org/docs/current/locale.html)\n from the PostgreSQL documentation (default: empty). Note that this option requires\n `localeProvider` to be set to `builtin`. Available from PostgreSQL 17.\n\ndataChecksums\n: Data checksums help detect corruption of data pages that would otherwise\n be silent. From PostgreSQL 18, where data checksums are enabled by default,\n setting `dataChecksums` to `false` makes CloudNativePG pass the\n `--no-data-checksums` option to `initdb` to disable them. On PostgreSQL\n versions before 18, setting `dataChecksums` to `true` makes CloudNativePG\n pass the `--data-checksums` option to `initdb` to enable them. When unset,\n the `initdb` default of the PostgreSQL version in use applies.\n\nencoding\n: When `encoding` set to a value, CloudNativePG passes it to the `--encoding`\n option in `initdb`, which selects the encoding of the template database\n (default: `UTF8`).\n\nicuLocale\n: When `icuLocale` is set to a value, CloudNativePG passes it to the\n `--icu-locale` option in `initdb`. This option controls the ICU locale, as\n defined in [\"Locale Support\"](https://www.postgresql.org/docs/current/locale.html)\n from the PostgreSQL documentation (default: empty).\n Note that this option requires `localeProvider` to be set to `icu`.\n Available from PostgreSQL 15.\n\nicuRules\n: When `icuRules` is set to a value, CloudNativePG passes it to the\n `--icu-rules` option in `initdb`. This option controls the ICU locale, as\n defined in [\"Locale\n Support\"](https://www.postgresql.org/docs/current/locale.html) from the\n PostgreSQL documentation (default: empty). Note that this option requires\n `localeProvider` to be set to `icu`. Available from PostgreSQL 16.\n\nlocale\n: When `locale` is set to a value, CloudNativePG passes it to the `--locale`\n option in `initdb`. This option controls the locale, as defined in\n [\"Locale Support\"](https://www.postgresql.org/docs/current/locale.html) from\n the PostgreSQL documentation. By default, the locale parameter is empty. In\n this case, environment variables such as `LANG` are used to determine the\n locale. Be aware that these variables can vary between container images,\n potentially leading to inconsistent behavior.\n\nlocaleCollate\n: When `localeCollate` is set to a value, CloudNativePG passes it to the `--lc-collate`\n option in `initdb`. This option controls the collation order (`LC_COLLATE`\n subcategory), as defined in [\"Locale Support\"](https://www.postgresql.org/docs/current/locale.html)\n from the PostgreSQL documentation (default: `C`).\n\nlocaleCType\n: When `localeCType` is set to a value, CloudNativePG passes it to the `--lc-ctype` option in\n `initdb`. This option controls the collation order (`LC_CTYPE` subcategory), as\n defined in [\"Locale Support\"](https://www.postgresql.org/docs/current/locale.html)\n from the PostgreSQL documentation (default: `C`).\n\nlocaleProvider\n: When `localeProvider` is set to a value, CloudNativePG passes it to the `--locale-provider`\noption in `initdb`. This option controls the locale provider, as defined in\n[\"Locale Support\"](https://www.postgresql.org/docs/current/locale.html) from the\nPostgreSQL documentation (default: empty, which means `libc` for PostgreSQL).\nAvailable from PostgreSQL 15.\n\nwalSegmentSize\n: When `walSegmentSize` is set to a value, CloudNativePG passes it to the `--wal-segsize`\n option in `initdb` (default: not set - defined by PostgreSQL as 16 megabytes).\n\n:::note\n The only two locale options that CloudNativePG implements during\n the `initdb` bootstrap refer to the `LC_COLLATE` and `LC_TYPE` subcategories.\n The remaining locale subcategories can be configured directly in the PostgreSQL\n configuration, using the `lc_messages`, `lc_monetary`, `lc_numeric`, and\n `lc_time` parameters.\n:::\n\nThe following example enables data checksums and sets the default encoding to\n`LATIN1`:\n\n```yaml\napiVersion: postgresql.cnpg.io/v1\nkind: Cluster\nmetadata:\n name: cluster-example-initdb\nspec:\n instances: 3\n\n bootstrap:\n initdb:\n database: app\n owner: app\n dataChecksums: true\n encoding: 'LATIN1'\n storage:\n size: 1Gi\n```\n\n:::warning\n CloudNativePG supports another way to customize the behavior of the\n `initdb` invocation, using the `options` subsection. However, given that there\n are options that can break the behavior of the operator (such as `--auth` or\n `-d`), this technique is deprecated and will be removed from future versions of\n the API.\n:::\n\n### Executing Queries After Initialization\n\nYou can specify a custom list of queries that will be executed once,\nimmediately after the cluster is created and configured. These queries will be\nexecuted as the *superuser* (`postgres`) against three different databases, in\nthis specific order:\n\n1. The `postgres` database (`postInit` section)\n2. The `template1` database (`postInitTemplate` section)\n3. The application database (`postInitApplication` section)\n\nFor each of these sections, CloudNativePG provides two ways to specify custom\nqueries, executed in the following order:\n\n- As a list of SQL queries in the cluster's definition (`postInitSQL`,\n `postInitTemplateSQL`, and `postInitApplicationSQL` stanzas)\n- As a list of Secrets and/or ConfigMaps, each containing a SQL script to be\n executed (`postInitSQLRefs`, `postInitTemplateSQLRefs`, and\n `postInitApplicationSQLRefs` stanzas). Secrets are processed before ConfigMaps.\n\nObjects in each list will be processed sequentially.\n\n:::warning\n Use the `postInit`, `postInitTemplate`, and `postInitApplication` options\n with extreme care, as queries are run as a superuser and can disrupt the entire\n cluster. An error in any of those queries will interrupt the bootstrap phase,\n leaving the cluster incomplete and requiring manual intervention.\n:::\n\n:::note\nThese queries run with the standard `\"$user\", public` `search_path`, even\nthough operator-issued connections otherwise pin a fixed `search_path` for\nsecurity reasons.\nSee [Schema resolution and `search_path` hardening](security.md#schema-resolution-and-search_path-hardening)\nfor details.\nSchema-qualify object references if you need them to be independent of the\n`search_path`.\n:::\n\n:::info[Important]\n Ensure the existence of entries inside the ConfigMaps or Secrets specified\n in `postInitSQLRefs`, `postInitTemplateSQLRefs`, and\n `postInitApplicationSQLRefs`, otherwise the bootstrap will fail. Errors in any\n of those SQL files will prevent the bootstrap phase from completing\n successfully.\n:::\n\nThe following example runs a single SQL query as part of the `postInitSQL`\nstanza:\n\n```yaml\napiVersion: postgresql.cnpg.io/v1\nkind: Cluster\nmetadata:\n name: cluster-example-initdb\nspec:\n instances: 3\n\n bootstrap:\n initdb:\n database: app\n owner: app\n dataChecksums: true\n localeCollate: 'en_US'\n localeCType: 'en_US'\n postInitSQL:\n - CREATE DATABASE angus\n storage:\n size: 1Gi\n```\n\nThe example below relies on `postInitApplicationSQLRefs` to specify a secret\nand a ConfigMap containing the queries to run after the initialization on the\napplication database:\n\n```yaml\napiVersion: postgresql.cnpg.io/v1\nkind: Cluster\nmetadata:\n name: cluster-example-initdb\nspec:\n instances: 3\n\n bootstrap:\n initdb:\n database: app\n owner: app\n postInitApplicationSQLRefs:\n secretRefs:\n - name: my-secret\n key: secret.sql\n configMapRefs:\n - name: my-configmap\n key: configmap.sql\n storage:\n size: 1Gi\n```\n\n:::note\n Within SQL scripts, each SQL statement is executed in a single exec on the\n server according to the [PostgreSQL semantics](https://www.postgresql.org/docs/current/protocol-flow.html#PROTOCOL-FLOW-MULTI-STATEMENT).\n Comments can be included, but internal commands like `psql` cannot.\n:::\n\n## Bootstrap from another cluster\n\nCloudNativePG enables bootstrapping a cluster starting from\nanother one of the same major version.\nThis operation can be carried out either connecting directly to the source cluster via\nstreaming replication (`pg_basebackup`), or indirectly via an existing\nphysical *base backup* (`recovery`).\n\nThe source cluster must be defined in the `externalClusters` section, identified\nby `name` (our recommendation is to use the same `name` of the origin cluster).\n\n:::info[Important]\n By default the `recovery` method strictly uses the `name` of the\n cluster in the `externalClusters` section to locate the main folder\n of the backup data within the object store, which is normally reserved\n for the name of the server. Backup plugins provide ways to specify a\n different one. For example, the Barman Cloud Plugin provides the [`serverName` parameter](https://cloudnative-pg.io/plugin-barman-cloud/docs/parameters/)\n (by default assigned to the value of `name` in the external cluster definition).\n:::\n\n### Bootstrap from a backup (`recovery`)\n\nGiven the variety of backup methods and combinations of backup storage\noptions provided by the CloudNativePG operator for `recovery`, please refer\nto the dedicated [\"Recovery\" section](recovery.md) for detailed guidance on\neach method.\n\n### Bootstrap from a live cluster (`pg_basebackup`)\n\nThe `pg_basebackup` bootstrap mode allows you to create a new cluster\n(*target*) as an exact physical copy of an existing and **binary-compatible**\nPostgreSQL instance (*source*) managed by CloudNativePG, using a valid\n*streaming replication* connection. The source instance can either be a primary\nor a standby PostgreSQL server. It’s crucial to thoroughly review the\nrequirements section below, as the pros and cons of PostgreSQL physical\nreplication fully apply.\n\nThe primary use cases for this method include:\n\n- Reporting and business intelligence clusters that need to be regenerated\n periodically (daily, weekly)\n- Test databases containing live data that require periodic regeneration\n (daily, weekly, monthly) and anonymization\n- Rapid spin-up of a standalone replica cluster\n- Physical migrations of CloudNativePG clusters to different namespaces or\n Kubernetes clusters\n\n:::info[Important]\n Avoid using this method, based on physical replication, to migrate an\n existing PostgreSQL cluster outside of Kubernetes into CloudNativePG, unless you\n are completely certain that all [requirements](#requirements) are met and\n the operation has been\n thoroughly tested. The CloudNativePG community does not endorse this approach\n for such use cases, and recommends using logical import instead. It is\n exceedingly rare that all requirements for physical replication are met in a\n way that seamlessly works with CloudNativePG. If you still need to go down\n this path, we strongly recommend relying on one of the\n [professional support companies](https://cloudnative-pg.io/support/)\n listed on the CloudNativePG website.\n:::\n\n:::warning\n In its current implementation, this method clones the source PostgreSQL\n instance, thereby creating a *snapshot*. Once the cloning process has finished,\n the new cluster is immediately started.\n Refer to [\"Current limitations\"](#current-limitations) for more details.\n:::\n\nSimilar to the `recovery` bootstrap method, once the cloning operation is\ncomplete, the operator takes full ownership of the target cluster, starting\nfrom the first instance. This includes overriding certain configuration\nparameters as required by CloudNativePG, resetting the superuser password,\ncreating the `streaming_replica` user, managing replicas, and more. The\nresulting cluster operates independently from the source instance.\n\n:::info[Important]\n Configuring the network connection between the target and source instances\n lies outside the scope of CloudNativePG documentation, as it depends heavily on\n the specific context and environment.\n:::\n\nThe streaming replication client on the target instance, managed transparently\nby `pg_basebackup`, can authenticate on the source instance using one of the\nfollowing methods:\n\n1. [Username/password](#usernamepassword-authentication)\n2. [TLS client certificate](#tls-certificate-authentication)\n\nBoth authentication methods are detailed below.\n\n#### Requirements\n\nThe following requirements apply to the `pg_basebackup` bootstrap method:\n\n- target and source must have the same hardware architecture\n- target and source must have the same major PostgreSQL version\n- target and source must have the same tablespaces (same names), with the\n locations in the source mapped through `tablespaceMapping` when they differ\n from the CloudNativePG ones (see\n [Mapping tablespaces from the source](#mapping-tablespaces-from-the-source))\n- source must be configured with enough `max_wal_senders` to grant\n access from the target for this one-off operation by providing at least\n one *walsender* for the backup plus one for WAL streaming\n- the network between source and target must be configured to enable the target\n instance to connect to the PostgreSQL port on the source instance\n- source must have a role with `REPLICATION LOGIN` privileges and must accept\n connections from the target instance for this role in `pg_hba.conf`, preferably\n via TLS (see [\"About the replication user\"](#about-the-replication-user) below)\n- target must be able to successfully connect to the source PostgreSQL instance\n using a role with `REPLICATION LOGIN` privileges\n\n:::note[Seealso]\n For further information, please refer to the\n [\"Planning\" section for Warm Standby](https://www.postgresql.org/docs/current/warm-standby.html#STANDBY-PLANNING),\n the\n [`pg_basebackup` page](https://www.postgresql.org/docs/current/app-pgbasebackup.html)\n and the\n [\"High Availability, Load Balancing, and Replication\" chapter](https://www.postgresql.org/docs/current/high-availability.html)\n in the PostgreSQL documentation.\n:::\n\n#### About the replication user\n\nAs explained in the requirements section, you need to have a user\nwith either the `SUPERUSER` or, preferably, just the `REPLICATION`\nprivilege in the source instance.\n\nIf the source database is created with CloudNativePG, you\ncan reuse the `streaming_replica` user and take advantage of client\nTLS certificates authentication (which, by default, is the only allowed\nconnection method for `streaming_replica`).\n\nFor all other cases, including outside Kubernetes, please verify that\nyou already have a user with the `REPLICATION` privilege, or create\na new one by following the instructions below.\n\nAs `postgres` user on the source system, please run:\n\n```console\ncreateuser -P --replication streaming_replica\n```\n\nEnter the password at the prompt and save it for later, as you\nwill need to add it to a secret in the target instance.\n\n:::note\n Although the name is not important, we will use `streaming_replica`\n for the sake of simplicity. Feel free to change it as you like,\n provided you adapt the instructions in the following sections.\n:::\n\n#### Username/Password authentication\n\nThe first authentication method supported by CloudNativePG\nwith the `pg_basebackup` bootstrap is based on username and password matching.\n\nMake sure you have the following information before you start the procedure:\n\n- location of the source instance, identified by a hostname or an IP address\n and a TCP port\n- replication username (`streaming_replica` for simplicity)\n- password\n\nYou might need to add a line similar to the following to the `pg_hba.conf`\nfile on the source PostgreSQL instance:\n\n```\n# A more restrictive rule for TLS and IP of origin is recommended\nhost replication streaming_replica all md5\n```\n\nThe following manifest creates a new PostgreSQL 18.7 cluster,\ncalled `target-db`, using the `pg_basebackup` bootstrap method\nto clone an external PostgreSQL cluster defined as `source-db`\n(in the `externalClusters` array). As you can see, the `source-db`\ndefinition points to the `source-db.foo.com` host and connects as\nthe `streaming_replica` user, whose password is stored in the\n`password` key of the `source-db-replica-user` secret.\n\n```yaml\napiVersion: postgresql.cnpg.io/v1\nkind: Cluster\nmetadata:\n name: target-db\nspec:\n instances: 3\n imageName: ghcr.io/cloudnative-pg/postgresql:18.7-system-trixie\n\n bootstrap:\n pg_basebackup:\n source: source-db\n\n storage:\n size: 1Gi\n\n externalClusters:\n - name: source-db\n connectionParameters:\n host: source-db.foo.com\n user: streaming_replica\n password:\n name: source-db-replica-user\n key: password\n```\n\nAll the requirements must be met for the clone operation to work, including\nthe same PostgreSQL version (in our case 18.7).\n\n#### TLS certificate authentication\n\nThe second authentication method supported by CloudNativePG\nwith the `pg_basebackup` bootstrap is based on TLS client certificates.\nThis is the recommended approach from a security standpoint.\n\nThe following example clones an existing PostgreSQL cluster (`cluster-example`)\nin the same Kubernetes cluster.\n\n:::note\n This example can be easily adapted to cover an instance that resides\n outside the Kubernetes cluster.\n:::\n\nThe manifest defines a new PostgreSQL 18.7 cluster called `cluster-clone-tls`,\nwhich is bootstrapped using the `pg_basebackup` method from the `cluster-example`\nexternal cluster. The host is identified by the read/write service\nin the same cluster, while the `streaming_replica` user is authenticated\nthanks to the provided keys, certificate, and certification authority\ninformation (respectively in the `cluster-example-replication` and\n`cluster-example-ca` secrets).\n\n```yaml\napiVersion: postgresql.cnpg.io/v1\nkind: Cluster\nmetadata:\n name: cluster-clone-tls\nspec:\n instances: 3\n imageName: ghcr.io/cloudnative-pg/postgresql:18.7-system-trixie\n\n bootstrap:\n pg_basebackup:\n source: cluster-example\n\n storage:\n size: 1Gi\n\n externalClusters:\n - name: cluster-example\n connectionParameters:\n host: cluster-example-rw.default.svc\n user: streaming_replica\n sslmode: verify-full\n sslKey:\n name: cluster-example-replication\n key: tls.key\n sslCert:\n name: cluster-example-replication\n key: tls.crt\n sslRootCert:\n name: cluster-example-ca\n key: ca.crt\n```\n\n#### Configure the application database\n\nWe also support to configure the application database for cluster which bootstrap\nfrom a live cluster, just like the case of `initdb` and `recovery` bootstrap method.\nIf the new cluster is created as a replica cluster (with replica mode enabled), application\ndatabase configuration will be skipped.\n\n:::info[Important]\n While the `Cluster` is in recovery mode, no changes to the database,\n including the catalog, are permitted. This restriction includes any role\n overrides, which are deferred until the `Cluster` transitions to primary.\n During the recovery phase, roles remain as defined in the source cluster.\n:::\n\nThe example below configures the `app` database with the owner `app` and\nthe password stored in the provided secret `app-secret`, following the\nbootstrap from a live cluster.\n\n```yaml\napiVersion: postgresql.cnpg.io/v1\nkind: Cluster\n[...]\nspec:\n bootstrap:\n pg_basebackup:\n database: app\n owner: app\n secret:\n name: app-secret\n source: cluster-example\n```\n\nWith the above configuration, the following will happen only **after recovery is\ncompleted**:\n\n1. If the `app` database does not exist, it will be created.\n2. If the `app` user does not exist, it will be created.\n3. If the `app` user is not the owner of the `app` database, ownership will be\n granted to the `app` user.\n4. If the `username` value matches the `owner` value in the secret, the\n password for the application user (the `app` user in this case) will be\n updated to the `password` value in the secret.\n\n#### Passing additional options to `pg_basebackup`\n\nThis is an advanced option. You can append custom options to the\n`pg_basebackup` command built by the operator with\n`.spec.bootstrap.pg_basebackup.additionalArgs`, for example to reduce the\nimpact on the source server or to speed up the copy of a very large data\ndirectory:\n\n```yaml\nspec:\n bootstrap:\n pg_basebackup:\n source: cluster-example\n additionalArgs:\n - --max-rate=50M\n - --checkpoint=fast\n - --sync-method=syncfs\n```\n\nIn this example:\n\n- `--max-rate=50M` limits the transfer rate, reducing the load on the source\n- `--checkpoint=fast` avoids waiting for a spread checkpoint on the source\n- `--sync-method=syncfs` avoids a slow per-file `fsync` phase at the end of the\n copy (PostgreSQL 17 and later only)\n\n:::warning\nThe operator rejects the options it relies on: the target directory and output\nformat (`-D`/`--pgdata`, `-F`/`--format`, `-R`/`--write-recovery-conf`,\n`-X`/`--wal-method`, `--waldir`, `-t`/`--target`), the connection parameters\n(`-d`/`--dbname`, `-h`/`--host`, `-p`/`--port`, `-U`/`--username`,\n`-w`/`--no-password`, `-W`/`--password`, taken from `externalClusters`), the\ntablespace relocation (`-T`/`--tablespace-mapping`), the creation of a\npermanent replication slot on the source (`-C`/`--create-slot`), which the new\ncluster would never use, and `--help` and `--version`. Abbreviated long options\nthat match one of them are rejected too.\n\nAll the other options are passed as they are, and some of them may still\ninterfere with the operator. You are responsible for the arguments and for\ntheir compatibility with the PostgreSQL version in use. The project does not\ntest combinations of `pg_basebackup` options.\n:::\n\nThis setting only applies to the bootstrap of the cluster. It does not affect\nthe `pg_basebackup` executions used to join new replicas.\n\n#### Mapping tablespaces from the source\n\nIf the source instance uses tablespaces, declare each of them in\n`spec.tablespaces`, using the same name it has in the source instance.\n`pg_basebackup` relocates tablespaces by path and not by name, so if the source\ndoes not already use the CloudNativePG location for a tablespace, map it with\n`tablespaceMapping`, which associates the name of the tablespace with its\nlocation in the source instance:\n\n```yaml\nspec:\n tablespaces:\n - name: data_ts\n storage:\n size: 1Gi\n bootstrap:\n pg_basebackup:\n source: external-postgres\n tablespaceMapping:\n - name: data_ts\n sourceLocation: /data/pg/data_ts\n```\n\n:::warning\nUse `tablespaceMapping` with caution, as it is meant for sources that are not\nmanaged by CloudNativePG, such as an instance running outside Kubernetes. As\nexplained in the [introduction of this method](#bootstrap-from-a-live-cluster-pg_basebackup),\nthe CloudNativePG community does not endorse that kind of migration, and\nrecommends logical import instead. If you still need it, we strongly\nrecommend relying on one of the\n[professional support companies](https://cloudnative-pg.io/support/)\nlisted on the CloudNativePG website. The operator does not validate that the\nresulting tablespace layout will work correctly.\n:::\n\n:::warning\nThe operator does not check which tablespaces the source instance has. Make\nsure that every tablespace of the source instance is declared in\n`spec.tablespaces`, and mapped through `tablespaceMapping` unless the source\nalready uses the CloudNativePG location. A tablespace that is not mapped is\nrestored under the path it has in the source instance, inside the Pod. If that\npath is not writable, the bootstrap fails. If it is, the data ends up in an\nunexpected location.\n:::\n\n:::warning\nDo not run `CREATE TABLESPACE` on the source from the start of the base backup\nuntil the target stops following the source. For a standalone cluster, that is\nthe end of the cloning operation; for a replica cluster, it is the promotion of\nthe cluster. WAL replay carries the source path unmodified, so replaying such a\nrecord fails on the target.\n:::\n\n#### Current limitations\n\n##### Snapshot copy\n\nThe `pg_basebackup` method takes a snapshot of the source instance in the form of\na PostgreSQL base backup. All transactions written from the start of\nthe backup to the correct termination of the backup will be streamed to the target\ninstance using a second connection (see the `--wal-method=stream` option for\n`pg_basebackup`).\n\nOnce the backup is completed, the new instance will be started on a new timeline\nand diverge from the source.\nFor this reason, it is advised to stop all write operations to the source database\nbefore migrating to the target database.\n\nNote that this limitation applies only if the target cluster is not defined as\na replica cluster.\n\n:::info[Important]\n Before you attempt a migration, you must test both the procedure\n and the applications. In particular, it is fundamental that you run the migration\n procedure as many times as needed to systematically measure the downtime of your\n applications in production.\n:::", "project": "cloudnative-pg", "source": "docs/src/bootstrap.md", "commit": "e9eec0d3b49adb088f6fbcfa024d4ea288105c6e", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "# Networking\n\nCloudNativePG assumes the underlying Kubernetes cluster has the required\nconnectivity already set up.\nNetworking on Kubernetes is an important and extended topic; please refer to\nthe [Kubernetes documentation](https://kubernetes.io/docs/concepts/services-networking/) for further information.\n\nIf you're following the quickstart guide to install CloudNativePG on a local KinD or K3d cluster, you should not encounter any networking issues as neither\nplatform will add any networking restrictions by default.\n\nHowever, when deploying CloudNativePG on existing infrastructure, networking\nrestrictions might be in place that could impair the communication of the\noperator with PostgreSQL clusters.\nSpecifically, existing [Network Policies](https://kubernetes.io/docs/concepts/services-networking/network-policies/)\nmight restrict certain types of traffic.\n\nOr, you might be interested in adding network policies in your environment for\nincreased security.\nAs mentioned in the [security document](security.md), please ensure the operator can reach every cluster pod on ports 8000 and 5432, and that pods can connect to each other.\n\n## Cross-namespace network policy for the operator\n\nFollowing the quickstart guide or using helm chart for deployment will install the operator in\na dedicated namespace (`cnpg-system` by default).\nWe recommend that you create clusters in a different namespace.\n\nThe operator *must* be able to connect to cluster pods.\nThis might be precluded if there is a `NetworkPolicy` restricting\ncross-namespace traffic.\n\nFor example, the\n[kubernetes guide on network policies](https://kubernetes.io/docs/concepts/services-networking/network-policies/)\ncontains an example policy denying all ingress traffic by default.\n\nIf your local kubernetes setup has this kind of restrictive network policy, you\nwill need to create a `NetworkPolicy` to explicitly allow connection from the\noperator namespace and pod to the cluster namespace and pods. You can find an example in the\n[`networkpolicy-example.yaml`](samples/networkpolicy-example.yaml) file in this repository.\nPlease note, you'll need to adjust the cluster name and cluster namespace to\nmatch your specific setup, and also the operator namespace if it is not\nthe default namespace.\n\n## Cross-cluster networking\n\nWhile [bootstrapping](bootstrap.md) from another cluster or when using the `externalClusters` section,\nensure connectivity among all clusters, object stores, and namespaces involved.\n\nAgain, we refer you to the [Kubernetes documentation](https://kubernetes.io/docs/concepts/services-networking/)\nfor setup information.", "project": "cloudnative-pg", "source": "docs/src/networking.md", "commit": "e9eec0d3b49adb088f6fbcfa024d4ea288105c6e", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "# Supported releases\n\n*This page lists the status, timeline and policy for currently supported\nreleases of CloudNativePG*.\n\nWe are committed to providing support for the latest minor release, with a\ndedication to launching a new minor release every three months. Each release\nremains fully supported until reaching its designated \"End of Life\" date, as\noutlined in the [support status table for CloudNativePG releases](#support-status-of-cloudnativepg-releases).\nThis includes an additional 3-month assistance window to facilitate seamless\nupgrade planning.\n\nSupported releases of CloudNativePG include releases that are in the active\nmaintenance window and are patched for security and bug fixes.\n\nSubsequent patch releases on a minor release contain backward-compatible changes only.\n\n* [Support policy](#support-policy)\n* [Naming scheme](#naming-scheme)\n* [Support status of CloudNativePG releases](#support-status-of-cloudnativepg-releases)\n* [What we mean by support](#what-we-mean-by-support)\n\n## Support Policy\n\nCloudNativePG produces new builds for each commit.\n\nApproximately every two months, we create a minor release that undergoes\nseveral additional tests and a thorough release qualification process. We\nrelease patch versions for issues found in supported minor releases.\n\nBefore an official release, at least one Release Candidate (RC) is built for\n[preview testing](preview_version.md).\nAdditional release candidates may be issued if new bugs are discovered.\nThe Release Candidates are announced on the Slack channel to encourage\ncommunity testing before the final release.\nThe maintainers provide 1-2 weeks for community testing, and if no objections\nare raised, the final release is announced.\n\nDifferent types of releases represent varying levels of product quality and\nassistance from the CloudNativePG community. For details on the support\nprovided by the community, see [What we mean by support](#what-we-mean-by-support).\n\n| Type | Support level | Quality and recommended Use |\n|-------------------|-----------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|\n| Development Build | No support | Dangerous, might not be fully reliable. Useful to experiment with. |\n| Release Candidate | No support | [Preview version: Not production-ready](preview_version.md). Released for experimentation and testing. |\n| Minor Release | Support provided until 3 months after the N+1 minor release (ex. 1.23 supported until 3 months after 1.24.0 is released)|\n| Patch | Same as the corresponding minor release | Users are encouraged to adopt patch releases as soon as they are available for a given release. |\n| Security Patch | Same as a patch, however, it doesn't contain any additional code other than the security fix from the previous patch | Given the nature of security fixes, users are **strongly** encouraged to adopt security patches after release. |\n\nYou can find available releases on the [releases page](https://github.com/cloudnative-pg/cloudnative-pg/releases).\n\nYou can find high-level more information for each minor and patch release in\nthe [release notes](release_notes.md).\n\nSure, here’s an improved version of the naming scheme section:\n\n## Naming Scheme\n\nOur naming scheme follows [Semantic Versioning 2.0.0](https://semver.org/) and\nis structured as follows:\n\n```\n . .\n```\n\n- ` ` is incremented for each release.\n- ` ` counts the number of patches for the current ` ` release,\n representing small changes relative to the ` ` release.\n\nRelease candidates are indicated by an additional `- ` identifier\nfollowing the patch version, as specified in [Semantic Versioning 2.0.0 - item #9](https://semver.org/#spec-item-9).\n\nGit tags for versions are prefixed with `v`.\n\n## Support status of CloudNativePG releases\n\n| Version | Currently supported | Release date | End of life | Supported Kubernetes versions | Tested, but not supported | Supported Postgres versions |\n|-----------------|----------------------|--------------|-----------------|-------------------------------|---------------------------|-----------------------------|\n| 1.30.x | Yes | 29 Jun 2026 | ~ Mar 2027 | 1.34, 1.35, 1.36 | 1.37, 1.33, 1.32, 1.31 | 15 - 18 |\n| main | No, development only | | | | | 15 - 18 |\n\nThe list of supported Kubernetes versions in the table depends on what\nthe CloudNativePG maintainers think is reasonable to support and to test.\n\nCurrently, the CloudNativePG community does not officially support or test any\nKubernetes distributions beyond the standard/vanilla one - such as Red Hat\nOpenShift. This may change in the future, and if it does, the CloudNativePG\nmaintainers will update the official policy accordingly.\n\nIf you plan to deploy CloudNativePG on Red Hat OpenShift, you can use the\n[certified operator provided by EDB](https://catalog.redhat.com/software/container-stacks/detail/653fd4035eece8598f66d97b),\nwhich comes with full support from EDB.\n\n### Supported PostgreSQL versions\n\nThe list of supported Postgres versions in the previous table generally depends on\nwhat PostgreSQL versions were supported by the community at the time the minor\nversion of CloudNativePG was released.\n\nSee the PostgreSQL [Versioning Policy](https://www.postgresql.org/support/versioning/)\npage for more information about supported versions.\n\n:::info\n Starting from November 12, 2026, [Postgres 14 is no longer supported](https://www.postgresql.org/about/news/postgresql-187-1712-1616-1520-1425-and-19-rc-2-released-3442/).\n Postgres 15 will stop receiving fixes on November 11, 2027.\n:::\n\nWe also recommend that you regularly update your PostgreSQL operand images and\nuse the latest minor release for the major version you have in use, as not upgrading\nis riskier than upgrading. As a result, when opening an issue with an older minor\nversion of PostgreSQL, we might not be able to help you.\n\n## Upcoming releases\n\n| Version | Release date | End of life |\n|---------|--------------|-------------|\n| 1.31.0 | ~ Dec, 2026 | ~ Jun, 2027 |\n| 1.32.0 | ~ Mar, 2027 | ~ Sep, 2027 |\n| 1.33.0 | ~ Jun, 2027 | ~ Dec, 2027 |\n\n:::warning\n CloudNativePG 1.31 is the last minor release that ships with native Barman\n Cloud support. It is removed starting from 1.32.0. Releases up to and\n including 1.31, and their patch releases, keep native support for as long\n as they are supported. Users must migrate to the\n [Barman Cloud Plugin](https://cloudnative-pg.io/plugin-barman-cloud/docs/migration/)\n before upgrading to 1.32 or later.\n:::\n\n:::note\n Feature freeze occurs 1-2 weeks before the release, at which point a\n release candidate version is built and distributed for testing, as described\n earlier.\n:::\n\n:::info[Important]\n Dates in the future are uncertain and might change. This applies to Kubernetes versions, too.\n Updates and changes on the release schedule will be communicated in the\n [Release updates](https://github.com/cloudnative-pg/cloudnative-pg/discussions/categories/release-updates)\n discussion in the main GitHub repository.\n:::\n\n## Old releases\n\n| Version | Release date | End of life | Supported Kubernetes versions |\n|-----------------|-------------------|---------------------|--------------------------------|\n| 1.29.x | March 31, 2026 | September 29, 2026 | 1.33, 1.34, 1.35 |\n| 1.28.x | December, 9 2025 | June 30, 2026 | 1.32, 1.33, 1.34, 1.35 |\n| 1.27.x | August, 12 2025 | March 9, 2026 | 1.31, 1.32, 1.33 |\n| 1.26.x | May 23, 2025 | November 12, 2025 | 1.30, 1.31, 1.32, 1.33 |\n| 1.25.x | Dec 23, 2024 | August 22, 2025 | 1.29, 1.30, 1.31, 1.32 |\n| 1.24.x | Aug 22, 2024 | May 23, 2025 | 1.28, 1.29, 1.30, 1.31 |\n| 1.23.x | April 24, 2024 | November 24, 2024 | 1.27, 1.28, 1.29 |\n| 1.22.x | December 21, 2023 | July 24, 2024 | 1.26, 1.27, 1.28 |\n| 1.21.x | October 12, 2023 | Jun 12, 2024 | 1.25, 1.26, 1.27, 1.28 |\n| 1.20.x | April 27, 2023 | January 21, 2024 | 1.24, 1.25, 1.26, 1.27 |\n| 1.19.x | February 14, 2023 | November 3, 2023 | 1.23, 1.24, 1.25, 1.26 |\n| 1.18.x | Nov 10, 2022 | June 12, 2023 | 1.23, 1.24, 1.25, 1.26, 1.27 |\n| 1.17.x | September 6, 2022 | March 20, 2023 | 1.22, 1.23, 1.24 |\n| 1.16.x | July 7, 2022 | December 21, 2022 | 1.22, 1.23, 1.24 |\n| 1.15.x | April 21, 2022 | October 6, 2022 | 1.21, 1.22, 1.23 |\n\n## What we mean by support\n\nOur support window is roughly five/six months for each release branch (latest\nminor release, plus 3 additional months), given that we produce a new final\nrelease every two/three months.\n\nIn the following diagram, `release-1.27` is an example of a release branch.\n\nFor example, if the latest release is `v1.27.0`, you can expect a supplementary\n3-month support period for the preceding release, `v1.26.x`.\n\n**Only the last patch release of each branch is supported.**\n\n```diagram\n------+---------------------------------------------> main (trunk development)\n \\ \\\n \\ \\\n \\ \\ v1.27.0\n \\ \\ Aug 12, 2025 ^\n \\ \\----------+---------------> release-1.27 |\n \\ | SUPPORTED\n \\ | RELEASES\n \\ v1.26.0 | = last minor\n \\ May 23, 2025 | release +\n +-------------------+---------------> release-1.26 | 3 months\n v\n```\n\nWe offer two types of support:\n\nTechnical support\n: Technical assistance is offered on a best-effort basis and is limited to\n supported releases only. For help, you can reach out to the community via the\n [#cloudnativepg-users](https://cloud-native.slack.com/archives/C08MAUJ7NPM)\n channel on the CNCF Slack workspace (if you're not yet a member, you can\n [join the workspace](https://communityinviter.com/apps/cloud-native/cncf)).\n Alternatively, you can post your questions in\n the [GitHub Discussions](https://github.com/cloudnative-pg/cloudnative-pg/discussions)\n section of the CloudNativePG repository.\n\nSecurity and bug fixes\n: We backport important bug fixes — including security fixes - to all\n currently supported releases. Before backporting a patch, we ask ourselves:\n *\"Does this backport improve `CloudNativePG`, bearing in mind that we really\n value stability for already-released versions?\"*\n\nIf you’re looking for professional support, please refer to the\n[Support page on our website](https://cloudnative-pg.io/support/).\nThe vendors listed there may offer service level agreements (SLA), including\nextended support periods and additional services.", "project": "cloudnative-pg", "source": "docs/src/supported_releases.md", "commit": "e9eec0d3b49adb088f6fbcfa024d4ea288105c6e", "license": "Apache-2.0", "from": "deployment-docs.jsonl"}
|
||
{"text": "# Running the service via TLS (optional)\n\n## Bring your own certificate\n\nHeadscale can be configured to expose its web service via TLS. To configure the certificate and key file manually, set the `tls.cert_path` and `tls.key_path` configuration parameters. If the path is relative, it will be interpreted as relative to the directory the configuration file was read from.\n\n```yaml title=\"config.yaml\"\ntls:\n cert_path: \"\"\n key_path: \"\"\n```\n\nThe certificate should contain the full chain, else some clients, like the Tailscale Android client, will reject it.\n\n### Reloading the certificate\n\nHeadscale reads the certificate and key again when it receives a SIGHUP signal, so a renewed certificate takes effect without a restart. Either reload Headscale via its systemd service (`sudo systemctl reload headscale`) or send the signal directly (`sudo kill -HUP $(pidof headscale)`). The same signal also [reloads the policy](policy.md). New connections get the new certificate; open connections stay as they are.\n\nIf the files cannot be loaded, or the certificate is expired or not yet valid, Headscale logs an error and keeps serving the previous certificate. `systemctl reload` reports success either way, because it only delivers the signal. Look for `TLS certificate reloaded` in the log, or [check the served certificate](#checking-certificate-expiry).\n\n## Let's Encrypt / ACME\n\nTo get a certificate automatically via [Let's Encrypt](https://letsencrypt.org/), set `tls.acme.hostname` to the desired certificate hostname. This name must resolve to the IP address(es) headscale is reachable on (i.e., it must correspond to the `server_url` configuration parameter). The certificate and Let's Encrypt account credentials will be stored in the directory configured in `tls.acme.cache_dir`. If the path is relative, it will be interpreted as relative to the directory the configuration file was read from.\n\n```yaml title=\"config.yaml\"\ntls:\n acme:\n hostname: \"\"\n http_listen: \":http\"\n cache_dir: /var/lib/headscale/cache\n challenge_type: HTTP-01\n```\n\n### Challenge types\n\nHeadscale supports three values for `tls.acme.challenge_type`: `HTTP-01` (default), `TLS-ALPN-01` and `DNS-01`. `DNS-01` publishes the challenge through the DNS provider in `dns.challenge.provider`.\n\n#### HTTP-01\n\nFor `HTTP-01`, headscale must be reachable on port 80 for the Let's Encrypt automated validation, in addition to whatever port is configured in `listen_addr`. By default, headscale listens on port 80 on all local IPs for Let's Encrypt automated validation.\n\n!!! warning \"`listen_addr` cannot also be port 80\"\n\n `listen_addr` and `tls.acme.http_listen` must not bind the same TCP socket. A common mistake is setting `listen_addr: 0.0.0.0:80` together with `tls.acme.hostname` — both endpoints try to claim port 80, and the second bind fails with `address already in use` even though no other process is involved. Headscale validates this at startup and refuses to launch with a `Fatal config error: listen_addr and tls.acme.http_listen would bind the same TCP socket` message. Use `listen_addr: 0.0.0.0:443` (or any non-80 port) when HTTP-01 is enabled.\n\nIf you need to change the ip and/or port used by headscale for the Let's Encrypt validation process, set `tls.acme.http_listen` to the appropriate value. This can be handy if you are running headscale as a non-root user (or can't run `setcap`). Keep in mind, however, that Let's Encrypt will _only_ connect to port 80 for the validation callback, so if you change `tls.acme.http_listen` you will also need to configure something else (e.g. a firewall rule) to forward the traffic from port 80 to the ip:port combination specified in `tls.acme.http_listen`.\n\n#### TLS-ALPN-01\n\nFor `TLS-ALPN-01`, headscale listens on the ip:port combination defined in `listen_addr`. Let's Encrypt will _only_ connect to port 443 for the validation callback, so if `listen_addr` is not set to port 443, something else (e.g. a firewall rule) will be required to forward the traffic from port 443 to the ip:port combination specified in `listen_addr`.\n\n### Technical description\n\nHeadscale uses [CertMagic](https://github.com/caddyserver/certmagic), a Golang library providing [ACME protocol](https://en.wikipedia.org/wiki/Automatic_Certificate_Management_Environment) verification, to facilitate certificate renewals via [Let's Encrypt](https://letsencrypt.org/about/). Certificates will be renewed automatically, and the following can be expected:\n\n- Certificates provided from Let's Encrypt have a validity of 3 months from date issued.\n- Renewals start when a third of the validity remains.\n- Renewal checks run every 10 minutes.\n- Log lines from the library are logged with `logger=acme`.\n\n#### Checking certificate expiry\n\nIf you want to validate that certificate renewal completed successfully, this can be done either manually, or through external monitoring software. Two examples of doing this manually:\n\n1. Open the URL for your headscale server in your browser of choice, and manually inspecting the expiry date of the certificate you receive.\n1. Or, check remotely from CLI using `openssl`:\n\n```console\n$ openssl s_client -servername [hostname] -connect [hostname]:443 | openssl x509 -noout -dates\n(...)\nnotBefore=Feb 8 09:48:26 2024 GMT\nnotAfter=May 8 09:48:25 2024 GMT\n```", "project": "headscale", "source": "docs/ref/tls.md", "commit": "0c304b0632db524356e940fc74dc6230e790d11d", "license": "BSD-3-Clause", "from": "deployment-docs.jsonl"}
|
||
{"text": "# Development builds\n\n!!! warning\n\n Development builds are created automatically from the latest `main` branch\n and are **not versioned releases**. They may contain incomplete features,\n breaking changes, or bugs. Use them for testing only.\n\nEach push to `main` produces container images and cross-compiled binaries.\nContainer images are multi-arch (amd64, arm64) and use the same distroless\nbase image as official releases.\n\n## Container images\n\nImages are available from both Docker Hub and GitHub Container Registry, tagged\nwith the short commit hash of the build (e.g. `main-abc1234`):\n\n- Docker Hub: `docker.io/headscale/headscale:main- `\n- GitHub Container Registry: `ghcr.io/juanfont/headscale:main- `\n\nTo find the latest available tag, check the\n[GitHub Actions workflow](https://github.com/juanfont/headscale/actions/workflows/container-main.yml)\nor the [GitHub Container Registry package page](https://github.com/juanfont/headscale/pkgs/container/headscale).\n\nFor example, to run a specific development build:\n\n```shell\ndocker run \\\n --name headscale \\\n --detach \\\n --read-only \\\n --tmpfs /tmp \\\n --tmpfs /var/run/headscale \\\n --volume \"$(pwd)/config:/etc/headscale:ro\" \\\n --volume \"$(pwd)/lib:/var/lib/headscale\" \\\n --publish 127.0.0.1:8080:8080 \\\n --publish 127.0.0.1:9090:9090 \\\n --health-cmd \"CMD headscale health\" \\\n docker.io/headscale/headscale:main- \\\n serve\n```\n\nSee [Running headscale in a container](container.md) for full container setup instructions.\n\n## Binaries\n\nPre-built binaries from the latest successful build on `main` are available\nvia [nightly.link](https://nightly.link/juanfont/headscale/workflows/container-main/main):\n\n| OS | Arch | Download |\n| ----- | ----- | -------------------------------------------------------------------------------------------------------------------------- |\n| Linux | amd64 | [headscale-linux-amd64](https://nightly.link/juanfont/headscale/workflows/container-main/main/headscale-linux-amd64.zip) |\n| Linux | arm64 | [headscale-linux-arm64](https://nightly.link/juanfont/headscale/workflows/container-main/main/headscale-linux-arm64.zip) |\n| macOS | amd64 | [headscale-darwin-amd64](https://nightly.link/juanfont/headscale/workflows/container-main/main/headscale-darwin-amd64.zip) |\n| macOS | arm64 | [headscale-darwin-arm64](https://nightly.link/juanfont/headscale/workflows/container-main/main/headscale-darwin-arm64.zip) |\n\nAfter downloading and extracting the archive, make the binary executable and follow the\n[standalone binary installation](official.md#using-standalone-binaries-advanced)\ninstructions for setting up the service.", "project": "headscale", "source": "docs/setup/install/main.md", "commit": "0c304b0632db524356e940fc74dc6230e790d11d", "license": "BSD-3-Clause", "from": "deployment-docs.jsonl"}
|