content
stringlengths 3
20.5k
| url
stringlengths 54
193
| embeddings
listlengths 384
384
| score
float64 -0.21
0.65
|
|---|---|---|---|
>}} defined. Otherwise, the containers in the Pod receive the TERM signal at different times and in an arbitrary order. If the order of shutdowns matters, consider using a `preStop` hook to synchronize (or switch to using sidecar containers). 1. At the same time as the kubelet is starting graceful shutdown of the Pod, the control plane evaluates whether to remove that shutting-down Pod from EndpointSlice objects, where those objects represent a {{< glossary\_tooltip term\_id="service" text="Service" >}} with a configured {{< glossary\_tooltip text="selector" term\_id="selector" >}}. {{< glossary\_tooltip text="ReplicaSets" term\_id="replica-set" >}} and other workload resources no longer treat the shutting-down Pod as a valid, in-service replica. Pods that shut down slowly should not continue to serve regular traffic and should start terminating and finish processing open connections. Some applications need to go beyond finishing open connections and need more graceful termination, for example, session draining and completion. Any endpoints that represent the terminating Pods are not immediately removed from EndpointSlices, and a status indicating [terminating state](/docs/concepts/services-networking/endpoint-slices/#conditions) is exposed from the EndpointSlice API. Terminating endpoints always have their `ready` status as `false` (for backward compatibility with versions before 1.26), so load balancers will not use it for regular traffic. If traffic draining on terminating Pod is needed, the actual readiness can be checked as a condition `serving`. You can find more details on how to implement connections draining in the tutorial [Pods And Endpoints Termination Flow](/docs/tutorials/services/pods-and-endpoint-termination-flow/) 1. The kubelet ensures the Pod is shut down and terminated 1. When the grace period expires, if there is still any container running in the Pod, the kubelet triggers forcible shutdown. The container runtime sends `SIGKILL` to any processes still running in any container in the Pod. The kubelet also cleans up a hidden `pause` container if that container runtime uses one. 1. The kubelet transitions the Pod into a terminal phase (`Failed` or `Succeeded` depending on the end state of its containers). 1. The kubelet triggers forcible removal of the Pod object from the API server, by setting grace period to 0 (immediate deletion). 1. The API server deletes the Pod's API object, which is then no longer visible from any client. ### Forced Pod termination {#pod-termination-forced} {{< caution >}} Forced deletions can be potentially disruptive for some workloads and their Pods. {{< /caution >}} By default, all deletes are graceful within 30 seconds. The `kubectl delete` command supports the `--grace-period=` option which allows you to override the default and specify your own value. Setting the grace period to `0` forcibly and immediately deletes the Pod from the API server. If the Pod was still running on a node, that forcible deletion triggers the kubelet to begin immediate cleanup. Using kubectl, You must specify an additional flag `--force` along with `--grace-period=0` in order to perform force deletions. When a force deletion is performed, the API server does not wait for confirmation from the kubelet that the Pod has been terminated on the node it was running on. It removes the Pod in the API immediately so a new Pod can be created with the same name. On the node, Pods that are set to terminate immediately will still be given a small grace period before being force killed. {{< caution >}} Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely. {{< /caution >}} If you need to force-delete Pods that are part of a StatefulSet, refer to the task documentation for [deleting Pods from a StatefulSet](/docs/tasks/run-application/force-delete-stateful-set-pod/). ### Pod shutdown and sidecar containers {#termination-with-sidecars} If your Pod includes one or
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/pod-lifecycle.md
|
[
-0.011479170992970467,
0.007690649479627609,
0.10396373271942139,
-0.009260366670787334,
-0.07933501154184341,
-0.010120369493961334,
0.028975682333111763,
-0.05848151817917824,
0.10608728229999542,
0.06084582582116127,
0.003574563656002283,
0.03541870787739754,
-0.06961813569068909,
-0.06204159930348396,
0.0000155495526996674,
0.0187718253582716,
0.08073396980762482,
-0.035810988396406174,
-0.07414484024047852,
0.0309189110994339,
0.04188169911503792,
0.010242016054689884,
-0.005917034111917019,
0.08582652360200882,
-0.06366494297981262,
0.006858066190034151,
-0.04733152687549591,
-0.018182551488280296,
0.05047568306326866,
0.0017461517127230763,
-0.07719016820192337,
0.015328210778534412,
-0.06310345232486725,
0.0285171028226614,
0.05700337514281273,
0.06359647214412689,
-0.014118354767560959,
-0.012404174543917179,
-0.0067125181667506695,
0.0011720153270289302,
0.048809975385665894,
-0.07362166047096252,
-0.12491809576749802,
0.020885230973362923,
-0.04528454691171646,
0.03352602943778038,
-0.052096422761678696,
-0.039518460631370544,
-0.0069573549553751945,
-0.00425551924854517,
0.01962421089410782,
-0.06655091792345047,
0.03307340294122696,
0.07664835453033447,
0.10430949926376343,
0.03843775391578674,
0.01443300861865282,
0.01158093847334385,
0.07930297404527664,
0.040791742503643036,
0.007910358719527721,
-0.011199085973203182,
-0.056427329778671265,
-0.005472034681588411,
0.055981818586587906,
-0.0041218968108296394,
0.043606728315353394,
-0.018805794417858124,
0.008657315745949745,
0.016971729695796967,
0.05660286918282509,
-0.01722557470202446,
0.02650391310453415,
-0.014605555683374405,
-0.006063999608159065,
0.026293354108929634,
-0.032503023743629456,
0.013343187980353832,
-0.04459308832883835,
-0.09907032549381256,
0.06504247337579727,
0.05483657866716385,
0.09658839553594589,
0.02194582112133503,
-0.08749962598085403,
-0.060696396976709366,
-0.011335233226418495,
-0.07308388501405716,
0.03410819545388222,
-0.012879138812422752,
-0.007477086968719959,
0.007941084913909435,
0.10952314734458923,
-0.09278687089681625,
0.05264250934123993,
-0.051306091248989105,
0.021139755845069885,
-0.01753176376223564,
0.015760578215122223,
-0.023747803643345833,
0.07091958820819855,
0.02798570692539215,
-0.008305774070322514,
-0.01602626033127308,
0.03543528914451599,
-0.05466937646269798,
-0.11514431983232498,
-0.029869206249713898,
0.044321347028017044,
0.004177811089903116,
-0.023805897682905197,
0.010505415499210358,
0.007858560420572758,
0.05776923522353172,
-0.06025075167417526,
0.011744776740670204,
-0.026792341843247414,
0.04167536646127701,
0.06365972012281418,
0.02231738157570362,
0.049055181443691254,
-0.04371270164847374,
-0.015515724197030067,
-0.027682166546583176,
-0.06704598665237427,
0.026168305426836014,
0.02091315947473049,
3.562924846710292e-33,
0.02788565307855606,
-0.13879720866680145,
-0.03777159005403519,
-0.014361678622663021,
0.024955084547400475,
-0.07565316557884216,
-0.08490485697984695,
0.018617143854498863,
-0.07865483313798904,
0.03631320223212242,
-0.05178487300872803,
0.03410663455724716,
-0.07488257437944412,
-0.013672036118805408,
0.05783606693148613,
-0.029896166175603867,
-0.035162393003702164,
0.07456935197114944,
0.004417387302964926,
-0.018696464598178864,
0.05750897526741028,
-0.07304678112268448,
-0.05669739469885826,
-0.0310868788510561,
0.07177237421274185,
0.002668327186256647,
-0.022846853360533714,
-0.06380745023488998,
-0.03162412717938423,
0.03265351057052612,
-0.007812148425728083,
-0.0023602175060659647,
0.020695198327302933,
0.03272385150194168,
-0.16793577373027802,
-0.03953150287270546,
-0.05452899634838104,
-0.04814460873603821,
-0.018668463453650475,
-0.08127064257860184,
-0.02647954411804676,
-0.008056932128965855,
-0.07973181456327438,
-0.0394984669983387,
0.030892662703990936,
-0.041563279926776886,
0.06786420196294785,
-0.05648135021328926,
0.08291467279195786,
0.03161172568798065,
0.02076675370335579,
-0.04463285580277443,
-0.01369723305106163,
0.021613556891679764,
-0.03090503253042698,
0.05207286775112152,
0.05546452850103378,
-0.036822158843278885,
-0.06312961876392365,
0.031986165791749954,
-0.10079872608184814,
0.006103875581175089,
-0.02997896820306778,
-0.031516145914793015,
0.061423346400260925,
0.07844565808773041,
-0.01161369401961565,
0.006413035094738007,
-0.02016420289874077,
0.002126317238435149,
-0.06967297941446304,
0.046344779431819916,
-0.00027509380015544593,
0.004554842598736286,
0.02615335024893284,
-0.03201507776975632,
-0.007451662328094244,
0.02931297942996025,
-0.1002795621752739,
0.0025380379520356655,
0.050966210663318634,
-0.0459090955555439,
-0.04474061354994774,
0.0304295402020216,
0.04236486926674843,
-0.02691805176436901,
0.030316954478621483,
-0.062414634972810745,
-0.09984337538480759,
0.05205945298075676,
-0.048346247524023056,
0.005129605531692505,
-0.06855329126119614,
0.06767985224723816,
-0.14217160642147064,
-4.7170105066682286e-33,
0.10258182138204575,
-0.052859168499708176,
-0.016655102372169495,
0.060334205627441406,
-0.013645024038851261,
0.022876186296343803,
-0.02665894478559494,
0.04526165872812271,
-0.031965870410203934,
0.002527066506445408,
0.04766238480806351,
0.007917026057839394,
0.013738545589148998,
0.09677676111459732,
-0.055683087557554245,
-0.01734105497598648,
-0.01359423715621233,
-0.05979444459080696,
-0.01276855356991291,
0.02503049559891224,
0.02868637442588806,
-0.0430898442864418,
0.00908419955521822,
-0.005472276825457811,
-0.04649094492197037,
-0.02985226735472679,
0.04147001728415489,
0.0024629090912640095,
0.005200882442295551,
-0.04328368231654167,
0.0256053376942873,
-0.05210670083761215,
0.006011561024934053,
0.006196404807269573,
0.022222600877285004,
-0.01738138683140278,
-0.045649077743291855,
0.019674191251397133,
-0.02621045708656311,
-0.006297955755144358,
0.09993216395378113,
0.05172230675816536,
-0.05093689262866974,
-0.07790622115135193,
-0.012513547204434872,
-0.008788972161710262,
-0.043672505766153336,
0.020051134750247,
-0.0014925772557035089,
-0.0685495063662529,
0.001222924329340458,
-0.0016306270845234394,
-0.019931312650442123,
0.0754963755607605,
-0.06407985091209412,
0.030719930306077003,
0.07878365367650986,
-0.030019475147128105,
-0.09871870279312134,
-0.0389232337474823,
0.07486137747764587,
-0.04606861621141434,
0.10403653234243393,
0.013857764191925526,
0.04741116985678673,
-0.013670885935425758,
0.026714913547039032,
0.058525241911411285,
0.05748743191361427,
-0.03987050801515579,
0.010417528450489044,
-0.007486205548048019,
0.06100818142294884,
-0.001326658297330141,
-0.01784561015665531,
0.01947171799838543,
0.02405189536511898,
-0.13452214002609253,
0.09721069782972336,
-0.025074956938624382,
-0.028560221195220947,
0.0701889619231224,
0.0163120049983263,
0.06571875512599945,
0.005409397184848785,
0.027324045076966286,
0.0018158737802878022,
0.13514529168605804,
0.07565321773290634,
0.1092103123664856,
0.026668032631278038,
-0.0015556287253275514,
0.015383989550173283,
0.12590782344341278,
-0.03375929966568947,
-5.2783661885769106e-8,
0.04356183856725693,
0.062390509992837906,
0.008723493665456772,
0.03800586983561516,
0.01928560808300972,
-0.05319986119866371,
0.05377940833568573,
0.0405094176530838,
-0.06822896003723145,
-0.02840435691177845,
-0.013993220403790474,
0.08027224987745285,
-0.06446893513202667,
0.06162140890955925,
0.012298842892050743,
0.0023903718683868647,
-0.017330659553408623,
-0.040578778833150864,
0.0028270443435758352,
-0.06488322466611862,
-0.07322616130113602,
-0.0582752525806427,
0.04754000902175903,
0.03653007373213768,
-0.02370048314332962,
0.04649139195680618,
0.105382040143013,
0.048328835517168045,
0.03939701244235039,
0.012684940360486507,
-0.040029801428318024,
0.016267314553260803,
-0.09409800916910172,
0.09988534450531006,
-0.008462116122245789,
0.058536071330308914,
-0.15098270773887634,
0.03759841248393059,
0.08259861171245575,
0.07845541089773178,
0.019743645563721657,
-0.06211907044053078,
-0.07718264311552048,
0.006788913160562515,
0.062311433255672455,
0.07314114272594452,
-0.0007122863898985088,
0.06794387847185135,
-0.010835845954716206,
0.02546408399939537,
-0.06923346221446991,
-0.036432452499866486,
-0.012819929979741573,
0.04732023552060127,
-0.01110868714749813,
-0.05454186722636223,
-0.021476242691278458,
-0.025433329865336418,
0.00919722393155098,
-0.006791963707655668,
0.029034897685050964,
-0.004083666484802961,
0.018831521272659302,
0.028072139248251915
] | 0.132266
|
terminated. The resource may continue to run on the cluster indefinitely. {{< /caution >}} If you need to force-delete Pods that are part of a StatefulSet, refer to the task documentation for [deleting Pods from a StatefulSet](/docs/tasks/run-application/force-delete-stateful-set-pod/). ### Pod shutdown and sidecar containers {#termination-with-sidecars} If your Pod includes one or more [sidecar containers](/docs/concepts/workloads/pods/sidecar-containers/) (init containers with an `Always` restart policy), the kubelet will delay sending the TERM signal to these sidecar containers until the last main container has fully terminated. The sidecar containers will be terminated in the reverse order they are defined in the Pod spec. This ensures that sidecar containers continue serving the other containers in the Pod until they are no longer needed. This means that slow termination of a main container will also delay the termination of the sidecar containers. If the grace period expires before the termination process is complete, the Pod may enter [forced termination](#pod-termination-beyond-grace-period). In this case, all remaining containers in the Pod will be terminated simultaneously with a short grace period. Similarly, if the Pod has a `preStop` hook that exceeds the termination grace period, emergency termination may occur. In general, if you have used `preStop` hooks to control the termination order without sidecar containers, you can now remove them and allow the kubelet to manage sidecar termination automatically. ### Garbage collection of Pods {#pod-garbage-collection} For failed Pods, the API objects remain in the cluster's API until a human or {{< glossary\_tooltip term\_id="controller" text="controller" >}} process explicitly removes them. The Pod garbage collector (PodGC), which is a controller in the control plane, cleans up terminated Pods (with a phase of `Succeeded` or `Failed`), when the number of Pods exceeds the configured threshold (determined by `terminated-pod-gc-threshold` in the kube-controller-manager). This avoids a resource leak as Pods are created and terminated over time. Additionally, PodGC cleans up any Pods which satisfy any of the following conditions: 1. are orphan Pods - bound to a node which no longer exists, 1. are unscheduled terminating Pods, 1. are terminating Pods, bound to a non-ready node tainted with [`node.kubernetes.io/out-of-service`](/docs/reference/labels-annotations-taints/#node-kubernetes-io-out-of-service). Along with cleaning up the Pods, PodGC will also mark them as failed if they are in a non-terminal phase. Also, PodGC adds a Pod disruption condition when cleaning up an orphan Pod. See [Pod disruption conditions](/docs/concepts/workloads/pods/disruptions#pod-disruption-conditions) for more details. ## Pod behavior during kubelet restarts {#kubelet-restarts} If you restart the kubelet, Pods (and their containers) continue to run even during the restart. When there are running Pods on a node, stopping or restarting the kubelet on that node does \*\*not\*\* cause the kubelet to stop all local Pods before the kubelet itself stops. To stop the Pods on a node, you can use `kubectl drain`. ### Detection of kubelet restarts {{< feature-state feature\_gate\_name="ChangeContainerStatusOnKubeletRestart" >}} When the kubelet starts, it checks to see if there is already a Node with bound Pods. If the Node's [`Ready` condition](/docs/reference/node/node-status/#condition) remains unchanged, in other words the condition has not transitioned from true to false, Kubernetes detects this a \_kubelet restart\_. (It's possible to restart the kubelet in other ways, for example to fix a node bug, but in these cases, Kubernetes picks the safe option and treats this as if you stopped the kubelet and then later started it). When the kubelet restarts, the container statuses are managed differently based on the feature gate setting: \* By default, the kubelet does not change container statuses after a restart. Containers that were in set to `ready: true` state remain remain ready. If you stop the kubelet long enough for it to fail a series of [node heartbeat](/docs/concepts/architecture/leases/#node-heart-beats) checks, and then you wait
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/pod-lifecycle.md
|
[
0.039485152810811996,
0.05279380455613136,
0.07148940861225128,
0.02565440908074379,
0.012033896520733833,
-0.005464390851557255,
-0.031362276524305344,
-0.07874757051467896,
0.06798891723155975,
-0.008922986686229706,
0.025453804060816765,
0.037614624947309494,
-0.03730980306863785,
-0.045222457498311996,
-0.019140399992465973,
-0.015597749501466751,
0.039490681141614914,
0.0036071345675736666,
-0.05149473249912262,
0.0352603904902935,
0.028354935348033905,
-0.03950197622179985,
0.011076545342803001,
0.06042581424117088,
-0.06792934983968735,
0.022756243124604225,
-0.007036477327346802,
-0.04340348392724991,
0.04087505862116814,
-0.046184640377759933,
-0.06433127075433731,
0.009978261776268482,
0.03928506001830101,
0.019116077572107315,
0.07079461216926575,
0.11284005641937256,
-0.004531458951532841,
-0.04391438513994217,
-0.020243635401129723,
-0.03451869264245033,
0.029846234247088432,
-0.05208764970302582,
-0.1335795372724533,
0.03911256790161133,
-0.04090479388833046,
-0.006548808887600899,
-0.09741009026765823,
-0.05792811140418053,
-0.02540769800543785,
-0.03421017900109291,
0.03568549081683159,
-0.05816126987338066,
0.048617634922266006,
0.1071661040186882,
0.05934254825115204,
0.05795693397521973,
-0.0028267193119972944,
0.06524137407541275,
0.07900883257389069,
0.030889378860592842,
0.05047745257616043,
-0.016476687043905258,
-0.0101368622854352,
-0.04402466118335724,
0.06355416029691696,
-0.042964763939380646,
0.02779315412044525,
0.0061150104738771915,
0.012614023871719837,
0.017478086054325104,
0.0825994610786438,
-0.021976782009005547,
-0.021162787452340126,
-0.012108750641345978,
-0.008013041689991951,
0.021441126242280006,
0.014690644107758999,
0.0026831997092813253,
-0.044152289628982544,
-0.05508306995034218,
-0.013167759403586388,
0.012509134598076344,
0.08939484506845474,
-0.06593019515275955,
-0.10418771952390671,
-0.04042702913284302,
-0.04067657142877579,
-0.05132010951638222,
0.05380161106586456,
-0.009398377500474453,
0.008315332233905792,
0.004304603207856417,
0.06880652904510498,
-0.10908190160989761,
0.08746090531349182,
-0.0415092371404171,
-0.032010529190301895,
-0.0020614909008145332,
0.030405089259147644,
-0.00005746148235630244,
0.03942001610994339,
0.02753245085477829,
-0.0517110601067543,
0.011952787637710571,
0.04332197085022926,
-0.059067681431770325,
-0.08644016832113266,
-0.012456736527383327,
0.04166506230831146,
0.0188154224306345,
-0.003021771786734462,
-0.02065347321331501,
0.0032799008768051863,
0.06653787940740585,
-0.06580532342195511,
0.07171793282032013,
-0.0023966156877577305,
0.05919700860977173,
0.05290203541517258,
0.01909930631518364,
0.06252840161323547,
-0.07627526670694351,
0.01139451377093792,
0.0131206214427948,
-0.05679785832762718,
-0.005646414123475552,
-0.021776746958494186,
1.9933452800908633e-33,
-0.00023347887326963246,
-0.17603981494903564,
-0.011948983184993267,
-0.012233298271894455,
0.030639784410595894,
-0.08531272411346436,
-0.046102698892354965,
0.039650946855545044,
-0.046099886298179626,
-0.014768727123737335,
-0.06413241475820541,
0.00855939369648695,
-0.0296401996165514,
-0.007000113371759653,
0.030533576384186745,
-0.07379600405693054,
-0.053836721926927567,
0.06013054773211479,
0.010219983756542206,
-0.023732703179121017,
0.07876270264387131,
-0.03924521058797836,
-0.0680575892329216,
0.006876484025269747,
0.030883248895406723,
-0.04960211366415024,
0.03079339489340782,
-0.08454711735248566,
-0.030787426978349686,
0.03290756046772003,
-0.015167045406997204,
0.07480864971876144,
-0.013115798123180866,
0.07059375941753387,
-0.13997367024421692,
-0.013877320103347301,
-0.019507836550474167,
0.019743813201785088,
-0.05525960400700569,
-0.06530214101076126,
0.034799572080373764,
0.020234575495123863,
-0.012506729923188686,
-0.08574267476797104,
0.05084023252129555,
-0.11085520684719086,
0.12329832464456558,
-0.028696654364466667,
0.039525095373392105,
0.05783674865961075,
0.030942417681217194,
-0.03056815266609192,
0.022028213366866112,
0.013899269513785839,
-0.012885850854218006,
0.02583102509379387,
0.08031783998012543,
-0.02745041623711586,
-0.031205223873257637,
0.005338709801435471,
-0.029005853459239006,
-0.008300147019326687,
0.015705596655607224,
0.022440312430262566,
0.009686420671641827,
0.11955228447914124,
-0.054388780146837234,
0.02304619923233986,
-0.005430452525615692,
-0.011365540325641632,
-0.07830695807933807,
0.04535452276468277,
0.01660027727484703,
-0.014223494566977024,
-0.04388156160712242,
-0.04233323410153389,
0.012683367356657982,
0.01935916393995285,
-0.15208089351654053,
0.017379827797412872,
0.0722835510969162,
-0.04780486226081848,
-0.03809515759348869,
0.036254819482564926,
0.02343890629708767,
-0.04587274789810181,
0.008022154681384563,
-0.049629680812358856,
-0.03835855796933174,
0.048190273344516754,
0.012279166840016842,
0.017389915883541107,
-0.06038113683462143,
0.061783477663993835,
-0.06919082254171371,
-2.9479337530089185e-33,
0.10099277645349503,
0.005910034757107496,
-0.022335117682814598,
-0.0075427088886499405,
-0.002070692367851734,
0.025163423269987106,
-0.02947206050157547,
0.08770529925823212,
-0.033646825700998306,
-0.02198483608663082,
-0.01982969231903553,
-0.042994529008865356,
0.014659582637250423,
0.0596638098359108,
-0.09869853407144547,
0.022693132981657982,
0.038923319429159164,
-0.06840520352125168,
-0.03801506385207176,
0.021225644275546074,
-0.02819116786122322,
-0.03713928163051605,
0.009886646643280983,
0.029924457892775536,
0.0084610003978014,
0.008751516230404377,
0.023835714906454086,
-0.0018224873347207904,
-0.06266910582780838,
-0.015043252147734165,
0.025255192071199417,
-0.13253730535507202,
0.006070461589843035,
0.06501499563455582,
0.028394872322678566,
-0.05037365481257439,
-0.10180796682834625,
0.058130454272031784,
-0.01659887284040451,
-0.06460057199001312,
0.08445212244987488,
0.019598281010985374,
-0.041468653827905655,
0.029485194012522697,
-0.010920651257038116,
-0.0078668724745512,
0.020653318613767624,
0.0016764060128480196,
0.0018448045011609793,
-0.06801490485668182,
-0.012396355159580708,
0.0011780232889577746,
-0.019298195838928223,
0.07670705765485764,
-0.006926929112523794,
-0.026007356122136116,
0.05578548088669777,
0.056253205984830856,
-0.047193493694067,
-0.026668233796954155,
0.0770740732550621,
-0.01711871661245823,
0.09448221325874329,
-0.0026536656077951193,
0.019778594374656677,
-0.08698897063732147,
0.024046214297413826,
0.048434436321258545,
0.02464616484940052,
-0.0015318556688725948,
0.0404699482023716,
0.09548229724168777,
0.0417206734418869,
0.07226040959358215,
-0.03402481973171234,
0.006129721645265818,
0.0019087708787992597,
-0.11365010589361191,
0.053481318056583405,
0.015813147649168968,
-0.06536749750375748,
0.02846730314195156,
-0.058431532233953476,
0.03305385261774063,
0.011565424501895905,
0.01594950444996357,
0.006296529434621334,
0.09287871420383453,
0.07085961103439331,
0.0841900035738945,
0.04296230897307396,
-0.0198042094707489,
0.035687245428562164,
0.11053512245416641,
-0.03153650462627411,
-4.7237403322242244e-8,
0.11488200724124908,
-0.04002195969223976,
-0.012167567387223244,
0.029917677864432335,
0.0524185448884964,
-0.050950951874256134,
0.06082917004823685,
0.09095937758684158,
-0.06777609884738922,
-0.01899789087474346,
0.020301301032304764,
0.07393808662891388,
-0.05776786431670189,
0.002531573874875903,
0.03349100053310394,
-0.05120072513818741,
0.03198310360312462,
0.01906502991914749,
0.008515076711773872,
-0.06444138288497925,
-0.11249875277280807,
-0.088846355676651,
0.02072870172560215,
0.025935586541891098,
-0.004300619941204786,
0.054461121559143066,
0.0876394584774971,
0.049200087785720825,
0.031242774799466133,
-0.021158332005143166,
-0.052838634699583054,
0.010663807392120361,
-0.04368972033262253,
0.09595053642988205,
-0.04100295901298523,
0.06854541599750519,
-0.16445490717887878,
0.09359743446111679,
0.017986629158258438,
0.0864570289850235,
0.004422744270414114,
0.010183801874518394,
-0.06666497886180878,
-0.014500509947538376,
0.010177787393331528,
0.019323140382766724,
-0.05413040518760681,
0.056096602231264114,
-0.02356509305536747,
0.02800629660487175,
-0.04275975003838539,
-0.04294349253177643,
-0.07770337164402008,
0.07694036513566971,
0.009576259180903435,
-0.005705161020159721,
-0.034011680632829666,
-0.05402649566531181,
0.023479538038372993,
-0.00603989465162158,
0.026129914447665215,
0.018062425777316093,
0.020990261808037758,
-0.026684293523430824
] | 0.180035
|
the feature gate setting: \* By default, the kubelet does not change container statuses after a restart. Containers that were in set to `ready: true` state remain remain ready. If you stop the kubelet long enough for it to fail a series of [node heartbeat](/docs/concepts/architecture/leases/#node-heart-beats) checks, and then you wait before you start the kubelet again, Kubernetes may begin to evict Pods from that Node. However, even though Pod evictions begin to happen, Kubernetes does not mark the individual containers in those Pods as `ready: false`. The Pod-level eviction happens after the control plane taints the node as `node.kubernetes.io/not-ready` (due to the failed heartbeats). \* In Kubernetes {{< skew currentVersion >}} you can opt in to a legacy behavior where the kubelet always modify the containers `ready` value, after a kubelet restart, to be false. This legacy behavior was the default for a long time, but caused issue for people using Kubernetes, especially in large scale deployments. Althought the feature gate allows reverting to this legacy behavior temporarily, the Kubernetes project recommends that you file a bug report if you encounter problems. The `ChangeContainerStatusOnKubeletRestart` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/#ChangeContainerStatusOnKubeletRestart) will be removed in the future. ## {{% heading "whatsnext" %}} \* Get hands-on experience [attaching handlers to container lifecycle events](/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/). \* Get hands-on experience [configuring Liveness, Readiness and Startup Probes](/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/). \* Learn more about [container lifecycle hooks](/docs/concepts/containers/container-lifecycle-hooks/). \* Learn more about [sidecar containers](/docs/concepts/workloads/pods/sidecar-containers/). \* For detailed information about Pod and container status in the API, see the API reference documentation covering [`status`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#PodStatus) for Pod.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/pod-lifecycle.md
|
[
0.06471160054206848,
0.002360488520935178,
0.06313402950763702,
0.02812161296606064,
-0.0228966623544693,
0.0018141740001738071,
-0.07475991547107697,
-0.07492964714765549,
0.09304776787757874,
0.008190964348614216,
-0.0019271769560873508,
-0.002534160390496254,
-0.039718400686979294,
-0.012348751537501812,
0.03740029036998749,
0.002341577084735036,
0.016361862421035767,
-0.005770878400653601,
-0.0339709036052227,
0.013082671910524368,
-0.02385707199573517,
-0.003933848347514868,
0.0002095732488669455,
0.007769050542265177,
-0.03860093280673027,
-0.025034233927726746,
-0.04483097046613693,
-0.001615048386156559,
0.09816053509712219,
-0.042621854692697525,
-0.07456009089946747,
0.004287934396415949,
0.026946939527988434,
0.010932762175798416,
0.04706753417849541,
0.09166707843542099,
0.019986871629953384,
-0.03265364095568657,
-0.05667724460363388,
-0.009508543647825718,
0.06943465024232864,
-0.0859314352273941,
-0.09017591923475266,
-0.00840820837765932,
0.0018439030973240733,
0.05120735988020897,
-0.03861056640744209,
-0.057655513286590576,
0.006179763004183769,
-0.05574687942862511,
0.05886320769786835,
-0.07008609175682068,
0.0934915617108345,
0.025244606658816338,
0.07962208986282349,
0.05637814477086067,
0.05128880962729454,
0.04472858086228371,
0.12324155867099762,
-0.00008552896906621754,
0.05075210705399513,
0.02408057637512684,
-0.0013751006918027997,
0.0057472893968224525,
-0.01347532868385315,
0.0205063596367836,
0.03399406746029854,
-0.01820242591202259,
0.02150924876332283,
0.012505477294325829,
0.10652337968349457,
-0.018476348370313644,
-0.02511467970907688,
-0.0035581819247454405,
0.033445101231336594,
0.03408057615160942,
-0.04386360943317413,
0.007088918704539537,
-0.0006356678204610944,
-0.05497010424733162,
-0.0035644997842609882,
-0.009580067358911037,
0.04538761079311371,
-0.05984443426132202,
-0.09917755424976349,
-0.04693645238876343,
-0.06188659742474556,
-0.05287434160709381,
0.027317633852362633,
0.03687739372253418,
0.023148203268647194,
-0.05839141085743904,
0.038184091448783875,
-0.06630726158618927,
0.059355512261390686,
-0.013196808286011219,
-0.004752741195261478,
-0.010529261082410812,
0.03201410174369812,
-0.0348985455930233,
0.041139304637908936,
0.03942883014678955,
-0.07271776348352432,
0.04990154504776001,
0.1089823842048645,
-0.0757361352443695,
0.02123531699180603,
-0.042890701442956924,
0.006311904173344374,
0.011949863284826279,
0.008939769119024277,
0.017314234748482704,
0.034528862684965134,
0.030199479311704636,
-0.03172467648983002,
0.015270506963133812,
-0.04959645867347717,
0.026432888582348824,
0.05185703933238983,
0.05010246858000755,
0.08152242004871368,
-0.09608631581068039,
0.002395946066826582,
-0.023404981940984726,
-0.04766380041837692,
0.013654439710080624,
-0.04008321836590767,
1.6141159251652158e-33,
0.022078759968280792,
-0.12397871166467667,
0.010017184540629387,
0.005508628208190203,
0.03098156675696373,
-0.10222239792346954,
-0.0796433687210083,
-0.03241989389061928,
-0.04038771614432335,
0.001559803495183587,
-0.08326387405395508,
-0.0078029390424489975,
-0.029614394530653954,
-0.07858775556087494,
0.016482409089803696,
-0.03967473655939102,
-0.11013516783714294,
-0.01632242649793625,
0.048991475254297256,
-0.014441534876823425,
0.07057946920394897,
-0.06394358724355698,
-0.025855042040348053,
0.004035492427647114,
0.008659225888550282,
-0.03414435684680939,
0.03419720008969307,
-0.052512481808662415,
-0.05941343307495117,
0.028898635879158974,
-0.04353077709674835,
0.010964862070977688,
0.04050006344914436,
0.023129306733608246,
-0.1915050595998764,
0.03093423694372177,
-0.003191589843481779,
0.008262459188699722,
-0.0750165581703186,
-0.06380948424339294,
-0.027953866869211197,
-0.007855919189751148,
-0.054125264286994934,
-0.06479765474796295,
0.048610709607601166,
-0.0507604219019413,
0.066375233232975,
-0.0568230040371418,
0.033752527087926865,
0.03689923509955406,
-0.04320000857114792,
0.038011204451322556,
-0.003805803135037422,
-0.03243692219257355,
0.00998497661203146,
0.028665227815508842,
0.09354261308908463,
-0.0691772922873497,
-0.11656324565410614,
0.017879506573081017,
-0.0438864603638649,
0.007127462886273861,
0.046730294823646545,
-0.0251252930611372,
0.04244276136159897,
0.09151236712932587,
-0.028268810361623764,
0.03332918509840965,
-0.09433266520500183,
0.031124843284487724,
-0.048334576189517975,
0.019131379202008247,
-0.06600987166166306,
-0.040863022208213806,
-0.04837875813245773,
-0.037473879754543304,
-0.02975783683359623,
0.005136056337505579,
-0.14189542829990387,
0.024727586656808853,
0.06892351061105728,
-0.060485851019620895,
-0.0306729543954134,
0.08127760887145996,
0.05383298546075821,
-0.021660225465893745,
0.010797940194606781,
0.018273787572979927,
-0.018962636590003967,
0.04145902022719383,
0.06208910048007965,
0.025851942598819733,
0.07226799428462982,
0.03483723849058151,
-0.10367664694786072,
-3.818163975866166e-33,
0.048840198665857315,
0.02010812610387802,
-0.0365782156586647,
-0.024090779945254326,
-0.01301667746156454,
0.029588213190436363,
-0.02558007277548313,
0.05884615331888199,
-0.041566118597984314,
-0.053188323974609375,
-0.021241117268800735,
-0.009400441311299801,
-0.027934251353144646,
0.03665206581354141,
-0.10055095702409744,
0.028372744098305702,
-0.059137389063835144,
-0.04054814577102661,
0.008785066194832325,
0.07892995327711105,
-0.03228958696126938,
-0.0414002425968647,
-0.06953133642673492,
0.076084665954113,
-0.04176480695605278,
0.029716309159994125,
0.03535361588001251,
0.08171781897544861,
-0.045905184000730515,
-0.06772681325674057,
0.024454599246382713,
-0.08334566652774811,
-0.010436399839818478,
0.11962409317493439,
0.04549436643719673,
-0.04618854075670242,
-0.036169178783893585,
0.012855914421379566,
-0.007972572930157185,
0.010698080994188786,
0.08075372129678726,
0.05932016298174858,
-0.02725541964173317,
-0.01697210967540741,
-0.023800376802682877,
0.06154228374361992,
0.04058994725346565,
-0.017308320850133896,
0.023690110072493553,
-0.10561706125736237,
-0.02198401279747486,
0.01145323459059,
0.010929868556559086,
0.10566040128469467,
-0.052698057144880295,
0.04940252751111984,
0.000708102947100997,
0.10684706270694733,
-0.002191165229305625,
-0.03173256665468216,
0.01228795200586319,
-0.04984164237976074,
0.08115625381469727,
-0.012957536615431309,
-0.01024813111871481,
-0.048879895359277725,
0.0372990220785141,
0.07049994170665741,
0.007150888442993164,
-0.012482036836445332,
-0.02189301699399948,
0.005210220348089933,
-0.031694743782281876,
0.010364200919866562,
-0.04080851003527641,
0.003569150110706687,
0.013607267290353775,
-0.10133642703294754,
0.014130976982414722,
-0.05396122485399246,
-0.036127761006355286,
0.02657243423163891,
-0.07826835662126541,
0.037037428468465805,
0.043549101799726486,
0.0656776875257492,
0.043460436165332794,
0.05177443102002144,
0.11696156859397888,
0.09545314311981201,
-0.0026552886702120304,
0.074360191822052,
-0.06589621305465698,
0.07318118959665298,
-0.025659821927547455,
-5.250364409903341e-8,
0.03782996907830238,
-0.014036677777767181,
-0.030291521921753883,
0.0373237282037735,
0.040895044803619385,
-0.04643874987959862,
0.0969693586230278,
-0.0315227210521698,
-0.13572081923484802,
-0.0430949367582798,
-0.04295177385210991,
0.10971588641405106,
-0.031035996973514557,
-0.04791206121444702,
0.04621628671884537,
-0.026057740673422813,
-0.04465913400053978,
0.024373400956392288,
0.055367693305015564,
-0.05635994300246239,
-0.06447286158800125,
-0.06696522235870361,
0.03929348662495613,
0.005477381404489279,
-0.005268491804599762,
0.041616108268499374,
0.05972176790237427,
0.013683238998055458,
0.057642966508865356,
-0.0005095697706565261,
-0.023714441806077957,
0.007468721363693476,
-0.028804609552025795,
0.065318264067173,
-0.00019867380615323782,
0.07392594963312149,
-0.10767115652561188,
0.021766727790236473,
0.060199856758117676,
0.05986950173974037,
0.010252639651298523,
-0.03414326161146164,
-0.06060558184981346,
-0.005661064758896828,
-0.09180911630392075,
0.05818386375904083,
-0.030512534081935883,
0.12246476113796234,
0.06689780205488205,
0.007472825702279806,
-0.004417052026838064,
-0.025064876303076744,
-0.02306571789085865,
0.07582476735115051,
0.02909921295940876,
0.022862892597913742,
-0.022145597264170647,
-0.02553713135421276,
0.04808451980352402,
0.02008739672601223,
0.024783002212643623,
0.001318147056736052,
0.015061070211231709,
-0.04303545877337456
] | 0.087034
|
This guide is for application owners who want to build highly available applications, and thus need to understand what types of disruptions can happen to Pods. It is also for cluster administrators who want to perform automated cluster actions, like upgrading and autoscaling clusters. ## Voluntary and involuntary disruptions Pods do not disappear until someone (a person or a controller) destroys them, or there is an unavoidable hardware or system software error. We call these unavoidable cases \*involuntary disruptions\* to an application. Examples are: - a hardware failure of the physical machine backing the node - cluster administrator deletes VM (instance) by mistake - cloud provider or hypervisor failure makes VM disappear - a kernel panic - the node disappears from the cluster due to cluster network partition - eviction of a pod due to the node being [out-of-resources](/docs/concepts/scheduling-eviction/node-pressure-eviction/). Except for the out-of-resources condition, all these conditions should be familiar to most users; they are not specific to Kubernetes. We call other cases \*voluntary disruptions\*. These include both actions initiated by the application owner and those initiated by a Cluster Administrator. Typical application owner actions include: - deleting the deployment or other controller that manages the pod - updating a deployment's pod template causing a restart - directly deleting a pod (e.g. by accident) Cluster administrator actions include: - [Draining a node](/docs/tasks/administer-cluster/safely-drain-node/) for repair or upgrade. - Draining a node from a cluster to scale the cluster down (learn about [Node Autoscaling](/docs/concepts/cluster-administration/node-autoscaling/)). - Removing a pod from a node to permit something else to fit on that node. These actions might be taken directly by the cluster administrator, or by automation run by the cluster administrator, or by your cluster hosting provider. Ask your cluster administrator or consult your cloud provider or distribution documentation to determine if any sources of voluntary disruptions are enabled for your cluster. If none are enabled, you can skip creating Pod Disruption Budgets. {{< caution >}} Not all voluntary disruptions are constrained by Pod Disruption Budgets. For example, deleting deployments or pods bypasses Pod Disruption Budgets. {{< /caution >}} ## Dealing with disruptions Here are some ways to mitigate involuntary disruptions: - Ensure your pod [requests the resources](/docs/tasks/configure-pod-container/assign-memory-resource) it needs. - Replicate your application if you need higher availability. (Learn about running replicated [stateless](/docs/tasks/run-application/run-stateless-application-deployment/) and [stateful](/docs/tasks/run-application/run-replicated-stateful-application/) applications.) - For even higher availability when running replicated applications, spread applications across racks (using [anti-affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity)) or across zones (if using a [multi-zone cluster](/docs/setup/multiple-zones).) The frequency of voluntary disruptions varies. On a basic Kubernetes cluster, there are no automated voluntary disruptions (only user-triggered ones). However, your cluster administrator or hosting provider may run some additional services which cause voluntary disruptions. For example, rolling out node software updates can cause voluntary disruptions. Also, some implementations of cluster (node) autoscaling may cause voluntary disruptions to defragment and compact nodes. Your cluster administrator or hosting provider should have documented what level of voluntary disruptions, if any, to expect. Certain configuration options, such as [using PriorityClasses](/docs/concepts/scheduling-eviction/pod-priority-preemption/) in your pod spec can also cause voluntary (and involuntary) disruptions. ## Pod disruption budgets {{< feature-state for\_k8s\_version="v1.21" state="stable" >}} Kubernetes offers features to help you run highly available applications even when you introduce frequent voluntary disruptions. As an application owner, you can create a PodDisruptionBudget (PDB) for each application. A PDB limits the number of Pods of a replicated application that are down simultaneously from voluntary disruptions. For example, a quorum-based application would like to ensure that the number of replicas running is never brought below the number needed for a quorum. A web front end might want to ensure that the number of replicas serving
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/disruptions.md
|
[
0.0347367525100708,
0.0045921895653009415,
0.08452867716550827,
0.03397563844919205,
0.09077279269695282,
-0.028768867254257202,
0.043068449944257736,
0.042418524622917175,
0.042984120547771454,
0.073126420378685,
0.04036038741469383,
-0.009027146734297276,
0.03399871289730072,
-0.05369273200631142,
0.016544239595532417,
-0.026056567206978798,
0.030746223405003548,
0.004429425112903118,
-0.07163394242525101,
0.040419772267341614,
-0.008742725476622581,
0.010085399262607098,
-0.10906493663787842,
0.07906760275363922,
-0.04310924559831619,
0.05127665773034096,
-0.024498077109456062,
-0.06260945647954941,
0.03755515068769455,
-0.01041590329259634,
-0.08958504348993301,
-0.0334303118288517,
-0.01377340778708458,
0.03535570949316025,
0.12434051185846329,
0.10916992276906967,
0.00819047074764967,
-0.05450088530778885,
-0.10912231355905533,
-0.03393279016017914,
0.01135000679641962,
-0.0873103067278862,
-0.12385293841362,
-0.014795571565628052,
0.00583299808204174,
-0.03257831186056137,
-0.057729773223400116,
-0.07363893836736679,
-0.03472870588302612,
-0.04382135719060898,
0.005054734647274017,
-0.04053105041384697,
0.10068943351507187,
0.08895057439804077,
0.030034849420189857,
-0.04443104937672615,
0.1020294800400734,
-0.0038354238495230675,
0.053054600954055786,
-0.00795823149383068,
0.09085628390312195,
-0.023012692108750343,
-0.03744574263691902,
-0.023732710629701614,
0.05976679176092148,
0.021400608122348785,
0.05760156363248825,
-0.0023483089171350002,
0.06703970581293106,
0.05380076542496681,
0.06015948951244354,
-0.027910595759749413,
-0.0468207485973835,
0.011002113111317158,
0.009570923633873463,
0.029074691236019135,
-0.033924445509910583,
0.04690060392022133,
0.014501077122986317,
0.01236326340585947,
0.02044692263007164,
0.02498311549425125,
-0.009347189217805862,
-0.034989695996046066,
-0.07608377933502197,
0.013076884672045708,
-0.046701814979314804,
-0.03227287530899048,
0.10662494599819183,
0.03875648230314255,
-0.03374292701482773,
0.020231880247592926,
0.1381867378950119,
-0.044463202357292175,
0.10664140433073044,
-0.05334785208106041,
0.012767910026013851,
-0.07893963158130646,
0.03736303001642227,
0.014775427058339119,
0.018394438549876213,
0.02136826328933239,
-0.015176490880548954,
-0.02039434015750885,
0.06357087194919586,
-0.015452457591891289,
-0.07428859919309616,
-0.09353556483983994,
0.03738424554467201,
0.013885874301195145,
-0.034025344997644424,
0.004408043809235096,
-0.009901617653667927,
-0.0018970574019476771,
0.030151143670082092,
0.017633233219385147,
0.0271405391395092,
0.008218892849981785,
0.027324583381414413,
0.027981175109744072,
0.041848085820674896,
-0.08504634350538254,
0.00493470998480916,
-0.029560934752225876,
-0.02339821867644787,
0.003621653188019991,
-0.07708892226219177,
2.9936942787184917e-33,
0.007165209390223026,
-0.06919489800930023,
-0.06107185035943985,
0.02200932428240776,
0.05986122041940689,
-0.09195859730243683,
-0.05578578636050224,
-0.04972228407859802,
0.044734593480825424,
-0.07191886752843857,
-0.054294403642416,
0.011590253561735153,
0.06881587952375412,
-0.03272343799471855,
0.06413470953702927,
-0.05041314661502838,
0.01971203088760376,
0.061890292912721634,
0.034765005111694336,
-0.047630928456783295,
0.03417569771409035,
-0.017701448872685432,
-0.02818582020699978,
0.046960681676864624,
-0.03608277440071106,
-0.027635635808110237,
0.00695924973115325,
-0.11146488785743713,
0.026023712009191513,
0.045772161334753036,
-0.015489421784877777,
0.021031009033322334,
0.018293632194399834,
0.030591290444135666,
-0.10484156012535095,
0.04857062175869942,
-0.08376115560531616,
-0.01256600022315979,
-0.05319390818476677,
-0.028075769543647766,
-0.09195590764284134,
-0.005886539816856384,
-0.021998465061187744,
-0.009661098010838032,
0.10830642282962799,
-0.06879809498786926,
0.13369512557983398,
-0.08361180126667023,
-0.04341816529631615,
-0.010996194556355476,
-0.006319201085716486,
0.0020072543993592262,
0.05097663030028343,
-0.07254727929830551,
0.0048129018396139145,
0.010882948525249958,
0.10016240179538727,
-0.07106255739927292,
-0.030559277161955833,
0.0601532869040966,
-0.005059518851339817,
-0.049037594348192215,
0.004747617058455944,
-0.00431068753823638,
0.023776892572641373,
0.006538912188261747,
-0.042935777455568314,
-0.016582796350121498,
-0.04749386012554169,
0.05384896323084831,
-0.08081132918596268,
0.03188466653227806,
-0.0015645071398466825,
-0.013554681092500687,
-0.061132319271564484,
-0.07074164599180222,
-0.0031175001058727503,
-0.021800562739372253,
-0.11913325637578964,
-0.003794086165726185,
-0.030370119959115982,
-0.05821049585938454,
-0.027914566919207573,
0.051433004438877106,
-0.0682118833065033,
-0.019731801003217697,
0.008484313264489174,
-0.018094981089234352,
-0.10433775931596756,
0.012743331491947174,
0.046926870942115784,
-0.024702629074454308,
-0.006584546994417906,
0.047201815992593765,
-0.062065668404102325,
-5.2481752615025415e-33,
0.0026845932006835938,
0.008551672101020813,
-0.07395937293767929,
0.010092142969369888,
0.03478268161416054,
0.022730352357029915,
-0.07491632550954819,
0.09148039668798447,
-0.03223523870110512,
-0.09653506428003311,
-0.13394811749458313,
-0.0325019434094429,
-0.010736013762652874,
0.0623149648308754,
-0.13846629858016968,
-0.003782958025112748,
0.006657092832028866,
-0.03861558437347412,
-0.027565285563468933,
0.057802729308605194,
0.00463846093043685,
0.006625124253332615,
-0.001207795343361795,
-0.004610979463905096,
-0.00017445663979742676,
-0.008671787567436695,
-0.04251613840460777,
0.018067914992570877,
-0.03171927481889725,
-0.021684972569346428,
0.01476602628827095,
-0.04032108932733536,
0.006202277261763811,
0.08303745836019516,
0.10418424755334854,
0.03104911372065544,
-0.03814222663640976,
0.0272546224296093,
-0.03007822297513485,
-0.08383365720510483,
0.0645567998290062,
0.04922381043434143,
0.02460920438170433,
-0.019688397645950317,
0.024729909375309944,
0.044140953570604324,
-0.019074518233537674,
-0.033308181911706924,
-0.05615947023034096,
-0.028784016147255898,
0.025862623006105423,
-0.031096303835511208,
0.038609594106674194,
0.13335750997066498,
-0.030567385256290436,
0.05344702675938606,
0.05625801905989647,
0.06556224822998047,
-0.03722335770726204,
0.03735693171620369,
0.024208564311265945,
-0.04730803892016411,
0.0291396826505661,
0.03679583966732025,
0.04203980788588524,
-0.030731717124581337,
0.015602074563503265,
-0.024641280993819237,
-0.019933504983782768,
-0.009185579605400562,
0.08470209687948227,
0.09592849016189575,
-0.05438360571861267,
0.006893813610076904,
-0.030417192727327347,
0.00037136595346964896,
-0.046078115701675415,
-0.07950031012296677,
-0.05333496257662773,
-0.047576889395713806,
-0.060228560119867325,
0.06606890261173248,
-0.0062465062364935875,
0.0552893802523613,
-0.033203959465026855,
0.05287300795316696,
0.051415085792541504,
0.003472974756732583,
0.06294675916433334,
0.03327815607190132,
-0.047901883721351624,
0.004482513293623924,
-0.08525324612855911,
0.09886228293180466,
-0.03289458155632019,
-4.983630219612678e-8,
0.05993575230240822,
0.04470513388514519,
-0.029151294380426407,
0.005945725832134485,
0.14296498894691467,
-0.030870860442519188,
0.037596315145492554,
0.030621323734521866,
-0.03485282510519028,
0.06496620923280716,
-0.03954794630408287,
-0.019572081044316292,
-0.035414036363363266,
0.010391993448138237,
0.04600381478667259,
-0.0028676381334662437,
0.020566845312714577,
0.08024276047945023,
-0.048055194318294525,
-0.0501556321978569,
-0.06941357254981995,
-0.024985577911138535,
-0.014012599363923073,
0.014689549803733826,
0.017012935131788254,
0.018383514136075974,
0.06705658882856369,
0.048950497061014175,
0.01902015693485737,
0.0020154910162091255,
-0.042794641107320786,
0.005800238344818354,
-0.016213541850447655,
0.04110035300254822,
-0.10279769450426102,
0.09636269509792328,
-0.06130421906709671,
-0.023295095190405846,
0.019472790881991386,
0.02599906362593174,
-0.03321326524019241,
0.02513928711414337,
-0.009914790280163288,
0.029477650299668312,
0.038497090339660645,
0.029968708753585815,
-0.0733894631266594,
0.04163427650928497,
-0.007184441667050123,
-0.017445147037506104,
-0.00003658319837995805,
-0.05790511146187782,
-0.05135801434516907,
0.1282208114862442,
-0.009930063039064407,
-0.028459936380386353,
0.0007809092639945447,
-0.039660897105932236,
0.04786854237318039,
0.023233594372868538,
0.06627383083105087,
0.02493724599480629,
-0.02626013197004795,
-0.012840225361287594
] | 0.238033
|
of a replicated application that are down simultaneously from voluntary disruptions. For example, a quorum-based application would like to ensure that the number of replicas running is never brought below the number needed for a quorum. A web front end might want to ensure that the number of replicas serving load never falls below a certain percentage of the total. Cluster managers and hosting providers should use tools which respect PodDisruptionBudgets by calling the [Eviction API](/docs/tasks/administer-cluster/safely-drain-node/#eviction-api) instead of directly deleting pods or deployments. For example, the `kubectl drain` subcommand lets you mark a node as going out of service. When you run `kubectl drain`, the tool tries to evict all of the Pods on the Node you're taking out of service. The eviction request that `kubectl` submits on your behalf may be temporarily rejected, so the tool periodically retries all failed requests until all Pods on the target node are terminated, or until a configurable timeout is reached. A PDB specifies the number of replicas that an application can tolerate having, relative to how many it is intended to have. For example, a Deployment which has a `.spec.replicas: 5` is supposed to have 5 pods at any given time. If its PDB allows for there to be 4 at a time, then the Eviction API will allow voluntary disruption of one (but not two) pods at a time. The group of pods that comprise the application is specified using a label selector, the same as the one used by the application's controller (deployment, stateful-set, etc). The "intended" number of pods is computed from the `.spec.replicas` of the workload resource that is managing those pods. The control plane discovers the owning workload resource by examining the `.metadata.ownerReferences` of the Pod. [Involuntary disruptions](#voluntary-and-involuntary-disruptions) cannot be prevented by PDBs; however they do count against the budget. Pods which are deleted or unavailable due to a rolling upgrade to an application do count against the disruption budget, but workload resources (such as Deployment and StatefulSet) are not limited by PDBs when doing rolling upgrades. Instead, the handling of failures during application updates is configured in the spec for the specific workload resource. It is recommended to set `AlwaysAllow` [Unhealthy Pod Eviction Policy](/docs/tasks/run-application/configure-pdb/#unhealthy-pod-eviction-policy) to your PodDisruptionBudgets to support eviction of misbehaving applications during a node drain. The default behavior is to wait for the application pods to become [healthy](/docs/tasks/run-application/configure-pdb/#healthiness-of-a-pod) before the drain can proceed. When a pod is evicted using the eviction API, it is gracefully [terminated](/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination), honoring the `terminationGracePeriodSeconds` setting in its [PodSpec](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podspec-v1-core). ## PodDisruptionBudget example {#pdb-example} Consider a cluster with 3 nodes, `node-1` through `node-3`. The cluster is running several applications. One of them has 3 replicas initially called `pod-a`, `pod-b`, and `pod-c`. Another, unrelated pod without a PDB, called `pod-x`, is also shown. Initially, the pods are laid out as follows: | node-1 | node-2 | node-3 | |:--------------------:|:-------------------:|:------------------:| | pod-a \*available\* | pod-b \*available\* | pod-c \*available\* | | pod-x \*available\* | | | All 3 pods are part of a deployment, and they collectively have a PDB which requires there be at least 2 of the 3 pods to be available at all times. For example, assume the cluster administrator wants to reboot into a new kernel version to fix a bug in the kernel. The cluster administrator first tries to drain `node-1` using the `kubectl drain` command. That tool tries to evict `pod-a` and `pod-x`. This succeeds immediately. Both pods go into the `terminating` state at the same time. This puts the cluster in this state: | node-1 \*draining\* | node-2 | node-3 | |:--------------------:|:-------------------:|:------------------:| |
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/disruptions.md
|
[
-0.012081630527973175,
-0.022486336529254913,
0.0348811149597168,
-0.0037816816475242376,
-0.0051783546805381775,
-0.0622575618326664,
-0.07030725479125977,
-0.011090482585132122,
0.09729572385549545,
0.04529054835438728,
-0.006736353505402803,
0.02178683876991272,
0.033350855112075806,
-0.06711532920598984,
0.03748277202248573,
-0.03460786119103432,
0.0728101059794426,
-0.010800604708492756,
-0.02580989897251129,
-0.023338204249739647,
0.007930482737720013,
-0.027156494557857513,
-0.07632162421941757,
0.0707571730017662,
-0.07163369655609131,
-0.009183208458125591,
-0.04412175342440605,
-0.062212325632572174,
0.023670244961977005,
-0.006178665906190872,
-0.05054965615272522,
0.01294153742492199,
-0.027033694088459015,
-0.02097516506910324,
0.08038637042045593,
0.07372599095106125,
-0.02736384980380535,
-0.059926073998212814,
-0.0874597579240799,
-0.006249955855309963,
0.030625198036432266,
-0.07679241895675659,
-0.12482823431491852,
-0.008295947685837746,
-0.04298100247979164,
-0.03718142583966255,
-0.10403469949960709,
-0.04417089372873306,
-0.04457990080118179,
-0.011325336061418056,
0.07260604202747345,
-0.04142579808831215,
0.0441330149769783,
0.1331568956375122,
0.048558130860328674,
-0.019560545682907104,
0.08727631717920303,
-0.0016072059515863657,
0.05638609826564789,
0.021313073113560677,
0.120375856757164,
0.03315962478518486,
-0.03692968189716339,
-0.003947259858250618,
0.08280711621046066,
0.016781488433480263,
0.028683330863714218,
-0.01477277372032404,
0.05303405970335007,
0.027531476691365242,
0.0002344234671909362,
-0.07161259651184082,
-0.039632536470890045,
-0.004184953402727842,
-0.02496279589831829,
-0.0010813242988660932,
-0.006259019952267408,
0.009210895746946335,
0.020126359537243843,
-0.0304498840123415,
-0.01662098988890648,
0.04613123834133148,
0.021105220541357994,
0.006593529600650072,
-0.10940217226743698,
-0.0012079788139089942,
-0.0002742006618063897,
-0.041161417961120605,
0.09601286053657532,
0.01835232600569725,
0.0017948029562830925,
0.07628121972084045,
0.07587480545043945,
-0.05466132611036301,
-0.0011116585228592157,
-0.04123544692993164,
0.038078565150499344,
-0.00010972768359351903,
0.013736982829868793,
0.017337678000330925,
0.02820184826850891,
-0.007898617535829544,
0.012795430608093739,
-0.04683332145214081,
-0.001351041253656149,
-0.08541914820671082,
-0.06512121856212616,
-0.06431055814027786,
0.04771728068590164,
0.0816015675663948,
-0.03360151872038841,
0.030546996742486954,
-0.002260104287415743,
0.07030533999204636,
-0.014933442696928978,
0.051225803792476654,
0.02825229987502098,
0.0063264197669923306,
0.04831968992948532,
-0.005088491830974817,
0.04344664141535759,
-0.021226707845926285,
0.06609407067298889,
-0.05468999966979027,
0.0017754306318238378,
0.06625950336456299,
0.00849306769669056,
6.02209172206715e-33,
0.05831024423241615,
-0.13622893393039703,
-0.012177919037640095,
-0.006643578875809908,
0.06100146099925041,
-0.05626721307635307,
-0.05703512206673622,
0.007129627745598555,
0.008875319734215736,
-0.07500601559877396,
-0.018235167488455772,
0.05021730437874794,
0.022547589614987373,
-0.013948490843176842,
0.02702363394200802,
-0.10286054760217667,
-0.004116285126656294,
0.07737204432487488,
0.06115167215466499,
-0.055534727871418,
0.0806397870182991,
-0.05804208293557167,
-0.03444860875606537,
0.09297818690538406,
0.05573832616209984,
-0.005721769295632839,
-0.003099408932030201,
-0.04481581971049309,
-0.033094294369220734,
0.052068401128053665,
-0.01864873245358467,
0.038485459983348846,
-0.04042281210422516,
-0.0024371107574552298,
-0.09605880081653595,
0.020430857315659523,
-0.05398277938365936,
-0.03485835716128349,
-0.0994623601436615,
-0.05663546547293663,
-0.06027814745903015,
0.019835514947772026,
-0.039206743240356445,
-0.00905614998191595,
0.08922086656093597,
-0.07013829797506332,
0.09523192048072815,
-0.08617182821035385,
-0.02349718287587166,
-0.00022798044665250927,
0.019829967990517616,
-0.01943463832139969,
0.05522554740309715,
-0.051749762147665024,
-0.006583424750715494,
-0.009169291704893112,
0.07069313526153564,
-0.09982340037822723,
-0.04145727679133415,
0.02045290917158127,
-0.021745244041085243,
-0.051590122282505035,
-0.008029984310269356,
0.003888156032189727,
0.06126146763563156,
0.07307704538106918,
-0.01441996544599533,
0.0068977465853095055,
-0.02878432348370552,
0.039615508168935776,
-0.06301996111869812,
0.011976432055234909,
0.023593420162796974,
-0.018788352608680725,
-0.061877958476543427,
-0.08261238783597946,
0.041059091687202454,
0.005374323111027479,
-0.10411954671144485,
0.02498231828212738,
-0.013253364711999893,
-0.04322431609034538,
-0.06504064798355103,
0.012928907759487629,
0.02729632891714573,
-0.03476491570472717,
0.03727652132511139,
-0.03816124051809311,
-0.11619037389755249,
-0.021718433126807213,
0.010829620994627476,
0.0011448456207290292,
-0.03795447573065758,
0.02892608568072319,
-0.03882982209324837,
-6.739768859468573e-33,
-0.017845608294010162,
-0.02848595753312111,
-0.0333188958466053,
0.04685187712311745,
0.03196178376674652,
-0.014799471013247967,
-0.06263475120067596,
0.10077013075351715,
-0.021749427542090416,
-0.07787752151489258,
-0.11461357027292252,
-0.029619861394166946,
-0.021465176716446877,
0.05201281979680061,
-0.12890438735485077,
-0.01827905885875225,
-0.00014820323849562556,
-0.09122145175933838,
-0.06988736987113953,
0.05346245691180229,
-0.005427788011729717,
-0.01386626809835434,
0.02896030619740486,
0.0211931299418211,
-0.009688000194728374,
-0.010110421106219292,
-0.04298878461122513,
-0.004797389265149832,
-0.03578389808535576,
-0.07201749086380005,
0.05706208571791649,
-0.04531778767704964,
-0.001846951781772077,
0.038908496499061584,
0.006924822926521301,
0.0003252826281823218,
-0.03767933323979378,
0.12561781704425812,
-0.022389359772205353,
-0.06483810395002365,
0.05056028813123703,
0.007651787716895342,
-0.057565879076719284,
-0.0012252269079908729,
-0.008597416803240776,
0.041898902505636215,
-0.029186394065618515,
-0.011836536228656769,
-0.01440427079796791,
0.0009804681176319718,
-0.011337217874825,
-0.03153235465288162,
0.036501504480838776,
0.13597072660923004,
-0.031230460852384567,
0.0055082072503864765,
0.04898067191243172,
0.0851329118013382,
-0.05055274814367294,
0.06650873273611069,
0.0795804038643837,
0.006088706199079752,
0.06456384062767029,
0.07558966428041458,
0.021966267377138138,
-0.012113746255636215,
0.041768573224544525,
0.03737838566303253,
-0.036306899040937424,
0.04264453053474426,
0.03445024415850639,
0.10408252477645874,
0.02008049190044403,
-0.01033371314406395,
0.006904814392328262,
-0.017833713442087173,
-0.030603956431150436,
-0.10735807567834854,
-0.06854647397994995,
0.004385866224765778,
-0.0761476531624794,
0.08479854464530945,
-0.03251616656780243,
0.044775284826755524,
-0.032631032168865204,
-0.01059049367904663,
0.031652383506298065,
0.039702415466308594,
0.09056068956851959,
0.1029752641916275,
-0.043636754155159,
-0.015325447544455528,
-0.10172110795974731,
0.11880892515182495,
-0.027914445847272873,
-6.427574561485017e-8,
0.059158023446798325,
0.026775984093546867,
0.007397746201604605,
0.0019412579713389277,
0.08136013150215149,
0.015138529241085052,
0.03012498840689659,
0.04842134565114975,
0.017332807183265686,
0.024480899795889854,
0.028988247737288475,
0.0037649888545274734,
-0.09375499188899994,
0.04606996104121208,
0.056720420718193054,
-0.0017718445742502809,
0.06298873573541641,
-0.002904243301600218,
-0.040747806429862976,
-0.023949341848492622,
-0.117973193526268,
-0.053700223565101624,
-0.021427925676107407,
0.030899986624717712,
0.04938723146915436,
0.019763123244047165,
0.06858476996421814,
0.04389394447207451,
0.004818332381546497,
-0.020587675273418427,
-0.012337599880993366,
0.020455021411180496,
-0.003907095640897751,
0.052336882799863815,
-0.04291779175400734,
0.11950849741697311,
-0.08193058520555496,
-0.029461417347192764,
0.008222508244216442,
0.043462447822093964,
-0.028732554987072945,
0.04656215012073517,
0.004620708990842104,
0.023647883906960487,
0.058607153594493866,
0.03642810881137848,
-0.10274089127779007,
0.08229658752679825,
0.004767283331602812,
-0.0036987902130931616,
-0.0519985593855381,
-0.08391451835632324,
-0.021671205759048462,
0.10136857628822327,
-0.010237300768494606,
0.01756192371249199,
-0.00030232552671805024,
-0.03342888131737709,
0.06709561496973038,
0.04595261439681053,
0.06370721757411957,
-0.0064816842786967754,
0.04021356627345085,
-0.018410513177514076
] | 0.216039
|
administrator first tries to drain `node-1` using the `kubectl drain` command. That tool tries to evict `pod-a` and `pod-x`. This succeeds immediately. Both pods go into the `terminating` state at the same time. This puts the cluster in this state: | node-1 \*draining\* | node-2 | node-3 | |:--------------------:|:-------------------:|:------------------:| | pod-a \*terminating\* | pod-b \*available\* | pod-c \*available\* | | pod-x \*terminating\* | | | The deployment notices that one of the pods is terminating, so it creates a replacement called `pod-d`. Since `node-1` is cordoned, it lands on another node. Something has also created `pod-y` as a replacement for `pod-x`. (Note: for a StatefulSet, `pod-a`, which would be called something like `pod-0`, would need to terminate completely before its replacement, which is also called `pod-0` but has a different UID, could be created. Otherwise, the example applies to a StatefulSet as well.) Now the cluster is in this state: | node-1 \*draining\* | node-2 | node-3 | |:--------------------:|:-------------------:|:------------------:| | pod-a \*terminating\* | pod-b \*available\* | pod-c \*available\* | | pod-x \*terminating\* | pod-d \*starting\* | pod-y | At some point, the pods terminate, and the cluster looks like this: | node-1 \*drained\* | node-2 | node-3 | |:--------------------:|:-------------------:|:------------------:| | | pod-b \*available\* | pod-c \*available\* | | | pod-d \*starting\* | pod-y | At this point, if an impatient cluster administrator tries to drain `node-2` or `node-3`, the drain command will block, because there are only 2 available pods for the deployment, and its PDB requires at least 2. After some time passes, `pod-d` becomes available. The cluster state now looks like this: | node-1 \*drained\* | node-2 | node-3 | |:--------------------:|:-------------------:|:------------------:| | | pod-b \*available\* | pod-c \*available\* | | | pod-d \*available\* | pod-y | Now, the cluster administrator tries to drain `node-2`. The drain command will try to evict the two pods in some order, say `pod-b` first and then `pod-d`. It will succeed at evicting `pod-b`. But, when it tries to evict `pod-d`, it will be refused because that would leave only one pod available for the deployment. The deployment creates a replacement for `pod-b` called `pod-e`. Because there are not enough resources in the cluster to schedule `pod-e` the drain will again block. The cluster may end up in this state: | node-1 \*drained\* | node-2 | node-3 | \*no node\* | |:--------------------:|:-------------------:|:------------------:|:------------------:| | | pod-b \*terminating\* | pod-c \*available\* | pod-e \*pending\* | | | pod-d \*available\* | pod-y | | At this point, the cluster administrator needs to add a node back to the cluster to proceed with the upgrade. You can see how Kubernetes varies the rate at which disruptions can happen, according to: - how many replicas an application needs - how long it takes to gracefully shutdown an instance - how long it takes a new instance to start up - the type of controller - the cluster's resource capacity ## Pod disruption conditions {#pod-disruption-conditions} {{< feature-state feature\_gate\_name="PodDisruptionConditions" >}} A dedicated Pod `DisruptionTarget` [condition](/docs/concepts/workloads/pods/pod-lifecycle/#pod-conditions) is added to indicate that the Pod is about to be deleted due to a {{}}. The `reason` field of the condition additionally indicates one of the following reasons for the Pod termination: `PreemptionByScheduler` : Pod is due to be {{}} 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/). `DeletionByTaintManager` : 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 {{}}-based evictions. `EvictionByEvictionAPI` : Pod has been marked for {{}}
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/disruptions.md
|
[
-0.0002306175447301939,
0.021815890446305275,
0.0656915232539177,
0.04973527044057846,
0.023747721686959267,
-0.056469161063432693,
-0.007547349669039249,
-0.03536965698003769,
0.042709123343229294,
0.0632142424583435,
0.06420842558145523,
-0.02909778617322445,
0.00273272767663002,
-0.05060351639986038,
-0.013080574572086334,
0.0232688020914793,
-0.0334722176194191,
-0.0077486964873969555,
0.007399753201752901,
-0.060384128242731094,
-0.011016600765287876,
0.005175694357603788,
-0.004486825317144394,
0.008038139902055264,
-0.02807236835360527,
0.026839379221200943,
-0.08499869704246521,
-0.013032418675720692,
0.039143696427345276,
-0.07887142896652222,
-0.03562307730317116,
0.039805181324481964,
0.0034008021466434,
-0.0019228612072765827,
0.10657110810279846,
0.13189278542995453,
0.030567798763513565,
-0.02630016766488552,
-0.06328228861093521,
-0.061637818813323975,
0.1273338347673416,
-0.04433640092611313,
-0.06254465878009796,
-0.034681566059589386,
-0.05963093042373657,
0.0076673137955367565,
-0.11588717997074127,
-0.044415321201086044,
0.0029282383620738983,
-0.047691795974969864,
0.051702868193387985,
-0.03521393612027168,
0.04672174155712128,
0.09680014848709106,
0.05288385972380638,
0.062258925288915634,
0.034111347049474716,
0.020035913214087486,
0.09319569915533066,
0.030644085258245468,
0.02870308980345726,
0.037524063140153885,
-0.00873461365699768,
-0.003917376045137644,
0.03166830539703369,
-0.0639399066567421,
-0.008545558899641037,
-0.047621846199035645,
-0.002687073079869151,
0.034261539578437805,
0.05758800730109215,
-0.02381005883216858,
-0.046085383743047714,
-0.016754422336816788,
-0.03588339313864708,
0.009151403792202473,
0.007184971123933792,
0.05563792958855629,
-0.08303516358137131,
-0.030919149518013,
0.0020796721801161766,
0.028676288202404976,
0.007389078848063946,
-0.025935348123311996,
-0.11737247556447983,
0.041922491043806076,
-0.06473109871149063,
-0.13738411664962769,
0.07657210528850555,
0.05995181202888489,
-0.03919101879000664,
-0.025878289714455605,
0.08744516223669052,
-0.055926159024238586,
0.03187362104654312,
-0.026556091383099556,
0.020668858662247658,
0.006576338782906532,
0.002116357907652855,
0.028207726776599884,
-0.0010009672259911895,
0.028508946299552917,
-0.01435783039778471,
-0.0539652481675148,
0.016237782314419746,
-0.04862917214632034,
-0.09695830196142197,
-0.055712874978780746,
0.042192816734313965,
0.015510601922869682,
0.024897363036870956,
-0.007114204112440348,
0.000587996793910861,
0.0717845931649208,
-0.0387449786067009,
0.06753607839345932,
-0.004711939487606287,
0.053216468542814255,
0.026707088574767113,
0.042049698531627655,
0.03635364770889282,
-0.07054084539413452,
0.018792536109685898,
0.0228461604565382,
-0.008169622160494328,
0.028361670672893524,
0.010260344482958317,
-5.175358161914901e-33,
0.005090408492833376,
-0.17652297019958496,
-0.03760869428515434,
0.015706615522503853,
0.06773335486650467,
0.006046018097549677,
-0.026137618348002434,
0.0034827161580324173,
-0.049298740923404694,
-0.018943898379802704,
-0.1023356020450592,
0.0000443172684754245,
-0.0045025888830423355,
-0.07169788330793381,
0.013335696421563625,
-0.06878897547721863,
0.02051212079823017,
0.026472903788089752,
0.011141772381961346,
-0.019814997911453247,
0.1100241169333458,
0.0037185903638601303,
-0.04182536154985428,
-0.006305815186351538,
0.025321850553154945,
-0.02588874287903309,
0.019226018339395523,
-0.12179361283779144,
0.07860829681158066,
0.03564541041851044,
-0.11190944164991379,
0.05216149240732193,
0.05073835328221321,
0.03273048996925354,
-0.11725667864084244,
0.011501816101372242,
0.030097436159849167,
-0.018068742007017136,
-0.1053442507982254,
-0.08864457905292511,
-0.02551698312163353,
0.001792586874216795,
-0.0029134091455489397,
-0.07753507047891617,
0.07563605159521103,
-0.09479833394289017,
0.04166611284017563,
-0.06975645571947098,
0.01962636411190033,
0.04721914231777191,
-0.03224223852157593,
-0.0000636577678960748,
0.01894201897084713,
-0.038294486701488495,
0.03023143671452999,
-0.011164487339556217,
0.10145948082208633,
-0.003041159827262163,
-0.030535250902175903,
0.06391337513923645,
0.004150803666561842,
0.08383749425411224,
-0.05322207883000374,
-0.013160689733922482,
0.016819098964333534,
0.06081236153841019,
-0.033023957163095474,
0.012686574831604958,
0.027629274874925613,
0.06763968616724014,
-0.11660140752792358,
0.042651813477277756,
0.002627704059705138,
0.027796482667326927,
-0.023503916338086128,
-0.03113008476793766,
-0.039563000202178955,
0.00484693655744195,
-0.0913422480225563,
-0.004335539881139994,
-0.04352838173508644,
-0.054974112659692764,
-0.05400850996375084,
0.05847814679145813,
0.018919503316283226,
-0.052095092833042145,
-0.03868671879172325,
-0.027256134897470474,
-0.0699300691485405,
0.03741282969713211,
0.03927227854728699,
0.037790555506944656,
-0.03760930150747299,
0.005642805248498917,
-0.07508008182048798,
5.218938696616676e-34,
0.004971673712134361,
0.014267751015722752,
-0.010992352850735188,
0.010462861508131027,
-0.009152906946837902,
-0.040014028549194336,
-0.051477398723363876,
-0.0006977814482524991,
-0.0788181945681572,
-0.05523034557700157,
-0.08831432461738586,
0.038090772926807404,
0.003834460163488984,
0.023893870413303375,
-0.030827514827251434,
0.021433616057038307,
-0.007988030090928078,
-0.08274297416210175,
-0.03471729904413223,
0.06481709331274033,
-0.02577492594718933,
0.06062750145792961,
0.037191517651081085,
0.03439582511782646,
-0.0005688106175512075,
-0.013816257938742638,
0.0583517886698246,
0.05262988805770874,
-0.030386153608560562,
-0.010739369317889214,
0.010607553645968437,
-0.10703322291374207,
-0.04751456528902054,
0.06746317446231842,
0.0007231232011690736,
-0.022694818675518036,
-0.09985552728176117,
0.042989715933799744,
0.004945842549204826,
-0.023515166714787483,
0.05531749501824379,
-0.01536623202264309,
-0.030936313793063164,
0.006928019225597382,
-0.012474896386265755,
0.03447619080543518,
-0.0032050451263785362,
0.009127949364483356,
-0.003667519660666585,
-0.07599664479494095,
-0.018585173413157463,
-0.015211851336061954,
-0.025000998750329018,
0.15168185532093048,
-0.05202021077275276,
-0.007239829748868942,
0.03369380161166191,
0.10766837745904922,
-0.05308236926794052,
-0.01100573968142271,
0.09801055490970612,
-0.08792035281658173,
0.041708312928676605,
0.03749879449605942,
-0.002149922074750066,
-0.06948256492614746,
0.045798059552907944,
0.04400134086608887,
-0.011951565742492676,
0.011265862733125687,
0.07739328593015671,
0.08647298067808151,
-0.0014575618552044034,
0.01426533330231905,
-0.012963243760168552,
0.015522809699177742,
-0.04334214702248573,
-0.09233810752630234,
0.016202189028263092,
-0.03804196044802666,
-0.12862718105316162,
0.09720554202795029,
-0.07491698861122131,
0.006447918247431517,
0.04763956740498543,
0.02289211004972458,
0.03201260045170784,
0.07486077398061752,
0.06915295124053955,
0.11292849481105804,
0.028232799842953682,
-0.004404012113809586,
-0.08659730106592178,
0.07272794842720032,
-0.06158865988254547,
-4.7778645040352785e-8,
0.019162872806191444,
0.0024545425549149513,
-0.03145470842719078,
0.05207403376698494,
0.09874219447374344,
-0.07244373857975006,
0.04609016701579094,
0.055589478462934494,
-0.04287473112344742,
0.0065217409282922745,
-0.0169661995023489,
0.072431281208992,
-0.044917162507772446,
-0.013006102293729782,
0.0835026428103447,
0.008759232237935066,
-0.008523955941200256,
0.018867384642362595,
-0.02041393704712391,
-0.07915609329938889,
-0.08687299489974976,
-0.11811176687479019,
-0.06247332692146301,
0.035906367003917694,
-0.06991025060415268,
-0.0037988547701388597,
0.029565054923295975,
0.029445167630910873,
0.03535917401313782,
-0.006041706074029207,
-0.009110739454627037,
-0.003025284269824624,
-0.010587403550744057,
0.06163656339049339,
-0.00424551498144865,
0.034054022282361984,
-0.06885682791471481,
0.028315428644418716,
0.004293900914490223,
0.08117419481277466,
-0.017464973032474518,
0.032383810728788376,
-0.03680235520005226,
0.03705015033483505,
-0.03007498010993004,
0.08168478310108185,
-0.027732087299227715,
0.04388648271560669,
0.0009518733713775873,
0.02757926471531391,
0.0073148044757544994,
-0.07707323879003525,
-0.04416230693459511,
0.06259287148714066,
0.03052428737282753,
-0.027667498216032982,
-0.023953530937433243,
-0.053584884852170944,
0.012174689210951328,
0.057808682322502136,
0.004542213398963213,
-0.01053321547806263,
0.02942986786365509,
0.020698031410574913
] | 0.167487
|
For more information, see [Pod priority preemption](/docs/concepts/scheduling-eviction/pod-priority-preemption/). `DeletionByTaintManager` : 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 {{}}-based evictions. `EvictionByEvictionAPI` : Pod has been marked for {{}} . `DeletionByPodGC` : Pod, that is bound to a no longer existing Node, is due to be deleted by [Pod garbage collection](/docs/concepts/workloads/pods/pod-lifecycle/#pod-garbage-collection). `TerminationByKubelet` : Pod has been terminated by the kubelet, because of either {{}}, the [graceful node shutdown](/docs/concepts/architecture/nodes/#graceful-node-shutdown), or preemption for [system critical pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/). In all other disruption scenarios, like eviction due to exceeding [Pod container limits](/docs/concepts/configuration/manage-resources-containers/), Pods don't receive the `DisruptionTarget` condition because the disruptions were probably caused by the Pod and would reoccur on retry. {{< note >}} A Pod disruption might be interrupted. The control plane might re-attempt to continue the disruption of the same Pod, but it is not guaranteed. As a result, the `DisruptionTarget` condition might be added to a Pod, but that Pod might then not actually be deleted. In such a situation, after some time, the Pod disruption condition will be cleared. {{< /note >}} Along with cleaning up the pods, the Pod garbage collector (PodGC) will also mark them as failed if they are in a non-terminal phase (see also [Pod garbage collection](/docs/concepts/workloads/pods/pod-lifecycle/#pod-garbage-collection)). When using a Job (or CronJob), you may want to use these Pod disruption conditions as part of your Job's [Pod failure policy](/docs/concepts/workloads/controllers/job#pod-failure-policy). ## Separating Cluster Owner and Application Owner Roles Often, it is useful to think of the Cluster Manager and Application Owner as separate roles with limited knowledge of each other. This separation of responsibilities may make sense in these scenarios: - when there are many application teams sharing a Kubernetes cluster, and there is natural specialization of roles - when third-party tools or services are used to automate cluster management Pod Disruption Budgets support this separation of roles by providing an interface between the roles. If you do not have such a separation of responsibilities in your organization, you may not need to use Pod Disruption Budgets. ## How to perform Disruptive Actions on your Cluster If you are a Cluster Administrator, and you need to perform a disruptive action on all the nodes in your cluster, such as a node or system software upgrade, here are some options: - Accept downtime during the upgrade. - Failover to another complete replica cluster. - No downtime, but may be costly both for the duplicated nodes and for human effort to orchestrate the switchover. - Write disruption tolerant applications and use PDBs. - No downtime. - Minimal resource duplication. - Allows more automation of cluster administration. - Writing disruption-tolerant applications is tricky, but the work to tolerate voluntary disruptions largely overlaps with work to support autoscaling and tolerating involuntary disruptions. ## {{% heading "whatsnext" %}} \* Follow steps to protect your application by [configuring a Pod Disruption Budget](/docs/tasks/run-application/configure-pdb/). \* Learn more about [draining nodes](/docs/tasks/administer-cluster/safely-drain-node/) \* Learn about [updating a deployment](/docs/concepts/workloads/controllers/deployment/#updating-a-deployment) including steps to maintain its availability during the rollout.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/disruptions.md
|
[
0.01895950920879841,
0.05564858391880989,
0.05725724995136261,
0.019054565578699112,
0.06650759279727936,
-0.02465590462088585,
-0.005029015708714724,
-0.046664122492074966,
0.09961868822574615,
0.06873349845409393,
0.03851694613695145,
0.020518742501735687,
-0.04459940269589424,
-0.020660797134041786,
0.0048650107346475124,
-0.0021460996940732002,
-0.01582358032464981,
-0.0011172760277986526,
-0.019200747832655907,
0.005999343935400248,
0.04063550755381584,
0.03741069510579109,
-0.008828248828649521,
0.03360161930322647,
-0.029322002083063126,
-0.01945154368877411,
-0.051819607615470886,
-0.044280439615249634,
0.0375659242272377,
-0.010580789297819138,
-0.05614970251917839,
0.01756482757627964,
0.0601721853017807,
-0.032219015061855316,
0.04164605587720871,
0.13259264826774597,
-0.0056616635993123055,
-0.13080337643623352,
-0.048135995864868164,
-0.026347391307353973,
0.019406193867325783,
-0.0014265809440985322,
-0.12615934014320374,
-0.02167750708758831,
-0.03139153867959976,
0.051940519362688065,
-0.07544755935668945,
-0.05250013247132301,
-0.0329432375729084,
-0.055465202778577805,
0.029385723173618317,
-0.037890151143074036,
0.09286235272884369,
0.056050531566143036,
0.08539998531341553,
0.043739065527915955,
0.031265199184417725,
-0.0024317617062479258,
0.08515749126672745,
0.04456252232193947,
0.013776513747870922,
0.020627522841095924,
-0.012489612214267254,
-0.03358389064669609,
0.11464472860097885,
-0.023611824959516525,
0.02335495874285698,
-0.014245337806642056,
0.058692868798971176,
0.02798106148838997,
0.07814541459083557,
-0.03616143763065338,
-0.0003039822622667998,
-0.0014759800396859646,
-0.038856036961078644,
0.06894335150718689,
0.02750079147517681,
0.06240443140268326,
-0.07412225753068924,
-0.021616855636239052,
-0.02771187387406826,
-0.008959980681538582,
0.04216384515166283,
-0.052015043795108795,
-0.09643395245075226,
0.020081985741853714,
-0.036166638135910034,
-0.053145550191402435,
0.05496561899781227,
0.07677537947893143,
0.016642829403281212,
0.04688622057437897,
0.07475036382675171,
-0.07205836474895477,
0.02644837647676468,
-0.02788681723177433,
0.017909638583660126,
0.011695420369505882,
-0.049758847802877426,
0.038609668612480164,
-0.007526008877903223,
0.023399367928504944,
-0.07203365117311478,
-0.006078996695578098,
0.06420595943927765,
-0.05817203223705292,
-0.0911751464009285,
-0.038365986198186874,
0.010578494518995285,
0.03518322482705116,
-0.015336006879806519,
-0.033127233386039734,
-0.009054111316800117,
0.05451353266835213,
-0.025916501879692078,
0.07775509357452393,
0.005558968521654606,
0.03629932552576065,
0.054979272186756134,
0.06027544289827347,
0.050942450761795044,
-0.07432618737220764,
-0.012029928155243397,
0.017495356500148773,
-0.0670103132724762,
0.0194117221981287,
0.028580449521541595,
1.9036166738857287e-33,
0.05935308709740639,
-0.13885371387004852,
-0.026438811793923378,
-0.020103100687265396,
0.06042955070734024,
-0.0837811827659607,
-0.03909808024764061,
0.015147147700190544,
0.018896935507655144,
-0.039906516671180725,
-0.053568240255117416,
-0.0045416285283863544,
-0.011307558044791222,
-0.030305372551083565,
0.01436565350741148,
-0.0740264505147934,
-0.043128762394189835,
0.027546171098947525,
0.04626454412937164,
-0.023677775636315346,
0.06731373816728592,
-0.018302075564861298,
-0.0722474753856659,
-0.008791730739176273,
0.02314603142440319,
0.026741208508610725,
0.03127873316407204,
-0.1284106820821762,
-0.0066057913936674595,
0.039823491126298904,
-0.044353969395160675,
0.030971139669418335,
0.0012223110534250736,
0.05338430404663086,
-0.14733198285102844,
-0.022601215168833733,
-0.057042792439460754,
0.004774413537234068,
-0.11417791247367859,
-0.06288564205169678,
0.027141056954860687,
0.0008148850174620748,
-0.048696279525756836,
-0.043078090995550156,
0.08170433342456818,
-0.11985539644956589,
0.09200015664100647,
-0.049397386610507965,
0.031038843095302582,
0.04961712285876274,
-0.0010870675323531032,
-0.04385265335440636,
0.04534677416086197,
-0.045146260410547256,
-0.029231706634163857,
0.0002954654046334326,
0.1136416643857956,
-0.049020640552043915,
-0.01621617190539837,
0.028373271226882935,
0.0014975416706874967,
0.05916084721684456,
0.04016843065619469,
0.005007892847061157,
0.04864883795380592,
0.07323191314935684,
-0.06421873718500137,
-0.00327933463267982,
0.014098920859396458,
-0.00798075832426548,
-0.07493633776903152,
0.025751370936632156,
0.032080113887786865,
0.022162536159157753,
-0.05406287685036659,
-0.03196830302476883,
-0.008716315031051636,
-0.013426044955849648,
-0.12325296550989151,
-0.004327075090259314,
0.05158063396811485,
-0.03185588866472244,
-0.016275040805339813,
0.027812549844384193,
0.02329293079674244,
-0.041810162365436554,
0.021856188774108887,
0.0013184725539758801,
-0.03781142830848694,
0.0797235444188118,
0.04089430347084999,
0.00047199969412758946,
-0.05941743403673172,
0.01672363094985485,
-0.0686875730752945,
-2.9767967310964136e-33,
0.050233129411935806,
0.004742857068777084,
-0.029318857938051224,
0.01563631370663643,
0.0015333713963627815,
-0.029707046225667,
-0.07987270504236221,
0.062170471996068954,
-0.04385506361722946,
-0.035264525562524796,
-0.05629038065671921,
-0.02493339590728283,
0.0566459558904171,
0.03553386032581329,
-0.07153990864753723,
0.015397613868117332,
-0.04887498915195465,
-0.10640393197536469,
-0.08715339750051498,
0.011931932531297207,
-0.02243717759847641,
0.003577240277081728,
0.04294755682349205,
0.006951563060283661,
-0.038114991039037704,
-0.027616458013653755,
0.061803653836250305,
0.03415991738438606,
-0.026884019374847412,
-0.031637754291296005,
0.008594121783971786,
-0.09643122553825378,
-0.02043214626610279,
0.08475690335035324,
0.06482229381799698,
-0.07405434548854828,
-0.07440017908811569,
0.07390637695789337,
0.0012542750919237733,
-0.05733714997768402,
0.0815189778804779,
0.039993222802877426,
-0.06737979501485825,
-0.011182757094502449,
-0.010579642839729786,
0.01876288279891014,
0.0054522911086678505,
0.017030803486704826,
0.08018682897090912,
-0.09834004938602448,
-0.006217597052454948,
-0.01582503691315651,
-0.009308842942118645,
0.0948057547211647,
-0.025431575253605843,
0.011001655831933022,
0.06350447982549667,
0.032086294144392014,
0.025568177923560143,
0.013559116050601006,
0.06933067739009857,
-0.03337152674794197,
0.05172482505440712,
0.020205611363053322,
0.03820914402604103,
-0.07976558059453964,
0.04771069437265396,
0.07121163606643677,
0.0021821646951138973,
-0.011175562627613544,
0.0442790649831295,
0.0634470134973526,
0.03992147371172905,
0.014557309448719025,
-0.015578407794237137,
0.01874309405684471,
0.006180405151098967,
-0.06477844715118408,
0.02840534970164299,
-0.023669909685850143,
-0.049193933606147766,
0.08851156383752823,
-0.05616647005081177,
0.03436436876654625,
0.011393414810299873,
0.039228975772857666,
0.011424260213971138,
0.06801415234804153,
0.03541947528719902,
0.06834742426872253,
0.018207784742116928,
0.017256872728466988,
-0.03342869505286217,
0.09126446396112442,
-0.02928411401808262,
-4.3408586947180083e-8,
0.08043656498193741,
-0.01025801058858633,
-0.004473691340535879,
0.054469555616378784,
0.10684912651777267,
-0.06822901964187622,
0.05753276124596596,
0.0952824279665947,
-0.05836935341358185,
0.016440775245428085,
0.014582992531359196,
0.041499000042676926,
-0.09523048996925354,
-0.03171106427907944,
0.0678616315126419,
-0.09226690977811813,
0.010963435284793377,
0.034199390560388565,
-0.016703616827726364,
-0.09372542053461075,
-0.09622440487146378,
-0.11519305408000946,
-0.015673186630010605,
-0.024059778079390526,
0.008894420228898525,
0.03707937151193619,
0.0981198102235794,
0.07743435353040695,
0.027518056333065033,
-0.015818340703845024,
-0.045469313859939575,
0.010933336801826954,
-0.02768094837665558,
0.03719208016991615,
-0.0382993146777153,
0.06794813275337219,
-0.15124791860580444,
0.021564994007349014,
0.0024056024849414825,
0.04366637393832207,
-0.02907581627368927,
0.006582591682672501,
-0.044893987476825714,
0.01389144454151392,
-0.01275609340518713,
0.030586326494812965,
-0.039582982659339905,
0.07082953304052353,
-0.0275894682854414,
0.03859373927116394,
-0.039687152951955795,
-0.0830649808049202,
-0.02783804200589657,
0.05297694355249405,
-0.028417985886335373,
0.010159243829548359,
0.006764611694961786,
-0.07498549669981003,
-0.034386537969112396,
-0.007002176251262426,
0.08538249880075455,
-0.019320320338010788,
0.050805650651454926,
0.00294471625238657
] | 0.180896
|
This page covers advanced Pod configuration topics including [PriorityClasses](#priorityclasses), [RuntimeClasses](#runtimeclasses), [security context](#security-context) within Pods, and introduces aspects of [scheduling](/docs/concepts/scheduling-eviction/#scheduling). ## PriorityClasses \_PriorityClasses\_ allow you to set the importance of Pods relative to other Pods. If you assign a priority class to a Pod, Kubernetes sets the `.spec.priority` field for that Pod based on the PriorityClass you specified (you cannot set `.spec.priority` directly). If or when a Pod cannot be scheduled, and the problem is due to a lack of resources, the {{< glossary\_tooltip term\_id="kube-scheduler" text="kube-scheduler" >}} tries to {{< glossary\_tooltip text="preempt" term\_id="preemption" >}} lower priority Pods, in order to make scheduling of the higher priority Pod possible. A PriorityClass is a cluster-scoped API object that maps a priority class name to an integer priority value. Higher numbers indicate higher priority. ### Defining a PriorityClass ```yaml apiVersion: scheduling.k8s.io/v1 kind: PriorityClass metadata: name: high-priority value: 10000 globalDefault: false description: "Priority class for high-priority workloads" ``` ### Specify pod priority using a PriorityClass {{< highlight yaml "hl\_lines=9" >}} apiVersion: v1 kind: Pod metadata: name: nginx spec: containers: - name: nginx image: nginx priorityClassName: high-priority {{< /highlight >}} ### Built-in PriorityClasses Kubernetes provides two built-in PriorityClasses: - `system-cluster-critical`: For system components that are critical to the cluster - `system-node-critical`: For system components that are critical to individual nodes. This is the highest priority that Pods can have in Kubernetes. For more information, see [Pod Priority and Preemption](/docs/concepts/scheduling-eviction/pod-priority-preemption/). ## RuntimeClasses A \_RuntimeClass\_ allows you to specify the low-level container runtime for a Pod. It is useful when you want to specify different container runtimes for different kinds of Pod, such as when you need different isolation levels or runtime features. ### Example Pod {#runtimeclass-pod-example} {{< highlight yaml "hl\_lines=6" >}} apiVersion: v1 kind: Pod metadata: name: mypod spec: runtimeClassName: myclass containers: - name: mycontainer image: nginx {{< /highlight >}} A [RuntimeClass](/docs/concepts/containers/runtime-class/) is a cluster-scoped object that represents a container runtime that is available on some or all of your node. The cluster administrator installs and configures the concrete runtimes backing the RuntimeClass. They might set up that special container runtime configuration on all nodes, or perhaps just on some of them. For more information, see the [RuntimeClass](/docs/concepts/containers/runtime-class/) documentation. ## Pod and container level security context configuration {#security-context} The `Security context` field in the Pod specification provides granular control over security settings for Pods and containers. ### Pod-wide `securityContext` {#pod-level-security-context} Some aspects of security apply to the whole Pod; for other aspects, you might want to set a default, without any container-level overrides. Here's an example of using `securityContext` at the Pod level: #### Example Pod {#pod-level-security-context-example} {{< highlight yaml "hl\_lines=5-9" >}} apiVersion: v1 kind: Pod metadata: name: security-context-demo spec: securityContext: # This applies to the entire Pod runAsUser: 1000 runAsGroup: 3000 fsGroup: 2000 containers: - name: sec-ctx-demo image: registry.k8s.io/e2e-test-images/agnhost:2.45 command: ["sh", "-c", "sleep 1h"] {{< /highlight >}} ### Container-level security context {#container-level-security-context} You can specify the security context just for a specific container. Here's an example: #### Example Pod {#container-level-security-context-example} {{< highlight yaml "hl\_lines=9-17" >}} apiVersion: v1 kind: Pod metadata: name: security-context-demo-2 spec: containers: - name: sec-ctx-demo-2 image: gcr.io/google-samples/node-hello:1.0 securityContext: allowPrivilegeEscalation: false runAsNonRoot: true runAsUser: 1000 capabilities: drop: - ALL seccompProfile: type: RuntimeDefault {{< /highlight >}} ### Security context options - \*\*User and Group IDs\*\*: Control which user/group the container runs as - \*\*Capabilities\*\*: Add or drop Linux capabilities - \*\*Seccomp Profiles\*\*: Set security computing profiles - \*\*SELinux Options\*\*: Configure SELinux context - \*\*AppArmor\*\*: Configure AppArmor profiles for additional access control - \*\*Windows Options\*\*: Configure Windows-specific security settings {{< caution >}} You can also use the Pod `securityContext` to allow [\_privileged mode\_](/docs/concepts/security/linux-kernel-security-constraints/#privileged-containers) in Linux containers. Privileged
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/advanced-pod-config.md
|
[
-0.028471186757087708,
0.029623588547110558,
0.09047501534223557,
0.05219363793730736,
-0.023709604516625404,
-0.0304365586489439,
0.008900614455342293,
-0.05089212954044342,
0.03268234431743622,
0.05731352046132088,
-0.047022879123687744,
-0.05200270190834999,
-0.05936800315976143,
0.019584516063332558,
0.048718757927417755,
0.013790132477879524,
0.07670941948890686,
-0.08884480595588684,
-0.11004825681447983,
0.0077987974509596825,
0.06811226159334183,
0.042525384575128555,
0.05599620193243027,
0.03886396065354347,
-0.04879918694496155,
-0.034462928771972656,
-0.05241867154836655,
0.0025070609990507364,
0.029705524444580078,
0.030792521312832832,
-0.07581867277622223,
0.014526915736496449,
0.018648993223905563,
0.026443885639309883,
0.06688790023326874,
0.08071468025445938,
-0.038754649460315704,
-0.03436902165412903,
-0.004561729729175568,
0.025814568623900414,
0.006803163327276707,
-0.04912090301513672,
-0.10042573511600494,
-0.019822053611278534,
-0.06191033497452736,
0.021070333197712898,
0.002198716625571251,
-0.04609141871333122,
-0.030461151152849197,
-0.02860780619084835,
0.009546683169901371,
-0.08802207559347153,
0.06066705286502838,
0.017737874761223793,
0.06417287886142731,
0.11848469078540802,
0.04899168759584427,
0.03724781051278114,
0.12136262655258179,
-0.029504364356398582,
-0.045322004705667496,
-0.038473550230264664,
-0.007448921445757151,
-0.026972828432917595,
0.032066769897937775,
-0.0364505760371685,
0.02875046245753765,
0.04558746516704559,
-0.011162535287439823,
0.035660963505506516,
0.11652723699808121,
0.0013804316986352205,
0.033966150134801865,
0.011360185220837593,
0.028287477791309357,
0.058237284421920776,
-0.03655211627483368,
0.04117558151483536,
0.012148769572377205,
-0.11363842338323593,
0.01679646037518978,
-0.004735338501632214,
0.04532003775238991,
0.029018737375736237,
-0.002003864385187626,
-0.05129823833703995,
0.03907538205385208,
-0.02867763116955757,
0.051545850932598114,
0.025676315650343895,
0.02071979269385338,
-0.061548903584480286,
0.04186651110649109,
-0.06844586133956909,
0.06957419961690903,
0.03299856185913086,
0.004908714443445206,
-0.03131740540266037,
-0.04494381323456764,
0.00032775933505035937,
0.024540036916732788,
-0.047858722507953644,
-0.03179575130343437,
0.038294799625873566,
0.08557832986116409,
-0.04054464027285576,
-0.07276017218828201,
-0.02243836410343647,
-0.035967402160167694,
0.02624269388616085,
0.057722434401512146,
0.037680093199014664,
-0.01020380575209856,
0.011082612909376621,
-0.05481189116835594,
0.046399641782045364,
0.011972048319876194,
-0.004087095148861408,
0.03668360039591789,
0.05044933408498764,
-0.0024289763532578945,
-0.0523991659283638,
0.03215143829584122,
-0.016616644337773323,
-0.028730491176247597,
0.035667601972818375,
0.0064306980930268764,
1.924155498930471e-33,
0.03908587247133255,
-0.10240132361650467,
-0.07375185936689377,
-0.10938728600740433,
0.00556893739849329,
-0.10505468398332596,
-0.048516646027565,
0.003838604548946023,
-0.062446944415569305,
-0.028844499960541725,
-0.027907034382224083,
0.07076901942491531,
0.03728900104761124,
-0.0578174963593483,
0.026823194697499275,
-0.014973368495702744,
-0.01235064584761858,
0.08909904211759567,
0.07075200974941254,
-0.01843392290174961,
0.025994496420025826,
-0.05483725666999817,
-0.04742728918790817,
-0.07376497238874435,
-0.016163844615221024,
0.04795398563146591,
0.04033644124865532,
-0.1559273600578308,
0.006773145869374275,
0.04434647411108017,
-0.017548346891999245,
-0.013509005308151245,
0.050994060933589935,
0.04155777394771576,
-0.13929013907909393,
-0.009999271482229233,
-0.01477112714201212,
-0.0011357030598446727,
-0.04957779496908188,
-0.06936101615428925,
0.022854898124933243,
-0.0198514387011528,
-0.02184256911277771,
-0.051316630095243454,
0.07466571778059006,
-0.023979829624295235,
0.06919384747743607,
-0.03418097272515297,
0.018901901319622993,
0.0590546578168869,
-0.025146178901195526,
-0.04275970533490181,
0.045759815722703934,
-0.06263485550880432,
-0.0375988706946373,
-0.006530713755637407,
0.09257425367832184,
-0.04836461693048477,
0.0023699956946074963,
-0.0031805543694645166,
-0.04020151495933533,
0.033588506281375885,
-0.05198437348008156,
-0.03317961096763611,
0.018250424414873123,
0.014667751267552376,
-0.053610462695360184,
0.04832612723112106,
0.02461051195859909,
0.01166352815926075,
-0.04802015796303749,
0.03764885291457176,
-0.006120351143181324,
0.029527273029088974,
0.025492720305919647,
-0.013730373233556747,
0.07062232494354248,
0.03254896029829979,
-0.14197884500026703,
-0.007525170221924782,
0.007543198298662901,
0.00782525260001421,
-0.01396850124001503,
0.03339617699384689,
-0.03824787959456444,
-0.03902861848473549,
0.0030045940075069666,
0.05376005172729492,
-0.06048854812979698,
0.05270518735051155,
0.04980488121509552,
-0.042954880744218826,
-0.11894530802965164,
0.06771848350763321,
-0.1080843135714531,
-2.340827471336678e-33,
0.11003921926021576,
-0.03583049029111862,
0.011645146645605564,
0.07990485429763794,
0.05059770494699478,
0.004282640293240547,
-0.024762727320194244,
-0.022005680948495865,
-0.004668588284403086,
-0.012486596591770649,
-0.042959146201610565,
-0.005127248354256153,
0.0609324648976326,
0.018378831446170807,
-0.02698473632335663,
0.023248033598065376,
-0.14540962874889374,
-0.034981634467840195,
0.0073542906902730465,
0.028931431472301483,
0.057454053312540054,
0.01123450230807066,
0.012227343395352364,
0.04218089208006859,
-0.027781741693615913,
-0.004941173829138279,
0.03436269983649254,
0.03030320256948471,
0.01615246571600437,
-0.01267896220088005,
-0.005153620149940252,
-0.05485633760690689,
-0.04950695112347603,
-0.014053761959075928,
0.0189006719738245,
-0.031511981040239334,
-0.04668485000729561,
0.020851412788033485,
-0.04203079268336296,
0.08083869516849518,
0.07747916132211685,
0.012420694343745708,
-0.08766793459653854,
-0.0839734897017479,
-0.03384251520037651,
0.042026881128549576,
0.02692250721156597,
-0.03356563299894333,
-0.01499952469021082,
-0.11051372438669205,
0.03849749639630318,
-0.024902483448386192,
0.005236546974629164,
0.08489174395799637,
-0.008108816109597683,
0.02250383421778679,
0.03134962543845177,
-0.040055062621831894,
-0.025587793439626694,
0.05480090528726578,
0.08144988864660263,
-0.045907165855169296,
0.06554491072893143,
-0.010373014025390148,
0.01355738751590252,
-0.016568802297115326,
-0.002454920671880245,
-0.0029949480667710304,
0.020228786394000053,
-0.01691858097910881,
0.02810855023562908,
-0.026040812954306602,
0.05797047168016434,
-0.009224138222634792,
-0.024025816470384598,
0.02453416958451271,
0.055808838456869125,
-0.007020530756562948,
0.07328416407108307,
-0.00467804167419672,
-0.01110143307596445,
0.10191980004310608,
-0.024663960561156273,
0.03787529096007347,
-0.01878623478114605,
0.08888398855924606,
0.05686267837882042,
0.11446941643953323,
0.02979324571788311,
0.04394946247339249,
-0.004644083324819803,
0.0034576673060655594,
0.02059035561978817,
0.16323399543762207,
-0.02084970287978649,
-4.7364991928589006e-8,
0.061953213065862656,
0.07218427211046219,
-0.012049064971506596,
0.07765983790159225,
0.08937075734138489,
-0.08650920540094376,
0.029780736193060875,
-0.0021900557912886143,
-0.012881812639534473,
0.03961090371012688,
-0.007081439718604088,
0.05356482043862343,
-0.01721068285405636,
0.02086685225367546,
0.018140951171517372,
-0.027508262544870377,
-0.03686141222715378,
-0.021164340898394585,
-0.019013147801160812,
-0.11879757791757584,
-0.0509796142578125,
-0.06642816215753555,
0.018289288505911827,
-0.040956173092126846,
-0.007530479226261377,
0.03647606074810028,
0.09361991286277771,
0.03924604877829552,
0.05062088742852211,
0.037315838038921356,
-0.13620306551456451,
0.0006682591629214585,
-0.10012836009263992,
0.020027296617627144,
-0.06737396121025085,
0.013128835707902908,
-0.15441912412643433,
0.02232258953154087,
0.041280344128608704,
0.052573323249816895,
0.01061350479722023,
-0.08012747019529343,
-0.08413973450660706,
-0.0007887686369940639,
0.010194617323577404,
0.06082775816321373,
-0.049142222851514816,
0.06204838305711746,
-0.008801981806755066,
0.026435144245624542,
-0.05889914929866791,
-0.04476848617196083,
-0.014769927598536015,
0.08250659704208374,
-0.059688273817300797,
0.0074191950261592865,
-0.0011386434780433774,
-0.08876486122608185,
-0.027700353413820267,
-0.047359779477119446,
0.06552793830633163,
0.004636429715901613,
-0.039213068783283234,
0.007747569587081671
] | 0.085107
|
drop Linux capabilities - \*\*Seccomp Profiles\*\*: Set security computing profiles - \*\*SELinux Options\*\*: Configure SELinux context - \*\*AppArmor\*\*: Configure AppArmor profiles for additional access control - \*\*Windows Options\*\*: Configure Windows-specific security settings {{< caution >}} You can also use the Pod `securityContext` to allow [\_privileged mode\_](/docs/concepts/security/linux-kernel-security-constraints/#privileged-containers) in Linux containers. Privileged mode overrides many of the other security settings in the `securityContext`. Avoid using this setting unless you can't grant the equivalent permissions by using other fields in the `securityContext`. You can run Windows containers in a similarly privileged mode by setting the `windowsOptions.hostProcess` flag on the Pod-level security context. For details and instructions, see [Create a Windows HostProcess Pod](/docs/tasks/configure-pod-container/create-hostprocess-pod/). {{< /caution >}} For more information, see [Configure a Security Context for a Pod or Container](/docs/tasks/configure-pod-container/security-context/). ## Influencing Pod scheduling decisions {#scheduling} Kubernetes provides several mechanisms to control which nodes your Pods are scheduled on. ### Node selectors The simplest form of node selection constraint: {{< highlight yaml "hl\_lines=9-11" >}} apiVersion: v1 kind: Pod metadata: name: nginx spec: containers: - name: nginx image: nginx nodeSelector: disktype: ssd {{< /highlight >}} ### Node affinity Node affinity allows you to specify rules that constrain which nodes your Pod can be scheduled on. Here's an example of a Pod that prefers running on nodes labelled as being on a particular continent, selecting based on the value of [`topology.kubernetes.io/zone`](/docs/reference/labels-annotations-taints/#topologykubernetesiozone) label. {{< highlight yaml "hl\_lines=6-15" >}} apiVersion: v1 kind: Pod metadata: name: with-node-affinity spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: topology.kubernetes.io/zone operator: In values: - antarctica-east1 - antarctica-west1 containers: - name: with-node-affinity image: registry.k8s.io/pause:3.8 {{< /highlight >}} ### Pod affinity and anti-affinity In addition to node affinity, you can also constrain which nodes a Pod can be scheduled on based on the labels of \_other Pods\_ that are already running on nodes. Pod affinity allows you to specify rules about where a Pod should be placed relative to other Pods. {{< highlight yaml "hl\_lines=6-15" >}} apiVersion: v1 kind: Pod metadata: name: with-pod-affinity spec: affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: app operator: In values: - database topologyKey: topology.kubernetes.io/zone containers: - name: with-pod-affinity image: registry.k8s.io/pause:3.8 {{< /highlight >}} ### Tolerations \_Tolerations\_ allow Pods to be scheduled on nodes with matching taints: {{< highlight yaml "hl\_lines=9-13" >}} apiVersion: v1 kind: Pod metadata: name: mypod spec: containers: - name: myapp image: nginx tolerations: - key: "key" operator: "Equal" value: "value" effect: "NoSchedule" {{< /highlight >}} For more information, see [Assign Pods to Nodes](/docs/concepts/scheduling-eviction/assign-pod-node/). ## Pod overhead Pod overhead allows you to account for the resources consumed by the Pod infrastructure on top of the container requests and limits. {{< highlight yaml "hl\_lines=7-10" >}} --- apiVersion: node.k8s.io/v1 kind: RuntimeClass metadata: name: kvisor-runtime handler: kvisor-runtime overhead: podFixed: memory: "2Gi" cpu: "500m" --- apiVersion: v1 kind: Pod metadata: name: mypod spec: runtimeClassName: kvisor-runtime containers: - name: myapp image: nginx resources: requests: memory: "64Mi" cpu: "250m" limits: memory: "128Mi" cpu: "500m" {{< /highlight >}} ## {{% heading "whatsnext" %}} \* Read about [Pod Priority and Preemption](/docs/concepts/scheduling-eviction/pod-priority-preemption/) \* Read about [RuntimeClasses](/docs/concepts/containers/runtime-class/) \* Explore [Configure a Security Context for a Pod or Container](/docs/tasks/configure-pod-container/security-context/) \* Learn how Kubernetes [assigns Pods to Nodes](/docs/concepts/scheduling-eviction/assign-pod-node/) \* [Pod Overhead](/docs/concepts/scheduling-eviction/pod-overhead/)
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/advanced-pod-config.md
|
[
0.0800900012254715,
0.061769161373376846,
-0.03849317505955696,
-0.014269986189901829,
0.029327191412448883,
-0.0020306999795138836,
0.03776243329048157,
0.06623823940753937,
-0.049354299902915955,
-0.025043930858373642,
-0.0004701717698480934,
-0.0900585949420929,
0.018758272752165794,
0.04152399301528931,
0.040301866829395294,
-0.029481759294867516,
0.09889785200357437,
0.065390445291996,
-0.023617157712578773,
0.028375154361128807,
-0.10003787279129028,
-0.05582091212272644,
0.028134606778621674,
-0.001469454262405634,
-0.06765381246805191,
-0.04590298980474472,
-0.036648619920015335,
0.003274066373705864,
0.023240191861987114,
0.04479248449206352,
-0.027457792311906815,
-0.025028731673955917,
-0.02175740897655487,
0.00815839134156704,
0.05991697311401367,
0.048686716705560684,
0.06228630244731903,
-0.06616926938295364,
-0.07356451451778412,
-0.033545494079589844,
-0.002352312905713916,
-0.03295164555311203,
-0.1390186846256256,
0.06892310082912445,
-0.053384922444820404,
-0.06979604810476303,
0.1051090657711029,
-0.06569838523864746,
-0.005955331958830357,
0.01334342546761036,
-0.024007026106119156,
0.09049007296562195,
0.08111007511615753,
-0.01338318083435297,
-0.025522150099277496,
-0.055893734097480774,
0.0021798182278871536,
0.07045796513557434,
0.06059780344367027,
-0.0016367238713428378,
0.020423635840415955,
-0.05811034515500069,
-0.026696957647800446,
-0.014719652943313122,
-0.022103959694504738,
0.02601316012442112,
-0.0003635529719758779,
-0.031742844730615616,
-0.029957417398691177,
0.007965454831719398,
-0.049803078174591064,
0.0023921651300042868,
0.009986192919313908,
-0.0351458378136158,
-0.01383152510970831,
0.050034623593091965,
-0.06634632498025894,
-0.008401953615248203,
-0.014415753073990345,
-0.04560622200369835,
0.027930306270718575,
0.07329023629426956,
0.03912504389882088,
-0.04757639393210411,
-0.07794488221406937,
0.05713304504752159,
-0.028087422251701355,
-0.010355183854699135,
0.020110921934247017,
0.009274067357182503,
0.09601279348134995,
-0.054322704672813416,
0.018953491002321243,
-0.04928738996386528,
0.12703688442707062,
-0.0700032114982605,
0.012465900741517544,
-0.04371007904410362,
0.007081357762217522,
-0.027896767482161522,
-0.044659752398729324,
-0.04249035567045212,
-0.050230007618665695,
0.07924160361289978,
0.02836526557803154,
0.019577359780669212,
-0.02156352624297142,
-0.016232158988714218,
-0.02677016705274582,
-0.01880471222102642,
0.028558379039168358,
0.06701511144638062,
-0.02159828692674637,
0.006233351305127144,
0.017850682139396667,
0.02225041761994362,
-0.052714742720127106,
0.009295560419559479,
-0.03500707820057869,
0.06793365627527237,
0.018594510853290558,
-0.059908293187618256,
0.015767326578497887,
-0.01848461665213108,
-0.04129114747047424,
0.02624349668622017,
-0.08115148544311523,
5.212090523668174e-33,
0.01440239418298006,
-0.05391422659158707,
0.07551432400941849,
0.04555497318506241,
0.10892081260681152,
-0.0123748779296875,
-0.023014964535832405,
-0.04519416019320488,
-0.06971026211977005,
0.043138355016708374,
-0.08161618560552597,
-0.003226019674912095,
0.016265075653791428,
-0.03476420417428017,
0.07435169070959091,
-0.0014211913803592324,
-0.03890411928296089,
-0.04101970046758652,
0.12407227605581284,
-0.025891199707984924,
0.008253930136561394,
-0.02122708596289158,
-0.01549708191305399,
-0.014474073424935341,
0.007912633940577507,
-0.040347374975681305,
-0.03320087864995003,
-0.03072945959866047,
0.04530021548271179,
0.023345157504081726,
-0.07044673711061478,
0.032190751284360886,
0.012967505492269993,
0.03838840126991272,
-0.03289112448692322,
-0.06526297330856323,
0.024347271770238876,
0.046361688524484634,
-0.02359895221889019,
-0.05125734210014343,
0.01961144059896469,
-0.018817584961652756,
0.055786337703466415,
0.0060388329438865185,
0.04101157188415527,
-0.0597943514585495,
0.0038171778433024883,
-0.003694855375215411,
-0.001956758089363575,
0.038522347807884216,
-0.07812444865703583,
-0.011381534859538078,
-0.006856437306851149,
-0.08272439241409302,
0.008475358597934246,
-0.10740058869123459,
-0.038069143891334534,
-0.027541330084204674,
-0.06175746023654938,
0.021785618737339973,
-0.05994737148284912,
0.022345904260873795,
-0.018719343468546867,
-0.011372814886271954,
-0.004899516701698303,
0.012089727446436882,
-0.04706449806690216,
0.051606304943561554,
-0.04871167615056038,
0.060809288173913956,
-0.13549621403217316,
0.08666060119867325,
-0.08781415224075317,
0.05945248529314995,
-0.08919145166873932,
-0.05277827009558678,
0.10030723363161087,
0.007126355078071356,
-0.013734335079789162,
0.020770257338881493,
-0.05415438860654831,
0.06805586814880371,
0.02870318479835987,
0.0004158915835432708,
-0.057614415884017944,
-0.08369281142950058,
-0.11642757058143616,
0.0436849519610405,
0.049610842019319534,
0.006216026376932859,
0.10630029439926147,
-0.0375685952603817,
0.05564243346452713,
0.06501911580562592,
-0.18013453483581543,
-8.154178763675644e-33,
0.03509204462170601,
-0.07622534036636353,
-0.04654868692159653,
-0.06451742351055145,
-0.026238948106765747,
0.07579431682825089,
-0.00720628909766674,
-0.0011299492325633764,
-0.025418566539883614,
-0.08064715564250946,
-0.014371962286531925,
0.048505134880542755,
0.0903412327170372,
-0.025827189907431602,
-0.06607929617166519,
0.017608392983675003,
-0.03464386239647865,
0.005344408098608255,
0.028248190879821777,
0.057943738996982574,
-0.03950363025069237,
0.038938045501708984,
0.1061956062912941,
0.06188099831342697,
-0.011687211692333221,
0.01235708687454462,
-0.03032524138689041,
-0.030470483005046844,
-0.04504656791687012,
0.039257459342479706,
0.07828731834888458,
-0.07856978476047516,
-0.009145081043243408,
-0.026180783286690712,
-0.010868660174310207,
-0.04749074578285217,
-0.028318967670202255,
0.012065392918884754,
-0.060879357159137726,
-0.0049341097474098206,
0.03499414399266243,
0.0053018550388514996,
-0.0037633616011589766,
0.015000464394688606,
0.02884647063910961,
0.04614274948835373,
0.00410761684179306,
-0.058190423995256424,
-0.07622608542442322,
0.014960131607949734,
-0.006639040540903807,
-0.020088020712137222,
0.066307432949543,
0.0436529740691185,
-0.015615514479577541,
-0.019185122102499008,
0.04041267931461334,
-0.009813742712140083,
0.0048814015462994576,
0.08704640716314316,
0.13672633469104767,
-0.009842499159276485,
-0.028125343844294548,
0.06203675642609596,
0.019907964393496513,
-0.004270462319254875,
-0.07791022956371307,
0.09573613107204437,
-0.01891881786286831,
0.017758581787347794,
0.018953930586576462,
-0.06507937610149384,
0.016918538138270378,
0.032910071313381195,
-0.02316967397928238,
-0.03375866636633873,
0.018018927425146103,
-0.0823725238442421,
-0.04980930685997009,
0.0625486969947815,
0.0009982630144804716,
0.04880900681018829,
-0.06447701901197433,
0.02481822483241558,
-0.0371750108897686,
0.03412124142050743,
0.028984004631638527,
0.011887174099683762,
0.07445807754993439,
0.01515592634677887,
-0.0020781978964805603,
-0.08224443346261978,
-0.020513471215963364,
0.11471153050661087,
0.06144279986619949,
-5.0356888436908775e-8,
0.10272058099508286,
-0.01820806786417961,
-0.055205415934324265,
0.001532400376163423,
-0.005892517510801554,
-0.012581714428961277,
0.015975944697856903,
-0.04654739797115326,
-0.04644506797194481,
-0.0029111383482813835,
-0.043427132070064545,
-0.005452553275972605,
-0.05333371087908745,
-0.04699788615107536,
0.035436782985925674,
0.005058827344328165,
-0.014929302036762238,
0.06694190949201584,
0.05706121027469635,
-0.044054049998521805,
0.025260671973228455,
-0.1242910847067833,
0.023901324719190598,
0.09131146967411041,
0.02168307825922966,
0.03213875740766525,
0.057380568236112595,
-0.112233966588974,
0.08617010712623596,
0.07400307059288025,
-0.07868502289056778,
-0.10115929692983627,
-0.03928305208683014,
0.09120805561542511,
-0.062262121587991714,
0.029742155224084854,
-0.07431498914957047,
0.022853201255202293,
0.025762565433979034,
-0.017264291644096375,
-0.035407885909080505,
0.014677335508167744,
0.006762364879250526,
-0.022312989458441734,
-0.06903086602687836,
0.02770923636853695,
0.00047784889466129243,
0.04270314425230026,
0.09337108582258224,
0.026082731783390045,
0.06865935027599335,
0.0021910688374191523,
0.013162133283913136,
0.12170519679784775,
0.041521113365888596,
0.04831447824835777,
-0.0756063386797905,
0.018794335424900055,
0.023419620469212532,
-0.013934249058365822,
-0.002066214568912983,
-0.005325928330421448,
-0.012801453471183777,
-0.024165350943803787
] | 0.130725
|
This page explains how to set a Pod's hostname, potential side effects after configuration, and the underlying mechanics. ## Default Pod hostname When a Pod is created, its hostname (as observed from within the Pod) is derived from the Pod's metadata.name value. Both the hostname and its corresponding fully qualified domain name (FQDN) are set to the metadata.name value (from the Pod's perspective) ```yaml apiVersion: v1 kind: Pod metadata: name: busybox-1 spec: containers: - image: busybox:1.28 command: - sleep - "3600" name: busybox ``` The Pod created by this manifest will have its hostname and fully qualified domain name (FQDN) set to `busybox-1`. ## Hostname with pod's hostname and subdomain fields The Pod spec includes an optional `hostname` field. When set, this value takes precedence over the Pod's `metadata.name` as the hostname (observed from within the Pod). For example, a Pod with spec.hostname set to `my-host` will have its hostname set to `my-host`. The Pod spec also includes an optional `subdomain` field, indicating the Pod belongs to a subdomain within its namespace. If a Pod has `spec.hostname` set to "foo" and spec.subdomain set to "bar" in the namespace `my-namespace`, its hostname becomes `foo` and its fully qualified domain name (FQDN) becomes `foo.bar.my-namespace.svc.cluster-domain.example` (observed from within the Pod). When both hostname and subdomain are set, the cluster's DNS server will create A and/or AAAA records based on these fields. Refer to: [Pod's hostname and subdomain fields](/docs/concepts/services-networking/dns-pod-service/#pod-hostname-and-subdomain-field). ## Hostname with pod's setHostnameAsFQDN fields {{< feature-state for\_k8s\_version="v1.22" state="stable" >}} When a Pod is configured to have fully qualified domain name (FQDN), its hostname is the short hostname. For example, if you have a Pod with the fully qualified domain name `busybox-1.busybox-subdomain.my-namespace.svc.cluster-domain.example`, then by default the `hostname` command inside that Pod returns `busybox-1` and the `hostname --fqdn` command returns the FQDN. When both `setHostnameAsFQDN: true` and the subdomain field is set in the Pod spec, the kubelet writes the Pod's FQDN into the hostname for that Pod's namespace. In this case, both `hostname` and `hostname --fqdn` return the Pod's FQDN. The Pod's FQDN is constructed in the same manner as previously defined. It is composed of the Pod's `spec.hostname` (if specified) or `metadata.name` field, the `spec.subdomain`, the `namespace` name, and the cluster domain suffix. {{< note >}} In Linux, the hostname field of the kernel (the `nodename` field of `struct utsname`) is limited to 64 characters. If a Pod enables this feature and its FQDN is longer than 64 character, it will fail to start. The Pod will remain in `Pending` status (`ContainerCreating` as seen by `kubectl`) generating error events, such as "Failed to construct FQDN from Pod hostname and cluster domain". This means that when using this field, you must ensure the combined length of the Pod's `metadata.name` (or `spec.hostname`) and `spec.subdomain` fields results in an FQDN that does not exceed 64 characters. {{< /note >}} ## Hostname with pod's hostnameOverride {{< feature-state feature\_gate\_name="HostnameOverride" >}} Setting a value for `hostnameOverride` in the Pod spec causes the kubelet to unconditionally set both the Pod's hostname and fully qualified domain name (FQDN) to the `hostnameOverride` value. The `hostnameOverride` field has a length limitation of 64 characters and must adhere to the DNS subdomain names standard defined in [RFC 1123](https://datatracker.ietf.org/doc/html/rfc1123). Example: ```yaml apiVersion: v1 kind: Pod metadata: name: busybox-2-busybox-example-domain spec: hostnameOverride: busybox-2.busybox.example.domain containers: - image: busybox:1.28 command: - sleep - "3600" name: busybox ``` {{< note >}} This only affects the hostname within the Pod; it does not affect the Pod's A or AAAA records in the cluster DNS server. {{< /note >}} If `hostnameOverride` is set alongside `hostname` and `subdomain` fields: \* The hostname inside
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/pod-hostname.md
|
[
0.043311502784490585,
-0.007065237499773502,
0.0476507693529129,
0.005156680941581726,
-0.032753728330135345,
-0.07709100842475891,
-0.004096002317965031,
0.002972664777189493,
0.06002439931035042,
0.04748064652085304,
-0.018201377242803574,
-0.039668530225753784,
-0.0024114360567182302,
-0.01802603155374527,
0.05916744843125343,
-0.015607253648340702,
0.06272102892398834,
0.001165885361842811,
0.007631330285221338,
0.02603103779256344,
0.06012983247637749,
0.05981844663619995,
0.04413289204239845,
-0.010223159566521645,
-0.04849637299776077,
-0.039366837590932846,
-0.04510929808020592,
0.07658162713050842,
0.023035502061247826,
-0.04691314697265625,
-0.003661602735519409,
0.07028515636920929,
0.058628857135772705,
0.06146082654595375,
0.08256156742572784,
0.08478908985853195,
-0.0028278513345867395,
-0.03536418825387955,
-0.06365092098712921,
-0.01780228316783905,
0.05687965080142021,
-0.10555649548768997,
-0.007990788668394089,
-0.012926141731441021,
-0.084962397813797,
0.009716853499412537,
0.005288875196129084,
-0.003206490306183696,
-0.0002962282160297036,
0.029733113944530487,
0.014454621821641922,
-0.0794505849480629,
0.05628078430891037,
0.07714097201824188,
0.08955848217010498,
0.08884675055742264,
-0.010450100526213646,
0.0823359563946724,
0.027654292061924934,
0.028675422072410583,
-0.032215964049100876,
-0.009286117739975452,
-0.008468885906040668,
-0.04470014572143555,
0.06639070808887482,
-0.027984732761979103,
-0.0020670872181653976,
-0.0331706665456295,
0.04156241938471794,
-0.008198553696274757,
0.07836813479661942,
0.04180736094713211,
0.0071848235093057156,
-0.06833213567733765,
-0.04215085506439209,
0.0714820846915245,
-0.049438491463661194,
0.07658437639474869,
-0.04288679361343384,
-0.030583476647734642,
0.0500996895134449,
0.07789873331785202,
0.008070467971265316,
-0.05698983371257782,
-0.09285923093557358,
-0.01986035518348217,
0.0164018664509058,
-0.015352906659245491,
-0.0034467552322894335,
0.048183463513851166,
-0.03301567956805229,
-0.15867622196674347,
0.04717664048075676,
-0.08383478969335556,
0.02116597630083561,
0.07417476177215576,
0.022249577566981316,
-0.010162431746721268,
-0.022676069289445877,
-0.012785476632416248,
0.05400119349360466,
0.04674302041530609,
-0.03352929651737213,
-0.015811868011951447,
0.10589368641376495,
-0.032426618039608,
-0.03837931528687477,
-0.003461678745225072,
0.0455930270254612,
0.028254369273781776,
0.00354575808160007,
0.01611371897161007,
0.019693009555339813,
-0.00477213691920042,
-0.05211950093507767,
0.04607505723834038,
-0.054909493774175644,
0.061515577137470245,
0.03349370136857033,
-0.09902242571115494,
0.019512981176376343,
-0.08750200271606445,
0.05197199434041977,
-0.010622822679579258,
-0.07490833848714828,
0.03343995660543442,
-0.0905129536986351,
2.2279177491913432e-33,
0.05711671710014343,
-0.03164443373680115,
-0.01679753139615059,
0.032247453927993774,
0.03699737787246704,
-0.0741933137178421,
0.011196537874639034,
0.05638696625828743,
-0.020706631243228912,
0.004640218801796436,
-0.002091670176014304,
0.01275376882404089,
0.023759309202432632,
-0.09419825673103333,
-0.03443482518196106,
-0.007195098791271448,
-0.09883958101272583,
0.035504501312971115,
0.06645553559064865,
0.10058015584945679,
0.018441038206219673,
-0.020099608227610588,
-0.021611174568533897,
0.03201755881309509,
0.021751249209046364,
0.005446782801300287,
-0.03735928609967232,
-0.13000918924808502,
-0.005146285519003868,
0.028600743040442467,
-0.014919951558113098,
-0.040368903428316116,
0.05682260915637016,
0.03687974438071251,
-0.014936595223844051,
-0.034170396625995636,
0.010859211906790733,
-0.004893120843917131,
-0.10943911969661713,
-0.034517597407102585,
0.08855301886796951,
-0.014095425605773926,
-0.052836280316114426,
0.007239684462547302,
0.021298019215464592,
-0.04536094889044762,
0.024502892047166824,
-0.036434415727853775,
0.06603991240262985,
0.0411037914454937,
0.010285899043083191,
-0.056528180837631226,
0.021086694672703743,
-0.08541400730609894,
-0.016152041032910347,
-0.0011175889521837234,
0.04711554944515228,
-0.041753415018320084,
-0.08009545505046844,
-0.03206565976142883,
-0.06747756153345108,
-0.029628954827785492,
-0.027288027107715607,
0.06228296831250191,
-0.011939506977796555,
0.08039397746324539,
0.02112247608602047,
-0.024003664031624794,
0.00005454423080664128,
0.11173000186681747,
-0.011293458752334118,
0.02102573774755001,
-0.10391765087842941,
0.025050640106201172,
-0.027080688625574112,
-0.0018502121092751622,
0.004520797170698643,
-0.006923413835465908,
-0.07879014313220978,
0.03454994782805443,
0.002820019843056798,
0.10827253013849258,
-0.10467580705881119,
0.06965979933738708,
-0.09472507238388062,
-0.007412481587380171,
0.020097700878977776,
-0.004996741656213999,
-0.09938793629407883,
-0.043750032782554626,
0.04609031230211258,
0.042494017630815506,
-0.07414605468511581,
0.020055923610925674,
-0.12357423454523087,
-3.17962038347813e-33,
0.0439319908618927,
-0.07058952748775482,
-0.04046088829636574,
0.0036834334023296833,
-0.05902259051799774,
-0.0335354320704937,
0.04099471867084503,
0.06385763734579086,
-0.024648550897836685,
-0.08046796172857285,
0.0005451970500871539,
-0.0510583259165287,
-0.07601920515298843,
-0.049803104251623154,
-0.0007863528444431722,
0.027988648042082787,
-0.07857540249824524,
-0.09797479212284088,
-0.03773181885480881,
0.07477257400751114,
-0.048533037304878235,
0.0167553573846817,
-0.012722501531243324,
0.07942971587181091,
0.02310904860496521,
-0.0180586576461792,
0.020941102877259254,
0.010044935159385204,
-0.027143750339746475,
-0.04421549290418625,
0.029351744800806046,
-0.048187896609306335,
-0.08626434206962585,
0.01885581761598587,
-0.05255097895860672,
0.02701498754322529,
-0.040733981877565384,
0.02367662824690342,
0.00742413429543376,
-0.015570846386253834,
0.027919789776206017,
0.03668632730841637,
-0.13228730857372284,
0.040980834513902664,
-0.059456780552864075,
0.007661525160074234,
-0.029958177357912064,
0.041854411363601685,
0.04778670147061348,
-0.05061184987425804,
0.04897066950798035,
-0.06927228718996048,
-0.03789249062538147,
0.038513753563165665,
-0.0040418850257992744,
0.009462818503379822,
-0.026163628324866295,
0.05470768362283707,
-0.03875911980867386,
0.0686594545841217,
0.08841916918754578,
-0.04502422362565994,
0.030955176800489426,
0.07157789915800095,
-0.07318881899118423,
-0.024294720962643623,
-0.00625099940225482,
-0.0015651907306164503,
0.03250451385974884,
-0.005905304104089737,
0.04722485691308975,
-0.08035806566476822,
-0.03402750939130783,
0.04499449580907822,
-0.0069682179018855095,
0.006238809786736965,
0.0323859378695488,
-0.03333907574415207,
0.0050958748906850815,
0.04206472262740135,
-0.054475653916597366,
0.1526147723197937,
-0.06653272360563278,
0.02313227392733097,
0.04657747969031334,
0.016233067959547043,
0.08067472279071808,
0.12981387972831726,
-0.0035754551645368338,
0.09258244931697845,
0.0605633519589901,
0.054654452949762344,
-0.04524697735905647,
0.03943398594856262,
-0.1222304031252861,
-4.166741618405467e-8,
0.01557375118136406,
0.0033249061089009047,
-0.028594214469194412,
0.06874655932188034,
-0.0006529804668389261,
0.02430558018386364,
0.06346981227397919,
0.0005347158294171095,
-0.0102304732427001,
0.02757340855896473,
-0.06911766529083252,
0.016397392377257347,
-0.09196220338344574,
0.0555306077003479,
0.03464604914188385,
-0.03239617496728897,
0.033423617482185364,
0.1558779776096344,
-0.05347394943237305,
-0.03714553639292717,
-0.11362143605947495,
-0.04214228317141533,
-0.03175659105181694,
-0.0969904288649559,
0.0092940554022789,
0.0339835062623024,
0.07589263468980789,
-0.015026439912617207,
0.04390304535627365,
0.05374597758054733,
0.0032885775435715914,
0.004092478193342686,
-0.037262652069330215,
0.045958198606967926,
-0.04215364530682564,
0.01374845951795578,
-0.07793213427066803,
0.017301371321082115,
0.017868200317025185,
0.06256167590618134,
-0.040880318731069565,
-0.008713358081877232,
-0.020569609478116035,
-0.03147229552268982,
-0.05087583512067795,
0.0036404908169060946,
0.008918450213968754,
0.07982262969017029,
0.02134145237505436,
0.043251581490039825,
-0.01922917179763317,
-0.024195414036512375,
0.024887992069125175,
0.012531147338449955,
-0.0012426658067852259,
0.00957916397601366,
-0.019852902740240097,
-0.02189827151596546,
0.035272017121315,
-0.03900656849145889,
-0.01631922274827957,
0.04520764201879501,
0.025034522637724876,
0.02197215147316456
] | 0.107347
|
command: - sleep - "3600" name: busybox ``` {{< note >}} This only affects the hostname within the Pod; it does not affect the Pod's A or AAAA records in the cluster DNS server. {{< /note >}} If `hostnameOverride` is set alongside `hostname` and `subdomain` fields: \* The hostname inside the Pod is overridden to the `hostnameOverride` value. \* The Pod's A and/or AAAA records in the cluster DNS server are still generated based on the `hostname` and `subdomain` fields. Note: If `hostnameOverride` is set, you cannot simultaneously set the `hostNetwork` and `setHostnameAsFQDN` fields. The API server will explicitly reject any create request attempting this combination. For details on behavior when `hostnameOverride` is set in combination with other fields (hostname, subdomain, setHostnameAsFQDN, hostNetwork), see the table in the [KEP-4762 design details](https://github.com/kubernetes/enhancements/blob/master/keps/sig-network/4762-allow-arbitrary-fqdn-as-pod-hostname/README.md#design-details ).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/pod-hostname.md
|
[
-0.00679620448499918,
-0.017858512699604034,
0.07382369041442871,
0.05195675045251846,
-0.0690789446234703,
-0.05155816301703453,
-0.06719686090946198,
-0.09996573626995087,
0.06946711242198944,
0.060237858444452286,
-0.04119916632771492,
-0.009313015267252922,
-0.04021169990301132,
-0.048014432191848755,
0.0038048101123422384,
-0.023398518562316895,
0.02298893965780735,
-0.023319369181990623,
0.019904399290680885,
-0.04234170913696289,
0.0617513433098793,
0.08069799095392227,
0.05178672447800636,
0.025034751743078232,
-0.0636569932103157,
-0.009499970823526382,
-0.04458901658654213,
0.06817524880170822,
0.051913902163505554,
-0.039685510098934174,
-0.02359529212117195,
0.05989183485507965,
0.03098217397928238,
0.043870456516742706,
0.09791602939367294,
0.09228665381669998,
0.000060844224208267406,
0.030798455700278282,
-0.03548756241798401,
-0.0366394966840744,
0.1212756410241127,
-0.07541923969984055,
0.014777682721614838,
-0.0024413831997662783,
-0.04970413073897362,
0.028321977704763412,
-0.04955502226948738,
0.025934377685189247,
0.0064072380773723125,
0.010539134033024311,
0.044559646397829056,
-0.06623756885528564,
0.12104446440935135,
0.06306120753288269,
0.13033656775951385,
0.09596699476242065,
-0.03955946862697601,
0.0800749808549881,
0.06825347989797592,
-0.0016227989690378308,
-0.020618882030248642,
-0.002784258686006069,
0.048330310732126236,
-0.07781323045492172,
0.06044437363743782,
-0.03727300837635994,
0.006200775038450956,
0.011986931785941124,
0.005053478758782148,
0.0022833235561847687,
0.08215243369340897,
0.05515315756201744,
-0.0030567855574190617,
-0.04887610673904419,
-0.027400121092796326,
0.05568695813417435,
-0.02584213577210903,
-0.004700460471212864,
0.010549795813858509,
-0.019083810970187187,
0.0333259142935276,
0.022974250838160515,
0.018743721768260002,
-0.030698539689183235,
-0.09569496661424637,
0.0029465691186487675,
0.02944258414208889,
-0.08079086244106293,
0.01391234528273344,
-0.018118206411600113,
-0.03611544147133827,
-0.09458043426275253,
0.01577105186879635,
-0.10286734253168106,
0.011144769378006458,
0.041496895253658295,
-0.0032058388460427523,
0.006166687700897455,
-0.025897108018398285,
0.004358178935945034,
0.06473872810602188,
0.05782725661993027,
-0.013074667192995548,
0.004206207115203142,
0.06354045122861862,
-0.030849942937493324,
-0.03877110779285431,
-0.008443260565400124,
0.06670529395341873,
0.10069593787193298,
0.016280706971883774,
0.05005975067615509,
0.02869049273431301,
0.022498993203043938,
-0.061284251511096954,
0.029041221365332603,
-0.007318816147744656,
0.04911099374294281,
0.06312131136655807,
-0.05177178978919983,
0.022892296314239502,
-0.10672686249017715,
0.022449074313044548,
0.008380908519029617,
-0.07070986926555634,
0.023105641826987267,
-0.07823698967695236,
3.988999671897123e-33,
0.05567760765552521,
-0.10269975662231445,
-0.050551436841487885,
0.010759708471596241,
0.039926331490278244,
-0.0835508182644844,
0.0003768936439882964,
0.0813073068857193,
-0.037316545844078064,
-0.051213935017585754,
-0.05519619956612587,
-0.005931347142904997,
0.08720245957374573,
-0.09400440007448196,
-0.006511377170681953,
-0.012566049583256245,
-0.021121155470609665,
0.014403275214135647,
0.07494938373565674,
0.09039667993783951,
-0.028669212013483047,
-0.04452903941273689,
0.004658355377614498,
0.06327380239963531,
-0.016817830502986908,
-0.020388437435030937,
-0.008924323134124279,
-0.1562555730342865,
0.02405611239373684,
0.004297029227018356,
-0.047071896493434906,
-0.03417891636490822,
-0.009847755543887615,
0.007897143252193928,
-0.039761535823345184,
-0.009102770127356052,
0.009473155252635479,
0.00032506854040548205,
-0.1285308599472046,
-0.03995450958609581,
0.012929328717291355,
-0.0028460912872105837,
-0.06017592176795006,
-0.0236441008746624,
0.03210959956049919,
-0.017341921105980873,
0.042765356600284576,
-0.05644970014691353,
0.040027253329753876,
0.08457782119512558,
0.0322001688182354,
-0.06335639953613281,
0.0019366476917639375,
-0.10200586915016174,
0.006590128410607576,
0.013538099825382233,
0.04111788421869278,
-0.042945798486471176,
-0.010308622382581234,
0.033621106296777725,
-0.07457154989242554,
-0.050844576209783554,
-0.015799839049577713,
0.011571140959858894,
0.004976456984877586,
0.06226441636681557,
-0.011610439047217369,
0.01678944192826748,
-0.004662074148654938,
0.060605015605688095,
0.03394027054309845,
0.029717056080698967,
-0.08456901460886002,
0.09075908362865448,
-0.08847688138484955,
-0.009838360361754894,
0.004025883972644806,
0.0054306345991790295,
-0.05572536215186119,
0.011786536313593388,
0.07039090245962143,
0.042942311614751816,
-0.06808359920978546,
0.048821840435266495,
-0.04073866829276085,
0.025926049798727036,
0.0011696190340444446,
-0.03290564566850662,
-0.08637522161006927,
-0.017636284232139587,
0.03762172907590866,
0.002617069287225604,
-0.03106258623301983,
-0.005926470272243023,
-0.13790881633758545,
-4.455050488561528e-33,
0.04682576283812523,
-0.06897498667240143,
-0.08669253438711166,
-0.028611430898308754,
-0.05317425727844238,
-0.020545288920402527,
0.0010730224894359708,
0.08159424364566803,
-0.025029238313436508,
-0.07639576494693756,
0.018859265372157097,
-0.04025138542056084,
-0.01951717957854271,
-0.04886903241276741,
-0.013995982706546783,
0.007086505647748709,
-0.022904831916093826,
-0.05076855421066284,
-0.03389982506632805,
0.08543167263269424,
-0.013956135138869286,
0.004707638639956713,
0.013921327888965607,
0.05176655203104019,
0.00036837568040937185,
0.007787461392581463,
-0.011501580476760864,
0.06513016670942307,
-0.029386060312390327,
-0.07201752066612244,
0.05350581184029579,
-0.07011974602937698,
-0.04859228804707527,
0.06379790604114532,
0.016171148046851158,
0.030352327972650528,
-0.056343574076890945,
0.025523019954562187,
0.014704102650284767,
-0.07976933568716049,
0.05494349077343941,
0.04009727016091347,
-0.13605794310569763,
0.060939934104681015,
-0.015151921659708023,
-0.006098871119320393,
-0.02182811126112938,
0.05185723304748535,
-0.017846057191491127,
-0.0012197170872241259,
0.00986605416983366,
-0.09374666213989258,
-0.01805875264108181,
0.08861460536718369,
-0.025627337396144867,
0.05787448585033417,
0.008786840364336967,
0.06915650516748428,
-0.0028086351230740547,
0.06817905604839325,
0.08348582684993744,
-0.11014752835035324,
0.017114024609327316,
0.06002291291952133,
-0.003642044495791197,
-0.05241582170128822,
0.03380570560693741,
-0.008233273401856422,
0.04236714541912079,
0.02433125115931034,
0.023381656035780907,
-0.013666825369000435,
-0.013039137236773968,
0.07515467703342438,
0.0035350832622498274,
0.005772419739514589,
0.054506815969944,
-0.029642967507243156,
-0.022412262856960297,
0.024268031120300293,
-0.11778050661087036,
0.10436759889125824,
-0.07434561103582382,
0.0614255852997303,
0.06894835829734802,
0.049784302711486816,
0.126783087849617,
0.10838331282138824,
-0.0005018662195652723,
0.1074991226196289,
0.02209315076470375,
0.0058938609436154366,
-0.04991032928228378,
0.043378714472055435,
-0.1056256890296936,
-5.102839040205254e-8,
0.0674557164311409,
-0.009946629405021667,
-0.03352569043636322,
0.05311622470617294,
0.018778424710035324,
0.0047067380510270596,
0.056724853813648224,
-0.004735256545245647,
-0.05882149562239647,
0.014260565862059593,
-0.01877821795642376,
0.01489101443439722,
-0.07878533005714417,
0.02566324546933174,
0.04838297516107559,
-0.01183659490197897,
0.028540270403027534,
0.08224046230316162,
-0.07004685699939728,
-0.07722539454698563,
-0.09265557676553726,
-0.06265278905630112,
-0.046321216970682144,
-0.057196956127882004,
-0.026549318805336952,
0.020138775929808617,
0.09531563520431519,
-0.033634960651397705,
-0.012646274641156197,
-0.03582899272441864,
-0.059008512645959854,
0.031993307173252106,
-0.026640329509973526,
0.03388052061200142,
-0.022089550271630287,
0.007598889525979757,
-0.049490246921777725,
0.012556550092995167,
-0.02645478956401348,
0.060044459998607635,
-0.04795301333069801,
0.011576543562114239,
-0.012527444399893284,
-0.015664905309677124,
0.002990058856084943,
0.03140837699174881,
0.011721063405275345,
0.057858727872371674,
0.03319975733757019,
0.021402966231107712,
-0.027678880840539932,
-0.022528495639562607,
0.033929940313100815,
0.0374082550406456,
-0.043494824320077896,
-0.03984970971941948,
-0.0373799204826355,
-0.025269189849495888,
0.02761373668909073,
-0.021619951352477074,
0.06833814084529877,
0.0010977145284414291,
-0.019171521067619324,
0.02184813842177391
] | 0.132391
|
This page introduces \_Quality of Service (QoS) classes\_ in Kubernetes, and explains how Kubernetes assigns a QoS class to each Pod as a consequence of the resource constraints that you specify for the containers in that Pod. Kubernetes relies on this classification to make decisions about which Pods to evict when there are not enough available resources on a Node. ## Quality of Service classes Kubernetes classifies the Pods that you run and allocates each Pod into a specific \_quality of service (QoS) class\_. Kubernetes uses that classification to influence how different pods are handled. Kubernetes does this classification based on the [resource requests](/docs/concepts/configuration/manage-resources-containers/) of the {{< glossary\_tooltip text="Containers" term\_id="container" >}} in that Pod, along with how those requests relate to resource limits. This is known as {{< glossary\_tooltip text="Quality of Service" term\_id="qos-class" >}} (QoS) class. Kubernetes assigns every Pod a QoS class based on the resource requests and limits of its component Containers. QoS classes are used by Kubernetes to decide which Pods to evict from a Node experiencing [Node Pressure](/docs/concepts/scheduling-eviction/node-pressure-eviction/). The possible QoS classes are `Guaranteed`, `Burstable`, and `BestEffort`. When a Node runs out of resources, Kubernetes will first evict `BestEffort` Pods running on that Node, followed by `Burstable` and finally `Guaranteed` Pods. When this eviction is due to resource pressure, only Pods exceeding resource requests are candidates for eviction. ### Guaranteed Pods that are `Guaranteed` have the strictest resource limits and are least likely to face eviction. They are guaranteed not to be killed until they exceed their limits or there are no lower-priority Pods that can be preempted from the Node. They may not acquire resources beyond their specified limits. These Pods can also make use of exclusive CPUs using the [`static`](/docs/tasks/administer-cluster/cpu-management-policies/#static-policy-configuration) CPU management policy. #### Criteria For a Pod to be given a QoS class of `Guaranteed`: \* Every Container in the Pod must have a memory limit and a memory request. \* For every Container in the Pod, the memory limit must equal the memory request. \* Every Container in the Pod must have a CPU limit and a CPU request. \* For every Container in the Pod, the CPU limit must equal the CPU request. If instead the Pod uses [Pod-level resources](/docs/concepts/configuration/manage-resources-containers/#pod-level-resource-specification): {{< feature-state feature\_gate\_name="PodLevelResources" >}} \* The Pod must have a Pod-level memory limit and memory request, and their values must be equal. \* The Pod must have a Pod-level CPU limit and CPU request, and their values must be equal. ### Burstable Pods that are `Burstable` have some lower-bound resource guarantees based on the request, but do not require a specific limit. If a limit is not specified, it defaults to a limit equivalent to the capacity of the Node, which allows the Pods to flexibly increase their resources if resources are available. In the event of Pod eviction due to Node resource pressure, these Pods are evicted only after all `BestEffort` Pods are evicted. Because a `Burstable` Pod can include a Container that has no resource limits or requests, a Pod that is `Burstable` can try to use any amount of node resources. #### Criteria A Pod is given a QoS class of `Burstable` if: \* The Pod does not meet the criteria for QoS class `Guaranteed`. \* At least one Container in the Pod has a memory or CPU request or limit, or the Pod has a Pod-level memory or CPU request or limit. ### BestEffort Pods in the `BestEffort` QoS class can use node resources that aren't specifically assigned to Pods in other QoS classes. For example, if you have a node with 16 CPU cores available to
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/pod-qos.md
|
[
-0.05051825940608978,
0.018579958006739616,
0.059937842190265656,
-0.010212619788944721,
0.025544246658682823,
-0.033607397228479385,
0.10348287969827652,
-0.0827324390411377,
0.08157096058130264,
0.0022292081266641617,
-0.04420900344848633,
-0.011588545516133308,
0.012169559486210346,
0.004892018157988787,
0.010280152782797813,
-0.027746889740228653,
0.10474519431591034,
-0.0203411802649498,
-0.10862323641777039,
0.00590150523930788,
0.13762091100215912,
0.04311654344201088,
0.009023313410580158,
0.019974833354353905,
-0.058213815093040466,
0.00690070167183876,
-0.05196290835738182,
-0.004078132566064596,
0.04718617722392082,
-0.021405331790447235,
-0.07270513474941254,
0.04904744029045105,
-0.00590298417955637,
0.03221987932920456,
0.04370325431227684,
0.08434708416461945,
-0.016593584790825844,
-0.04048744589090347,
-0.05880994722247124,
0.0928601622581482,
-0.006679077632725239,
-0.0413818396627903,
-0.09794936329126358,
0.036379363387823105,
0.031195150688290596,
0.04030318558216095,
-0.046338628977537155,
-0.06914030015468597,
-0.04324563220143318,
-0.06844447553157806,
0.030152222141623497,
-0.06302393227815628,
0.012306365184485912,
0.047496993094682693,
0.025162821635603905,
0.009781609289348125,
-0.03439832851290703,
0.049270618706941605,
0.033031534403562546,
0.04125085473060608,
0.011347746476531029,
-0.037899259477853775,
0.030092624947428703,
0.029458876699209213,
0.09106921404600143,
-0.033189643174409866,
-0.01808418333530426,
0.04371007904410362,
-0.03978272154927254,
-0.06755754351615906,
0.051263440400362015,
-0.005005448590964079,
0.03234108164906502,
0.04021129757165909,
0.028001295402646065,
0.04095008224248886,
-0.021130530163645744,
0.10495302826166153,
-0.02130332961678505,
-0.09997587651014328,
0.019884752109646797,
0.04197842255234718,
0.08935389667749405,
0.0021459271665662527,
-0.006287793163210154,
-0.013761734589934349,
-0.0013230536133050919,
-0.049306128174066544,
0.009464018978178501,
0.023477349430322647,
0.012369259260594845,
-0.04532922804355621,
0.033489055931568146,
-0.1031217947602272,
0.08019736409187317,
0.017156345769762993,
-0.026122217997908592,
-0.07995235174894333,
0.04494496062397957,
-0.01972563937306404,
0.00289496430195868,
-0.023639481514692307,
0.010466795414686203,
-0.02012649178504944,
0.0781291127204895,
-0.03100682608783245,
-0.0977247878909111,
-0.008219788782298565,
0.009931898675858974,
0.015338791534304619,
-0.033566731959581375,
0.041121337562799454,
-0.03754597157239914,
0.007843404076993465,
-0.020579850301146507,
0.0009169293916784227,
0.017497409135103226,
-0.009367679245769978,
0.03690247982740402,
0.08246145397424698,
-0.01721835322678089,
-0.11459661275148392,
-0.0015927182976156473,
-0.03793349489569664,
-0.031211161985993385,
0.03757993504405022,
-0.10573304444551468,
4.8391601654240034e-33,
0.015673166140913963,
-0.10084218531847,
-0.017708297818899155,
-0.06743669509887695,
0.01670941151678562,
-0.10281842947006226,
-0.04269442334771156,
-0.025430338457226753,
-0.04506799951195717,
0.016835389658808708,
-0.04484506696462631,
0.13411438465118408,
0.022615525871515274,
0.0018499605357646942,
0.08071461319923401,
0.03487006947398186,
-0.10865417867898941,
0.10021074116230011,
0.07358590513467789,
-0.014409990049898624,
0.030878504738211632,
-0.04018912836909294,
0.002682081889361143,
-0.013804318383336067,
0.06333132088184357,
0.011964622884988785,
-0.0009750719764269888,
-0.06061124429106712,
-0.03428179770708084,
0.01809067279100418,
-0.013508164323866367,
-0.0016096757026389241,
0.06402909010648727,
-0.02954142354428768,
-0.10079129040241241,
0.012763152830302715,
-0.04743964970111847,
0.015072300098836422,
-0.047495972365140915,
-0.08155006170272827,
-0.010023651644587517,
-0.02877112105488777,
0.00756162591278553,
-0.01834242418408394,
0.027667030692100525,
-0.016027837991714478,
0.0464242585003376,
-0.1136934831738472,
-0.008749151602387428,
0.03051655739545822,
-0.019472185522317886,
-0.06289929151535034,
0.040513549000024796,
0.008747882209718227,
0.05406257510185242,
-0.0015834019286558032,
0.08340837061405182,
-0.00801822543144226,
-0.08588721603155136,
0.0080095324665308,
-0.0490708164870739,
-0.012016864493489265,
-0.03338541090488434,
-0.01773565076291561,
0.059695880860090256,
0.016562314704060555,
-0.005192252807319164,
0.05209127068519592,
0.014291518367826939,
0.005748108495026827,
0.023016223683953285,
-0.003977256361395121,
-0.024406570941209793,
0.05016230419278145,
0.023490382358431816,
-0.08620650321245193,
0.027365582063794136,
0.010369821451604366,
-0.09774363040924072,
0.014697444625198841,
-0.02611120603978634,
-0.034899644553661346,
0.00354976998642087,
0.036314528435468674,
-0.09276080876588821,
-0.04322383180260658,
0.04057343304157257,
-0.03306042402982712,
-0.018978076055645943,
0.05111365020275116,
-0.01701165735721588,
-0.011382773518562317,
-0.10450886189937592,
0.037415824830532074,
-0.10143877565860748,
-6.291829839356448e-33,
0.0816933885216713,
0.046041373163461685,
-0.019140198826789856,
0.055953655391931534,
-0.0334610790014267,
0.024415148422122,
-0.042555615305900574,
0.03085428662598133,
0.013357761316001415,
-0.029780112206935883,
-0.02482554130256176,
0.027116119861602783,
0.02841123566031456,
0.06266126781702042,
-0.10802169889211655,
0.011997640132904053,
-0.11084534227848053,
-0.0257891733199358,
-0.009342593140900135,
0.02903088554739952,
0.007244610693305731,
0.013173065148293972,
0.05030812323093414,
0.006265115458518267,
-0.006161415949463844,
-0.0012562075862661004,
-0.01563628576695919,
0.016907397657632828,
-0.01748332940042019,
-0.08054971694946289,
-0.0000957313968683593,
-0.14598879218101501,
-0.036868952214717865,
-0.007066383492201567,
0.029706185683608055,
-0.05465879663825035,
0.00440360838547349,
0.01048122439533472,
0.0018231102731078863,
0.07720673829317093,
0.058289818465709686,
-0.02289939671754837,
-0.036870136857032776,
-0.07345636934041977,
-0.06839817762374878,
0.009896582923829556,
-0.0004892435390502214,
-0.07006116956472397,
0.01970539800822735,
-0.13442280888557434,
0.08554091304540634,
0.009165254421532154,
-0.03416142612695694,
0.13852514326572418,
-0.044880159199237823,
0.02109948918223381,
-0.015310795977711678,
0.05392036214470863,
-0.07774177193641663,
0.054633669555187225,
0.07085930556058884,
-0.025269590318202972,
-0.023073051124811172,
0.07620007544755936,
0.016725637018680573,
-0.07697023451328278,
-0.01470237597823143,
0.01206986978650093,
0.002736483234912157,
-0.008939077146351337,
0.001931863254867494,
-0.02342888154089451,
0.041795674711465836,
0.010532926768064499,
-0.07023962587118149,
-0.035069119185209274,
0.046549782156944275,
-0.06734967976808548,
0.047462157905101776,
-0.04384859651327133,
-0.05015170946717262,
0.04595812037587166,
-0.037185076624155045,
0.06171340122818947,
-0.01491386815905571,
0.0841764435172081,
0.09353218227624893,
0.06656008213758469,
0.06354014575481415,
0.04835186153650284,
0.026320545002818108,
0.013525951653718948,
-0.03649945557117462,
0.11794795840978622,
-0.05768212303519249,
-5.211420983641801e-8,
0.04941738769412041,
0.040531475096940994,
-0.012815619818866253,
0.03735936060547829,
0.01168090384453535,
-0.039078664034605026,
0.047433678060770035,
0.07503077387809753,
-0.03248470276594162,
0.0709880143404007,
-0.020743444561958313,
0.09445185214281082,
-0.045525338500738144,
-0.001044501201249659,
0.07805068045854568,
0.031737446784973145,
-0.03306928649544716,
0.01654990203678608,
0.024960344657301903,
-0.05389022454619408,
0.016940955072641373,
-0.05254659429192543,
0.010325135663151741,
-0.000748052669223398,
0.00301231793127954,
0.023260172456502914,
0.0798841193318367,
0.021597519516944885,
0.011815427802503109,
0.035686466842889786,
-0.02626783773303032,
0.003287962405011058,
-0.10358471423387527,
0.020453523844480515,
0.02214636467397213,
0.057467732578516006,
-0.21775244176387787,
-0.019749095663428307,
0.021495511755347252,
0.10084658861160278,
-0.048981763422489166,
-0.04775669798254967,
-0.08066020160913467,
0.02781704254448414,
0.04693398252129555,
0.07721228152513504,
-0.06325472146272659,
0.035786230117082596,
-0.03154550865292549,
-0.02095327153801918,
-0.02189178764820099,
0.00010952894808724523,
-0.01545154582709074,
0.02805498242378235,
-0.04646550491452217,
-0.04683554545044899,
0.02978048287332058,
-0.03564019128680229,
0.04988892748951912,
0.0010423364583402872,
0.02320977859199047,
0.030819986015558243,
0.028854263946413994,
0.021517878398299217
] | 0.206674
|
request or limit, or the Pod has a Pod-level memory or CPU request or limit. ### BestEffort Pods in the `BestEffort` QoS class can use node resources that aren't specifically assigned to Pods in other QoS classes. For example, if you have a node with 16 CPU cores available to the kubelet, and you assign 4 CPU cores to a `Guaranteed` Pod, then a Pod in the `BestEffort` QoS class can try to use any amount of the remaining 12 CPU cores. The kubelet prefers to evict `BestEffort` Pods if the node comes under resource pressure. #### Criteria A Pod has a QoS class of `BestEffort` if it doesn't meet the criteria for either `Guaranteed` or `Burstable`. In other words, a Pod is `BestEffort` only if none of the Containers in the Pod have a memory limit or a memory request, and none of the Containers in the Pod have a CPU limit or a CPU request, and the Pod does not have any Pod-level memory or CPU limits or requests. Containers in a Pod can request other resources (not CPU or memory) and still be classified as `BestEffort`. ## Memory QoS with cgroup v2 {{< feature-state feature\_gate\_name="MemoryQoS" >}} Memory QoS uses the memory controller of cgroup v2 to guarantee memory resources in Kubernetes. Memory requests and limits of containers in pod are used to set specific interfaces `memory.min` and `memory.high` provided by the memory controller. When `memory.min` is set to memory requests, memory resources are reserved and never reclaimed by the kernel; this is how Memory QoS ensures memory availability for Kubernetes pods. And if memory limits are set in the container, this means that the system needs to limit container memory usage; Memory QoS uses `memory.high` to throttle workload approaching its memory limit, ensuring that the system is not overwhelmed by instantaneous memory allocation. Memory QoS relies on QoS class to determine which settings to apply; however, these are different mechanisms that both provide controls over quality of service. ## Some behavior is independent of QoS class {#class-independent-behavior} Certain behavior is independent of the QoS class assigned by Kubernetes. For example: \* Any Container exceeding a resource limit will be killed and restarted by the kubelet without affecting other Containers in that Pod. \* If a Container exceeds its resource request and the node it runs on faces resource pressure, the Pod it is in becomes a candidate for [eviction](/docs/concepts/scheduling-eviction/node-pressure-eviction/). If this occurs, all Containers in the Pod will be terminated. Kubernetes may create a replacement Pod, usually on a different node. \* The resource request of a Pod is equal to the sum of the resource requests of its component Containers, and the resource limit of a Pod is equal to the sum of the resource limits of its component Containers. \* The kube-scheduler does not consider QoS class when selecting which Pods to [preempt](/docs/concepts/scheduling-eviction/pod-priority-preemption/#preemption). Preemption can occur when a cluster does not have enough resources to run all the Pods you defined. ## {{% heading "whatsnext" %}} \* Learn about [resource management for Pods and Containers](/docs/concepts/configuration/manage-resources-containers/). \* Learn about [Node-pressure eviction](/docs/concepts/scheduling-eviction/node-pressure-eviction/). \* Learn about [Pod priority and preemption](/docs/concepts/scheduling-eviction/pod-priority-preemption/). \* Learn about [Pod disruptions](/docs/concepts/workloads/pods/disruptions/). \* Learn how to [assign memory resources to containers and pods](/docs/tasks/configure-pod-container/assign-memory-resource/). \* Learn how to [assign CPU resources to containers and pods](/docs/tasks/configure-pod-container/assign-cpu-resource/). \* Learn how to [configure Quality of Service for Pods](/docs/tasks/configure-pod-container/quality-service-pod/).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/pod-qos.md
|
[
0.03861892968416214,
0.017297258600592613,
0.0071283262223005295,
0.008390191942453384,
0.037855785340070724,
-0.006107942666858435,
0.008048283867537975,
0.017754539847373962,
0.044636864215135574,
0.03147884085774422,
-0.011618154123425484,
0.01770922914147377,
-0.024854302406311035,
-0.034440286457538605,
0.0074801696464419365,
-0.04414879158139229,
0.10159282386302948,
-0.005161497741937637,
-0.05207310989499092,
0.009870246984064579,
0.08597046136856079,
-0.020469563081860542,
-0.032459039241075516,
0.03507513180375099,
-0.018640436232089996,
0.0046061985194683075,
-0.08465669304132462,
-0.006314195226877928,
0.040625784546136856,
-0.019530722871422768,
-0.05936068296432495,
0.007601162884384394,
0.017364559695124626,
0.04286143183708191,
0.06670866161584854,
0.0959782525897026,
-0.03778678551316261,
-0.08866120874881744,
-0.006194516085088253,
-0.014078051783144474,
-0.05059853568673134,
-0.03876707702875137,
-0.1341417133808136,
0.060720957815647125,
-0.0533943846821785,
0.019975950941443443,
-0.020738836377859116,
-0.06858623027801514,
-0.048459794372320175,
-0.08739841729402542,
-0.04689469188451767,
-0.03081177920103073,
0.07972004264593124,
0.059466652572155,
0.047308359295129776,
0.0382390134036541,
-0.04106631875038147,
-0.01259071659296751,
0.03871091082692146,
0.04485195502638817,
-0.030283115804195404,
-0.10342655330896378,
0.03524821996688843,
-0.0073357513174414635,
0.09864135086536407,
-0.04252400994300842,
-0.002600673586130142,
0.0613279864192009,
0.007041455712169409,
0.020651735365390778,
0.11862301826477051,
-0.04497133195400238,
-0.019334495067596436,
0.036184243857860565,
0.036288533359766006,
-0.004570757504552603,
-0.018818987533450127,
0.015056882984936237,
-0.04134621471166611,
-0.015145295299589634,
-0.0024907547049224377,
0.0375603549182415,
0.06731533259153366,
-0.11287149041891098,
-0.013621293008327484,
0.006171551067382097,
-0.012597314082086086,
0.008985532447695732,
-0.01858147792518139,
0.01654587686061859,
0.040634505450725555,
0.006617097184062004,
0.03931964188814163,
-0.05990491434931755,
0.1413930505514145,
-0.003522473154589534,
-0.03224338963627815,
-0.06727284938097,
0.014538566581904888,
-0.05269612744450569,
0.051291219890117645,
-0.0074028377421200275,
-0.018892480060458183,
-0.01015059556812048,
0.09471592307090759,
-0.07222039252519608,
-0.03021768480539322,
-0.014786901883780956,
0.01650778390467167,
0.028398459777235985,
-0.009257230907678604,
-0.00026666020858101547,
0.025828558951616287,
0.038039520382881165,
-0.034347400069236755,
0.010792948305606842,
-0.029313765466213226,
0.01922956481575966,
0.007418761495500803,
0.04164169356226921,
-0.0009748807642608881,
-0.029315989464521408,
0.04575445502996445,
-0.01773745007812977,
-0.08244749903678894,
-0.003438974032178521,
-0.052632659673690796,
2.6771277725702955e-33,
0.024082405492663383,
-0.06975943595170975,
-0.019750334322452545,
-0.10253334045410156,
0.010255124419927597,
-0.08346212655305862,
-0.01610315963625908,
0.025057999417185783,
-0.03550439327955246,
-0.0001302945747738704,
-0.06773898005485535,
-0.008580844849348068,
0.011898300610482693,
0.049967389553785324,
0.07581023126840591,
-0.03173027187585831,
-0.09173595160245895,
0.05733709782361984,
0.03637233376502991,
0.0016066539101302624,
0.0462055578827858,
-0.04218516871333122,
-0.03902255743741989,
-0.002640476915985346,
0.011154933832585812,
0.01177343912422657,
0.044669292867183685,
-0.05960305035114288,
-0.014234423637390137,
0.036353569477796555,
-0.06526423245668411,
0.001678945729508996,
-0.029439877718687057,
0.014797068201005459,
-0.07959814369678497,
-0.0008556754910387099,
-0.0050248694606125355,
0.006265467964112759,
-0.06356263160705566,
-0.07999888062477112,
0.026081394404172897,
0.05029910430312157,
-0.0004869456752203405,
-0.030217137187719345,
0.02245204709470272,
-0.06704513728618622,
0.0627906545996666,
-0.03908573463559151,
-0.05820918455719948,
0.06818509101867676,
-0.007166209165006876,
-0.05583246052265167,
-0.0003432994126342237,
-0.020447218790650368,
0.057197414338588715,
0.014822411350905895,
0.08877483755350113,
0.05578655004501343,
-0.011407054960727692,
0.10615197569131851,
-0.016394084319472313,
-0.03384372591972351,
-0.011686819605529308,
-0.009509371593594551,
0.0214499793946743,
0.09197985380887985,
-0.0604281947016716,
0.02294827438890934,
-0.015645712614059448,
0.08436572551727295,
-0.026759793981909752,
0.029748037457466125,
0.026123376563191414,
-0.0027474232483655214,
-0.01728663593530655,
-0.03529387712478638,
0.016823282465338707,
0.0044557168148458,
-0.14401230216026306,
-0.020101970061659813,
-0.0054135252721607685,
-0.017294125631451607,
-0.007774692960083485,
0.05188915133476257,
-0.08491496741771698,
-0.03348701074719429,
0.010572751052677631,
0.03134239837527275,
-0.042149946093559265,
0.056476205587387085,
0.024471735581755638,
-0.026391757652163506,
-0.0507282018661499,
0.011387981474399567,
-0.1279788464307785,
-3.640157396953209e-33,
0.040986087173223495,
-0.0243251733481884,
0.017027514055371284,
0.05351538211107254,
0.018666518852114677,
0.05194099247455597,
-0.03859535977244377,
-0.026680996641516685,
-0.047732431441545486,
-0.04805435612797737,
-0.059494100511074066,
-0.03623940423130989,
0.06994296610355377,
0.009995645843446255,
-0.08309270441532135,
-0.017851093783974648,
-0.09062489867210388,
-0.07626992464065552,
0.010492091998457909,
0.017074095085263252,
-0.044263776391744614,
0.024498747661709785,
0.07126826792955399,
0.013180567882955074,
0.012417707592248917,
0.025621188804507256,
-0.04273652285337448,
0.0021276308689266443,
-0.0045039295218884945,
-0.06497978419065475,
0.05595199391245842,
-0.15083351731300354,
-0.06032154709100723,
0.05032801255583763,
0.048390816897153854,
-0.01071160938590765,
-0.05602787807583809,
0.030889587476849556,
-0.014309369027614594,
0.06968805938959122,
0.06132388487458229,
0.018771035596728325,
0.005815535318106413,
0.004135776311159134,
-0.0632309690117836,
-0.01498486939817667,
-0.03008769452571869,
-0.03581567108631134,
0.07171578705310822,
-0.1135006919503212,
0.044343575835227966,
-0.01818777061998844,
-0.029211031273007393,
0.15843789279460907,
-0.0019801196176558733,
-0.05016348510980606,
-0.017965730279684067,
0.09947556257247925,
-0.01665232703089714,
-0.024978378787636757,
0.09294960647821426,
-0.07417120784521103,
-0.0022954316809773445,
0.03302885964512825,
0.030322270467877388,
-0.0750809833407402,
-0.03947904333472252,
0.009823386557400227,
-0.01582278124988079,
0.048389434814453125,
0.08888247609138489,
0.029794342815876007,
0.05336540564894676,
0.04898916929960251,
-0.03550466150045395,
0.03690141811966896,
-0.03088776208460331,
-0.06465231627225876,
0.038558706641197205,
-0.02158033661544323,
-0.11119174212217331,
0.09721670299768448,
-0.047128304839134216,
0.05226001515984535,
0.03420856595039368,
0.042453933507204056,
0.06262081116437912,
-0.005993029568344355,
0.03128931671380997,
-0.019143035635352135,
0.034794434905052185,
0.014664296992123127,
-0.03755934536457062,
0.09297117590904236,
-0.027572540566325188,
-4.063593905812013e-8,
0.11437812447547913,
-0.05375397577881813,
0.004299173131585121,
0.043357741087675095,
0.07189396023750305,
-0.062297433614730835,
0.04862340912222862,
0.022165341302752495,
-0.010348216630518436,
0.08248354494571686,
0.016044341027736664,
0.0008818574133329093,
-0.03792450949549675,
-0.04109037667512894,
0.10759330540895462,
-0.03278444707393646,
-0.004775600973516703,
0.05352289229631424,
0.017107218503952026,
-0.06716807931661606,
-0.07674343138933182,
-0.04399608448147774,
0.006957069970667362,
-0.014357564970850945,
-0.029554490000009537,
0.048284824937582016,
0.15339843928813934,
0.0015042521990835667,
0.05155586451292038,
-0.0018068611389026046,
-0.0688336193561554,
-0.006500905845314264,
-0.03730785846710205,
0.005266031716018915,
0.01549793966114521,
0.08197271823883057,
-0.20267638564109802,
0.03711864724755287,
-0.01944478042423725,
0.07674286514520645,
-0.010149028152227402,
-0.1220814660191536,
-0.042708367109298706,
0.04792590066790581,
-0.002837549429386854,
0.057495612651109695,
-0.06957240402698517,
0.033631544560194016,
-0.011992900632321835,
0.023080674931406975,
-0.015516800805926323,
-0.03713417798280716,
-0.0006176631432026625,
0.06450650840997696,
-0.03988673537969589,
0.05109135061502457,
-0.002126560779288411,
-0.06394457817077637,
0.015105892904102802,
-0.020168781280517578,
0.09613320231437683,
0.04452717304229736,
0.04852064326405525,
0.04289722815155983
] | 0.237984
|
Learn how to [configure Quality of Service for Pods](/docs/tasks/configure-pod-container/quality-service-pod/).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/pod-qos.md
|
[
0.036216508597135544,
-0.03422797843813896,
0.04407560080289841,
-0.000326163339195773,
0.010377840138971806,
-0.06515286862850189,
0.0039040478877723217,
0.004822101444005966,
-0.045892395079135895,
0.07005614787340164,
0.007452649995684624,
0.036860983818769455,
-0.044764094054698944,
-0.011040986515581608,
0.028072981163859367,
-0.05105600133538246,
0.10966070741415024,
0.0008304651128128171,
-0.04840860515832901,
-0.041542403399944305,
0.04161662235856056,
-0.03524371609091759,
0.0529278889298439,
0.06929069012403488,
-0.032148756086826324,
0.044246479868888855,
-0.06783373653888702,
-0.054489150643348694,
-0.03958005830645561,
-0.02257286198437214,
-0.03572670742869377,
0.052185721695423126,
0.08741554617881775,
-0.010305529460310936,
0.06615118682384491,
0.05517058074474335,
0.042955949902534485,
-0.1408928632736206,
-0.00027590582612901926,
-0.010741072706878185,
-0.02429819107055664,
-0.010769998654723167,
-0.07933332771062851,
0.03191088140010834,
-0.02033921331167221,
0.012482495978474617,
-0.0449482686817646,
-0.10638591647148132,
0.031681906431913376,
0.005668177735060453,
-0.05803472921252251,
-0.05850891396403313,
0.07564214617013931,
-0.034315723925828934,
0.0627267062664032,
0.04129407927393913,
-0.05499713495373726,
0.08688128739595413,
0.062224265187978745,
0.06671524792909622,
0.0609341599047184,
-0.05234316736459732,
-0.036272790282964706,
0.033952999860048294,
0.05746987834572792,
-0.04879206418991089,
0.013072146102786064,
0.03267113119363785,
-0.011800131760537624,
-0.04494098201394081,
0.031223531812429428,
0.05268669128417969,
-0.003042171709239483,
0.0069481125101447105,
-0.027074813842773438,
0.013371430337429047,
0.010291938669979572,
-0.024112306535243988,
-0.03225421905517578,
0.03601925075054169,
-0.01714162901043892,
0.027379345148801804,
0.04191403463482857,
0.05788370221853256,
-0.007585681974887848,
0.011341945268213749,
0.049705807119607925,
-0.09120198339223862,
-0.03562084957957268,
-0.005597635637968779,
-0.005794703960418701,
0.013882370665669441,
0.0013364950427785516,
-0.06091376021504402,
0.007464063819497824,
0.013117237016558647,
-0.04454315826296806,
-0.035402096807956696,
-0.009676098823547363,
0.021094080060720444,
0.014678629115223885,
-0.04254250228404999,
0.0180819071829319,
-0.0029984181746840477,
0.06604024767875671,
-0.04657066985964775,
-0.05753760412335396,
0.06321379542350769,
-0.002572681289166212,
0.0724448412656784,
0.01707405038177967,
-0.03694179654121399,
-0.020406236872076988,
0.08096866309642792,
0.02056768350303173,
0.05484385788440704,
-0.02298920601606369,
0.01605997048318386,
0.03987317532300949,
0.020347654819488525,
0.023232590407133102,
-0.07976981997489929,
-0.016374316066503525,
-0.020411141216754913,
-0.07408389449119568,
-0.005713343154639006,
0.06143176183104515,
-4.226799883181068e-34,
0.012834392488002777,
-0.031313955783843994,
0.05208149924874306,
0.017761288210749626,
0.03187978267669678,
-0.0632287785410881,
-0.02727028913795948,
0.050107091665267944,
0.00249179033562541,
-0.021766383200883865,
-0.025631682947278023,
0.06728073209524155,
-0.10406875610351562,
-0.008696982637047768,
-0.0014897743239998817,
-0.10957296192646027,
-0.10937520116567612,
0.045779287815093994,
0.03397827595472336,
-0.020868372172117233,
0.06953698396682739,
-0.06273830682039261,
-0.053076449781656265,
-0.019978338852524757,
0.06400172412395477,
0.016797946766018867,
0.06568454205989838,
-0.1182328462600708,
-0.002139567630365491,
0.029937978833913803,
-0.001960039371624589,
0.02425839751958847,
0.030341317877173424,
0.005450636148452759,
-0.11147800832986832,
-0.016973963007330894,
-0.016369270160794258,
0.07826445251703262,
-0.08504525572061539,
-0.06637312471866608,
0.029126154258847237,
0.012863351963460445,
-0.048739269375801086,
-0.03334032744169235,
0.04558805003762245,
0.013208490796387196,
0.07599199563264847,
-0.1118457093834877,
0.08321712911128998,
0.04584357887506485,
-0.013240648433566093,
-0.06904616206884384,
0.004074054770171642,
-0.00766490725800395,
0.04018077254295349,
0.0034390061628073454,
0.08616480976343155,
0.03572757542133331,
-0.044163648039102554,
0.017210684716701508,
-0.024858810007572174,
-0.06082674488425255,
-0.0029006267432123423,
-0.089920274913311,
0.01654413715004921,
0.06300877779722214,
-0.034066036343574524,
0.006486279424279928,
0.024552762508392334,
0.009195925667881966,
-0.03499132767319679,
0.0048737553879618645,
0.00797002762556076,
0.05883445218205452,
-0.08452839404344559,
-0.07878990471363068,
-0.03109491616487503,
0.03403187915682793,
-0.11666092276573181,
0.0041915359906852245,
-0.029272181913256645,
0.0003096343425568193,
-0.04751163348555565,
0.04970643296837807,
-0.0032357159070670605,
-0.025137441232800484,
0.06963498890399933,
0.033744510263204575,
-0.06579954922199249,
0.09847112745046616,
-0.0044608642347157,
0.0539545901119709,
-0.055493950843811035,
0.026501378044486046,
-0.07308194041252136,
-9.902253290376599e-34,
0.07011672109365463,
-0.003758085425943136,
-0.01575319468975067,
0.13115866482257843,
-0.05595991760492325,
0.019051415845751762,
-0.04452958330512047,
0.05308881774544716,
0.07257790118455887,
0.0031221576500684023,
-0.04113636910915375,
-0.04591532424092293,
-0.019259683787822723,
0.057032108306884766,
-0.12628616392612457,
0.01556917279958725,
-0.08197291940450668,
-0.07308205217123032,
-0.015966171398758888,
0.020785095170140266,
-0.08129902929067612,
0.0659584030508995,
0.09010117501020432,
0.04341078922152519,
-0.021799350157380104,
-0.01178926695138216,
0.06331882625818253,
0.016945529729127884,
-0.005511854309588671,
-0.06752696633338928,
0.03356580436229706,
-0.11934341490268707,
-0.049650512635707855,
0.031463995575904846,
0.03394760563969612,
-0.015459515154361725,
-0.010763810947537422,
0.07929818332195282,
-0.020375225692987442,
-0.011136004701256752,
0.09161056578159332,
-0.012578435242176056,
-0.10918673127889633,
-0.05343573912978172,
-0.02709704264998436,
-0.04440224543213844,
0.01947956718504429,
-0.04882588982582092,
-0.016936084255576134,
-0.07167359441518784,
0.04815283790230751,
-0.06814674288034439,
-0.06261959671974182,
0.06758488714694977,
-0.06968706101179123,
0.03550877422094345,
0.03367077559232712,
0.030660470947623253,
0.01778303273022175,
0.02455446869134903,
0.023267405107617378,
-0.03187478706240654,
-0.03458704799413681,
0.003135687205940485,
0.0161172803491354,
-0.050625015050172806,
-0.021236883476376534,
0.10402427613735199,
0.01697324961423874,
0.03298211470246315,
0.029176563024520874,
-0.014074079692363739,
0.04782108590006828,
0.04169626906514168,
-0.005379323847591877,
-0.09215347468852997,
-0.03451278805732727,
-0.024783993139863014,
0.0672874003648758,
0.0014249375090003014,
-0.002297661267220974,
0.10650895535945892,
-0.05165458843111992,
0.05008310079574585,
-0.024922335520386696,
0.11456851661205292,
0.10207605361938477,
0.04198847711086273,
0.026160990819334984,
0.09727628529071808,
-0.023194242268800735,
-0.03356277197599411,
-0.058372341096401215,
0.07758591324090958,
-0.03500710055232048,
-3.0856515564892106e-8,
0.0517948716878891,
-0.056031689047813416,
0.050334855914115906,
0.09132271260023117,
0.03150969743728638,
-0.011699586175382137,
0.0010035174200311303,
0.08631382137537003,
-0.032015860080718994,
0.028865933418273926,
-0.050949402153491974,
-0.001538831158541143,
-0.13261903822422028,
0.02866876684129238,
0.08228515088558197,
-0.02148883044719696,
-0.031161267310380936,
0.16225524246692657,
-0.022126231342554092,
-0.05160137265920639,
-0.0586460642516613,
-0.04182305932044983,
0.059958565980196,
-0.027347974479198456,
-0.0030835040379315615,
0.06563296914100647,
0.04924054816365242,
0.007951645180583,
0.023331256583333015,
-0.048548243939876556,
-0.031198734417557716,
0.040009088814258575,
-0.018461650237441063,
-0.07341135293245316,
-0.024861009791493416,
0.06842413544654846,
-0.11712244153022766,
-0.019420906901359558,
-0.024604635313153267,
-0.016309048980474472,
-0.060904912650585175,
0.04236110299825668,
-0.011832235381007195,
-0.014801818877458572,
-0.036801528185606,
0.03423802927136421,
0.03597715124487877,
0.07087800651788712,
-0.03257930651307106,
0.028134146705269814,
0.037541747093200684,
-0.03235021233558655,
0.049093496054410934,
0.013027013279497623,
-0.038034286350011826,
-0.027675122022628784,
0.026510901749134064,
-0.04816665127873421,
-0.01036569382995367,
0.03394705057144165,
0.07716450095176697,
0.05808642506599426,
-0.01498302724212408,
0.0218659695237875
] | 0.200006
|
This page provides an overview of init containers: specialized containers that run before app containers in a {{< glossary\_tooltip text="Pod" term\_id="pod" >}}. Init containers can contain utilities or setup scripts not present in an app image. You can specify init containers in the Pod specification alongside the `containers` array (which describes app containers). In Kubernetes, a [sidecar container](/docs/concepts/workloads/pods/sidecar-containers/) is a container that starts before the main application container and \_continues to run\_. This document is about init containers: containers that run to completion during Pod initialization. ## Understanding init containers A {{< glossary\_tooltip text="Pod" term\_id="pod" >}} can have multiple containers running apps within it, but it can also have one or more init containers, which are run before the app containers are started. Init containers are exactly like regular containers, except: \* Init containers always run to completion. \* Each init container must complete successfully before the next one starts. If a Pod's init container fails, the kubelet repeatedly restarts that init container until it succeeds. However, if the Pod has a `restartPolicy` of Never, and an init container fails during startup of that Pod, Kubernetes treats the overall Pod as failed. To specify an init container for a Pod, add the `initContainers` field into the [Pod specification](/docs/reference/kubernetes-api/workload-resources/pod-v1/#PodSpec), as an array of `container` items (similar to the app `containers` field and its contents). See [Container](/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container) in the API reference for more details. The status of the init containers is returned in `.status.initContainerStatuses` field as an array of the container statuses (similar to the `.status.containerStatuses` field). ### Differences from regular containers Init containers support all the fields and features of app containers, including resource limits, [volumes](/docs/concepts/storage/volumes/), and security settings. However, the resource requests and limits for an init container are handled differently, as documented in [Resource sharing within containers](#resource-sharing-within-containers). Regular init containers (in other words: excluding sidecar containers) do not support the `lifecycle`, `livenessProbe`, `readinessProbe`, or `startupProbe` fields. Init containers must run to completion before the Pod can be ready; sidecar containers continue running during a Pod's lifetime, and \_do\_ support some probes. See [sidecar container](/docs/concepts/workloads/pods/sidecar-containers/) for further details about sidecar containers. If you specify multiple init containers for a Pod, kubelet runs each init container sequentially. Each init container must succeed before the next can run. When all of the init containers have run to completion, kubelet initializes the application containers for the Pod and runs them as usual. ### Differences from sidecar containers Init containers run and complete their tasks before the main application container starts. Unlike [sidecar containers](/docs/concepts/workloads/pods/sidecar-containers), init containers are not continuously running alongside the main containers. Init containers run to completion sequentially, and the main container does not start until all the init containers have successfully completed. init containers do not support `lifecycle`, `livenessProbe`, `readinessProbe`, or `startupProbe` whereas sidecar containers support all these [probes](/docs/concepts/workloads/pods/pod-lifecycle/#types-of-probe) to control their lifecycle. Init containers share the same resources (CPU, memory, network) with the main application containers but do not interact directly with them. They can, however, use shared volumes for data exchange. ## Using init containers Because init containers have separate images from app containers, they have some advantages for start-up related code: \* Init containers can contain utilities or custom code for setup that are not present in an app image. For example, there is no need to make an image `FROM` another image just to use a tool like `sed`, `awk`, `python`, or `dig` during setup. \* The application image builder and deployer roles can work independently without the need to jointly build a single app image. \* Init containers can run with a different view of the
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/init-containers.md
|
[
-0.0257529579102993,
0.024515455588698387,
0.0991554781794548,
0.003031012834981084,
0.03674572706222534,
-0.030812598764896393,
0.05289420858025551,
-0.015410257503390312,
0.038635123521089554,
0.01770261861383915,
0.021816972643136978,
-0.020883090794086456,
-0.018155528232455254,
-0.05390695109963417,
0.00775411631911993,
-0.00014648685464635491,
0.08164151757955551,
-0.02309274859726429,
-0.038178715854883194,
-0.0014320519985631108,
0.02823074348270893,
0.019446490332484245,
-0.006168542895466089,
0.01755276508629322,
-0.08222407847642899,
0.03999960049986839,
-0.05754108726978302,
-0.024133892729878426,
0.05379297211766243,
0.016131194308400154,
-0.051410917192697525,
0.05255208909511566,
-0.05048677325248718,
0.07134228944778442,
0.038376592099666595,
0.1290348321199417,
0.0035389408003538847,
-0.0017679979791864753,
-0.027948912233114243,
-0.022826995700597763,
0.014411780051887035,
-0.0642329752445221,
-0.13807129859924316,
0.05828382074832916,
0.01395863201469183,
-0.06555477529764175,
-0.06890452653169632,
-0.09188086539506912,
-0.014711263589560986,
-0.018626196309924126,
0.008822533302009106,
-0.0337793305516243,
0.06486117839813232,
0.042420320212841034,
0.02096444182097912,
0.04005255550146103,
-0.06498948484659195,
0.049819767475128174,
0.09772729128599167,
0.042599618434906006,
0.013542885892093182,
-0.011182749643921852,
0.024042204022407532,
0.004730538465082645,
0.08431196212768555,
-0.025414204224944115,
0.04528636112809181,
0.00977529026567936,
-0.01480739563703537,
-0.03719884529709816,
0.07160744071006775,
0.013461020775139332,
0.049861568957567215,
-0.00740183237940073,
0.0034474660642445087,
-0.008320926688611507,
-0.020365247502923012,
0.058894600719213486,
-0.07162868976593018,
-0.06134166568517685,
0.028446849435567856,
0.097879558801651,
0.0834738165140152,
-0.004726116079837084,
-0.07865326851606369,
-0.03302440047264099,
-0.004599500447511673,
-0.024729598313570023,
0.0001422471832484007,
-0.010754183866083622,
-0.02200324274599552,
-0.0818634033203125,
0.032939132302999496,
-0.08572959899902344,
0.11627081781625748,
-0.03427022323012352,
-0.029741186648607254,
-0.04208379611372948,
0.03149595484137535,
-0.027413230389356613,
0.01506358478218317,
-0.040174730122089386,
-0.009144493378698826,
0.0026466641575098038,
0.07137344032526016,
-0.06737876683473587,
-0.07610153406858444,
-0.12260792404413223,
0.029676632955670357,
0.022282954305410385,
-0.03506011515855789,
-0.04155084490776062,
0.023402519524097443,
0.04204009473323822,
-0.04165585711598396,
-0.04839686304330826,
-0.03790123760700226,
-0.018220428377389908,
0.09388121962547302,
0.07008081674575806,
0.04624371603131294,
-0.0674947053194046,
0.036910347640514374,
-0.028887858614325523,
-0.05961284786462784,
0.026255449280142784,
-0.02569107711315155,
4.8189842742600774e-33,
0.015828635543584824,
-0.1404559463262558,
0.005310857202857733,
0.05256553739309311,
-0.017772413790225983,
-0.08106018602848053,
0.0018643917283043265,
0.020208539441227913,
-0.06830466538667679,
0.007112408056855202,
-0.05675682798027992,
0.10410338640213013,
-0.047643013298511505,
0.049416329711675644,
0.019305987283587456,
-0.01129298098385334,
-0.10659559816122055,
0.05646832287311554,
0.02622963674366474,
-0.02516322024166584,
0.0019777361303567886,
-0.06629686057567596,
-0.06450465321540833,
-0.019655998796224594,
0.06565818935632706,
0.007143898401409388,
0.013997013680636883,
-0.11496695131063461,
0.014319186098873615,
0.0336470901966095,
0.018751608207821846,
0.006693089380860329,
-0.01612662523984909,
0.05559438467025757,
-0.1491146981716156,
-0.03029230609536171,
0.01839798130095005,
-0.008036958053708076,
-0.057427436113357544,
-0.045758381485939026,
0.004452192690223455,
0.013539460487663746,
0.009391123428940773,
-0.07673553377389908,
-0.00915029551833868,
-0.010242934338748455,
0.0364745631814003,
-0.08067582547664642,
0.04846334084868431,
-0.008043545298278332,
0.00595213333144784,
-0.009272729977965355,
-0.017480958253145218,
-0.02928869239985943,
-0.008928762748837471,
0.031719498336315155,
0.0245486032217741,
-0.08124852180480957,
-0.01362566091120243,
-0.001482730032876134,
-0.12616649270057678,
0.00039752916200086474,
-0.06114257872104645,
0.014559878036379814,
0.0003459594736341387,
0.04796156287193298,
-0.012287517078220844,
0.014253750443458557,
0.005688924808055162,
0.005377676337957382,
-0.09550595283508301,
0.022269338369369507,
-0.011493139900267124,
0.007867030799388885,
0.01797875203192234,
-0.009213796816766262,
0.009385929442942142,
0.008398245088756084,
-0.140957772731781,
0.016663488000631332,
0.015909163281321526,
-0.060961030423641205,
-0.054649803787469864,
0.06096409633755684,
-0.005696597043424845,
-0.011437181383371353,
0.013676213100552559,
-0.06778351217508316,
-0.043833792209625244,
0.03516402095556259,
0.016733627766370773,
0.018676882609725,
-0.10710632055997849,
0.009611846879124641,
-0.11483945697546005,
-7.49863054347701e-33,
0.10975465178489685,
-0.011230180971324444,
-0.04343346133828163,
0.06241944432258606,
0.013223833404481411,
0.05689461529254913,
0.04218402877449989,
0.04948849976062775,
0.016369914636015892,
-0.07768812775611877,
-0.04257863759994507,
0.02627391181886196,
0.04044165462255478,
0.08423536270856857,
-0.0756426453590393,
0.036560408771038055,
-0.0765753984451294,
-0.022297825664281845,
0.03091919608414173,
0.02819007635116577,
0.014615430496633053,
-0.04279470816254616,
0.034022096544504166,
0.03410720080137253,
-0.05211735516786575,
0.016509955748915672,
0.057249583303928375,
-0.01654847152531147,
-0.05352659150958061,
-0.03979693353176117,
0.034960322082042694,
-0.047870803624391556,
-0.018162284046411514,
0.03524458035826683,
0.007559779100120068,
-0.036804407835006714,
-0.04375524818897247,
-0.051255885511636734,
-0.06237562373280525,
-0.01901075430214405,
0.07416971772909164,
-0.02273600362241268,
-0.051649101078510284,
-0.01769079454243183,
-0.10187883675098419,
-0.02405519224703312,
-0.020107312127947807,
-0.01231473870575428,
0.015940994024276733,
-0.0854295939207077,
0.0193322766572237,
0.03430965170264244,
-0.04299960285425186,
0.027071774005889893,
-0.03195558115839958,
-0.009331547655165195,
0.04468582943081856,
0.009131833910942078,
-0.039431095123291016,
0.05252280458807945,
0.07526712864637375,
-0.03976099193096161,
0.0637984424829483,
-0.03176448494195938,
-0.035705309361219406,
-0.0679076537489891,
-0.032645367085933685,
0.003881228854879737,
0.012330109253525734,
-0.018841175362467766,
0.003059924580156803,
-0.041434094309806824,
0.05423100292682648,
0.01303775329142809,
-0.026252783834934235,
0.018279166892170906,
0.10154931992292404,
-0.1488865315914154,
0.08597791939973831,
-0.05808040499687195,
-0.06318674236536026,
0.06300638616085052,
-0.030902327969670296,
0.04590528830885887,
0.02350103296339512,
0.021496696397662163,
0.02246905490756035,
0.09834552556276321,
0.06153198331594467,
0.043126627802848816,
0.050657838582992554,
0.052335042506456375,
-0.0038853122387081385,
0.14600710570812225,
-0.026060620322823524,
-5.424744387028113e-8,
0.06219399720430374,
0.03529543802142143,
0.002426401013508439,
0.031672362238168716,
-0.03961033746600151,
-0.021350735798478127,
0.11827728897333145,
0.0757959857583046,
-0.04067191109061241,
-0.04583622142672539,
-0.04157111421227455,
0.08944229036569595,
-0.07988103479146957,
0.02752818539738655,
0.027831794694066048,
0.0511697418987751,
-0.019359415397047997,
0.004155369009822607,
0.012918728403747082,
-0.0476951040327549,
-0.08080387115478516,
-0.023517834022641182,
0.002963707083836198,
-0.00403538066893816,
-0.03694281727075577,
0.07041365653276443,
0.07853696495294571,
0.009230614639818668,
0.05645686015486717,
0.0497157946228981,
-0.03073279745876789,
0.00951743870973587,
-0.0805792510509491,
0.10422120988368988,
0.003629895858466625,
0.05951427295804024,
-0.10111521184444427,
0.04775581136345863,
0.0526457317173481,
-0.01732100173830986,
0.0007501498912461102,
-0.06389674544334412,
-0.05834493786096573,
-0.06863188743591309,
0.0033448778558522463,
0.07038267701864243,
-0.06449270993471146,
0.05980386957526207,
-0.020489640533924103,
0.015116986818611622,
-0.05764128640294075,
-0.004605719354003668,
-0.010783161036670208,
0.08931034058332443,
0.031301096081733704,
0.02976723201572895,
0.02580309845507145,
-0.05497446656227112,
0.07109080255031586,
0.003694443730637431,
-0.024091621860861778,
0.008917837403714657,
0.06586559861898422,
0.06474295258522034
] | 0.152746
|
an image `FROM` another image just to use a tool like `sed`, `awk`, `python`, or `dig` during setup. \* The application image builder and deployer roles can work independently without the need to jointly build a single app image. \* Init containers can run with a different view of the filesystem than app containers in the same Pod. Consequently, they can be given access to {{< glossary\_tooltip text="Secrets" term\_id="secret" >}} that app containers cannot access. \* Because init containers run to completion before any app containers start, init containers offer a mechanism to block or delay app container startup until a set of preconditions are met. Once preconditions are met, all of the app containers in a Pod can start in parallel. \* Init containers can securely run utilities or custom code that would otherwise make an app container image less secure. By keeping unnecessary tools separate you can limit the attack surface of your app container image. ### Examples Here are some ideas for how to use init containers: \* Wait for a {{< glossary\_tooltip text="Service" term\_id="service">}} to be created, using a shell one-line command like: ```shell for i in {1..100}; do sleep 1; if nslookup myservice; then exit 0; fi; done; exit 1 ``` \* Register this Pod with a remote server from the downward API with a command like: ```shell curl -X POST http://$MANAGEMENT\_SERVICE\_HOST:$MANAGEMENT\_SERVICE\_PORT/register -d 'instance=$()&ip=$()' ``` \* Wait for some time before starting the app container with a command like ```shell sleep 60 ``` \* Clone a Git repository into a {{< glossary\_tooltip text="Volume" term\_id="volume" >}} \* Place values into a configuration file and run a template tool to dynamically generate a configuration file for the main app container. For example, place the `POD\_IP` value in a configuration and generate the main app configuration file using Jinja. #### Init containers in use This example defines a simple Pod that has two init containers. The first waits for `myservice`, and the second waits for `mydb`. Once both init containers complete, the Pod runs the app container from its `spec` section. ```yaml apiVersion: v1 kind: Pod metadata: name: myapp-pod labels: app.kubernetes.io/name: MyApp spec: containers: - name: myapp-container image: busybox:1.28 command: ['sh', '-c', 'echo The app is running! && sleep 3600'] initContainers: - name: init-myservice image: busybox:1.28 command: ['sh', '-c', "until nslookup myservice.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for myservice; sleep 2; done"] - name: init-mydb image: busybox:1.28 command: ['sh', '-c', "until nslookup mydb.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for mydb; sleep 2; done"] ``` You can start this Pod by running: ```shell kubectl apply -f myapp.yaml ``` The output is similar to this: ``` pod/myapp-pod created ``` And check on its status with: ```shell kubectl get -f myapp.yaml ``` The output is similar to this: ``` NAME READY STATUS RESTARTS AGE myapp-pod 0/1 Init:0/2 0 6m ``` or for more details: ```shell kubectl describe -f myapp.yaml ``` The output is similar to this: ``` Name: myapp-pod Namespace: default [...] Labels: app.kubernetes.io/name=MyApp Status: Pending [...] Init Containers: init-myservice: [...] State: Running [...] init-mydb: [...] State: Waiting Reason: PodInitializing Ready: False [...] Containers: myapp-container: [...] State: Waiting Reason: PodInitializing Ready: False [...] Events: FirstSeen LastSeen Count From SubObjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 16s 16s 1 {default-scheduler } Normal Scheduled Successfully assigned myapp-pod to 172.17.4.201 16s 16s 1 {kubelet 172.17.4.201} spec.initContainers{init-myservice} Normal Pulling pulling image "busybox" 13s 13s 1 {kubelet 172.17.4.201} spec.initContainers{init-myservice} Normal Pulled Successfully pulled image "busybox" 13s 13s 1 {kubelet 172.17.4.201} spec.initContainers{init-myservice} Normal Created Created container init-myservice 13s 13s 1 {kubelet 172.17.4.201} spec.initContainers{init-myservice} Normal Started Started container init-myservice ``` To see logs for the
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/init-containers.md
|
[
-0.11254831403493881,
0.05343703553080559,
0.07111099362373352,
0.0029690354131162167,
0.049938514828681946,
-0.0943964421749115,
0.05326360836625099,
-0.01743447780609131,
0.034690771251916885,
0.023274803534150124,
0.06273144483566284,
-0.039787210524082184,
0.05668700486421585,
-0.028406282886862755,
0.04697347804903984,
0.005301946308463812,
0.012284197844564915,
0.013202759437263012,
-0.07387106865644455,
-0.005207348149269819,
0.008266476914286613,
0.008999176323413849,
0.02867383509874344,
-0.021597785875201225,
-0.04527142271399498,
0.015524200163781643,
-0.06872912496328354,
-0.0197758786380291,
0.08043333142995834,
-0.005615385249257088,
0.011371398344635963,
0.01644034869968891,
-0.10703776776790619,
0.10108614712953568,
0.04172683134675026,
0.13002650439739227,
0.010787619277834892,
-0.007217437960207462,
-0.015076195821166039,
-0.048979632556438446,
0.01738680712878704,
-0.004509223625063896,
-0.09985615313053131,
0.0010950472205877304,
-0.04390677437186241,
-0.007679435424506664,
0.013023532927036285,
-0.06753548979759216,
-0.006418012548238039,
-0.0317574143409729,
-0.04417502135038376,
-0.03139693662524223,
-0.03505546599626541,
-0.006272284779697657,
0.035969413816928864,
0.043705202639102936,
-0.03510541096329689,
0.010033105500042439,
0.03702957183122635,
0.08450298011302948,
0.003316895803436637,
0.03790668025612831,
-0.03297049552202225,
0.0351213738322258,
0.08522297441959381,
0.006690300069749355,
0.03707389160990715,
-0.047156259417533875,
0.016034279018640518,
-0.09204419702291489,
0.0388014130294323,
-0.03512449562549591,
0.07249289751052856,
-0.05206736922264099,
-0.034617796540260315,
-0.0026947816368192434,
-0.0596085786819458,
0.03403957560658455,
-0.020277585834264755,
-0.15826129913330078,
0.09827171266078949,
0.08069473505020142,
0.10376512259244919,
0.07049602270126343,
-0.043124519288539886,
-0.03400656208395958,
0.021012263372540474,
-0.02632005326449871,
0.04084789380431175,
0.005768087226897478,
0.03364647924900055,
-0.07479452341794968,
0.07207205146551132,
0.005644528195261955,
0.1834539920091629,
-0.03114304691553116,
-0.0036053459625691175,
-0.059253133833408356,
-0.03338053822517395,
-0.001989516895264387,
0.006886483635753393,
-0.08673878014087677,
0.029826929792761803,
-0.0033344540279358625,
0.10110435634851456,
-0.009168287739157677,
-0.06171676889061928,
-0.11879310011863708,
-0.005614486988633871,
0.044310059398412704,
0.0012254263274371624,
0.004830695688724518,
-0.017650045454502106,
0.03316386044025421,
-0.0250160563737154,
-0.08667933195829391,
-0.050286754965782166,
-0.03203671798110008,
0.04341147094964981,
0.0637425109744072,
0.03760115057229996,
-0.006189786829054356,
0.05698176473379135,
-0.06686046719551086,
-0.018105389550328255,
0.00902691762894392,
-0.05798181891441345,
7.297526235254363e-33,
0.017529882490634918,
-0.10928747057914734,
-0.01380305178463459,
0.025921303778886795,
-0.029471788555383682,
-0.04465216025710106,
-0.004605391528457403,
0.0012806500308215618,
-0.06724715232849121,
0.01565517485141754,
-0.026753004640340805,
0.0537986122071743,
-0.08299704641103745,
0.0766841396689415,
0.07108098268508911,
0.028580205515027046,
-0.034908466041088104,
0.07042498886585236,
0.05069407448172569,
0.01213077362626791,
-0.01107788272202015,
-0.09165340662002563,
-0.05365651845932007,
-0.04153214022517204,
0.05793255195021629,
-0.022115932777523994,
-0.004762248136103153,
-0.08992959558963776,
0.03248947858810425,
0.034691449254751205,
-0.013385683298110962,
-0.010495772585272789,
0.04852128028869629,
0.08042686432600021,
-0.08661147207021713,
-0.031997207552194595,
-0.0029702666215598583,
-0.04034370183944702,
-0.024114545434713364,
-0.0023255941923707724,
0.030065065249800682,
-0.02825946733355522,
0.0198814794421196,
-0.010434791445732117,
-0.0013867421075701714,
0.003263237653300166,
-0.04094228148460388,
-0.03190252557396889,
0.0012443781597539783,
0.018302103504538536,
0.039255429059267044,
0.01610642485320568,
-0.03375953808426857,
-0.04217613860964775,
-0.029731852933764458,
-0.006884804926812649,
-0.04147297143936157,
-0.10929141938686371,
0.009068976156413555,
-0.031756691634655,
-0.1333581954240799,
0.04421601817011833,
-0.04150550067424774,
0.0705672949552536,
-0.016914421692490578,
0.032355740666389465,
0.0030918570701032877,
-0.018204040825366974,
-0.055283647030591965,
0.02917628362774849,
-0.10810133814811707,
0.029332276433706284,
-0.011969789862632751,
-0.04869832843542099,
-0.012248286977410316,
-0.034041762351989746,
0.017612487077713013,
0.019204871729016304,
-0.07784166932106018,
0.01944568008184433,
0.002799595007672906,
-0.01681940257549286,
-0.017103197053074837,
0.045964501798152924,
-0.04964956268668175,
-0.021295182406902313,
0.009930608794093132,
-0.06301327794790268,
-0.0684289038181305,
0.05918806046247482,
0.020291050896048546,
-0.02642933279275894,
-0.08652778714895248,
-0.0013806124916300178,
-0.10897380113601685,
-8.951076506140813e-33,
0.09890472143888474,
-0.02610877901315689,
-0.03123924881219864,
-0.010581047274172306,
0.011683196760714054,
0.014546620659530163,
0.0557422935962677,
0.026009365916252136,
0.02647923119366169,
-0.0616258904337883,
-0.046991828829050064,
0.09396414458751678,
0.03262101113796234,
0.013755712658166885,
-0.08033052831888199,
0.019699018448591232,
-0.053101424127817154,
-0.003022250020876527,
0.005802647676318884,
0.027093473821878433,
0.01812824234366417,
-0.0023449708241969347,
0.03627513349056244,
0.06414064019918442,
-0.07902222871780396,
0.003610920161008835,
-0.01820584014058113,
-0.04576238617300987,
-0.02883273735642433,
0.02545858360826969,
0.027009621262550354,
0.00036526669282466173,
-0.016044382005929947,
-0.06391836702823639,
0.0035266249906271696,
-0.025345079600811005,
-0.03516579046845436,
-0.0535968616604805,
-0.056060101836919785,
-0.026841765269637108,
0.085503950715065,
-0.007550037000328302,
-0.017411593347787857,
-0.06273629516363144,
-0.04557265713810921,
-0.009060543030500412,
-0.016815733164548874,
-0.07607488334178925,
-0.010108081623911858,
-0.004270459059625864,
0.04705280810594559,
-0.000026488341973163188,
0.02761095203459263,
0.015287998132407665,
-0.03059295378625393,
-0.005915982648730278,
0.03707778453826904,
-0.03501328080892563,
-0.028032543137669563,
0.020003726705908775,
0.11305882036685944,
-0.05004624277353287,
-0.00371270882897079,
-0.02202192135155201,
-0.016933536157011986,
-0.008879724889993668,
-0.09219339489936829,
0.01730077899992466,
-0.055456023663282394,
0.04419328644871712,
0.012278429232537746,
-0.10045001655817032,
0.05687990412116051,
-0.0005912540946155787,
-0.01570792682468891,
0.011430301703512669,
0.07210104912519455,
-0.13676291704177856,
0.044110845774412155,
-0.057658012956380844,
-0.020963815972208977,
0.06315477937459946,
-0.014133463613688946,
0.0486883744597435,
-0.008045446127653122,
0.020385628566145897,
0.016865747049450874,
0.04460490122437477,
0.08239643275737762,
-0.004863177426159382,
-0.010537832975387573,
-0.018910419195890427,
0.011666971258819103,
0.11874080449342728,
0.03763876482844353,
-5.7956945909154456e-8,
0.03171534091234207,
0.08361275494098663,
0.016655106097459793,
0.00988454557955265,
-0.030034467577934265,
-0.005964681971818209,
0.05304598808288574,
0.05148922652006149,
0.07786616683006287,
-0.020750023424625397,
0.008855223655700684,
0.044053636491298676,
-0.0958200991153717,
0.012577446177601814,
-0.03239696845412254,
0.10754942893981934,
-0.06530486792325974,
-0.025759022682905197,
0.019715752452611923,
-0.13338729739189148,
-0.07911316305398941,
-0.04006054252386093,
-0.016488688066601753,
0.04812561348080635,
-0.04641246795654297,
0.04532148689031601,
0.049779023975133896,
-0.047489799559116364,
-0.006463893223553896,
0.10751977562904358,
-0.02562773786485195,
-0.01976916752755642,
-0.025999652221798897,
0.14683301746845245,
-0.012561138719320297,
0.0456763356924057,
-0.07303886115550995,
0.0017356048338115215,
0.07109127193689346,
-0.025327598676085472,
-0.015776721760630608,
-0.028472965583205223,
0.01185777597129345,
-0.05297769233584404,
0.006595124490559101,
0.020960455760359764,
0.027592428028583527,
0.025748733431100845,
-0.014852151274681091,
0.08767382055521011,
-0.020478185266256332,
0.024075763300061226,
-0.06160508468747139,
0.13481873273849487,
0.06728795915842056,
-0.013089114800095558,
0.06939573585987091,
-0.02203746885061264,
0.07744161784648895,
0.08506394922733307,
-0.01873326115310192,
-0.01839515008032322,
0.05280030518770218,
0.044710882008075714
] | 0.063038
|
16s 1 {kubelet 172.17.4.201} spec.initContainers{init-myservice} Normal Pulling pulling image "busybox" 13s 13s 1 {kubelet 172.17.4.201} spec.initContainers{init-myservice} Normal Pulled Successfully pulled image "busybox" 13s 13s 1 {kubelet 172.17.4.201} spec.initContainers{init-myservice} Normal Created Created container init-myservice 13s 13s 1 {kubelet 172.17.4.201} spec.initContainers{init-myservice} Normal Started Started container init-myservice ``` To see logs for the init containers in this Pod, run: ```shell kubectl logs myapp-pod -c init-myservice # Inspect the first init container kubectl logs myapp-pod -c init-mydb # Inspect the second init container ``` At this point, those init containers will be waiting to discover {{< glossary\_tooltip text="Services" term\_id="service" >}} named `mydb` and `myservice`. Here's a configuration you can use to make those Services appear: ```yaml --- apiVersion: v1 kind: Service metadata: name: myservice spec: ports: - protocol: TCP port: 80 targetPort: 9376 --- apiVersion: v1 kind: Service metadata: name: mydb spec: ports: - protocol: TCP port: 80 targetPort: 9377 ``` To create the `mydb` and `myservice` services: ```shell kubectl apply -f services.yaml ``` The output is similar to this: ``` service/myservice created service/mydb created ``` You'll then see that those init containers complete, and that the `myapp-pod` Pod moves into the Running state: ```shell kubectl get -f myapp.yaml ``` The output is similar to this: ``` NAME READY STATUS RESTARTS AGE myapp-pod 1/1 Running 0 9m ``` This simple example should provide some inspiration for you to create your own init containers. [What's next](#what-s-next) contains a link to a more detailed example. ## Detailed behavior During Pod startup, the kubelet delays running init containers until the networking and storage are ready. Then the kubelet runs the Pod's init containers in the order they appear in the Pod's spec. Each init container must exit successfully before the next container starts. If a container fails to start due to the runtime or exits with failure, it is retried according to the Pod `restartPolicy`. However, if the Pod `restartPolicy` is set to Always, the init containers use `restartPolicy` OnFailure. A Pod cannot be `Ready` until all init containers have succeeded. The ports on an init container are not aggregated under a Service. A Pod that is initializing is in the `Pending` state but should have a condition `Initialized` set to false. If the Pod [restarts](#pod-restart-reasons), or is restarted, all init containers must execute again. Changes to the init container spec are limited to the container image field. Directly altering the `image` field of an init container does \_not\_ restart the Pod or trigger its recreation. If the Pod has yet to start, that change may have an effect on how the Pod boots up. For a [pod template](/docs/concepts/workloads/pods/#pod-templates) you can typically change any field for an init container; the impact of making that change depends on where the pod template is used. Because init containers can be restarted, retried, or re-executed, init container code should be idempotent. In particular, code that writes into any `emptyDir` volume should be prepared for the possibility that an output file already exists. Init containers have all of the fields of an app container. However, Kubernetes prohibits `readinessProbe` from being used because init containers cannot define readiness distinct from completion. This is enforced during validation. Use `activeDeadlineSeconds` on the Pod to prevent init containers from failing forever. The active deadline includes init containers. However it is recommended to use `activeDeadlineSeconds` only if teams deploy their application as a Job, because `activeDeadlineSeconds` has an effect even after initContainer finished. The Pod which is already running correctly would be killed by `activeDeadlineSeconds` if you set. The name of each app and init container in a Pod must be unique; a validation error is
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/init-containers.md
|
[
0.04142926633358002,
0.016445687040686607,
0.03843763843178749,
-0.02727345936000347,
0.028533650562167168,
-0.08276262134313583,
0.015427278354763985,
-0.024392632767558098,
0.045748576521873474,
0.04430273547768593,
0.05651849880814552,
-0.0682014524936676,
-0.03037002868950367,
-0.004861937370151281,
-0.012501388788223267,
-0.01301063783466816,
0.05412987992167473,
-0.06614173203706741,
-0.016976695507764816,
0.022624341771006584,
-0.0440358929336071,
0.0009296538191847503,
-0.018100475892424583,
-0.018867000937461853,
-0.06581736356019974,
-0.024774855002760887,
-0.09278673678636551,
-0.057253945618867874,
0.002754274057224393,
-0.08079585433006287,
-0.021322481334209442,
0.05130348354578018,
0.00966181606054306,
0.01375711802393198,
0.09993290901184082,
0.12256486713886261,
0.024102644994854927,
-0.054103802889585495,
0.012735128402709961,
-0.01917877607047558,
0.042450424283742905,
-0.0592728927731514,
-0.009436666034162045,
-0.014613828621804714,
0.013048174791038036,
-0.01094517856836319,
-0.0983571708202362,
-0.05871865525841713,
0.0759621188044548,
-0.07178273797035217,
-0.05913081392645836,
-0.010648326016962528,
0.039938535541296005,
0.10732026398181915,
0.05326483026146889,
0.08114264905452728,
-0.03147521987557411,
0.05115573853254318,
0.06878630071878433,
0.008826551027595997,
-0.002531843725591898,
0.007729928940534592,
0.019837306812405586,
-0.007259204983711243,
0.026085305958986282,
0.0015211714198812842,
0.013595318421721458,
-0.008540085516870022,
0.020021134987473488,
-0.042225949466228485,
0.032567769289016724,
0.03582296147942543,
-0.02311054803431034,
-0.024732064455747604,
0.010014492087066174,
-0.015249733813107014,
-0.04374288022518158,
0.04633926972746849,
-0.048281244933605194,
-0.11913885176181793,
-0.03950094059109688,
0.029516495764255524,
0.032509464770555496,
-0.052349288016557693,
-0.07146379351615906,
-0.029625477269291878,
-0.03241746127605438,
-0.02885982021689415,
0.007051604334264994,
-0.014907345175743103,
0.0024137666914612055,
-0.06942542642354965,
-0.043689679354429245,
-0.012778659351170063,
0.09392459690570831,
-0.02848120406270027,
-0.02106456644833088,
0.015665866434574127,
0.022162243723869324,
-0.010560685768723488,
0.03441707044839859,
0.038346096873283386,
-0.050340354442596436,
0.09594663977622986,
0.059654351323843,
-0.08079666644334793,
-0.03361380100250244,
-0.04720031097531319,
0.021748175844550133,
0.054566390812397,
-0.005600037518888712,
-0.027912257239222527,
0.03021569363772869,
0.0745091661810875,
-0.011058486066758633,
0.008104776032269001,
-0.019589994102716446,
0.0035555970389395952,
0.045476123690605164,
0.07044556736946106,
0.0974186435341835,
-0.06404019147157669,
0.006346559152007103,
0.017999421805143356,
-0.08444694429636002,
0.04967029020190239,
0.009145811200141907,
8.095706001245898e-33,
0.04627168923616409,
-0.11534147709608078,
0.07901931554079056,
0.045985326170921326,
-0.04646744206547737,
-0.06844522058963776,
-0.07081771641969681,
-0.015242925845086575,
-0.02893161214888096,
-0.029251204803586006,
-0.10383220762014389,
0.038349539041519165,
-0.03230372443795204,
-0.008528448641300201,
-0.00811689905822277,
-0.031110698357224464,
-0.045359253883361816,
-0.0017202117014676332,
0.002630401635542512,
0.019496751949191093,
0.007602164056152105,
-0.040197599679231644,
-0.1008690893650055,
-0.005169825628399849,
0.04840456321835518,
-0.0011839242652058601,
0.033673934638500214,
-0.0672948807477951,
-0.005366489291191101,
0.036775995045900345,
0.03809325769543648,
-0.016875874251127243,
-0.03811095654964447,
0.08460519462823868,
-0.13529349863529205,
-0.035508155822753906,
0.06247824430465698,
0.007812855765223503,
-0.11583057790994644,
-0.058303967118263245,
0.005616132169961929,
-0.049171656370162964,
-0.0022745642345398664,
-0.04810890182852745,
0.04794953390955925,
-0.03675884008407593,
0.001413051038980484,
-0.04004228860139847,
0.014544650912284851,
0.029410649091005325,
-0.002373107708990574,
-0.007812337018549442,
-0.0326811820268631,
-0.08125244826078415,
-0.012643501162528992,
0.0331505723297596,
0.12120121717453003,
-0.005508797708898783,
-0.027554243803024292,
0.08029402047395706,
-0.07111918181180954,
0.02818252146244049,
0.0018091717502102256,
0.03583705797791481,
0.011640241369605064,
0.053849752992391586,
-0.06365673989057541,
-0.0004781364987138659,
-0.04442708194255829,
0.061324361711740494,
-0.1025516539812088,
0.02965727634727955,
0.023481590673327446,
-0.016014354303479195,
0.06101660802960396,
-0.0011123765725642443,
-0.008947616443037987,
-0.04067278653383255,
-0.17372407019138336,
0.022621357813477516,
0.025044390931725502,
-0.0007316505652852356,
-0.055435553193092346,
0.05794811621308327,
0.020347945392131805,
0.03247877210378647,
0.01579374261200428,
0.0030252106953412294,
0.0016037824098020792,
0.06392420828342438,
-0.01997745782136917,
0.06226198002696037,
-0.13409332931041718,
0.009526723995804787,
-0.0871211439371109,
-9.297551996677744e-33,
0.11204537004232407,
0.06560388952493668,
0.05515227094292641,
-0.013775620609521866,
0.077241912484169,
0.04971938207745552,
0.04289989545941353,
0.06477285176515579,
0.015271337702870369,
-0.026713628321886063,
0.02197250723838806,
-0.047795314341783524,
-0.07051025331020355,
0.0245196633040905,
-0.06711604446172714,
0.06717050075531006,
-0.06149357557296753,
0.014944779686629772,
-0.01569489762187004,
0.06985193490982056,
-0.022335749119520187,
0.03018909879028797,
0.029559580609202385,
0.06911277025938034,
-0.09576034545898438,
0.05440490320324898,
0.0883140042424202,
0.002430027350783348,
-0.08075986802577972,
-0.03827355429530144,
0.015211112797260284,
-0.08522272109985352,
-0.08076805621385574,
0.08511290699243546,
0.025681450963020325,
-0.017386706545948982,
-0.06791917979717255,
0.028607873246073723,
-0.06642233580350876,
-0.04447299987077713,
-0.0014477574732154608,
0.025175876915454865,
-0.06360247731208801,
0.02161485143005848,
-0.1093946099281311,
-0.026697920635342598,
0.07422002404928207,
-0.022211069241166115,
0.0023710071109235287,
-0.03186696767807007,
-0.017448270693421364,
-0.024216968566179276,
0.012676396407186985,
0.13234153389930725,
-0.022883066907525063,
0.03893868625164032,
0.02031872235238552,
0.07214632630348206,
-0.007929098792374134,
-0.018767550587654114,
0.10438696295022964,
-0.05573084577918053,
0.019086865708231926,
-0.006824879441410303,
0.019911333918571472,
-0.11341051012277603,
-0.008990438655018806,
-0.005272100679576397,
-0.012193223461508751,
0.016120126470923424,
-0.0031272070482373238,
-0.009366708807647228,
0.013672064058482647,
0.019940588623285294,
0.06641608476638794,
0.022986475378274918,
-0.03659563884139061,
-0.10200895369052887,
0.06457846611738205,
-0.015010200440883636,
-0.07256105542182922,
0.02053801156580448,
-0.05983561649918556,
-0.033004339784383774,
0.041186317801475525,
0.022993015125393867,
0.06427361816167831,
0.0470447763800621,
0.048982445150613785,
-0.0004230438789818436,
0.006635512225329876,
0.03356213495135307,
0.00490566436201334,
0.040988244116306305,
-0.04185042902827263,
-5.1667885969663985e-8,
0.09536165744066238,
-0.0688362568616867,
0.0035259563010185957,
0.06703867018222809,
0.04072972759604454,
-0.016859497874975204,
0.01811925321817398,
0.09095744788646698,
-0.08988448977470398,
-0.047014158219099045,
-0.0691920593380928,
0.037119269371032715,
-0.05463730916380882,
0.00624872324988246,
0.057039305567741394,
-0.04839441552758217,
-0.030764911323785782,
-0.008813650347292423,
0.009781747125089169,
-0.07836734503507614,
-0.0510256327688694,
-0.05275801196694374,
0.04221581295132637,
-0.0024304173421114683,
-0.044483065605163574,
0.11380846053361893,
0.052590835839509964,
0.004665098153054714,
0.06594406068325043,
0.03805653005838394,
0.015032154507935047,
-0.017759328708052635,
-0.03290768340229988,
0.026207955554127693,
-0.03312898054718971,
0.05764774978160858,
-0.11614981293678284,
0.05488624423742294,
0.051249850541353226,
0.013280019164085388,
0.024527523666620255,
-0.061334945261478424,
-0.046513788402080536,
-0.013310213573276997,
-0.009556959383189678,
0.054866205900907516,
-0.030983388423919678,
0.07123786211013794,
-0.012978395447134972,
-0.002843258436769247,
-0.04581485688686371,
-0.07895401120185852,
0.016322214156389236,
0.09749424457550049,
-0.00024055383983068168,
0.023221880197525024,
0.06608236581087112,
-0.09447050094604492,
0.05277140066027641,
0.07707672566175461,
0.012047448195517063,
0.0011088502360507846,
-0.016633111983537674,
-0.005229190923273563
] | 0.119489
|
if teams deploy their application as a Job, because `activeDeadlineSeconds` has an effect even after initContainer finished. The Pod which is already running correctly would be killed by `activeDeadlineSeconds` if you set. The name of each app and init container in a Pod must be unique; a validation error is thrown for any container sharing a name with another. ### Resource sharing within containers Given the order of execution for init, sidecar and app containers, the following rules for resource usage apply: \* The highest of any particular resource request or limit defined on all init containers is the \*effective init request/limit\*. If any resource has no resource limit specified this is considered as the highest limit. \* The Pod's \*effective request/limit\* for a resource is the higher of: \* the sum of all app containers request/limit for a resource \* the effective init request/limit for a resource \* Scheduling is done based on effective requests/limits, which means init containers can reserve resources for initialization that are not used during the life of the Pod. \* The QoS (quality of service) tier of the Pod's \*effective QoS tier\* is the QoS tier for init containers and app containers alike. Quota and limits are applied based on the effective Pod request and limit. ### Init containers and Linux cgroups {#cgroups} On Linux, resource allocations for Pod level control groups (cgroups) are based on the effective Pod request and limit, the same as the scheduler. {{< comment >}} This section also present under [sidecar containers](/docs/concepts/workloads/pods/sidecar-containers/) page. If you're editing this section, change both places. {{< /comment >}} ### Pod restart reasons A Pod can restart, causing re-execution of init containers, for the following reasons: \* The Pod infrastructure container is restarted. This is uncommon and would have to be done by someone with root access to nodes. \* All containers in a Pod are terminated while `restartPolicy` is set to Always, forcing a restart, and the init container completion record has been lost due to {{< glossary\_tooltip text="garbage collection" term\_id="garbage-collection" >}}. The Pod will not be restarted when the init container image is changed, or the init container completion record has been lost due to garbage collection. This applies for Kubernetes v1.20 and later. If you are using an earlier version of Kubernetes, consult the documentation for the version you are using. ## {{% heading "whatsnext" %}} Learn more about the following: \* [Creating a Pod that has an init container](/docs/tasks/configure-pod-container/configure-pod-initialization/#create-a-pod-that-has-an-init-container). \* [Debug init containers](/docs/tasks/debug/debug-application/debug-init-containers/). \* Overview of [kubelet](/docs/reference/command-line-tools-reference/kubelet/) and [kubectl](/docs/reference/kubectl/). \* [Types of probes](/docs/concepts/workloads/pods/pod-lifecycle/#types-of-probe): liveness, readiness, startup probe. \* [Sidecar containers](/docs/concepts/workloads/pods/sidecar-containers).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/init-containers.md
|
[
-0.0450945645570755,
0.032288528978824615,
-0.02028920128941536,
0.006974483374506235,
0.023056596517562866,
-0.06998085230588913,
0.021702367812395096,
-0.025727152824401855,
0.0253963153809309,
0.034545619040727615,
0.010361202992498875,
0.02900414727628231,
0.014627124182879925,
0.019091133028268814,
-0.0011448971927165985,
0.02702466771006584,
0.12509311735630035,
-0.05779449641704559,
-0.1110939010977745,
-0.01881783828139305,
0.06934014707803726,
-0.032825496047735214,
-0.03271486237645149,
0.035518474876880646,
-0.04887443780899048,
-0.04658600687980652,
-0.08262705057859421,
0.00916911568492651,
0.045974358916282654,
-0.012129909358918667,
-0.08091333508491516,
0.0006429206114262342,
0.038847122341394424,
-0.007250326685607433,
0.06437594443559647,
0.12742838263511658,
-0.007774210534989834,
-0.0702558308839798,
-0.03851277381181717,
-0.002118609845638275,
-0.02564501389861107,
-0.06455612182617188,
-0.13789372146129608,
0.08504565060138702,
0.0076031433418393135,
-0.04049467667937279,
-0.07701617479324341,
-0.03495148569345474,
-0.03550035506486893,
0.021867571398615837,
0.025685235857963562,
-0.003331621875986457,
0.07489215582609177,
0.09635467082262039,
0.011776687577366829,
0.037917610257864,
-0.008501987904310226,
0.027481041848659515,
0.027830637991428375,
0.03880669176578522,
-0.004768428858369589,
-0.050376418977975845,
-0.01868082582950592,
0.02288057841360569,
0.07794242352247238,
-0.05953448638319969,
0.016184162348508835,
-0.013466027565300465,
-0.037039730697870255,
-0.009785301983356476,
0.026721065863966942,
-0.044161755591630936,
-0.030988173559308052,
-0.05083676800131798,
0.022932665422558784,
0.03259270638227463,
-0.008317064493894577,
0.046014703810214996,
-0.04789721593260765,
-0.13965509831905365,
0.030981510877609253,
-0.008164148777723312,
0.00947631150484085,
-0.07161898910999298,
-0.04244286194443703,
0.021046554669737816,
-0.019174205139279366,
-0.04981831833720207,
0.046071089804172516,
0.05528176948428154,
0.01760844513773918,
0.06232390180230141,
0.05085514485836029,
-0.04857044667005539,
0.08672312647104263,
-0.0021329913288354874,
-0.05032261833548546,
0.016799530014395714,
-0.0033453365322202444,
-0.028207290917634964,
0.0521235466003418,
-0.028029320761561394,
-0.013169527053833008,
0.026108980178833008,
0.06742075830698013,
-0.032851699739694595,
-0.015206348150968552,
-0.04759959131479263,
0.006326954811811447,
0.03400779142975807,
-0.008813083171844482,
-0.021886071190238,
0.04600454121828079,
0.015191186219453812,
-0.037270206958055496,
0.08395218104124069,
-0.031073227524757385,
0.060010503977537155,
0.008834843523800373,
0.05004460737109184,
0.047666892409324646,
-0.08126949518918991,
0.05596321448683739,
-0.025793274864554405,
-0.012330256402492523,
-0.014753175899386406,
-0.020254813134670258,
8.287155092744477e-33,
-0.017084356397390366,
-0.11718031018972397,
0.022971969097852707,
0.016658224165439606,
0.04527607187628746,
-0.07301274687051773,
-0.02405373565852642,
0.032997675240039825,
-0.04262394458055496,
-0.02713683433830738,
-0.06633301824331284,
0.036140311509370804,
0.013016406446695328,
-0.014641426503658295,
0.041051752865314484,
-0.03833092376589775,
-0.020321514457464218,
0.05945860594511032,
0.01026891265064478,
0.028566500172019005,
-0.003731516422703862,
-0.10088863968849182,
-0.1045193150639534,
0.035092830657958984,
0.05256281793117523,
0.006669491995126009,
0.0165504552423954,
-0.07143311202526093,
-0.018403958529233932,
0.04106387123465538,
0.030228937044739723,
0.012586577795445919,
-0.024629643186926842,
0.057421982288360596,
-0.10371223092079163,
0.03135458379983902,
0.02358318492770195,
0.02735893614590168,
-0.03505668789148331,
-0.012774917297065258,
-0.03910587728023529,
0.024361366406083107,
0.005335468798875809,
-0.054037269204854965,
-0.00986918993294239,
-0.08655945956707001,
0.04068228229880333,
-0.028239361941814423,
-0.017319049686193466,
0.07257301360368729,
0.0003941594623029232,
-0.00350437150336802,
0.060176026076078415,
-0.02135636657476425,
0.023627588525414467,
0.010259341448545456,
0.026836924254894257,
0.02477044053375721,
-0.022667914628982544,
0.05697406083345413,
-0.04882980138063431,
-0.03291139751672745,
-0.05863377824425697,
0.03289356455206871,
-0.013226536102592945,
0.0698593333363533,
0.004607480019330978,
-0.05925392732024193,
-0.002607213333249092,
0.033171750605106354,
-0.06375736743211746,
0.019209686666727066,
0.07849467545747757,
0.0521775558590889,
-0.03728492558002472,
-0.03391347825527191,
0.03353387117385864,
0.05749085173010826,
-0.12738600373268127,
-0.014663892798125744,
-0.01716187782585621,
0.03488096967339516,
0.0036071031354367733,
-0.012428871355950832,
-0.024608002975583076,
-0.06240786612033844,
-0.019480489194393158,
-0.019750136882066727,
-0.07828820496797562,
0.11996909230947495,
0.021491382271051407,
0.018948275595903397,
-0.04320472851395607,
0.05497772991657257,
-0.026212401688098907,
-8.746382532044343e-33,
0.053754325956106186,
0.05427275225520134,
-0.052777744829654694,
-0.007533015683293343,
0.023248162120580673,
0.03767571598291397,
-0.014376228675246239,
0.0022010779939591885,
0.018184049054980278,
-0.019114527851343155,
-0.04877318814396858,
0.021306538954377174,
0.006916537415236235,
0.03254926949739456,
-0.11848589777946472,
-0.029551303014159203,
0.011511228047311306,
-0.07331788539886475,
0.005844165571033955,
0.04724253714084625,
0.00810347218066454,
-0.0322553813457489,
0.04441406950354576,
0.06407152116298676,
0.04232468456029892,
0.016970351338386536,
-0.05031080171465874,
-0.043911077082157135,
-0.025665713474154472,
-0.0552707239985466,
0.04263010993599892,
-0.1582234650850296,
-0.05287442356348038,
0.037826258689165115,
-0.01230592280626297,
-0.019198309630155563,
-0.08331889659166336,
0.08060724288225174,
-0.00884682685136795,
0.014259248040616512,
0.11652710288763046,
-0.047890111804008484,
-0.044573817402124405,
-0.008411316201090813,
-0.06996069848537445,
-0.03553704917430878,
-0.07441260665655136,
-0.11498825997114182,
-0.05701254680752754,
-0.07387271523475647,
0.05347501486539841,
0.04244564473628998,
-0.01403788197785616,
0.10652104020118713,
0.04491610825061798,
0.0036106950137764215,
0.010224839672446251,
0.07901065796613693,
-0.07162865996360779,
0.037921249866485596,
0.1670113503932953,
0.007835118100047112,
-0.03772612288594246,
0.0439034104347229,
-0.016589341685175896,
-0.027712663635611534,
0.008252699859440327,
0.011485902592539787,
0.0391228087246418,
0.005098449531942606,
0.011258101090788841,
0.034997083246707916,
-0.025553015992045403,
0.07115204632282257,
-0.09663969278335571,
0.014106877148151398,
0.037764254957437515,
-0.16056296229362488,
-0.00819855835288763,
0.026983482763171196,
-0.1510508507490158,
0.06428380310535431,
-0.039128877222537994,
0.07711058109998703,
-0.06570015102624893,
0.031163597479462624,
0.05107457563281059,
0.06248824670910835,
0.05141660198569298,
0.030461858958005905,
0.03579920530319214,
-0.0025822732131928205,
-0.042851682752370834,
0.0843406394124031,
-0.0503004714846611,
-5.659774515720528e-8,
0.095502570271492,
-0.0120162358507514,
0.027051733806729317,
-0.039131633937358856,
0.02116556093096733,
-0.08303731679916382,
0.1350511610507965,
0.018649820238351822,
0.014330747537314892,
0.06622432172298431,
-0.008637444116175175,
0.03330262750387192,
-0.05529387295246124,
0.027095254510641098,
0.09326029568910599,
0.015413147397339344,
0.004540762864053249,
0.008299089036881924,
-0.044412869960069656,
-0.08482235670089722,
-0.04306958243250847,
-0.007711758837103844,
-0.0694376528263092,
-0.0037567834369838238,
-0.003984421957284212,
0.027973882853984833,
0.09394728392362595,
0.014026451855897903,
0.010126687586307526,
0.034511685371398926,
-0.02340281940996647,
-0.03660816326737404,
-0.06280823051929474,
0.04837067797780037,
-0.03267224133014679,
0.017656486481428146,
-0.11862486600875854,
-0.009063614532351494,
0.02699906937777996,
0.07700058072805405,
-0.04210955649614334,
0.016163328662514687,
0.021874796599149704,
-0.015660526230931282,
0.05777771770954132,
0.06029178574681282,
-0.1378268301486969,
0.0324522890150547,
-0.051220305263996124,
-0.04510091617703438,
-0.033402737230062485,
-0.032121412456035614,
-0.0239945650100708,
0.045154180377721786,
0.03400594741106033,
0.020545141771435738,
0.05849430710077286,
-0.04157642275094986,
0.0866730585694313,
-0.01636934094130993,
0.024174008518457413,
0.027158400043845177,
0.02820059284567833,
0.024773605167865753
] | 0.212344
|
{{< feature-state state="stable" for\_k8s\_version="v1.25" >}} This page provides an overview of ephemeral containers: a special type of container that runs temporarily in an existing {{< glossary\_tooltip term\_id="pod" >}} to accomplish user-initiated actions such as troubleshooting. You use ephemeral containers to inspect services rather than to build applications. ## Understanding ephemeral containers {{< glossary\_tooltip text="Pods" term\_id="pod" >}} are the fundamental building block of Kubernetes applications. Since Pods are intended to be disposable and replaceable, you cannot add a container to a Pod once it has been created. Instead, you usually delete and replace Pods in a controlled fashion using {{< glossary\_tooltip text="deployments" term\_id="deployment" >}}. Sometimes it's necessary to inspect the state of an existing Pod, however, for example to troubleshoot a hard-to-reproduce bug. In these cases you can run an ephemeral container in an existing Pod to inspect its state and run arbitrary commands. ### What is an ephemeral container? Ephemeral containers differ from other containers in that they lack guarantees for resources or execution, and they will never be automatically restarted, so they are not appropriate for building applications. Ephemeral containers are described using the same `ContainerSpec` as regular containers, but many fields are incompatible and disallowed for ephemeral containers. - Ephemeral containers may not have ports, so fields such as `ports`, `livenessProbe`, `readinessProbe` are disallowed. - Pod resource allocations are immutable, so setting `resources` is disallowed. - For a complete list of allowed fields, see the [EphemeralContainer reference documentation](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#ephemeralcontainer-v1-core). Ephemeral containers are created using a special `ephemeralcontainers` handler in the API rather than by adding them directly to `pod.spec`, so it's not possible to add an ephemeral container using `kubectl edit`. Like regular containers, you may not change or remove an ephemeral container after you have added it to a Pod. {{< note >}} Ephemeral containers are not supported by [static pods](/docs/tasks/configure-pod-container/static-pod/). {{< /note >}} ## Uses for ephemeral containers Ephemeral containers are useful for interactive troubleshooting when `kubectl exec` is insufficient because a container has crashed or a container image doesn't include debugging utilities. In particular, [distroless images](https://github.com/GoogleContainerTools/distroless) enable you to deploy minimal container images that reduce attack surface and exposure to bugs and vulnerabilities. Since distroless images do not include a shell or any debugging utilities, it's difficult to troubleshoot distroless images using `kubectl exec` alone. When using ephemeral containers, it's helpful to enable [process namespace sharing](/docs/tasks/configure-pod-container/share-process-namespace/) so you can view processes in other containers. ## {{% heading "whatsnext" %}} \* Learn how to [debug pods using ephemeral containers](/docs/tasks/debug/debug-application/debug-running-pod/#ephemeral-container).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/ephemeral-containers.md
|
[
-0.04065050557255745,
0.028419844806194305,
0.12896226346492767,
-0.000023684866391704418,
0.0006271390011534095,
0.00188967096619308,
0.048808373510837555,
-0.025280075147747993,
0.03535927087068558,
0.035939693450927734,
0.013428429141640663,
-0.06753048300743103,
-0.026658646762371063,
-0.04353494569659233,
0.033017709851264954,
0.011309130117297173,
0.03295706957578659,
-0.05100596696138382,
-0.061915431171655655,
0.017598967999219894,
0.05860431492328644,
0.036781422793865204,
0.016920659691095352,
0.06691160053014755,
-0.022192995995283127,
0.047794148325920105,
-0.07289516925811768,
0.004129019565880299,
0.05491272360086441,
0.021399399265646935,
-0.04881564527750015,
0.0788559541106224,
-0.03666006401181221,
0.0399630181491375,
0.1041257232427597,
0.05891939252614975,
-0.013697619549930096,
0.029408978298306465,
-0.06330766528844833,
0.005911351181566715,
0.0049207983538508415,
-0.06966140121221542,
-0.10828954726457596,
0.004291714634746313,
-0.009745760820806026,
-0.02793554775416851,
-0.008267179131507874,
-0.05861182138323784,
0.022015893831849098,
0.00411349767819047,
0.04506833106279373,
-0.10205434262752533,
0.039603400975465775,
0.0020267716608941555,
0.07411172240972519,
-0.0020809622947126627,
-0.06625231355428696,
0.0631551742553711,
0.0572848841547966,
0.024735739454627037,
0.07521187514066696,
-0.017787935212254524,
0.02957286685705185,
-0.006631264928728342,
0.06119057536125183,
-0.04844037815928459,
0.029472477734088898,
-0.003895809641107917,
-0.00616115378215909,
-0.004955712705850601,
0.03041916899383068,
-0.005093418061733246,
0.044955648481845856,
0.004036261700093746,
0.004043446853756905,
0.03696124255657196,
-0.03630201518535614,
0.03623570129275322,
0.0351453460752964,
-0.05415309965610504,
0.04522383585572243,
0.06090704724192619,
0.08507873862981796,
0.026825156062841415,
-0.050284918397665024,
-0.055567603558301926,
0.017401549965143204,
-0.056811679154634476,
0.021997498348355293,
-0.007756062783300877,
0.011011642403900623,
-0.07889217883348465,
0.11347536742687225,
-0.10218349099159241,
0.07772602140903473,
0.008608958683907986,
0.005791280884295702,
-0.021986622363328934,
0.00437341071665287,
0.024312598630785942,
0.027495138347148895,
-0.022430824115872383,
0.0007355596753768623,
0.020445792004466057,
0.013499977067112923,
-0.028924480080604553,
-0.10446134954690933,
-0.030903326347470284,
-0.0034753759391605854,
-0.00029929052107036114,
0.007514488883316517,
0.049608856439590454,
-0.02677152305841446,
-0.0010754988761618733,
-0.039355650544166565,
-0.08768683671951294,
-0.07819190621376038,
-0.03472597524523735,
0.07229603081941605,
0.06679166108369827,
0.027957843616604805,
-0.1038387343287468,
-0.018981778994202614,
-0.005212992895394564,
-0.08117924630641937,
0.06533181667327881,
-0.027114447206258774,
3.1336802275380716e-33,
0.0330536887049675,
-0.0604560449719429,
-0.06280205398797989,
-0.002739217132329941,
0.006774374283850193,
-0.07152684777975082,
-0.03127124533057213,
0.014562095515429974,
-0.07401468604803085,
-0.02841053530573845,
-0.0234831552952528,
0.07618168741464615,
-0.024801455438137054,
-0.04368152469396591,
0.021635647863149643,
0.0030237098690122366,
-0.057043250650167465,
0.0816102921962738,
0.06849756091833115,
-0.04252009838819504,
0.030729135498404503,
-0.07660883665084839,
-0.035272710025310516,
-0.06880324333906174,
0.05446987226605415,
0.029634857550263405,
0.010364945977926254,
-0.08085266500711441,
-0.006069378461688757,
0.024102896451950073,
-0.006264386232942343,
-0.0006037420243956149,
0.016166118904948235,
0.03325049951672554,
-0.15715397894382477,
-0.06838815659284592,
-0.01926189474761486,
-0.03674515709280968,
-0.021370379254221916,
-0.08590945601463318,
0.037463463842868805,
0.004056463949382305,
-0.023891737684607506,
-0.017615005373954773,
0.07952990382909775,
0.03199193999171257,
0.032835666090250015,
-0.09284362941980362,
0.049194030463695526,
0.0022005089558660984,
0.008942768909037113,
0.007143601309508085,
-0.045980118215084076,
-0.009907761588692665,
0.005762131884694099,
0.041753191500902176,
0.04908648133277893,
-0.079027459025383,
-0.015016979537904263,
-0.08405550569295883,
-0.060323502868413925,
0.08196892589330673,
-0.0072822170332074165,
-0.037906549870967865,
0.05072631686925888,
0.04300227761268616,
-0.015394571237266064,
0.07831314951181412,
-0.0003824406594503671,
-0.017377901822328568,
-0.04583356902003288,
-0.0022051637060940266,
-0.027432285249233246,
0.03880985826253891,
0.032573532313108444,
-0.10118598490953445,
0.01713806763291359,
0.00224758917465806,
-0.09155246615409851,
0.017924679443240166,
0.007872059009969234,
-0.07076766341924667,
-0.054467130452394485,
0.09672121703624725,
0.03521384671330452,
-0.06738100200891495,
0.01239797007292509,
-0.019958291202783585,
-0.023180292919278145,
0.03738900646567345,
-0.005835092160850763,
-0.03988182917237282,
-0.1148405447602272,
0.0010048443218693137,
-0.1359366923570633,
-5.558580340542506e-33,
0.10591895133256912,
-0.017440319061279297,
-0.020900076255202293,
0.03171105310320854,
-0.017466876655817032,
0.01675688847899437,
0.030834324657917023,
0.053406573832035065,
-0.009034997783601284,
-0.06396380066871643,
-0.021841716021299362,
0.04621618241071701,
0.02516419254243374,
0.08792704343795776,
-0.05932275950908661,
0.04367662966251373,
-0.17242757976055145,
0.006771177984774113,
0.0013172398321330547,
0.009157415479421616,
-0.0007055908208712935,
-0.049130313098430634,
0.022462841123342514,
0.07011723518371582,
-0.04924728721380234,
-0.0817817971110344,
0.0586252398788929,
-0.032923802733421326,
-0.007206514943391085,
-0.061825282871723175,
0.042917847633361816,
-0.026115350425243378,
-0.055572353303432465,
0.0174692515283823,
0.04174847900867462,
-0.07535028457641602,
0.0016445923829451203,
-0.09777136892080307,
-0.023393407464027405,
-0.013923970982432365,
0.06319086998701096,
-0.013120174407958984,
-0.017685074359178543,
-0.07330378890037537,
-0.028867054730653763,
0.013984722085297108,
0.050474319607019424,
0.010334906168282032,
0.052375104278326035,
-0.1121230348944664,
0.07397212088108063,
-0.01466440036892891,
-0.06887469440698624,
0.009804705157876015,
-0.07855023443698883,
0.038914766162633896,
0.016043245792388916,
-0.008229619823396206,
-0.05120377987623215,
-0.0019819079898297787,
0.03948142006993294,
-0.07533743232488632,
0.061103008687496185,
0.0013256554957479239,
0.03185082599520683,
-0.040894702076911926,
-0.052151892334222794,
0.051294662058353424,
-0.030764993280172348,
-0.029692886397242546,
-0.016491880640387535,
-0.06483862549066544,
0.028453059494495392,
-0.052756842225790024,
0.02074277773499489,
0.0002969015622511506,
0.05183962732553482,
-0.09566083550453186,
0.10172125697135925,
-0.08252212405204773,
-0.02512427419424057,
0.09325747936964035,
0.009024403989315033,
0.013807409442961216,
0.02150772698223591,
0.04222381114959717,
0.04948566481471062,
0.13660010695457458,
0.028868647292256355,
0.06407435983419418,
0.014448389410972595,
-0.0052500138990581036,
-0.04830769822001457,
0.17936810851097107,
0.008059977553784847,
-5.750756670863666e-8,
0.04457063227891922,
0.1273820847272873,
-0.006588768679648638,
0.03076079487800598,
0.02590174414217472,
-0.02094336226582527,
0.013271931558847427,
0.031704653054475784,
0.001111059682443738,
-0.059833526611328125,
-0.030771631747484207,
0.06428757309913635,
-0.08076705783605576,
0.08474217355251312,
0.025900643318891525,
-0.004073108080774546,
-0.08367376774549484,
0.047064535319805145,
0.00012059231085004285,
-0.05583913251757622,
-0.02447245828807354,
-0.010213366709649563,
0.06623359769582748,
0.014052110724151134,
-0.024193763732910156,
0.013615679927170277,
0.041933733969926834,
0.02347479946911335,
0.008036971092224121,
-0.021573657169938087,
-0.017971264198422432,
0.04717386141419411,
-0.07455741614103317,
0.12934699654579163,
0.03581622987985611,
0.00430592754855752,
-0.11991550028324127,
0.05502244830131531,
0.05729961395263672,
0.0039010264445096254,
-0.014701593667268753,
-0.053091324865818024,
-0.0787891298532486,
-0.01200441736727953,
0.011733480729162693,
0.07112863659858704,
0.0017275381833314896,
0.04429052397608757,
-0.04585075005888939,
0.010654102079570293,
-0.03595835343003273,
-0.004137334879487753,
-0.012275387533009052,
0.06954823434352875,
-0.00008625615737400949,
-0.009737187996506691,
0.003850949462503195,
-0.014329575933516026,
0.04060687869787216,
-0.022438425570726395,
0.03412467986345291,
-0.011958122253417969,
0.038596197962760925,
0.0069785951636731625
] | 0.085297
|
\_Pods\_ are the smallest deployable units of computing that you can create and manage in Kubernetes. A \_Pod\_ (as in a pod of whales or pea pod) is a group of one or more {{< glossary\_tooltip text="containers" term\_id="container" >}}, with shared storage and network resources, and a specification for how to run the containers. A Pod's contents are always co-located and co-scheduled, and run in a shared context. A Pod models an application-specific "logical host": it contains one or more application containers which are relatively tightly coupled. In non-cloud contexts, applications executed on the same physical or virtual machine are analogous to cloud applications executed on the same logical host. As well as application containers, a Pod can contain {{< glossary\_tooltip text="init containers" term\_id="init-container" >}} that run during Pod startup. You can also inject {{< glossary\_tooltip text="ephemeral containers" term\_id="ephemeral-container" >}} for debugging a running Pod. ## What is a Pod? {{< note >}} You need to install a [container runtime](/docs/setup/production-environment/container-runtimes/) into each node in the cluster so that Pods can run there. {{< /note >}} The shared context of a Pod is a set of Linux namespaces, cgroups, and potentially other facets of isolation - the same things that isolate a {{< glossary\_tooltip text="container" term\_id="container" >}}. Within a Pod's context, the individual applications may have further sub-isolations applied. A Pod is similar to a set of containers with shared namespaces and shared filesystem volumes. Pods in a Kubernetes cluster are used in two main ways: \* \*\*Pods that run a single container\*\*. The "one-container-per-Pod" model is the most common Kubernetes use case; in this case, you can think of a Pod as a wrapper around a single container; Kubernetes manages Pods rather than managing the containers directly. \* \*\*Pods that run multiple containers that need to work together\*\*. A Pod can encapsulate an application composed of [multiple co-located containers](#how-pods-manage-multiple-containers) that are tightly coupled and need to share resources. These co-located containers form a single cohesive unit. Grouping multiple co-located and co-managed containers in a single Pod is a relatively advanced use case. You should use this pattern only in specific instances in which your containers are tightly coupled. You don't need to run multiple containers to provide replication (for resilience or capacity); if you need multiple replicas, see [Workload management](/docs/concepts/workloads/controllers/). ## Using Pods The following is an example of a Pod which consists of a container running the image `nginx:1.14.2`. {{% code\_sample file="pods/simple-pod.yaml" %}} To create the Pod shown above, run the following command: ```shell kubectl apply -f https://k8s.io/examples/pods/simple-pod.yaml ``` Pods are generally not created directly and are created using workload resources. See [Working with Pods](#working-with-pods) for more information on how Pods are used with workload resources. ### Workload resources for managing pods Usually you don't need to create Pods directly, even singleton Pods. Instead, create them using workload resources such as {{< glossary\_tooltip text="Deployment" term\_id="deployment" >}} or {{< glossary\_tooltip text="Job" term\_id="job" >}}. If your Pods need to track state, consider the {{< glossary\_tooltip text="StatefulSet" term\_id="statefulset" >}} resource. Each Pod is meant to run a single instance of a given application. If you want to scale your application horizontally (to provide more overall resources by running more instances), you should use multiple Pods, one for each instance. In Kubernetes, this is typically referred to as \_replication\_. Replicated Pods are usually created and managed as a group by a workload resource and its {{< glossary\_tooltip text="controller" term\_id="controller" >}}. See [Pods and controllers](#pods-and-controllers) for more information on how Kubernetes uses workload resources, and their controllers, to implement application scaling and auto-healing. Pods natively provide two kinds of shared resources for their constituent
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/_index.md
|
[
0.01725844293832779,
-0.010631612502038479,
0.06035918742418289,
0.007600277662277222,
0.005533927120268345,
-0.04828968644142151,
0.021883489564061165,
-0.010149500332772732,
0.10072126239538193,
0.05081338435411453,
0.014572559855878353,
-0.04307670518755913,
-0.013371780514717102,
-0.05469780042767525,
0.05426403880119324,
-0.019304094836115837,
0.07614417374134064,
-0.051878921687603,
-0.027090370655059814,
0.042467884719371796,
0.06293822824954987,
0.064151331782341,
-0.022362926974892616,
0.05445867031812668,
-0.05639943853020668,
0.05487614870071411,
-0.07497844845056534,
-0.011878345161676407,
0.05263349041342735,
0.042106155306100845,
-0.07581906765699387,
0.03564462810754776,
0.0020420546643435955,
0.0948721393942833,
0.06948795914649963,
0.11613848060369492,
0.01724686473608017,
-0.045180998742580414,
-0.06575585901737213,
-0.0008358325576409698,
0.009832809679210186,
-0.11588110774755478,
-0.13012705743312836,
0.024367908015847206,
-0.015830781310796738,
-0.0021735893096774817,
-0.001050821621902287,
-0.09781774878501892,
-0.02214180678129196,
-0.02140103466808796,
0.014397844672203064,
-0.07812056690454483,
0.027741264551877975,
0.06624273210763931,
0.0380438007414341,
0.018513722345232964,
-0.00866780150681734,
0.02531682886183262,
0.06235211342573166,
0.0203240979462862,
0.032373491674661636,
-0.007618158124387264,
-0.000029243450626381673,
0.028268607333302498,
0.0664406567811966,
-0.040714532136917114,
0.010119026526808739,
0.022623799741268158,
0.03327779471874237,
-0.07149019092321396,
0.06506151705980301,
0.001204384141601622,
0.02636963687837124,
-0.005529513582587242,
-0.05083867907524109,
-0.026608513668179512,
-0.018389461562037468,
0.037795841693878174,
0.013263498432934284,
-0.034135475754737854,
0.04610102251172066,
0.11849315464496613,
0.06471198797225952,
0.011803258210420609,
-0.08109971880912781,
-0.021450215950608253,
0.031663328409194946,
-0.03176221251487732,
0.02661980502307415,
-0.01094831433147192,
0.0010478150798007846,
-0.05312308296561241,
0.09196236729621887,
-0.08709230273962021,
0.08542419224977493,
-0.026142342016100883,
0.05357259511947632,
-0.022722067311406136,
0.04482946917414665,
-0.0003360812843311578,
0.053570281714200974,
0.013343773782253265,
0.006243126001209021,
-0.03540957719087601,
0.06339201331138611,
-0.004054455552250147,
-0.10749370604753494,
-0.06985250115394592,
0.04796617478132248,
0.0077165826223790646,
-0.04706345498561859,
0.000025884402930387296,
-0.042086128145456314,
0.034784041345119476,
-0.01634884811937809,
-0.03961103782057762,
-0.06660609692335129,
-0.007446196395903826,
0.07148709893226624,
0.07236608862876892,
-0.015520533546805382,
-0.12839935719966888,
0.03886637091636658,
-0.02872323803603649,
-0.05131391063332558,
0.027224702760577202,
-0.07552659511566162,
1.8040298945100184e-33,
0.03850951045751572,
-0.08923593163490295,
-0.03104664385318756,
-0.042003195732831955,
0.032945018261671066,
-0.04257803037762642,
-0.020325040444731712,
0.037336066365242004,
-0.03969123214483261,
0.009036031551659107,
-0.03762926161289215,
0.12188351899385452,
0.00517894746735692,
0.03121255710721016,
0.06429203599691391,
0.0009594677248969674,
-0.10722529143095016,
0.07741127908229828,
0.0860884040594101,
-0.0026323888450860977,
0.0001682062866166234,
-0.028522038832306862,
-0.044138871133327484,
0.015421532094478607,
0.07737648487091064,
-0.03464607149362564,
0.006924905814230442,
-0.12258316576480865,
-0.0005709819961339235,
0.04092230647802353,
-0.020276524126529694,
0.001123429974541068,
0.052766066044569016,
0.027017923071980476,
-0.10199635475873947,
-0.023700501769781113,
-0.02058367431163788,
-0.02706535905599594,
-0.06049516424536705,
-0.06693078577518463,
0.0526806078851223,
-0.0022826672066003084,
-0.006418880540877581,
-0.06064697727560997,
0.004423846025019884,
-0.01043772604316473,
0.022885121405124664,
-0.09623973816633224,
0.01705857366323471,
0.0012540295720100403,
0.011415818706154823,
-0.0303860642015934,
0.007476563099771738,
-0.01674717105925083,
0.019630512222647667,
0.012418254278600216,
0.055141039192676544,
-0.07692132145166397,
-0.020422691479325294,
-0.005275493487715721,
-0.12679795920848846,
0.0035470749717205763,
-0.017549442127346992,
0.014445860870182514,
0.0516158863902092,
0.044571880251169205,
-0.0028033440466970205,
0.05092352628707886,
0.024975484237074852,
0.05439813807606697,
-0.07171176373958588,
-0.005515536293387413,
-0.01160175446420908,
0.0036897235549986362,
-0.0011093561770394444,
-0.05495217815041542,
0.002210571663454175,
0.009131429716944695,
-0.16826245188713074,
0.06566374003887177,
-0.01571023464202881,
-0.017509890720248222,
-0.07490707188844681,
0.06577932089567184,
-0.1015300452709198,
-0.009044019505381584,
0.004202894866466522,
-0.015215416438877583,
-0.07571183890104294,
0.008604537695646286,
0.01347838994115591,
-0.016731644049286842,
-0.09616199135780334,
-0.01947781629860401,
-0.16294406354427338,
-4.237714807405934e-33,
0.10817765444517136,
-0.03599441424012184,
-0.07946067303419113,
0.0448281466960907,
-0.0037469558883458376,
0.022251691669225693,
0.036964986473321915,
0.02294725365936756,
-0.04772781953215599,
-0.06355846673250198,
-0.06098843365907669,
0.022879475727677345,
0.04738970473408699,
0.0818488597869873,
-0.0608043447136879,
0.025713635608553886,
-0.07782819122076035,
-0.06658393889665604,
0.009265969507396221,
0.033285368233919144,
0.0061861430294811726,
-0.038398705422878265,
0.06842576712369919,
0.013421257957816124,
-0.02792557142674923,
-0.03551910072565079,
0.007832528091967106,
-0.04732746258378029,
-0.014749941416084766,
-0.05076632276177406,
0.02470521070063114,
-0.041960377246141434,
0.011411050334572792,
-0.022780608385801315,
-0.02380054071545601,
-0.03821498900651932,
-0.03732594847679138,
-0.0386849083006382,
-0.002102300524711609,
-0.037844039499759674,
0.061210788786411285,
-0.0033580258022993803,
-0.028381608426570892,
-0.061519771814346313,
-0.05673028528690338,
0.04103654995560646,
-0.08978237956762314,
-0.01235424354672432,
0.009216968901455402,
-0.09664057940244675,
0.03131001070141792,
-0.015845099464058876,
-0.06905819475650787,
0.03020007349550724,
-0.039967410266399384,
-0.0028529444243758917,
-0.021993614733219147,
0.040286675095558167,
-0.08579045534133911,
0.015029816888272762,
0.11701441556215286,
-0.08185790479183197,
0.01000022329390049,
0.0365162119269371,
-0.04213566333055496,
-0.030220532789826393,
-0.030165325850248337,
0.010820114985108376,
-0.029306547716259956,
-0.008832497522234917,
0.005960053764283657,
-0.0331374928355217,
0.03185892850160599,
0.02421204186975956,
-0.053155429661273956,
-0.009258740581572056,
0.05259624496102333,
-0.11296958476305008,
0.06660255789756775,
-0.014101195149123669,
-0.05125933885574341,
0.09331264346837997,
0.0040637413039803505,
0.036106422543525696,
-0.02518809214234352,
0.02301875501871109,
0.04840012267231941,
0.1106199324131012,
0.012732580304145813,
0.06071290746331215,
0.02583906799554825,
0.025448381900787354,
-0.04814897105097771,
0.15433186292648315,
-0.03446146100759506,
-5.1588450844519684e-8,
0.07081539928913116,
0.09891264885663986,
0.05693553760647774,
0.0402139388024807,
-0.018968135118484497,
-0.020012225955724716,
0.09502774477005005,
0.034153155982494354,
0.015618078410625458,
0.04581676051020622,
-0.036732591688632965,
0.010902564972639084,
-0.10492980480194092,
0.01751304790377617,
0.055862776935100555,
0.0733780488371849,
-0.02233048528432846,
0.018054863438010216,
0.00914700049906969,
-0.09264633059501648,
-0.018111523240804672,
-0.007984130643308163,
-0.011465020477771759,
0.019319549202919006,
-0.007203215733170509,
0.048617660999298096,
0.08957227319478989,
0.022037165239453316,
0.008029677905142307,
0.002243229653686285,
-0.04066327586770058,
0.01769319921731949,
-0.07420464605093002,
0.06003708019852638,
-0.008530518040060997,
0.04348636791110039,
-0.12646721303462982,
0.009108956903219223,
0.0417281910777092,
0.036349739879369736,
-0.0357813686132431,
-0.06381868571043015,
-0.03153824061155319,
-0.03394079953432083,
0.007938411086797714,
0.08287956565618515,
-0.014600809663534164,
0.060634635388851166,
-0.022762954235076904,
0.04843832552433014,
-0.015149775892496109,
0.020210355520248413,
-0.01665855571627617,
0.08593801409006119,
-0.010917815379798412,
0.021920286118984222,
-0.00004261849608155899,
-0.048909202218055725,
0.038879141211509705,
0.008504237048327923,
-0.005678611807525158,
0.0203828364610672,
0.043539661914110184,
0.028104694560170174
] | 0.219858
|
created and managed as a group by a workload resource and its {{< glossary\_tooltip text="controller" term\_id="controller" >}}. See [Pods and controllers](#pods-and-controllers) for more information on how Kubernetes uses workload resources, and their controllers, to implement application scaling and auto-healing. Pods natively provide two kinds of shared resources for their constituent containers: [networking](#pod-networking) and [storage](#pod-storage). ## Working with Pods You'll rarely create individual Pods directly in Kubernetes—even singleton Pods. This is because Pods are designed as relatively ephemeral, disposable entities. When a Pod gets created (directly by you, or indirectly by a {{< glossary\_tooltip text="controller" term\_id="controller" >}}), the new Pod is scheduled to run on a {{< glossary\_tooltip term\_id="node" >}} in your cluster. The Pod remains on that node until the Pod finishes execution, the Pod object is deleted, the Pod is \*evicted\* for lack of resources, or the node fails. {{< note >}} Restarting a container in a Pod should not be confused with restarting a Pod. A Pod is not a process, but an environment for running container(s). A Pod persists until it is deleted. {{< /note >}} The name of a Pod must be a valid [DNS subdomain](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names) value, but this can produce unexpected results for the Pod hostname. For best compatibility, the name should follow the more restrictive rules for a [DNS label](/docs/concepts/overview/working-with-objects/names#dns-label-names). ### Pod OS {{< feature-state state="stable" for\_k8s\_version="v1.25" >}} You should set the `.spec.os.name` field to either `windows` or `linux` to indicate the OS on which you want the pod to run. These two are the only operating systems supported for now by Kubernetes. In the future, this list may be expanded. In Kubernetes v{{< skew currentVersion >}}, the value of `.spec.os.name` does not affect how the {{< glossary\_tooltip text="kube-scheduler" term\_id="kube-scheduler" >}} picks a node for the Pod to run on. In any cluster where there is more than one operating system for running nodes, you should set the [kubernetes.io/os](/docs/reference/labels-annotations-taints/#kubernetes-io-os) label correctly on each node, and define pods with a `nodeSelector` based on the operating system label. The kube-scheduler assigns your pod to a node based on other criteria and may or may not succeed in picking a suitable node placement where the node OS is right for the containers in that Pod. The [Pod security standards](/docs/concepts/security/pod-security-standards/) also use this field to avoid enforcing policies that aren't relevant to the operating system. ### Pods and controllers You can use workload resources to create and manage multiple Pods for you. A controller for the resource handles replication and rollout and automatic healing in case of Pod failure. For example, if a Node fails, a controller notices that Pods on that Node have stopped working and creates a replacement Pod. The scheduler places the replacement Pod onto a healthy Node. Here are some examples of workload resources that manage one or more Pods: \* {{< glossary\_tooltip text="Deployment" term\_id="deployment" >}} \* {{< glossary\_tooltip text="StatefulSet" term\_id="statefulset" >}} \* {{< glossary\_tooltip text="DaemonSet" term\_id="daemonset" >}} ### Specifying a Workload reference {{< feature-state feature\_gate\_name="GenericWorkload" >}} By default, Kubernetes schedules every Pod individually. However, some tightly-coupled applications need a group of Pods to be scheduled simultaneously to function correctly. You can link a Pod to a [Workload](/docs/concepts/workloads/workload-api/) object using a [Workload reference](/docs/concepts/workloads/pods/workload-reference/). This tells the `kube-scheduler` that the Pod is part of a specific group, enabling it to make coordinated placement decisions for the entire group at once. ### Pod templates Controllers for {{< glossary\_tooltip text="workload" term\_id="workload" >}} resources create Pods from a \_pod template\_ and manage those Pods on your behalf. PodTemplates are specifications for creating Pods, and are included in workload resources such as [Deployments](/docs/concepts/workloads/controllers/deployment/), [Jobs](/docs/concepts/workloads/controllers/job/), and [DaemonSets](/docs/concepts/workloads/controllers/daemonset/). Each controller for
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/_index.md
|
[
-0.03521762788295746,
-0.05741447955369949,
0.045955296605825424,
0.07475052773952484,
-0.011724154464900494,
-0.0299094058573246,
0.05869073048233986,
-0.054497551172971725,
0.11071460694074631,
0.06919912993907928,
0.03134880214929581,
-0.031767357140779495,
0.010925856418907642,
-0.03806433081626892,
0.02145937643945217,
0.03244476020336151,
0.028090333566069603,
-0.05611097440123558,
-0.059785228222608566,
-0.02042999491095543,
0.06098158657550812,
0.03381581977009773,
-0.012231511995196342,
0.028415611013770103,
-0.032255444675683975,
0.026540808379650116,
-0.10183321684598923,
-0.04888266324996948,
0.09530828893184662,
0.013643650338053703,
-0.0779852643609047,
0.008400147780776024,
-0.0348135270178318,
0.06515911221504211,
0.039198704063892365,
0.09033014625310898,
-0.004988077562302351,
-0.01446564868092537,
-0.07141205668449402,
-0.0125730624422431,
0.053316690027713776,
-0.023626793175935745,
-0.12620355188846588,
-0.013440978713333607,
0.0007310219807550311,
0.052666399627923965,
-0.03517654910683632,
-0.04126853868365288,
-0.011527868919074535,
-0.03456707298755646,
0.03607736527919769,
-0.09226924180984497,
0.06532929092645645,
0.04644632712006569,
0.07431637495756149,
0.029733024537563324,
-0.01509631983935833,
0.0033962433226406574,
0.05862318351864815,
0.014680211432278156,
0.008939947932958603,
-0.000003980701876571402,
-0.009183707647025585,
-0.018800068646669388,
0.08201687037944794,
-0.04252389073371887,
0.03411734849214554,
0.02619411237537861,
0.031285934150218964,
-0.03990381211042404,
0.07049981504678726,
-0.023333625867962837,
0.03894132375717163,
0.0026754073332995176,
0.00717297475785017,
0.024431245401501656,
-0.028834737837314606,
0.054046086966991425,
-0.006525607313960791,
-0.03542046993970871,
0.031509578227996826,
0.09843388944864273,
0.10822968930006027,
0.028960607945919037,
-0.06172465905547142,
-0.04107379540801048,
0.005020678974688053,
-0.045930009335279465,
0.0513736754655838,
-0.003589391242712736,
-0.005389162339270115,
-0.03229851275682449,
0.06987480819225311,
-0.11376562714576721,
0.059626758098602295,
-0.048067815601825714,
0.016737496480345726,
-0.03183364123106003,
0.006915829610079527,
0.003312469460070133,
0.01565670035779476,
0.007837949320673943,
-0.00016105502436403185,
-0.022974051535129547,
0.013544571585953236,
-0.008853990584611893,
-0.1149529293179512,
-0.009159855544567108,
0.04364228621125221,
0.07112839072942734,
-0.012938980013132095,
0.04938589781522751,
-0.05404859781265259,
0.06954576075077057,
-0.019994717091321945,
-0.03853559121489525,
-0.03341551497578621,
-0.029139364138245583,
0.04593690484762192,
0.10290703177452087,
0.007714465260505676,
-0.12194095551967621,
0.0015680491924285889,
-0.011331760324537754,
-0.04878122732043266,
0.05533342435956001,
-0.042005717754364014,
1.0822434859975093e-33,
0.0450051873922348,
-0.09753493964672089,
-0.05504947155714035,
-0.012617520987987518,
0.008791733533143997,
-0.06237073615193367,
-0.04579140245914459,
0.0322711318731308,
-0.07700880616903305,
-0.03129259869456291,
-0.05510217696428299,
0.11466173827648163,
-0.007013347931206226,
0.00009351314656669274,
0.03874089941382408,
-0.0228177011013031,
-0.053055863827466965,
0.06046457588672638,
0.07564061135053635,
-0.030640555545687675,
0.03112667053937912,
0.019928963854908943,
-0.02953181602060795,
-0.031168119981884956,
0.030489899218082428,
-0.007152429316192865,
0.003326862584799528,
-0.12637312710285187,
0.00404277304187417,
0.035387225449085236,
-0.049062516540288925,
-0.001944083720445633,
0.022408315911889076,
0.021150648593902588,
-0.13495202362537384,
0.0019843503832817078,
-0.009338963776826859,
-0.044446054846048355,
-0.024954447522759438,
-0.04666665941476822,
0.01993889920413494,
-0.013424849137663841,
-0.0005509306211024523,
-0.10686906427145004,
0.003050965489819646,
0.002264871262013912,
0.04331571236252785,
-0.06097982078790665,
0.014491831883788109,
-0.011991670355200768,
-0.004986441694200039,
-0.03524234518408775,
0.03223125636577606,
-0.000793315761256963,
0.03312848508358002,
0.025716254487633705,
0.07044591009616852,
-0.0795421451330185,
0.002095251576974988,
0.008852910250425339,
-0.07311353087425232,
0.02129947952926159,
-0.03903188183903694,
0.020179498940706253,
0.04906535893678665,
0.04940786957740784,
-0.0027288913261145353,
0.06738290190696716,
0.04151400551199913,
-0.011429212987422943,
-0.03944125026464462,
0.03147587180137634,
-0.007580848410725594,
0.02888825535774231,
0.020193001255393028,
-0.08535106480121613,
0.004996894858777523,
0.019938813522458076,
-0.159647598862648,
0.04873338341712952,
0.006279976572841406,
-0.048457127064466476,
-0.05586353689432144,
0.10211898386478424,
-0.016628947108983994,
-0.03670600801706314,
0.010298624634742737,
-0.047126613557338715,
-0.08936498314142227,
0.04782311990857124,
0.0045298063196241856,
-0.03734351694583893,
-0.06615720689296722,
0.0012578315800055861,
-0.12561549246311188,
-3.933759886274122e-33,
0.1043005958199501,
-0.030082842335104942,
-0.04991061985492706,
0.02604583278298378,
0.023238984867930412,
-0.011598225682973862,
-0.039413679391145706,
0.052548717707395554,
-0.047860581427812576,
-0.05956124886870384,
-0.0639929324388504,
0.012225983664393425,
0.021305106580257416,
0.1034436821937561,
-0.05014713481068611,
0.0027071600779891014,
-0.10674183815717697,
-0.04489094763994217,
-0.024039098992943764,
0.017102088779211044,
-0.006788583472371101,
-0.019537245854735374,
0.07463386654853821,
0.04549368470907211,
0.0008141003781929612,
-0.04604547098278999,
0.017572922632098198,
-0.00007380903116427362,
-0.003295419504866004,
-0.030748268589377403,
0.00672906544059515,
-0.07622634619474411,
-0.014034084975719452,
-0.04055887833237648,
0.04080948606133461,
-0.03166070207953453,
-0.04861956089735031,
-0.009206500835716724,
-0.008477558381855488,
-0.011963240802288055,
0.07395756989717484,
-0.01702955737709999,
-0.059480879455804825,
-0.06001183018088341,
0.014684299938380718,
-0.012095354497432709,
-0.016492627561092377,
-0.010341404005885124,
-0.004867522045969963,
-0.06391327828168869,
0.07695608586072922,
-0.04379630461335182,
-0.04629926383495331,
0.003946620039641857,
-0.0741577073931694,
0.021031750366091728,
0.0934470146894455,
-0.0034370729699730873,
-0.08376254886388779,
0.0053057619370520115,
0.05673268064856529,
-0.0941600427031517,
-0.008906617760658264,
0.05205593630671501,
-0.010534766130149364,
-0.049484919756650925,
0.03885330259799957,
0.025595534592866898,
-0.005084437783807516,
-0.028582053259015083,
-0.031070010736584663,
-0.00211455300450325,
0.06194326654076576,
0.007861857302486897,
-0.011892287991940975,
0.006252980791032314,
0.04431183636188507,
-0.1090918630361557,
0.07107727974653244,
-0.04177626594901085,
-0.042557649314403534,
0.07046959549188614,
0.006690028123557568,
0.03582681342959404,
0.016290506348013878,
0.02569873258471489,
0.06699858605861664,
0.13748455047607422,
0.011798820458352566,
0.08500485122203827,
0.005095501895993948,
-0.0012332830810919404,
-0.02861805260181427,
0.14058350026607513,
-0.0730113759636879,
-5.1833005443313596e-8,
0.035990629345178604,
0.16379781067371368,
0.005890879314392805,
0.09803949296474457,
0.0005615678965114057,
-0.03969244658946991,
0.0681866928935051,
0.022889280691742897,
-0.039187584072351456,
0.042538758367300034,
0.008761602453887463,
0.045402344316244125,
-0.10283619910478592,
0.03850685805082321,
0.038584157824516296,
0.01527344435453415,
-0.03569379076361656,
-0.011032984592020512,
-0.0074089826084673405,
-0.11220929026603699,
-0.049203768372535706,
-0.03441357985138893,
-0.009279880672693253,
0.02656329609453678,
-0.022233933210372925,
0.01632503978908062,
0.046889401972293854,
0.029307980090379715,
-0.018331492319703102,
-0.01919599249958992,
-0.0350593738257885,
0.020944667980074883,
-0.10578243434429169,
0.13474948704242706,
-0.033083923161029816,
0.0008511330233886838,
-0.13678506016731262,
0.032151300460100174,
0.07557085156440735,
0.02232547476887703,
-0.021375417709350586,
0.01296964567154646,
-0.05310145765542984,
-0.003072076477110386,
0.018748069182038307,
0.10840734839439392,
-0.04270009323954582,
0.05900418013334274,
-0.01538288313895464,
0.018199384212493896,
-0.04264485090970993,
-0.012214967049658298,
-0.01976109854876995,
0.09780906140804291,
-0.007338001858443022,
-0.03791952505707741,
0.005248310975730419,
-0.02114246040582657,
0.0871707946062088,
-0.018367396667599678,
0.0037676652427762747,
-0.01751713827252388,
0.011165308766067028,
0.02303515002131462
] | 0.156347
|
the entire group at once. ### Pod templates Controllers for {{< glossary\_tooltip text="workload" term\_id="workload" >}} resources create Pods from a \_pod template\_ and manage those Pods on your behalf. PodTemplates are specifications for creating Pods, and are included in workload resources such as [Deployments](/docs/concepts/workloads/controllers/deployment/), [Jobs](/docs/concepts/workloads/controllers/job/), and [DaemonSets](/docs/concepts/workloads/controllers/daemonset/). Each controller for a workload resource uses the `PodTemplate` inside the workload object to make actual Pods. The `PodTemplate` is part of the desired state of whatever workload resource you used to run your app. When you create a Pod, you can include [environment variables](/docs/tasks/inject-data-application/define-environment-variable-container/) in the Pod template for the containers that run in the Pod. The sample below is a manifest for a simple Job with a `template` that starts one container. The container in that Pod prints a message then pauses. ```yaml apiVersion: batch/v1 kind: Job metadata: name: hello spec: template: # This is the pod template spec: containers: - name: hello image: busybox:1.28 command: ['sh', '-c', 'echo "Hello, Kubernetes!" && sleep 3600'] restartPolicy: OnFailure # The pod template ends here ``` Modifying the pod template or switching to a new pod template has no direct effect on the Pods that already exist. If you change the pod template for a workload resource, that resource needs to create replacement Pods that use the updated template. For example, the StatefulSet controller ensures that the running Pods match the current pod template for each StatefulSet object. If you edit the StatefulSet to change its pod template, the StatefulSet starts to create new Pods based on the updated template. Eventually, all of the old Pods are replaced with new Pods, and the update is complete. Each workload resource implements its own rules for handling changes to the Pod template. If you want to read more about StatefulSet specifically, read [Update strategy](/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets) in the StatefulSet Basics tutorial. On Nodes, the {{< glossary\_tooltip term\_id="kubelet" text="kubelet" >}} does not directly observe or manage any of the details around pod templates and updates; those details are abstracted away. That abstraction and separation of concerns simplifies system semantics, and makes it feasible to extend the cluster's behavior without changing existing code. ## Pod update and replacement As mentioned in the previous section, when the Pod template for a workload resource is changed, the controller creates new Pods based on the updated template instead of updating or patching the existing Pods. Kubernetes doesn't prevent you from managing Pods directly. It is possible to update some fields of a running Pod, in place. However, Pod update operations like [`patch`](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#patch-pod-v1-core), and [`replace`](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#replace-pod-v1-core) have some limitations: - Most of the metadata about a Pod is immutable. For example, you cannot change the `namespace`, `name`, `uid`, or `creationTimestamp` fields. - If the `metadata.deletionTimestamp` is set, no new entry can be added to the `metadata.finalizers` list. - Pod updates may not change fields other than `spec.containers[\*].image`, `spec.initContainers[\*].image`, `spec.activeDeadlineSeconds`, `spec.terminationGracePeriodSeconds`, `spec.tolerations` or `spec.schedulingGates`. For `spec.tolerations`, you can only add new entries. - When updating the `spec.activeDeadlineSeconds` field, two types of updates are allowed: 1. setting the unassigned field to a positive number; 1. updating the field from a positive number to a smaller, non-negative number. ### Pod subresources The above update rules apply to regular pod updates, but other pod fields can be updated through \_subresources\_. - \*\*Resize:\*\* The `resize` subresource allows container resources (`spec.containers[\*].resources`) to be updated. See [Resize Container Resources](/docs/tasks/configure-pod-container/resize-container-resources/) for more details. - \*\*Ephemeral Containers:\*\* The `ephemeralContainers` subresource allows {{< glossary\_tooltip text="ephemeral containers" term\_id="ephemeral-container" >}} to be added to a Pod. See [Ephemeral Containers](/docs/concepts/workloads/pods/ephemeral-containers/) for more details. - \*\*Status:\*\* The `status` subresource allows the pod status
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/_index.md
|
[
-0.030911317095160484,
-0.013948324136435986,
0.022410200908780098,
0.03476780280470848,
-0.020320171490311623,
-0.017784923315048218,
0.04824550449848175,
-0.022065700963139534,
0.0402333103120327,
0.02458951808512211,
0.010965665802359581,
-0.05825674161314964,
-0.048566315323114395,
-0.04291275888681412,
0.0222612451761961,
-0.02028607204556465,
0.028841644525527954,
0.0029723746702075005,
-0.01612287387251854,
-0.018857372924685478,
0.10494477301836014,
0.04816537722945213,
0.042379312217235565,
0.03635966032743454,
-0.040318563580513,
0.056416310369968414,
-0.09018153697252274,
-0.019579757004976273,
0.07658976316452026,
0.01049739308655262,
-0.027039719745516777,
0.03792818635702133,
-0.018794870004057884,
0.06422292441129684,
0.061059627681970596,
0.08846898376941681,
0.03425537794828415,
-0.04364394024014473,
-0.05750023201107979,
-0.0015877233818173409,
0.0450880192220211,
0.013500459492206573,
-0.09976931661367416,
0.03122652694582939,
-0.040427446365356445,
0.02751455083489418,
-0.012041469104588032,
-0.02617509663105011,
0.004696630872786045,
0.012045208364725113,
0.053688932210206985,
-0.12707450985908508,
0.05776974931359291,
0.02098642662167549,
0.09371485561132431,
-0.0041016340255737305,
0.011887829750776291,
0.012249222956597805,
0.10524274408817291,
0.006316365208476782,
-0.019347382709383965,
0.00442832987755537,
-0.008834490552544594,
-0.006039876025170088,
0.12511685490608215,
-0.04169800505042076,
0.006856987252831459,
0.06357403844594955,
0.012499946169555187,
-0.07433558255434036,
0.04242407903075218,
-0.01459390576928854,
0.044888950884342194,
-0.05480586737394333,
-0.04513394460082054,
0.024811290204524994,
-0.0131226172670722,
0.028444945812225342,
-0.029514217749238014,
-0.13109233975410461,
0.052711717784404755,
0.09074205905199051,
0.05658341199159622,
0.019651707261800766,
-0.019927777349948883,
-0.044772736728191376,
0.017214404419064522,
-0.005029961466789246,
0.061001721769571304,
0.017173921689391136,
0.02717781625688076,
-0.06472097337245941,
0.06015446037054062,
-0.12341862171888351,
0.013453002087771893,
-0.005389098078012466,
0.0358409658074379,
0.00551809323951602,
0.0035060185473412275,
-0.0021723490208387375,
0.0006794244982302189,
-0.051126059144735336,
0.051675837486982346,
-0.010052819736301899,
0.0030584249179810286,
-0.02050037495791912,
-0.11756197363138199,
-0.015494047664105892,
-0.020270435139536858,
0.056414637714624405,
-0.01386504340916872,
0.057899653911590576,
-0.05853595212101936,
0.05255655571818352,
-0.0008497177041135728,
-0.10371236503124237,
-0.046087127178907394,
0.0006466280901804566,
0.0031776749528944492,
0.11394539475440979,
0.008171888999640942,
-0.10070949047803879,
0.05935836583375931,
0.006587627809494734,
-0.026226261630654335,
0.00621936097741127,
-0.04925403743982315,
7.131988712667753e-34,
0.06483440101146698,
-0.07705633342266083,
-0.05540189519524574,
0.06345761567354202,
0.005488134454935789,
-0.036548204720020294,
-0.016232287511229515,
0.09937143325805664,
-0.019910577684640884,
0.03940654918551445,
-0.03501513972878456,
0.11944898962974548,
-0.04731370136141777,
0.03165131062269211,
-0.020185347646474838,
-0.029709145426750183,
-0.09776721894741058,
0.07237450033426285,
0.05665351450443268,
-0.00819439347833395,
-0.007579738274216652,
0.01873808167874813,
-0.07002495229244232,
0.00046899530570954084,
0.06671306490898132,
0.024953335523605347,
0.0039541395381093025,
-0.11192625015974045,
-0.022371739149093628,
0.038996074348688126,
0.024452781304717064,
-0.007204539608210325,
0.006786911748349667,
0.03725200518965721,
-0.11467602103948593,
-0.024599041789770126,
0.025757813826203346,
-0.02383921667933464,
-0.014943909831345081,
-0.02078862674534321,
0.024021049961447716,
-0.020968122407794,
-0.01449115201830864,
-0.06007122993469238,
-0.006660631392151117,
0.010048880241811275,
0.01766839437186718,
-0.08959414809942245,
0.04782406613230705,
0.005308604799211025,
-0.0035556014627218246,
-0.04770878702402115,
0.04056936874985695,
-0.04594029113650322,
0.05738045647740364,
-0.03774579241871834,
-0.016233909875154495,
-0.04724123701453209,
0.02622799016535282,
-0.01850520446896553,
-0.06752929091453552,
0.02063128724694252,
-0.049685098230838776,
0.0031800612341612577,
0.049360308796167374,
0.0699467733502388,
0.011325810104608536,
0.041423190385103226,
0.07951809465885162,
0.03863658010959625,
-0.06818599998950958,
0.008846224285662174,
0.013901403173804283,
0.044387105852365494,
0.01942506432533264,
-0.05106835439801216,
0.025121290236711502,
0.023948702961206436,
-0.19888629019260406,
0.020601458847522736,
-0.050502337515354156,
-0.004240703769028187,
-0.0618680939078331,
0.06101066619157791,
0.023214086890220642,
-0.002542935311794281,
0.03887888416647911,
-0.04797586053609848,
-0.09371039271354675,
0.0042802621610462666,
-0.01483063492923975,
-0.03270895779132843,
-0.07772835344076157,
-0.02219589427113533,
-0.10309992730617523,
-3.5042500461889975e-33,
0.10105397552251816,
-0.008275735192000866,
-0.010582388378679752,
-0.0074365949258208275,
0.023719465360045433,
-0.01279238797724247,
0.0064980024471879005,
0.04535277560353279,
-0.01831073872745037,
0.010663631372153759,
-0.0630868598818779,
-0.00014742984785698354,
0.021996043622493744,
0.06602097302675247,
-0.09652173519134521,
-0.0073784771375358105,
-0.1277410387992859,
-0.03954627737402916,
0.004217259120196104,
0.009165285155177116,
-0.05022495239973068,
-0.012945650145411491,
0.1005132794380188,
0.06598232686519623,
0.0308553334325552,
-0.010814820416271687,
-0.006451135966926813,
-0.04510874301195145,
0.026524120941758156,
-0.018560342490673065,
0.01566222310066223,
-0.061284154653549194,
-0.020128158852458,
-0.03332538157701492,
-0.043304260820150375,
-0.017410170286893845,
-0.08170148730278015,
0.059103015810251236,
-0.0231399517506361,
0.04556776583194733,
0.08050329983234406,
-0.029786644503474236,
-0.06111996993422508,
-0.04422594979405403,
-0.050373222678899765,
-0.016489308327436447,
0.0031713510397821665,
-0.017557190731167793,
-0.040938977152109146,
-0.08052468299865723,
0.08183179795742035,
-0.02945745922625065,
-0.10058610141277313,
0.038169365376234055,
-0.02516883984208107,
-0.025246504694223404,
0.08749669045209885,
-0.0884334072470665,
-0.08270818740129471,
0.036859579384326935,
0.07617536932229996,
-0.0678718239068985,
0.01481606811285019,
0.0026843962259590626,
-0.0455055758357048,
-0.08571433275938034,
0.032849397510290146,
-0.016565177589654922,
0.003112490987405181,
0.005441964603960514,
-0.021470965817570686,
-0.07223867624998093,
0.04885232076048851,
-0.011069873347878456,
0.000530166900716722,
-0.00681527191773057,
0.02706937864422798,
-0.10237391293048859,
0.057788509875535965,
-0.046302180737257004,
-0.046518631279468536,
0.06267749518156052,
0.010389887727797031,
0.057509128004312515,
0.01500206720083952,
0.05684022977948189,
0.052637044340372086,
0.13512499630451202,
0.04166636988520622,
0.07985814660787582,
-0.017262350767850876,
0.03299381211400032,
0.01641041226685047,
0.12883667647838593,
-0.035613805055618286,
-4.410329879078745e-8,
0.05724736303091049,
0.14476265013217926,
0.04809361323714256,
0.02720075659453869,
-0.03680519387125969,
-0.041703417897224426,
0.02109457179903984,
0.06697403639554977,
-0.0190013088285923,
0.018340544775128365,
0.014105317182838917,
0.02697940543293953,
-0.06524862349033356,
0.05857519432902336,
0.029458636417984962,
0.0462702177464962,
-0.026116957888007164,
0.021381378173828125,
-0.04127349704504013,
-0.10609220713376999,
-0.009833157993853092,
-0.0023636005353182554,
-0.013313863426446915,
-0.039945926517248154,
-0.019340066239237785,
0.05631713196635246,
0.001751784817315638,
-0.010117698460817337,
-0.022495070472359657,
-0.025195326656103134,
0.005441747140139341,
0.005962545517832041,
-0.12090401351451874,
0.08964988589286804,
-0.024466050788760185,
-0.015189072117209435,
-0.13473644852638245,
0.002844623988494277,
0.08822189271450043,
0.025352105498313904,
-0.023405853658914566,
-0.04179723188281059,
-0.04408134147524834,
0.01679217629134655,
-0.014232132583856583,
0.07142657786607742,
-0.045309264212846756,
0.05603981763124466,
-0.045836471021175385,
0.039631813764572144,
-0.04991802200675011,
-0.027797557413578033,
-0.038514118641614914,
0.08476003259420395,
-0.0173689816147089,
-0.03313760086894035,
0.013965155929327011,
-0.021333450451493263,
0.0555819608271122,
-0.034057870507240295,
-0.006061754189431667,
-0.007743513211607933,
0.0011376929469406605,
-0.001477581448853016
] | 0.115432
|
`resize` subresource allows container resources (`spec.containers[\*].resources`) to be updated. See [Resize Container Resources](/docs/tasks/configure-pod-container/resize-container-resources/) for more details. - \*\*Ephemeral Containers:\*\* The `ephemeralContainers` subresource allows {{< glossary\_tooltip text="ephemeral containers" term\_id="ephemeral-container" >}} to be added to a Pod. See [Ephemeral Containers](/docs/concepts/workloads/pods/ephemeral-containers/) for more details. - \*\*Status:\*\* The `status` subresource allows the pod status to be updated. This is typically only used by the Kubelet and other system controllers. - \*\*Binding:\*\* The `binding` subresource allows setting the pod's `spec.nodeName` via a `Binding` request. This is typically only used by the {{< glossary\_tooltip text="scheduler" term\_id="kube-scheduler" >}}. ### Pod generation - The `metadata.generation` field is unique. It will be automatically set by the system such that new pods have a `metadata.generation` of 1, and every update to mutable fields in the pod's spec will increment the `metadata.generation` by 1. {{< feature-state feature\_gate\_name="PodObservedGenerationTracking" >}} - `observedGeneration` is a field that is captured in the `status` section of the Pod object. The Kubelet will set `status.observedGeneration` to track the pod state to the current pod status. The pod's `status.observedGeneration` will reflect the `metadata.generation` of the pod at the point that the pod status is being reported. {{< note >}} The `status.observedGeneration` field is managed by the kubelet and external controllers should \*\*not\*\* modify this field. {{< /note >}} Different status fields may either be associated with the `metadata.generation` of the current sync loop, or with the `metadata.generation` of the previous sync loop. The key distinction is whether a change in the `spec` is reflected directly in the `status` or is an indirect result of a running process. #### Direct Status Updates For status fields where the allocated spec is directly reflected, the `observedGeneration` will be associated with the current `metadata.generation` (Generation N). This behavior applies to: - \*\*Resize Status\*\*: The status of a resource resize operation. - \*\*Allocated Resources\*\*: The resources allocated to the Pod after a resize. - \*\*Ephemeral Containers\*\*: When a new ephemeral container is added, and it is in `Waiting` state. #### Indirect Status Updates For status fields that are an indirect result of running the spec, the `observedGeneration` will be associated with the `metadata.generation` of the previous sync loop (Generation N-1). This behavior applies to: - \*\*Container Image\*\*: The `ContainerStatus.ImageID` reflects the image from the previous generation until the new image is pulled and the container is updated. - \*\*Actual Resources\*\*: During an in-progress resize, the actual resources in use still belong to the previous generation's request. - \*\*Container state\*\*: During an in-progress resize, with require restart policy reflects the previous generation's request. - \*\*activeDeadlineSeconds\*\* & \*\*terminationGracePeriodSeconds\*\* & \*\*deletionTimestamp\*\*: The effects of these fields on the Pod's status are a result of the previously observed specification. ## Resource sharing and communication Pods enable data sharing and communication among their constituent containers. ### Storage in Pods {#pod-storage} A Pod can specify a set of shared storage {{< glossary\_tooltip text="volumes" term\_id="volume" >}}. All containers in the Pod can access the shared volumes, allowing those containers to share data. Volumes also allow persistent data in a Pod to survive in case one of the containers within needs to be restarted. See [Storage](/docs/concepts/storage/) for more information on how Kubernetes implements shared storage and makes it available to Pods. ### Pod networking Each Pod is assigned a unique IP address for each address family. Every container in a Pod shares the network namespace, including the IP address and network ports. Inside a Pod (and \*\*only\*\* then), the containers that belong to the Pod can communicate with one another using `localhost`. When containers in a Pod communicate with entities \*outside the Pod\*, they must coordinate how they use the shared
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/_index.md
|
[
-0.03921302407979965,
0.028793442994356155,
0.03974538296461105,
0.03229215741157532,
-0.0260907094925642,
-0.019566800445318222,
0.04877166077494621,
0.008076915517449379,
0.0073774284683167934,
0.04205639287829399,
-0.02446821704506874,
-0.03718499839305878,
-0.04530853033065796,
-0.060683175921440125,
-0.006610631011426449,
-0.01735491305589676,
0.055032361298799515,
0.06509701162576675,
-0.0849342942237854,
-0.024960365146398544,
0.08845464140176773,
0.012977722100913525,
0.03935032710433006,
-0.0031325032468885183,
0.02760346606373787,
0.036595188081264496,
-0.08019816130399704,
-0.008827928453683853,
0.07788270711898804,
-0.03938388079404831,
-0.021048568189144135,
0.06311158835887909,
0.009993627667427063,
0.06416895985603333,
0.10663791000843048,
0.0807834342122078,
0.0023681919556111097,
-0.03141958266496658,
-0.06299732625484467,
-0.019605908542871475,
0.02327471412718296,
-0.009580645710229874,
-0.11056028306484222,
0.023609744384884834,
-0.03459935262799263,
-0.015447530895471573,
-0.018873436376452446,
-0.04956892505288124,
-0.03240960091352463,
-0.04006489738821983,
0.054271019995212555,
-0.13650862872600555,
0.02102230116724968,
0.051510248333215714,
0.08193907141685486,
0.03332480043172836,
-0.012755329720675945,
0.03509194031357765,
0.0883878841996193,
0.027625957503914833,
0.03519050031900406,
0.007128887344151735,
0.01960093528032303,
-0.014343313872814178,
0.04898340255022049,
-0.01362799946218729,
0.02349405735731125,
0.00026667671045288444,
-0.04531671106815338,
-0.03428896516561508,
0.023815860971808434,
0.004692667163908482,
0.04017435386776924,
0.009184901602566242,
0.03425370901823044,
-0.019573764875531197,
-0.03342927619814873,
0.0544154979288578,
0.0009364974102936685,
-0.04742782935500145,
0.04812274128198624,
0.1153886467218399,
0.0934823527932167,
0.029728086665272713,
-0.029622314497828484,
0.004497516434639692,
0.012558244168758392,
-0.039835087954998016,
0.006842635106295347,
-0.05238152667880058,
0.03573763743042946,
-0.0934877097606659,
0.010323656722903252,
-0.04250878840684891,
-0.032703883945941925,
-0.03475114330649376,
-0.05068957433104515,
-0.04190385341644287,
0.02133651077747345,
0.0014696255093440413,
0.06913132220506668,
0.040019456297159195,
0.03667857497930527,
0.005834488198161125,
0.022795308381319046,
-0.031073492020368576,
-0.09476538002490997,
0.05201570317149162,
0.0021548932418227196,
0.06440844386816025,
0.0162211786955595,
0.01377200148999691,
-0.06351941078901291,
0.019626779481768608,
-0.03208312764763832,
-0.0607873797416687,
-0.03028108924627304,
-0.006034804508090019,
0.02343900501728058,
0.030513258650898933,
0.056613121181726456,
-0.024119414389133453,
0.01388645451515913,
-0.010484199970960617,
-0.033841297030448914,
0.061261627823114395,
-0.027247801423072815,
3.492376083877754e-33,
0.02324632927775383,
-0.06477901339530945,
-0.017658621072769165,
0.015886643901467323,
0.007647074293345213,
-0.04735288769006729,
-0.030072523280978203,
0.026935948058962822,
-0.08382103592157364,
-0.04759497568011284,
-0.012648328207433224,
0.11845386773347855,
-0.06908329576253891,
0.02176620252430439,
-0.006292146630585194,
-0.05392736941576004,
-0.04031453654170036,
0.1575833112001419,
0.029812026768922806,
-0.04892180487513542,
-0.017312834039330482,
-0.0126670952886343,
-0.006602257955819368,
-0.009805492125451565,
0.050961337983608246,
-0.04559789597988129,
0.012860093265771866,
-0.0693480521440506,
-0.0401952750980854,
0.010255708359181881,
-0.007991512306034565,
-0.010819585993885994,
0.04921718314290047,
0.025231217965483665,
-0.12207594513893127,
-0.015933245420455933,
-0.01992075704038143,
-0.0056348154321312904,
-0.03929237276315689,
-0.05920244753360748,
0.010886500589549541,
0.010576301254332066,
0.009820104576647282,
-0.07341756671667099,
0.007916377857327461,
-0.04494257643818855,
0.06779304891824722,
-0.09535500407218933,
0.029281258583068848,
-0.02210976369678974,
0.038307201117277145,
-0.006542734801769257,
-0.00812784768640995,
-0.028529925271868706,
-0.004476283211261034,
0.02563338913023472,
0.028978953137993813,
-0.0020142775028944016,
0.030513130128383636,
-0.028480026870965958,
-0.10439368337392807,
0.014933299273252487,
-0.00290873134508729,
0.04579169303178787,
0.0631808266043663,
0.11102308332920074,
-0.0358111672103405,
0.0390879362821579,
-0.028519021347165108,
0.058478452265262604,
-0.0558566190302372,
0.015050633810460567,
0.06474564969539642,
0.09846093505620956,
-0.03742872178554535,
-0.07890414446592331,
-0.00845730397850275,
0.003851864719763398,
-0.18502052128314972,
0.042923636734485626,
-0.002437558490782976,
-0.02793429046869278,
0.012366482056677341,
0.10415276885032654,
0.011237801983952522,
-0.12460058182477951,
0.01964656263589859,
-0.010346642695367336,
0.0029003263916820288,
-0.01333928294479847,
0.002744674915447831,
-0.05006203055381775,
-0.08516698330640793,
-0.05191129446029663,
-0.12244020402431488,
-3.697774619900748e-33,
0.1665932983160019,
-0.014763664454221725,
-0.05404006689786911,
0.036367665976285934,
-0.029949529096484184,
0.003416763385757804,
-0.0065081981010735035,
0.1361294388771057,
-0.02866901457309723,
-0.07854991406202316,
-0.01844111457467079,
-0.003456869861111045,
0.0025686852168291807,
0.031697165220975876,
-0.09744378924369812,
0.035301972180604935,
-0.13099944591522217,
-0.026603316888213158,
-0.02417977713048458,
0.040417980402708054,
-0.018003351986408234,
-0.04831049218773842,
0.058139391243457794,
0.03707700967788696,
0.010549983941018581,
-0.046986065804958344,
0.07988855987787247,
-0.03225928172469139,
-0.032902833074331284,
-0.059993963688611984,
0.028037140145897865,
-0.07402971386909485,
-0.10183875262737274,
0.005602624733000994,
0.014323245733976364,
-0.07906120270490646,
-0.04309255629777908,
0.03668278828263283,
-0.031181713566184044,
0.0564606599509716,
0.02530013397336006,
0.0039432235062122345,
-0.018148573115468025,
-0.11130474507808685,
-0.005816625896841288,
-0.003823352511972189,
0.03807849436998367,
-0.04553794115781784,
-0.0097268745303154,
-0.0981677919626236,
0.06288214772939682,
-0.005177927203476429,
-0.033440545201301575,
0.030629226937890053,
-0.008586913347244263,
0.02653871476650238,
0.016225501894950867,
-0.018453968688845634,
-0.05763471871614456,
-0.041114117950201035,
0.04196717217564583,
-0.08249864727258682,
0.009468590840697289,
-0.03107129968702793,
-0.00461408169940114,
-0.03758292645215988,
-0.040587324649095535,
-0.0210911575704813,
-0.007504204288125038,
-0.02705329842865467,
0.06890008598566055,
-0.04957229271531105,
0.0428306870162487,
0.005761400330811739,
0.01682804338634014,
-0.01924825645983219,
0.0674041360616684,
-0.1036393865942955,
0.12382679432630539,
-0.024072585627436638,
-0.04637964442372322,
0.08811159431934357,
0.01294033508747816,
0.05356407165527344,
0.05315329134464264,
0.09355127066373825,
-0.01186057087033987,
0.158865287899971,
0.03168076276779175,
0.04918143153190613,
-0.02639971300959587,
0.013515468686819077,
0.024328917264938354,
0.10629027336835861,
-0.03412257134914398,
-4.279875298607294e-8,
0.012257184833288193,
0.12176474183797836,
-0.005357760936021805,
0.06521106511354446,
-0.014847424812614918,
-0.03351115807890892,
0.0725739449262619,
0.05884517729282379,
-0.004216999746859074,
0.018623504787683487,
-0.02815183810889721,
0.034858230501413345,
-0.03570234030485153,
0.021209698170423508,
0.02981872484087944,
-0.007795876357704401,
-0.0015538684092462063,
0.04688497632741928,
-0.024031978100538254,
-0.10885710269212723,
-0.04872748255729675,
0.007533142808824778,
0.04959562048316002,
0.03756331652402878,
0.03826882317662239,
0.008475658483803272,
0.0179914478212595,
0.06932257860898972,
-0.017980145290493965,
-0.001908443751744926,
0.004387358669191599,
0.014228659681975842,
-0.05356437712907791,
0.10407210141420364,
0.05779121816158295,
-0.02332829125225544,
-0.14208969473838806,
0.08466988056898117,
0.03568951040506363,
0.05549272149801254,
-0.00947650894522667,
-0.058955442160367966,
-0.004398052580654621,
0.02922976016998291,
0.01977875642478466,
0.04282723739743233,
-0.026198765262961388,
0.09478714317083359,
-0.034124456346035004,
0.003215154865756631,
0.03472111374139786,
-0.041591547429561615,
-0.013067462481558323,
0.02215270698070526,
-0.004357119556516409,
0.038238245993852615,
-0.017611049115657806,
0.013977477326989174,
-0.02059791423380375,
0.001956269145011902,
0.030828585848212242,
0.004776672925800085,
-0.04352715611457825,
0.01777062565088272
] | 0.120168
|
shares the network namespace, including the IP address and network ports. Inside a Pod (and \*\*only\*\* then), the containers that belong to the Pod can communicate with one another using `localhost`. When containers in a Pod communicate with entities \*outside the Pod\*, they must coordinate how they use the shared network resources (such as ports). Within a Pod, containers share an IP address and port space, and can find each other via `localhost`. The containers in a Pod can also communicate with each other using standard inter-process communications like SystemV semaphores or POSIX shared memory. Containers in different Pods have distinct IP addresses and can not communicate by OS-level IPC without special configuration. Containers that want to interact with a container running in a different Pod can use IP networking to communicate. Containers within the Pod see the system hostname as being the same as the configured `name` for the Pod. There's more about this in the [networking](/docs/concepts/cluster-administration/networking/) section. ## Pod security settings {#pod-security} To set security constraints on Pods and containers, you use the `securityContext` field in the Pod specification. This field gives you granular control over what a Pod or individual containers can do. See [Advanced Pod Configuration](/docs/concepts/workloads/pods/advanced-pod-config/) for more details. For basic security configuration, you should meet the Baseline Pod security standard and run containers as non-root. You can set simple security contexts: ```yaml apiVersion: v1 kind: Pod metadata: name: security-context-demo spec: securityContext: runAsUser: 1000 runAsGroup: 3000 fsGroup: 2000 containers: - name: sec-ctx-demo image: busybox command: ["sh", "-c", "sleep 1h"] ``` For advanced security context configuration including capabilities, seccomp profiles, and detailed security options, see the [security concepts](/docs/concepts/security/) section. \* To learn about kernel-level security constraints that you can use, see [Linux kernel security constraints for Pods and containers](/docs/concepts/security/linux-kernel-security-constraints). \* To learn more about the Pod security context, see [Configure a Security Context for a Pod or Container](/docs/tasks/configure-pod-container/security-context/). ## Static Pods \_Static Pods\_ are managed directly by the kubelet daemon on a specific node, without the {{< glossary\_tooltip text="API server" term\_id="kube-apiserver" >}} observing them. Whereas most Pods are managed by the control plane (for example, a {{< glossary\_tooltip text="Deployment" term\_id="deployment" >}}), for static Pods, the kubelet directly supervises each static Pod (and restarts it if it fails). Static Pods are always bound to one {{< glossary\_tooltip term\_id="kubelet" >}} on a specific node. The main use for static Pods is to run a self-hosted control plane: in other words, using the kubelet to supervise the individual [control plane components](/docs/concepts/architecture/#control-plane-components). The kubelet automatically tries to create a {{< glossary\_tooltip text="mirror Pod" term\_id="mirror-pod" >}} on the Kubernetes API server for each static Pod. This means that the Pods running on a node are visible on the API server, but cannot be controlled from there. See the guide [Create static Pods](/docs/tasks/configure-pod-container/static-pod) for more information. {{< note >}} The `spec` of a static Pod cannot refer to other API objects (e.g., {{< glossary\_tooltip text="ServiceAccount" term\_id="service-account" >}}, {{< glossary\_tooltip text="ConfigMap" term\_id="configmap" >}}, {{< glossary\_tooltip text="Secret" term\_id="secret" >}}, etc). {{< /note >}} ## Pods with multiple containers {#how-pods-manage-multiple-containers} Pods are designed to support multiple cooperating processes (as containers) that form a cohesive unit of service. The containers in a Pod are automatically co-located and co-scheduled on the same physical or virtual machine in the cluster. The containers can share resources and dependencies, communicate with one another, and coordinate when and how they are terminated. Pods in a Kubernetes cluster are used in two main ways: \* \*\*Pods that run a single container\*\*. The "one-container-per-Pod" model is the most common Kubernetes use case; in this case, you can think of a Pod as a wrapper
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/_index.md
|
[
0.06649810820817947,
-0.02302348054945469,
0.02423456497490406,
-0.001308131730183959,
-0.003934219479560852,
-0.025928646326065063,
0.004158463329076767,
-0.016358288004994392,
0.07687751203775406,
0.004487057216465473,
-0.0269212294369936,
0.0017768011894077063,
0.005930477753281593,
-0.06908935308456421,
0.028155818581581116,
-0.046389516443014145,
0.07369135320186615,
0.009069821797311306,
-0.0010685613378882408,
0.009712372906506062,
0.009851667098701,
0.008319253101944923,
-0.0014564412413164973,
-0.014376402832567692,
-0.08146446198225021,
0.0778360441327095,
-0.009416352026164532,
0.005690285004675388,
0.012523684650659561,
-0.013408745639026165,
-0.056791938841342926,
0.007499953731894493,
0.07355674356222153,
0.048673078417778015,
0.013428477570414543,
0.03772181645035744,
0.032433077692985535,
-0.0353432223200798,
-0.08187960833311081,
-0.01763025112450123,
-0.001813698559999466,
-0.0693889781832695,
-0.083841972053051,
0.009595819748938084,
-0.06672501564025879,
-0.021364234387874603,
-0.026737885549664497,
-0.03514646366238594,
-0.02332661859691143,
-0.01202880684286356,
-0.051575545221567154,
-0.03472379222512245,
0.05581837520003319,
0.07451023906469345,
0.036015383899211884,
0.0469210259616375,
-0.006858516950160265,
0.06990564614534378,
0.07087407261133194,
0.035445090383291245,
-0.017498057335615158,
-0.0167411919683218,
0.020861448720097542,
-0.018894007429480553,
0.05431592836976051,
-0.1064019575715065,
0.012297771871089935,
0.08272025734186172,
0.018777640536427498,
-0.039454296231269836,
0.09860945492982864,
0.024324089288711548,
0.04711724445223808,
-0.021715961396694183,
-0.02164354734122753,
0.05374009534716606,
-0.013528412207961082,
0.01743040792644024,
-0.026422644034028053,
0.01334571186453104,
0.005489201284945011,
0.12324859946966171,
0.05587245896458626,
-0.06410136073827744,
-0.11269517242908478,
0.015136413276195526,
-0.029438644647598267,
-0.03675931692123413,
-0.010067036375403404,
-0.0319356769323349,
0.0052232458256185055,
-0.05263803154230118,
-0.012507818639278412,
-0.09575168788433075,
0.08985898643732071,
-0.05823954567313194,
0.004260703921318054,
-0.027097411453723907,
-0.008686883375048637,
0.009924487210810184,
0.040931202471256256,
0.028443703427910805,
-0.02772136963903904,
-0.01226866990327835,
0.08183635026216507,
-0.022395839914679527,
-0.06184583529829979,
-0.07187642902135849,
0.09065224975347519,
0.08155950158834457,
-0.0409591905772686,
-0.01782933436334133,
-0.05737662315368652,
0.06681658327579498,
-0.035210274159908295,
-0.03671633079648018,
-0.0033209403045475483,
-0.0021787334699183702,
0.06086114048957825,
-0.010227114893496037,
-0.037885140627622604,
-0.11972794681787491,
0.02474803477525711,
0.00971253588795662,
-0.06157323718070984,
0.002643700921908021,
-0.06033579632639885,
2.711823406689777e-33,
0.021183187142014503,
-0.104913130402565,
0.008221004158258438,
0.0012964223278686404,
0.04888683184981346,
-0.02683868072926998,
-0.011429676786065102,
0.007210379932075739,
-0.016843650490045547,
-0.005487372167408466,
-0.03746306896209717,
0.04046715423464775,
0.09612199664115906,
-0.02450244501233101,
0.005075422115623951,
0.055729158222675323,
-0.0711231678724289,
0.00842724647372961,
0.10895977914333344,
0.07012282311916351,
0.0020705009810626507,
-0.016835782676935196,
-0.0070696924813091755,
0.006682251114398241,
-0.0019231007900089025,
-0.03579416498541832,
-0.010810114443302155,
-0.1824401319026947,
0.011280326172709465,
0.03422265499830246,
-0.008449993096292019,
0.04275945946574211,
0.069481760263443,
0.035649869590997696,
-0.012837757356464863,
0.017562417313456535,
0.061572711914777756,
-0.007838437333703041,
-0.09611368924379349,
-0.049447763711214066,
-0.001944120042026043,
-0.052011340856552124,
0.008889460936188698,
-0.03063879907131195,
0.002140769036486745,
-0.017750633880496025,
0.02050992287695408,
-0.04141372814774513,
-0.00790476705878973,
0.026687398552894592,
-0.019858727231621742,
-0.0844975933432579,
-0.024709254503250122,
0.002538312692195177,
0.062171079218387604,
0.0020218417048454285,
0.0176997147500515,
-0.020608555525541306,
-0.039080243557691574,
0.033023200929164886,
-0.07989645004272461,
-0.0023199147544801235,
0.0044161733239889145,
0.03861017897725105,
0.04286082834005356,
0.12181255221366882,
-0.03416606783866882,
0.05094338208436966,
0.04837118089199066,
0.10045194625854492,
-0.06243676692247391,
0.044769641011953354,
-0.05532550439238548,
0.07320564985275269,
-0.057590242475271225,
0.0016685854643583298,
-0.031984370201826096,
0.01847558654844761,
-0.06834366172552109,
0.05505254492163658,
-0.015236449427902699,
0.03211751580238342,
-0.07107055187225342,
0.08809679001569748,
-0.10216020047664642,
-0.033530935645103455,
-0.00948425941169262,
0.04499305039644241,
-0.03503537178039551,
0.04288158565759659,
0.08977127075195312,
0.00666420254856348,
-0.013669825159013271,
0.02628086693584919,
-0.10795459896326065,
-5.24618059452599e-33,
0.030424170196056366,
0.027048569172620773,
-0.11245635896921158,
-0.04902156814932823,
-0.0551145039498806,
-0.0017987112514674664,
0.021447915583848953,
0.014112808741629124,
-0.05787183344364166,
-0.023324869573116302,
-0.05211528018116951,
-0.04185428097844124,
0.0635562539100647,
0.019236251711845398,
-0.10355184227228165,
0.021499738097190857,
-0.0018130365060642362,
-0.03039725497364998,
-0.01757260039448738,
0.03770581632852554,
-0.043498557060956955,
-0.0019603793043643236,
0.05559084191918373,
0.016857707872986794,
-0.049467116594314575,
-0.014672470279037952,
0.02075434848666191,
-0.03326106816530228,
-0.06415008008480072,
-0.047944143414497375,
0.036919496953487396,
-0.038475535809993744,
0.02627130039036274,
0.03725983202457428,
-0.02594367042183876,
-0.012432390823960304,
-0.09619928151369095,
-0.03732844442129135,
0.04680974408984184,
-0.07274186611175537,
0.008089110255241394,
-0.009952832013368607,
-0.08003371953964233,
-0.028591232374310493,
-0.05821209400892258,
0.001990692224353552,
-0.061504170298576355,
0.035568322986364365,
-0.03066970221698284,
-0.0865226462483406,
-0.0013486688258126378,
-0.037823986262083054,
-0.05005849897861481,
0.060516614466905594,
-0.013518408872187138,
0.04754907637834549,
-0.01181093044579029,
0.08385355770587921,
-0.02824130281805992,
0.10036878287792206,
0.14143718779087067,
-0.06132298335433006,
-0.03748951479792595,
0.10301240533590317,
-0.0364566370844841,
-0.03138658031821251,
0.007642104756087065,
0.02600225806236267,
-0.003332360414788127,
-0.0070849452167749405,
0.017025044187903404,
-0.012650947086513042,
0.058916255831718445,
0.10832275450229645,
-0.024946674704551697,
-0.030511898919939995,
0.027530519291758537,
-0.02076846919953823,
0.01186008658260107,
0.017517274245619774,
-0.07134517282247543,
0.11810678243637085,
-0.05469353124499321,
-0.01476606447249651,
0.04642840474843979,
0.11431670933961868,
0.11364641785621643,
0.09810750931501389,
0.018994417041540146,
0.0036205719225108624,
0.06165105476975441,
0.029138360172510147,
-0.06726193428039551,
0.04465865343809128,
-0.039054024964571,
-4.765001904161181e-8,
0.07123307883739471,
-0.002504076575860381,
0.012783080339431763,
0.01171739213168621,
-0.044620636850595474,
0.03073861636221409,
0.06423436105251312,
0.00702449306845665,
-0.010649924166500568,
0.10942115634679794,
-0.07066383957862854,
0.023698631674051285,
-0.13592912256717682,
-0.07246127724647522,
0.068479984998703,
0.029184941202402115,
0.03040992096066475,
0.011277387849986553,
0.012383217923343182,
-0.08520238846540451,
-0.045386526733636856,
-0.11638130247592926,
-0.02546955645084381,
0.03146683797240257,
-0.06453835964202881,
0.045885536819696426,
0.07992947101593018,
-0.034005094319581985,
0.010235261172056198,
0.03857759013772011,
-0.029058614745736122,
-0.026884976774454117,
-0.05399223789572716,
0.07640065252780914,
-0.04391244426369667,
0.04548443853855133,
-0.05939009040594101,
0.017468208447098732,
-0.018767377361655235,
0.04520886391401291,
-0.10695849359035492,
-0.05283510312438011,
-0.007980859838426113,
-0.05031459033489227,
-0.005119187291711569,
0.08890607208013535,
-0.013507028110325336,
0.0638841912150383,
-0.020250918343663216,
0.06903190910816193,
0.029350383207201958,
-0.01700701005756855,
0.03430749475955963,
0.059733565896749496,
0.025548752397298813,
0.017466668039560318,
-0.10098422318696976,
-0.053536947816610336,
-0.0010869872057810426,
0.01324548665434122,
-0.05354415625333786,
0.08361579477787018,
0.036155182868242264,
0.0024421080015599728
] | 0.209109
|
one another, and coordinate when and how they are terminated. Pods in a Kubernetes cluster are used in two main ways: \* \*\*Pods that run a single container\*\*. The "one-container-per-Pod" model is the most common Kubernetes use case; in this case, you can think of a Pod as a wrapper around a single container; Kubernetes manages Pods rather than managing the containers directly. \* \*\*Pods that run multiple containers that need to work together\*\*. A Pod can encapsulate an application composed of multiple co-located containers that are tightly coupled and need to share resources. These co-located containers form a single cohesive unit of service—for example, one container serving data stored in a shared volume to the public, while a separate {{< glossary\_tooltip text="sidecar container" term\_id="sidecar-container" >}} refreshes or updates those files. The Pod wraps these containers, storage resources, and an ephemeral network identity together as a single unit. For example, you might have a container that acts as a web server for files in a shared volume, and a separate [sidecar container](/docs/concepts/workloads/pods/sidecar-containers/) that updates those files from a remote source, as in the following diagram: {{< figure src="/images/docs/pod.svg" alt="Pod creation diagram" class="diagram-medium" >}} Some Pods have {{< glossary\_tooltip text="init containers" term\_id="init-container" >}} as well as {{< glossary\_tooltip text="app containers" term\_id="app-container" >}}. By default, init containers run and complete before the app containers are started. You can also have [sidecar containers](/docs/concepts/workloads/pods/sidecar-containers/) that provide auxiliary services to the main application Pod (for example: a service mesh). {{< feature-state feature\_gate\_name="SidecarContainers" >}} Enabled by default, the `SidecarContainers` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) allows you to specify `restartPolicy: Always` for init containers. Setting the `Always` restart policy ensures that the containers where you set it are treated as \_sidecars\_ that are kept running during the entire lifetime of the Pod. Containers that you explicitly define as sidecar containers start up before the main application Pod and remain running until the Pod is shut down. ## Container probes A \_probe\_ is a diagnostic performed periodically by the kubelet on a container. To perform a diagnostic, the kubelet can invoke different actions: - `ExecAction` (performed with the help of the container runtime) - `TCPSocketAction` (checked directly by the kubelet) - `HTTPGetAction` (checked directly by the kubelet) You can read more about [probes](/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) in the Pod Lifecycle documentation. ## {{% heading "whatsnext" %}} \* Learn about the [lifecycle of a Pod](/docs/concepts/workloads/pods/pod-lifecycle/). \* Read about [PodDisruptionBudget](/docs/concepts/workloads/pods/disruptions/) and how you can use it to manage application availability during disruptions. \* Pod is a top-level resource in the Kubernetes REST API. The {{< api-reference page="workload-resources/pod-v1" >}} object definition describes the object in detail. \* [The Distributed System Toolkit: Patterns for Composite Containers](/blog/2015/06/the-distributed-system-toolkit-patterns/) explains common layouts for Pods with more than one container. \* Read about [Pod topology spread constraints](/docs/concepts/scheduling-eviction/topology-spread-constraints/) \* Read [Advanced Pod Configuration](/docs/concepts/workloads/pods/advanced-pod-config/) to learn the topic in detail. That page covers aspects of Pod configuration beyond the essentials, including: \* PriorityClasses \* RuntimeClasses \* advanced ways to configure \_scheduling\_: the way that Kubernetes decides which node a Pod should run on. To understand the context for why Kubernetes wraps a common Pod API in other resources (such as {{< glossary\_tooltip text="StatefulSets" term\_id="statefulset" >}} or {{< glossary\_tooltip text="Deployments" term\_id="deployment" >}}), you can read about the prior art, including: \* [Aurora](https://aurora.apache.org/documentation/latest/reference/configuration/#job-schema) \* [Borg](https://research.google/pubs/large-scale-cluster-management-at-google-with-borg/) \* [Marathon](https://github.com/d2iq-archive/marathon) \* [Omega](https://research.google/pubs/pub41684/) \* [Tupperware](https://engineering.fb.com/data-center-engineering/tupperware/).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/pods/_index.md
|
[
-0.0054313107393682,
-0.03462885320186615,
0.044816289097070694,
0.012366809882223606,
0.017170829698443413,
0.004745769780129194,
0.03444729745388031,
-0.012433160096406937,
0.13817714154720306,
0.03155326843261719,
0.01141414139419794,
0.0024948385544121265,
0.00735689140856266,
-0.05008735507726669,
0.0226726196706295,
-0.0300992913544178,
0.028813622891902924,
-0.005532864946871996,
-0.07052244991064072,
0.014423415996134281,
0.03577115759253502,
-0.002973958384245634,
-0.03758026286959648,
0.02775152213871479,
-0.06659756600856781,
0.07778720557689667,
-0.054132357239723206,
-0.014458898454904556,
0.04927301034331322,
-0.0153231555595994,
-0.015800336375832558,
0.03051343746483326,
-0.030992059037089348,
0.07222404330968857,
0.010718411765992641,
0.08284913003444672,
0.021967332810163498,
-0.004526038188487291,
-0.08225901424884796,
0.005731151904910803,
0.019919831305742264,
-0.05590635538101196,
-0.12995852530002594,
0.01636851765215397,
-0.01644154265522957,
-0.027833832427859306,
-0.04518955945968628,
-0.07516239583492279,
-0.023109188303351402,
-0.05273260548710823,
0.04345918446779251,
-0.07538904249668121,
0.013876223936676979,
0.11507261544466019,
0.0664418637752533,
0.0447499081492424,
-0.03415114805102348,
0.05800759419798851,
0.060117900371551514,
0.024252725765109062,
0.07271627336740494,
-0.02942722477018833,
-0.006009145639836788,
-0.0064186835661530495,
0.12177121639251709,
-0.06654789298772812,
0.03237292543053627,
0.023608779534697533,
0.012412224896252155,
-0.058184389024972916,
0.047378525137901306,
0.004663988947868347,
0.0015764337731525302,
0.036035239696502686,
0.016104666516184807,
0.01887286640703678,
-0.003713177749887109,
0.06291414797306061,
0.011485304683446884,
-0.03742189332842827,
0.04673340916633606,
0.13862068951129913,
0.11441586911678314,
-0.023425694555044174,
-0.06394301354885101,
-0.05536628141999245,
-0.00120521557983011,
-0.036850254982709885,
-0.012007155455648899,
-0.028202887624502182,
0.002769127255305648,
-0.026346981525421143,
0.08251015841960907,
-0.10700692236423492,
0.07278867810964584,
-0.021996773779392242,
-0.024314356967806816,
-0.006070635747164488,
0.09896786510944366,
-0.007033635396510363,
0.02099878527224064,
0.009366517886519432,
0.0009152548736892641,
-0.03386039659380913,
0.05572977662086487,
-0.07444386184215546,
-0.090213842689991,
-0.013543369248509407,
0.09270970523357391,
0.01398210134357214,
-0.036014821380376816,
-0.0026222902815788984,
-0.06914357841014862,
0.05443768948316574,
-0.019208285957574844,
-0.039577923715114594,
-0.03689831122756004,
0.016759034246206284,
0.08413625508546829,
0.07651277631521225,
-0.03949259594082832,
-0.1158061996102333,
0.009184456430375576,
-0.014318007044494152,
-0.024801503866910934,
0.01795814372599125,
-0.05909251049160957,
4.767791495281767e-33,
-0.0014957949751988053,
-0.1130233183503151,
-0.040187884122133255,
-0.00937528908252716,
0.05491022393107414,
-0.07389336824417114,
-0.04102140665054321,
0.03081933967769146,
-0.027939053252339363,
0.005031608045101166,
-0.06196042522788048,
0.13407021760940552,
0.013559955172240734,
0.035096269100904465,
0.04220254719257355,
-0.012985581532120705,
-0.09650113433599472,
0.07212420552968979,
0.10291488468647003,
-0.02795650251209736,
-0.015830501914024353,
-0.006821851246058941,
-0.011591698974370956,
0.007101312279701233,
0.031224489212036133,
-0.031636204570531845,
0.00538998655974865,
-0.09606853872537613,
-0.02746024914085865,
0.026459412649273872,
-0.008035290986299515,
0.009089563973248005,
0.02818927727639675,
0.058732595294713974,
-0.10279024392366409,
0.008256862871348858,
-0.016682878136634827,
-0.04574985429644585,
-0.049447327852249146,
-0.07553283870220184,
-0.039776761084795,
-0.014746115542948246,
-0.003392523154616356,
-0.06500034034252167,
0.03537518158555031,
-0.038005683571100235,
0.016077103093266487,
-0.10093404352664948,
0.02133837155997753,
-0.0019675223156809807,
0.014973762445151806,
-0.008962297812104225,
0.025396376848220825,
-0.010903866030275822,
-0.003410405945032835,
0.038865696638822556,
0.05846115201711655,
-0.06259999424219131,
-0.021398013457655907,
0.019599031656980515,
-0.10368663817644119,
0.013607067056000233,
-0.033546119928359985,
0.006676487158983946,
0.058967139571905136,
0.05466475710272789,
0.006883119698613882,
0.04508524015545845,
0.02445068582892418,
0.02812962979078293,
-0.05247978866100311,
0.0006820186390541494,
0.009443657472729683,
-0.004451085347682238,
-0.04142836853861809,
-0.05893480405211449,
-0.02993571013212204,
0.013933682814240456,
-0.13106954097747803,
0.06991415470838547,
-0.054394740611314774,
-0.03315801918506622,
-0.07138476520776749,
0.08672019839286804,
-0.09433456510305405,
-0.012194567359983921,
0.006851570680737495,
-0.03149290382862091,
-0.012372667901217937,
0.04722236096858978,
0.039117977023124695,
0.007567499298602343,
-0.08132358640432358,
0.00464393338188529,
-0.0815945565700531,
-6.461102495242795e-33,
0.0985235869884491,
0.02558758109807968,
-0.08314315974712372,
-0.0015538923908025026,
-0.026084577664732933,
0.07826968282461166,
0.0011944059515371919,
0.0078062135726213455,
-0.06023017689585686,
-0.024635571986436844,
-0.03628689795732498,
-0.010019447654485703,
0.03498385101556778,
0.06381593644618988,
-0.09878042340278625,
0.029622359201312065,
-0.038930002599954605,
-0.0755104199051857,
0.0030020594131201506,
0.013538944534957409,
-0.004164332523941994,
-0.027171852067112923,
0.02554723247885704,
0.027022965252399445,
0.002351480070501566,
-0.02864423394203186,
0.004145349375903606,
-0.022308045998215675,
-0.029722535982728004,
-0.028796827420592308,
0.020080560818314552,
-0.1285283863544464,
0.03238552436232567,
-0.035642292350530624,
-0.007083310279995203,
-0.04996182769536972,
-0.052599065005779266,
-0.020235633477568626,
0.004602514673024416,
-0.06607116013765335,
0.029515929520130157,
-0.018193641677498817,
-0.014062660746276379,
-0.06764841824769974,
-0.019836725667119026,
0.025966819375753403,
-0.042218878865242004,
0.007097360212355852,
-0.023128757253289223,
-0.09465762227773666,
0.021669305860996246,
0.017149558290839195,
-0.08603563159704208,
0.018179472535848618,
-0.0655825138092041,
0.018515920266509056,
-0.005002112127840519,
0.04161183536052704,
-0.07809310406446457,
0.022505654022097588,
0.12523199617862701,
-0.08409330248832703,
0.007273229770362377,
0.06100855767726898,
-0.03845596686005592,
-0.04180207476019859,
0.017710691317915916,
-0.049287308007478714,
-0.048140428960323334,
-0.0039968001656234264,
0.005855630151927471,
-0.010235355235636234,
0.05996298789978027,
0.04747762903571129,
-0.040946152061223984,
-0.016493523493409157,
0.06118158996105194,
-0.1302890181541443,
0.04631463438272476,
-0.011922181583940983,
-0.05658536031842232,
0.07575087249279022,
-0.04216371476650238,
0.03350954130291939,
0.018681567162275314,
0.037384700030088425,
0.06374648958444595,
0.11155234277248383,
0.04896731302142143,
0.029346292838454247,
0.022630339488387108,
0.04599607735872269,
-0.06211179494857788,
0.14946520328521729,
-0.01851639337837696,
-5.460823260250436e-8,
0.051437802612781525,
0.04927170276641846,
0.026586081832647324,
0.025234829634428024,
-0.031919412314891815,
-0.039915457367897034,
0.08985356241464615,
0.06363411247730255,
-0.012365473434329033,
0.044529613107442856,
-0.012242916971445084,
0.02996896021068096,
-0.12358370423316956,
-0.003492057789117098,
0.05048051103949547,
0.05958723649382591,
0.016332708299160004,
-0.008335174061357975,
0.01399184763431549,
-0.05823269486427307,
-0.05388786643743515,
-0.06723078340291977,
0.0006809883052483201,
0.028534183278679848,
0.010652663186192513,
0.06549188494682312,
0.09487007558345795,
0.059672124683856964,
-0.017884504050016403,
-0.011883938685059547,
-0.035089898854494095,
0.004255611915141344,
-0.06996092200279236,
0.10176795721054077,
-0.017638718709349632,
0.04757804051041603,
-0.1120801791548729,
0.044338248670101166,
0.0008925514994189143,
0.052182216197252274,
-0.0029976454097777605,
-0.04968838766217232,
-0.03245603293180466,
0.008619405329227448,
0.0630142018198967,
0.09381658583879471,
-0.0363345667719841,
0.07484795153141022,
-0.025593489408493042,
0.029508329927921295,
-0.020355531945824623,
-0.04143856465816498,
0.007691911421716213,
0.09799282997846603,
-0.02444193884730339,
-0.01918059028685093,
-0.030700333416461945,
-0.059952061623334885,
0.05792246386408806,
0.02841181866824627,
-0.009823275730013847,
0.04647468775510788,
0.03393083065748215,
-0.025821493938565254
] | 0.25076
|
In Kubernetes, a \_HorizontalPodAutoscaler\_ automatically updates a workload resource (such as a {{< glossary\_tooltip text="Deployment" term\_id="deployment" >}} or {{< glossary\_tooltip text="StatefulSet" term\_id="statefulset" >}}), with the aim of automatically scaling capacity to match demand. Horizontal scaling means that the response to increased load is to deploy more {{< glossary\_tooltip text="Pods" term\_id="pod" >}}. This is different from \_vertical\_ scaling, which for Kubernetes would mean assigning more resources (for example: memory or CPU) to the Pods that are already running for the workload. If the load decreases, and the number of Pods is above the configured minimum, the HorizontalPodAutoscaler instructs the workload resource (the Deployment, StatefulSet, or other similar resource) to scale back down. Horizontal pod autoscaling does not apply to objects that can't be scaled (for example: a {{< glossary\_tooltip text="DaemonSet" term\_id="daemonset" >}}.) The HorizontalPodAutoscaler is implemented as a Kubernetes API resource and a {{< glossary\_tooltip text="controller" term\_id="controller" >}}. The resource determines the behavior of the controller. The horizontal pod autoscaling controller, running within the Kubernetes {{< glossary\_tooltip text="control plane" term\_id="control-plane" >}}, periodically adjusts the desired scale of its target (for example, a Deployment) to match observed metrics such as average CPU utilization, average memory utilization, or any other custom metric you specify. There is [walkthrough example](/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/) of using horizontal pod autoscaling. ## How does a HorizontalPodAutoscaler work? {{< mermaid >}} graph BT hpa[HorizontalPodAutoscaler] --> scale[Scale] subgraph rc[Deployment] scale end scale -.-> pod1[Pod 1] scale -.-> pod2[Pod 2] scale -.-> pod3[Pod N] classDef hpa fill:#D5A6BD,stroke:#1E1E1D,stroke-width:1px,color:#1E1E1D; classDef rc fill:#F9CB9C,stroke:#1E1E1D,stroke-width:1px,color:#1E1E1D; classDef scale fill:#B6D7A8,stroke:#1E1E1D,stroke-width:1px,color:#1E1E1D; classDef pod fill:#9FC5E8,stroke:#1E1E1D,stroke-width:1px,color:#1E1E1D; class hpa hpa; class rc rc; class scale scale; class pod1,pod2,pod3 pod {{< /mermaid >}} Figure 1. HorizontalPodAutoscaler controls the scale of a Deployment and its ReplicaSet Kubernetes implements horizontal pod autoscaling as a control loop that runs intermittently (it is not a continuous process). The interval is set by the `--horizontal-pod-autoscaler-sync-period` parameter to the [`kube-controller-manager`](/docs/reference/command-line-tools-reference/kube-controller-manager/) (and the default interval is 15 seconds). Once during each period, the controller manager queries the resource utilization against the metrics specified in each HorizontalPodAutoscaler definition. The controller manager finds the target resource defined by the `scaleTargetRef`, then selects the pods based on the target resource's `.spec.selector` labels, and obtains the metrics from either the resource metrics API (for per-pod resource metrics), or the custom metrics API (for all other metrics). - For per-pod resource metrics (like CPU), the controller fetches the metrics from the resource metrics API for each Pod targeted by the HorizontalPodAutoscaler. Then, if a target utilization value is set, the controller calculates the utilization value as a percentage of the equivalent [resource request](/docs/concepts/configuration/manage-resources-containers/#requests-and-limits) on the containers in each Pod. If a target raw value is set, the raw metric values are used directly. The controller then takes the mean of the utilization or the raw value (depending on the type of target specified) across all targeted Pods, and produces a ratio used to scale the number of desired replicas. Please note that if some of the Pod's containers do not have the relevant resource request set, CPU utilization for the Pod will not be defined and the autoscaler will not take any action for that metric. See the [algorithm details](#algorithm-details) section below for more information about how the autoscaling algorithm works. - For per-pod custom metrics, the controller functions similarly to per-pod resource metrics, except that it works with raw values, not utilization values. - For object metrics and external metrics, a single metric is fetched, which describes the object in question. This metric is compared to the target value, to produce a ratio as above. In the `autoscaling/v2` API version, this value can optionally be divided by
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale.md
|
[
-0.021046524867415428,
0.006336533464491367,
0.05203865095973015,
0.007941650226712227,
-0.08087258785963058,
-0.03646422177553177,
-0.00014893956540618092,
-0.004202910233289003,
0.07383473962545395,
0.03039284609258175,
-0.008343575522303581,
0.0009879992576316,
0.0015658256597816944,
-0.0096284756436944,
0.006520985160022974,
-0.0012654055608436465,
0.046586863696575165,
0.0277178306132555,
-0.13291913270950317,
-0.03289981931447983,
0.09933397173881531,
-0.051841363310813904,
-0.018019232898950577,
0.02892495132982731,
-0.01922275312244892,
0.02967534400522709,
-0.08500318974256516,
-0.021071622148156166,
0.08898671716451645,
-0.017491701990365982,
-0.08651667088270187,
0.04730246961116791,
-0.02150397188961506,
0.06292060762643814,
0.03613602742552757,
0.039237942546606064,
-0.03971506282687187,
-0.055118001997470856,
-0.06006794050335884,
0.06524105370044708,
0.012235878966748714,
-0.05221246927976608,
-0.07947222888469696,
0.026427097618579865,
-0.03452420234680176,
0.01948482170701027,
-0.02967313677072525,
-0.044637374579906464,
-0.0228714682161808,
-0.026272529736161232,
0.048976778984069824,
-0.08854475617408752,
0.014556803740561008,
0.040443189442157745,
0.05528926104307175,
0.03078935109078884,
0.047795336693525314,
0.039391547441482544,
0.08461102098226547,
-0.013473118655383587,
0.01158627588301897,
0.0040336837992072105,
0.032116033136844635,
-0.018598778173327446,
0.06372255086898804,
-0.04160834848880768,
0.024987543001770973,
-0.06270638853311539,
-0.06260420382022858,
0.006295459344983101,
0.08320648223161697,
-0.06057238578796387,
0.025995060801506042,
-0.03673535957932472,
0.040443871170282364,
-0.04580586031079292,
-0.05873164162039757,
0.05503978207707405,
0.022250421345233917,
-0.07153292745351791,
0.05405368283390999,
0.0915222093462944,
0.07444621622562408,
0.030181465670466423,
-0.025590190663933754,
-0.05651002749800682,
0.01691383868455887,
-0.07161907851696014,
0.03915435075759888,
0.015400978736579418,
0.028450334444642067,
-0.02289043366909027,
-0.02303854003548622,
-0.04427538067102432,
0.02145824022591114,
-0.07530409097671509,
-0.04447689652442932,
-0.031550098210573196,
-0.020123818889260292,
-0.03369651362299919,
0.07812350243330002,
-0.006162987090647221,
0.08380372077226639,
0.02751273289322853,
0.04724275693297386,
-0.033428966999053955,
-0.10480578243732452,
-0.00654136948287487,
0.05976735055446625,
0.029994985088706017,
-0.005853189621120691,
0.07550884038209915,
-0.016322951763868332,
0.038697630167007446,
-0.01969427429139614,
-0.008847542107105255,
-0.0028776146937161684,
0.020689889788627625,
0.019587313756346703,
0.06812232732772827,
0.018112583085894585,
-0.10040847212076187,
-0.01818491332232952,
-0.03975432738661766,
0.0005829446599818766,
0.10435701906681061,
-0.037733495235443115,
3.510242495984299e-33,
0.006886360701173544,
-0.12690290808677673,
-0.011106100864708424,
-0.021409282460808754,
-0.02069193311035633,
-0.07570285350084305,
-0.06820469349622726,
0.024505076929926872,
-0.05945810303092003,
-0.048830851912498474,
-0.05849464610219002,
0.15820591151714325,
-0.03006952814757824,
0.08958132565021515,
0.06875219941139221,
-0.060493748635053635,
-0.04269777610898018,
0.08200733363628387,
0.043051302433013916,
-0.009305726736783981,
0.03140294924378395,
-0.09976821392774582,
-0.021626899018883705,
-0.03437846899032593,
0.05765633285045624,
-0.06706535071134567,
-0.008612943813204765,
-0.05074219033122063,
-0.12287120521068573,
0.033875688910484314,
-0.07849393039941788,
-0.03923840448260307,
0.029217572882771492,
-0.018429702147841454,
-0.09765660017728806,
-0.05517415702342987,
-0.03574202582240105,
-0.04632227495312691,
-0.019688300788402557,
-0.0651244968175888,
0.0027425310108810663,
0.0010833683190867305,
-0.024867484346032143,
-0.07349950820207596,
0.02566048502922058,
0.0446942001581192,
0.06815396994352341,
-0.06158081814646721,
-0.04386874660849571,
-0.03723375126719475,
0.07090084254741669,
0.024665705859661102,
0.03850466012954712,
-0.05497906357049942,
0.08424203097820282,
0.0032647596672177315,
0.0788942202925682,
-0.016020409762859344,
-0.0018659450579434633,
0.01469540037214756,
-0.08755110949277878,
-0.07031572610139847,
-0.03934993967413902,
0.06081856042146683,
0.09440905600786209,
0.04531843587756157,
-0.019529666751623154,
0.09455589950084686,
0.02033909596502781,
0.02783682942390442,
0.01974651962518692,
0.015387853607535362,
0.013221634551882744,
0.034971754997968674,
-0.013202138245105743,
-0.06134482100605965,
0.015436738729476929,
0.016921300441026688,
-0.11291871219873428,
0.038294319063425064,
-0.03514197841286659,
0.030773883685469627,
0.0034260782413184643,
-0.007321556564420462,
-0.06401528418064117,
-0.05162116885185242,
0.024314120411872864,
-0.037983037531375885,
-0.04565809294581413,
0.027948515489697456,
-0.008114202879369259,
-0.05948810651898384,
-0.07239729911088943,
0.030362365767359734,
-0.11129599809646606,
-5.651381946120079e-33,
0.0637538954615593,
-0.04193160682916641,
-0.07053948938846588,
0.042567260563373566,
0.005600665230304003,
0.034273263067007065,
0.011807712726294994,
0.061878129839897156,
-0.04957231506705284,
-0.05902095139026642,
-0.014697733335196972,
0.011645528487861156,
-0.0716274231672287,
0.027440575882792473,
-0.028066443279385567,
-0.0015552386175841093,
-0.1025732085108757,
0.00042041545384563506,
-0.0015758617082610726,
0.015554620884358883,
0.06661810725927353,
-0.036308061331510544,
0.007892540656030178,
0.07657395303249359,
0.04272271692752838,
-0.08550027757883072,
-0.04951639845967293,
0.009715171530842781,
-0.011497174389660358,
-0.0446443147957325,
0.025894658640027046,
-0.06877711415290833,
0.0024733934551477432,
0.00810953602194786,
0.008204566314816475,
-0.03616046532988548,
-0.012228067964315414,
-0.003773292526602745,
0.005842156242579222,
0.02445264346897602,
0.05217840149998665,
0.01444437075406313,
0.02258712612092495,
-0.08007106184959412,
-0.00821792334318161,
-0.006480554584413767,
-0.022515607997775078,
-0.02100435458123684,
-0.01909894496202469,
-0.09651115536689758,
0.06579387187957764,
0.030266549438238144,
0.0006350906915031374,
0.1001124456524849,
-0.07144950330257416,
0.02046741172671318,
-0.016034305095672607,
-0.013514453545212746,
-0.07055500149726868,
0.003932322841137648,
0.03624208644032478,
-0.10038866847753525,
0.011974071152508259,
-0.016340380534529686,
-0.060233861207962036,
0.010550077073276043,
0.018014589324593544,
-0.026286276057362556,
0.020048122853040695,
0.010249917395412922,
-0.01894436776638031,
-0.030095022171735764,
0.09129620343446732,
0.014064648188650608,
-0.08621004223823547,
-0.04394761472940445,
0.09699759632349014,
-0.08924062550067902,
0.07804015278816223,
-0.0690339133143425,
-0.07673260569572449,
0.044559888541698456,
0.006353950127959251,
0.06321471184492111,
-0.04562047868967056,
0.041712239384651184,
0.0357719250023365,
0.130109503865242,
0.06525886803865433,
0.10247848927974701,
0.011358439922332764,
-0.04797593876719475,
-0.055760886520147324,
0.0926741510629654,
-0.02576407976448536,
-5.224234911338499e-8,
0.004434766247868538,
0.09141136705875397,
-0.0047674039378762245,
0.0715029239654541,
-0.010911366902291775,
-0.006126099731773138,
0.07974614948034286,
0.02987128496170044,
0.009831936098635197,
0.028820501640439034,
0.022396260872483253,
0.03520845249295235,
-0.022656535729765892,
0.07034575194120407,
0.03176999092102051,
0.029321519657969475,
0.000036392040783539414,
-0.00875560287386179,
0.035281192511320114,
-0.08279414474964142,
-0.05874314159154892,
0.002186786849051714,
-0.02200205996632576,
0.05846525356173515,
0.009972987696528435,
0.020769739523530006,
0.005477225873619318,
0.09828661382198334,
0.02492643892765045,
-0.02021891251206398,
-0.045459847897291183,
0.03675507754087448,
-0.09574257582426071,
0.09347929060459137,
0.03638564422726631,
0.014083631336688995,
-0.1407250314950943,
0.07020546495914459,
0.06949155032634735,
0.012235932983458042,
0.015520337969064713,
-0.026018323376774788,
-0.03963172063231468,
0.0036757620982825756,
0.07296140491962433,
0.040945056825876236,
-0.08867784589529037,
0.07997112721204758,
-0.0048282332718372345,
-0.01285241637378931,
0.007639563176780939,
0.0012986629735678434,
-0.026347653940320015,
0.08686072379350662,
0.005713284015655518,
-0.02358904853463173,
-0.01803182065486908,
-0.014704002067446709,
0.013079652562737465,
0.010468394495546818,
0.05303897336125374,
-0.03443979099392891,
-0.0455147810280323,
0.006247919984161854
] | 0.132501
|
with raw values, not utilization values. - For object metrics and external metrics, a single metric is fetched, which describes the object in question. This metric is compared to the target value, to produce a ratio as above. In the `autoscaling/v2` API version, this value can optionally be divided by the number of Pods before the comparison is made. The common use for HorizontalPodAutoscaler is to configure it to fetch metrics from {{< glossary\_tooltip text="aggregated APIs" term\_id="aggregation-layer" >}} (`metrics.k8s.io`, `custom.metrics.k8s.io`, or `external.metrics.k8s.io`). The `metrics.k8s.io` API is usually provided by an add-on named Metrics Server, which needs to be launched separately. For more information about resource metrics, see [Metrics Server](/docs/tasks/debug/debug-cluster/resource-metrics-pipeline/#metrics-server). [Support for metrics APIs](#support-for-metrics-apis) explains the stability guarantees and support status for these different APIs. The HorizontalPodAutoscaler controller accesses corresponding workload resources that support scaling (such as Deployments and StatefulSet). These resources each have a subresource named `scale`, an interface that allows you to dynamically set the number of replicas and examine each of their current states. For general information about subresources in the Kubernetes API, see [Kubernetes API Concepts](/docs/reference/using-api/api-concepts/). ### Algorithm details From the most basic perspective, the HorizontalPodAutoscaler controller operates on the ratio between desired metric value and current metric value: ```math \begin{equation\*} desiredReplicas = ceil\left\lceil currentReplicas \times \frac{currentMetricValue}{desiredMetricValue} \right\rceil \end{equation\*} ``` For example, if the current metric value is `200m`, and the desired value is `100m`, the number of replicas will be doubled, since \\( { 200.0 \div 100.0 } = 2.0 \\). If the current value is instead `50m`, you'll halve the number of replicas, since \\( { 50.0 \div 100.0 } = 0.5 \\). The control plane skips any scaling action if the ratio is sufficiently close to 1.0 (within a [configurable tolerance](#tolerance), 0.1 by default). When a `targetAverageValue` or `targetAverageUtilization` is specified, the `currentMetricValue` is computed by taking the average of the given metric across all Pods in the HorizontalPodAutoscaler's scale target. Before checking the tolerance and deciding on the final values, the control plane also considers whether any metrics are missing, and how many Pods are [`Ready`](/docs/concepts/workloads/pods/pod-lifecycle/#pod-conditions). All Pods with a deletion timestamp set (objects with a deletion timestamp are in the process of being shut down / removed) are ignored, and all failed Pods are discarded. If a particular Pod is missing metrics, it is set aside for later; Pods with missing metrics will be used to adjust the final scaling amount. When scaling on CPU, if any pod has yet to become ready (it's still initializing, or possibly is unhealthy) \_or\_ the most recent metric point for the pod was before it became ready, that pod is set aside as well. Due to technical constraints, the HorizontalPodAutoscaler controller cannot exactly determine the first time a pod becomes ready when determining whether to set aside certain CPU metrics. Instead, it considers a Pod "not yet ready" if it's unready and transitioned to ready within a short, configurable window of time since it started. This value is configured with the `--horizontal-pod-autoscaler-initial-readiness-delay` command line option, and its default is 30 seconds. Once a pod has become ready, it considers any transition to ready to be the first if it occurred within a longer, configurable time since it started. This value is configured with the `--horizontal-pod-autoscaler-cpu-initialization-period` command line option, and its default is 5 minutes. The \\( currentMetricValue \over desiredMetricValue \\) base scale ratio is then calculated, using the remaining pods not set aside or discarded from above. If there were any missing metrics, the control plane recomputes the average more conservatively, assuming those pods were consuming 100% of the desired value in case of a
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale.md
|
[
-0.00689772330224514,
-0.03273424878716469,
-0.014294621534645557,
0.05376632139086723,
-0.07932968437671661,
-0.03032856620848179,
-0.016144225373864174,
0.04436233639717102,
0.05288349464535713,
-0.019451556727290154,
-0.016128897666931152,
-0.14342451095581055,
-0.026313653215765953,
0.0033400049433112144,
-0.0030235860031098127,
-0.06259696930646896,
0.07920534908771515,
0.014820750802755356,
-0.08028145134449005,
-0.04054718464612961,
0.06613897532224655,
0.03731008246541023,
0.019240694120526314,
0.021640822291374207,
0.02179744467139244,
0.0010342649184167385,
-0.11054786294698715,
-0.028338832780718803,
0.03489350527524948,
0.019988277927041054,
-0.05878261849284172,
0.06715600937604904,
0.013636182062327862,
0.05162869021296501,
0.05806094780564308,
0.009519141167402267,
0.007787542883306742,
-0.057666659355163574,
-0.04383312910795212,
-0.0005079976399429142,
0.0181430634111166,
-0.011198295280337334,
-0.03429451957345009,
-0.007434884551912546,
-0.04062008485198021,
0.010658926330506802,
-0.09177695959806442,
0.0025335901882499456,
-0.02815062180161476,
0.06644956767559052,
-0.007530406583100557,
-0.028534170240163803,
0.003883071942254901,
0.0288464967161417,
0.09482374787330627,
0.04979795217514038,
-0.01654868572950363,
0.024001531302928925,
0.03878379240632057,
-0.03471110761165619,
-0.0034483177587389946,
-0.06847453862428665,
0.006421428639441729,
-0.039709851145744324,
0.043406739830970764,
-0.046114854514598846,
-0.00974159874022007,
-0.0625184178352356,
-0.01706703193485737,
-0.00848983135074377,
0.028423689305782318,
-0.05156315118074417,
0.025205129757523537,
-0.048631519079208374,
-0.012176723219454288,
0.06115906313061714,
-0.020301874727010727,
0.05193062499165535,
0.05757656320929527,
-0.11351770162582397,
0.02700187638401985,
0.06488877534866333,
0.052268680185079575,
0.06339854001998901,
0.008657143451273441,
0.011469801887869835,
0.060020171105861664,
-0.010751635767519474,
0.02392992563545704,
-0.00986979715526104,
0.0194627083837986,
-0.02901792898774147,
-0.034758519381284714,
-0.09280797094106674,
0.009501404128968716,
-0.04801714047789574,
-0.0831492692232132,
-0.0016015771543607116,
0.02336806058883667,
-0.026430409401655197,
0.04082866013050079,
0.008595678023993969,
0.015355958603322506,
0.006690965034067631,
0.014306660741567612,
0.0073022423312067986,
-0.05038492754101753,
0.026129530742764473,
0.05626818537712097,
0.09401115775108337,
0.04342950880527496,
0.053831346333026886,
-0.025754760950803757,
0.008651417680084705,
0.042973462492227554,
0.0012101163156330585,
0.032637130469083786,
-0.047652434557676315,
0.07197204232215881,
0.05784934386610985,
-0.009260555729269981,
-0.07651899009943008,
0.007735785096883774,
0.010003261268138885,
0.007845488376915455,
0.07823500782251358,
-0.024195943027734756,
1.9612449170928067e-33,
-0.015337888151407242,
-0.09313280135393143,
0.07036533951759338,
-0.07217828929424286,
-0.09206146746873856,
-0.019583027809858322,
-0.08692646771669388,
0.06967905908823013,
-0.0008978788973763585,
-0.057354219257831573,
-0.08444628119468689,
0.1936013400554657,
0.0014379650820046663,
0.021136566996574402,
0.05644802749156952,
-0.029698828235268593,
-0.011406335979700089,
0.09174352139234543,
0.05923488736152649,
-0.0021831069607287645,
0.06302277743816376,
-0.06374501436948776,
-0.006943175569176674,
-0.01638064533472061,
0.04858168214559555,
-0.019012220203876495,
-0.013314380310475826,
-0.020078616216778755,
-0.10392638295888901,
0.03053394891321659,
-0.03407042846083641,
-0.02701740525662899,
0.0007247627945616841,
-0.029178069904446602,
-0.049564093351364136,
-0.06710349023342133,
-0.03852084279060364,
0.049962837249040604,
-0.07412586361169815,
-0.04610437899827957,
0.016685981303453445,
0.02089684084057808,
-0.04737185314297676,
-0.12436981499195099,
-0.06774396449327469,
0.0275317020714283,
0.05701174587011337,
-0.05536763370037079,
0.07248923182487488,
-0.02721147984266281,
0.06904109567403793,
0.01200522854924202,
0.032541535794734955,
-0.04638746753334999,
0.045806460082530975,
-0.008340662345290184,
0.05811784043908119,
0.000780512229539454,
0.022758131846785545,
0.021054353564977646,
-0.06960026174783707,
-0.00548541359603405,
0.01121518760919571,
-0.018797509372234344,
0.051453422755002975,
0.042156483978033066,
-0.000564202549867332,
0.0646849274635315,
-0.023653296753764153,
0.06490885466337204,
0.000025986624677898362,
0.011419359594583511,
0.014234972186386585,
0.053706150501966476,
-0.0019852302502840757,
-0.05264492332935333,
0.07911647856235504,
0.005753125064074993,
-0.08495419472455978,
0.03730740025639534,
-0.07143361866474152,
0.037019722163677216,
0.02798301912844181,
-0.023943118751049042,
-0.03184561803936958,
-0.030096087604761124,
0.06316523253917694,
-0.00429527135565877,
-0.06090192124247551,
0.029228076338768005,
-0.019865067675709724,
-0.08474035561084747,
-0.12468866258859634,
0.018596375361084938,
-0.15796440839767456,
-4.2512972772877006e-33,
0.04087623208761215,
0.048152849078178406,
-0.007037297356873751,
0.04240144044160843,
-0.016739482060074806,
-0.015760017558932304,
0.03391878679394722,
0.10653224587440491,
-0.0032091173343360424,
-0.003400792134925723,
-0.0056212712079286575,
0.02962554059922695,
0.018188627436757088,
0.03477012366056442,
0.01420283131301403,
0.02361837401986122,
-0.09585510939359665,
-0.05100695416331291,
0.019083529710769653,
0.00035043476964347064,
0.04961591958999634,
-0.017541132867336273,
0.035076018422842026,
0.06597556173801422,
-0.028279971331357956,
-0.039881713688373566,
-0.016415400430560112,
-0.05085911229252815,
-0.041724979877471924,
-0.07422705739736557,
0.050265099853277206,
-0.08357982337474823,
-0.016150357201695442,
0.01013339962810278,
-0.01385180652141571,
-0.10330598801374435,
-0.020966142416000366,
-0.003069712547585368,
0.00722423754632473,
0.05449357256293297,
0.02012515999376774,
0.024035563692450523,
-0.06613032519817352,
-0.009964031167328358,
-0.0035165948793292046,
-0.04854626581072807,
0.018775498494505882,
0.006974027957767248,
-0.03924158215522766,
-0.1377023607492447,
0.07997432351112366,
0.00991235300898552,
-0.04386381432414055,
0.10334945470094681,
-0.057336803525686264,
0.05462499335408211,
0.02086889185011387,
-0.009218563325703144,
-0.05805755779147148,
-0.008726890198886395,
0.03898235037922859,
-0.10068601369857788,
-0.02138262242078781,
-0.0158480666577816,
-0.01397008914500475,
0.002339685568585992,
0.02671450562775135,
-0.05160773545503616,
-0.06781086325645447,
0.043718039989471436,
0.02536643296480179,
0.000015284918845281936,
0.06739674508571625,
-0.004035681951791048,
-0.07642723619937897,
0.028267281129956245,
0.03225910663604736,
-0.08886229246854782,
0.0976993516087532,
-0.035229332745075226,
-0.07673145085573196,
0.060369931161403656,
0.06302796304225922,
0.046432122588157654,
-0.0022443081252276897,
0.023851800709962845,
0.06339394301176071,
0.11185767501592636,
0.031515903770923615,
0.11899062246084213,
-0.046159565448760986,
-0.06542649865150452,
-0.08577670902013779,
0.10245326906442642,
0.0021125490311533213,
-5.140364223166216e-8,
0.0003094764251727611,
0.06744858622550964,
-0.006036416161805391,
0.09722857177257538,
-0.04160540923476219,
0.013057997450232506,
0.011586304754018784,
0.09021690487861633,
0.006360666826367378,
0.08789917826652527,
0.016345664858818054,
-0.04588736221194267,
-0.09447234869003296,
0.08710294961929321,
0.015303757041692734,
-0.010951283387839794,
0.017952820286154747,
0.01742834970355034,
-0.009641756303608418,
-0.05100824311375618,
-0.015197348780930042,
0.025196794420480728,
0.004772167187184095,
-0.06072356179356575,
-0.004595695994794369,
-0.002131217624992132,
-0.02138255536556244,
0.0640854462981224,
-0.02717026323080063,
-0.10420786589384079,
-0.00569869065657258,
0.018049877136945724,
-0.05125359073281288,
0.025160357356071472,
0.0019421444740146399,
0.004265489522367716,
-0.13413779437541962,
0.10583534091711044,
0.027919843792915344,
0.0691256895661354,
0.00030957715352997184,
-0.015592998825013638,
-0.04619831591844559,
0.01241172943264246,
0.04261810705065727,
0.055250268429517746,
-0.07388322055339813,
0.08208192139863968,
-0.02623986080288887,
-0.0034191857557743788,
0.01734786294400692,
-0.06437674164772034,
-0.049546606838703156,
0.05525539442896843,
-0.0012072711251676083,
-0.08138024061918259,
-0.04659479111433029,
-0.05265895649790764,
-0.004438717383891344,
0.02532760053873062,
0.06433620303869247,
-0.06009669229388237,
-0.04423779621720314,
-0.008145074360072613
] | 0.157989
|
\\( currentMetricValue \over desiredMetricValue \\) base scale ratio is then calculated, using the remaining pods not set aside or discarded from above. If there were any missing metrics, the control plane recomputes the average more conservatively, assuming those pods were consuming 100% of the desired value in case of a scale down, and 0% in case of a scale up. This dampens the magnitude of any potential scale. Furthermore, if any not-yet-ready pods were present, and the workload would have scaled up without factoring in missing metrics or not-yet-ready pods, the controller conservatively assumes that the not-yet-ready pods are consuming 0% of the desired metric, further dampening the magnitude of a scale up. After factoring in the not-yet-ready pods and missing metrics, the controller recalculates the usage ratio. If the new ratio reverses the scale direction, or is within the tolerance, the controller doesn't take any scaling action. In other cases, the new ratio is used to decide any change to the number of Pods. Note that the \_original\_ value for the average utilization is reported back via the HorizontalPodAutoscaler status, without factoring in the not-yet-ready pods or missing metrics, even when the new usage ratio is used. If multiple metrics are specified in a HorizontalPodAutoscaler, this calculation is done for each metric, and then the largest of the desired replica counts is chosen. If any of these metrics cannot be converted into a desired replica count (e.g. due to an error fetching the metrics from the metrics APIs) and a scale down is suggested by the metrics which can be fetched, scaling is skipped. This means that the HPA is still capable of scaling up if one or more metrics give a `desiredReplicas` greater than the current value. Finally, right before HPA scales the target, the scale recommendation is recorded. The controller considers all recommendations within a configurable window choosing the highest recommendation from within that window. You can configure this value using the `--horizontal-pod-autoscaler-downscale-stabilization` command line option, which defaults to 5 minutes. This means that scaledowns will occur gradually, smoothing out the impact of rapidly fluctuating metric values. ## Pod readiness and autoscaling metrics The HorizontalPodAutoscaler (HPA) controller includes two command line options that influence how CPU metrics are collected from Pods during startup: 1. `--horizontal-pod-autoscaler-cpu-initialization-period` (default: 5 minutes) This defines the time window after a Pod starts during which its \*\*CPU usage is ignored\*\* unless: - The Pod is in a `Ready` state \*\*and\*\* - The metric sample was taken entirely during the period it was `Ready`. This command line option helps \*\*exclude misleading high CPU usage\*\* from initializing Pods (for example: Java apps warming up) in HPA scaling decisions. 1. `--horizontal-pod-autoscaler-initial-readiness-delay` (default: 30 seconds) This defines a short delay period after a Pod starts during which the HPA controller treats Pods that are currently `Unready` as still initializing, \*\*even if they have previously transitioned to `Ready` briefly\*\*. It is designed to: - Avoid including Pods that rapidly fluctuate between `Ready` and `Unready` during startup. - Ensure stability in the initial readiness signal before HPA considers their metrics valid. You can only set these command line options cluster-wide. ### Key behaviors for pod readiness {#pod-readiness-key-behaviors} - If a Pod is `Ready` and remains `Ready`, it can be counted as contributing metrics even within the delay. - If a Pod rapidly toggles between `Ready` and `Unready`, metrics are ignored until it’s considered stably `Ready`. ### Good practice for pod readiness {#pod-readiness-good-practices} - Configure a `startupProbe` that doesn't pass until the high CPU usage has passed, or - Ensure your `readinessProbe` only reports `Ready` \*\*after\*\* the CPU spike subsides,
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale.md
|
[
0.00677333353087306,
-0.035918641835451126,
-0.01732824370265007,
0.0802977904677391,
0.017159633338451385,
0.0089572723954916,
-0.06228527054190636,
0.05501437932252884,
0.08330891281366348,
0.07463786005973816,
0.09150348603725433,
-0.018520552664995193,
0.016131334006786346,
-0.04680546745657921,
-0.005206681322306395,
-0.010465404950082302,
0.098345547914505,
0.04390992596745491,
-0.12414682656526566,
0.006327151786535978,
-0.005664588417857885,
-0.00319770909845829,
-0.012189067900180817,
0.03871168568730354,
0.0043281568214297295,
-0.02909032255411148,
-0.13352976739406586,
-0.022893507033586502,
0.08138173073530197,
-0.0219555776566267,
-0.04881295561790466,
0.09199118614196777,
0.04748481139540672,
-0.038737066090106964,
-0.036351278424263,
-0.023479962721467018,
0.043294064700603485,
-0.08648578822612762,
-0.03476795554161072,
0.016833048313856125,
-0.010480602271854877,
0.008138339966535568,
-0.056474246084690094,
0.05273306742310524,
-0.010325197130441666,
0.010211541317403316,
-0.050823602825403214,
-0.025539904832839966,
-0.03820856660604477,
0.00017703678167890757,
0.0630568414926529,
-0.044710297137498856,
0.015354761853814125,
0.0045674568973481655,
0.08535561710596085,
0.005691198166459799,
0.031927648931741714,
0.02460254170000553,
0.047597486525774,
-0.00980488583445549,
-0.026088159531354904,
-0.07215997576713562,
-0.02853161282837391,
-0.07370837032794952,
0.08433806896209717,
-0.10151002556085587,
-0.0010790993692353368,
-0.08458999544382095,
0.024043623358011246,
0.022267144173383713,
0.03390301764011383,
-0.04335714876651764,
0.015725936740636826,
-0.04475289210677147,
0.039099715650081635,
-0.034358832985162735,
-0.037655483931303024,
0.08209702372550964,
0.055260639637708664,
-0.05205364152789116,
0.06359269469976425,
0.02776719070971012,
0.0020148116163909435,
-0.05099279433488846,
-0.012752624228596687,
-0.013059809803962708,
0.04144129902124405,
-0.06770073622465134,
0.1419219970703125,
0.027106251567602158,
0.0705939531326294,
0.06411004066467285,
-0.06756726652383804,
-0.07193531841039658,
0.02495660074055195,
-0.082820825278759,
-0.0831306129693985,
0.022113019600510597,
-0.010357202030718327,
0.027093036100268364,
0.032851845026016235,
0.059933796525001526,
0.053402144461870193,
-0.0012171007692813873,
0.06362392008304596,
-0.06381195783615112,
0.011805342510342598,
0.043497901409864426,
0.04869036749005318,
0.07474103569984436,
0.046707458794116974,
-0.018782706931233406,
-0.004758461844176054,
0.08575376123189926,
0.030621543526649475,
-0.029111633077263832,
0.07260198891162872,
-0.052314046770334244,
-0.01289795245975256,
0.005003372672945261,
0.02112150751054287,
-0.07372745126485825,
-0.016999460756778717,
-0.0138882827013731,
-0.06545482575893402,
0.04053401201963425,
0.008457121439278126,
2.5753191252005388e-33,
-0.007331997621804476,
-0.05630629137158394,
0.0319201797246933,
-0.008516073226928711,
-0.0022444333881139755,
-0.02040993794798851,
-0.044487059116363525,
0.05182994529604912,
0.04321806877851486,
-0.05598381161689758,
-0.055796436965465546,
0.12727801501750946,
-0.061058737337589264,
0.07073713093996048,
0.017951542511582375,
-0.12016736716032028,
-0.05029965192079544,
0.0648026391863823,
0.08383060246706009,
-0.017910100519657135,
0.05461990088224411,
-0.005768872331827879,
-0.042594220489263535,
-0.03900395706295967,
-0.00967362429946661,
-0.014510460197925568,
-0.025684738531708717,
-0.007549547590315342,
-0.1364445835351944,
0.019922420382499695,
-0.006759502459317446,
0.00712388101965189,
-0.035892270505428314,
-0.03187382593750954,
-0.06416398286819458,
-0.023367486894130707,
0.04859781265258789,
-0.011231677606701851,
-0.02616856060922146,
-0.03176046535372734,
-0.04555463790893555,
0.045598722994327545,
-0.05029010400176048,
-0.016791293397545815,
-0.08108224719762802,
-0.06486204266548157,
0.0777423307299614,
-0.004583831876516342,
-0.03286047279834747,
-0.014357062056660652,
0.009112447500228882,
0.05521661043167114,
0.021825289353728294,
-0.03988140821456909,
-0.01633744314312935,
-0.037950050085783005,
0.02687223069369793,
-0.010322925634682178,
-0.06523145735263824,
0.02879912778735161,
-0.014594513922929764,
-0.045899514108896255,
-0.03198902681469917,
0.05310744792222977,
0.02085467427968979,
0.08369164913892746,
-0.017136920243501663,
0.02723645232617855,
0.03507871925830841,
0.027807824313640594,
-0.003674952546134591,
0.03321898356080055,
-0.040156289935112,
0.011883526109158993,
0.0012372337514534593,
-0.09399715065956116,
0.04229745268821716,
0.024412067607045174,
-0.0791039988398552,
0.0033172888215631247,
-0.055903419852256775,
0.061058927327394485,
-0.03690159693360329,
0.024137409403920174,
-0.05839826166629791,
-0.0956876277923584,
0.05498211458325386,
-0.008416726253926754,
-0.08954600989818573,
-0.02317826822400093,
0.02907237969338894,
-0.07143402099609375,
-0.00210488960146904,
0.05441823974251747,
-0.03740740194916725,
-3.471331796262158e-33,
0.021888740360736847,
-0.00746105145663023,
-0.04546577110886574,
0.044847775250673294,
-0.018822625279426575,
0.016887063160538673,
0.013999899849295616,
-0.001672133686952293,
-0.0057956986129283905,
-0.0885649099946022,
-0.06091606989502907,
0.006424298509955406,
-0.0693592056632042,
0.020038112998008728,
-0.011011339724063873,
-0.03844704478979111,
-0.0855761244893074,
-0.06678199768066406,
-0.02185572311282158,
0.009277045726776123,
0.07407938688993454,
-0.03856039419770241,
0.02948567271232605,
0.07917366921901703,
-0.003305223770439625,
-0.03468112647533417,
-0.08223129063844681,
-0.0043080090545117855,
-0.013093777932226658,
-0.033894553780555725,
0.002944460604339838,
-0.12143848091363907,
0.03222523629665375,
0.0665840283036232,
-0.00022675633954349905,
-0.036502182483673096,
-0.08307654410600662,
0.07761617004871368,
0.01184553187340498,
0.043955422937870026,
0.06001169979572296,
-0.0033443686552345753,
-0.08390581607818604,
-0.001824328675866127,
0.07580392062664032,
-0.04034459590911865,
0.051883846521377563,
-0.0005563293816521764,
-0.002539884066209197,
-0.05706459656357765,
0.12224067002534866,
0.02108732797205448,
-0.027745602652430534,
0.10718558728694916,
-0.06447424739599228,
0.02926470898091793,
0.025870030745863914,
-0.021200504153966904,
-0.04992189258337021,
0.03247588127851486,
-0.0038498875219374895,
-0.035061970353126526,
-0.02833830751478672,
-0.05338584631681442,
-0.06677315384149551,
0.04234835132956505,
0.10701753944158554,
0.0210591908544302,
0.0941101461648941,
0.025710372254252434,
0.01637054607272148,
0.003977661486715078,
0.10554678738117218,
-0.020189499482512474,
-0.06642628461122513,
-0.04268666356801987,
0.045830607414245605,
-0.10072723776102066,
0.033198282122612,
-0.025411229580640793,
-0.11350996792316437,
0.04300907999277115,
0.04357726871967316,
0.00958267692476511,
0.026078246533870697,
-0.00419476255774498,
0.05803186073899269,
0.03237730637192726,
0.032317839562892914,
0.13153021037578583,
0.012336852960288525,
0.009047707542777061,
-0.040777768939733505,
0.07470875233411789,
-0.004964903462678194,
-5.408410785889828e-8,
0.008978523313999176,
0.030331624671816826,
-0.013276918791234493,
0.10474799573421478,
0.03956599161028862,
-0.014798683114349842,
0.035255417227745056,
-0.05174075439572334,
-0.07104812562465668,
0.05473773926496506,
0.09194137156009674,
-0.028134576976299286,
-0.04634866118431091,
0.005597785115242004,
0.03614676743745804,
-0.002255181549116969,
0.08867964893579483,
0.025940710678696632,
-0.04561183601617813,
-0.0277144405990839,
-0.08429262787103653,
0.0549214743077755,
-0.05074818432331085,
-0.08347439020872116,
0.000042303796362830326,
0.02215345948934555,
-0.06455826014280319,
0.08775799721479416,
-0.01079555507749319,
-0.02526286244392395,
0.08685167133808136,
0.023850196972489357,
-0.051855459809303284,
0.0620887391269207,
-0.028343895450234413,
0.05145690590143204,
-0.06649035215377808,
0.038897138088941574,
0.05069657042622566,
0.04120127484202385,
-0.02520093135535717,
-0.01070138905197382,
-0.04709627851843834,
0.006169906351715326,
0.04310156777501106,
0.06526673585176468,
-0.1259719580411911,
0.06295085698366165,
0.0049255299381911755,
0.015927068889141083,
0.039891038089990616,
0.05596194416284561,
-0.024474354460835457,
0.0943206325173378,
0.03161928802728653,
-0.05830147862434387,
-0.028693802654743195,
-0.01716366782784462,
-0.02128922939300537,
0.013960041105747223,
0.03958713635802269,
-0.03210499882698059,
-0.048034366220235825,
-0.011568092741072178
] | 0.096253
|
a Pod rapidly toggles between `Ready` and `Unready`, metrics are ignored until it’s considered stably `Ready`. ### Good practice for pod readiness {#pod-readiness-good-practices} - Configure a `startupProbe` that doesn't pass until the high CPU usage has passed, or - Ensure your `readinessProbe` only reports `Ready` \*\*after\*\* the CPU spike subsides, using `initialDelaySeconds`. And ideally also set `--horizontal-pod-autoscaler-cpu-initialization-period` to \*\*cover the startup duration\*\*. ## API object The HorizontalPodAutoscaler is an API kind in the Kubernetes `autoscaling` API group. The current stable version can be found in the `autoscaling/v2` API version which includes support for scaling on memory and custom metrics. The new fields introduced in `autoscaling/v2` are preserved as annotations when working with `autoscaling/v1`. When you create a HorizontalPodAutoscaler API object, make sure the name specified is a valid [DNS subdomain name](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names). More details about the API object can be found at [HorizontalPodAutoscaler Object](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#horizontalpodautoscaler-v2-autoscaling). ## Stability of workload scale {#flapping} When managing the scale of a group of replicas using the HorizontalPodAutoscaler, it is possible that the number of replicas keeps fluctuating frequently due to the dynamic nature of the metrics evaluated. This is sometimes referred to as \_thrashing\_, or \_flapping\_. It's similar to the concept of \_hysteresis\_ in cybernetics. ## Autoscaling during rolling update Kubernetes lets you perform a rolling update on a Deployment. In that case, the Deployment manages the underlying ReplicaSets for you. When you configure autoscaling for a Deployment, you bind a HorizontalPodAutoscaler to a single Deployment. The HorizontalPodAutoscaler manages the `replicas` field of the Deployment. The deployment controller is responsible for setting the `replicas` of the underlying ReplicaSets so that they add up to a suitable number during the rollout and also afterwards. If you perform a rolling update of a StatefulSet that has an autoscaled number of replicas, the StatefulSet directly manages its set of Pods (there is no intermediate resource similar to ReplicaSet). ## Support for resource metrics Any HPA target can be scaled based on the resource usage of the pods in the scaling target. When defining the pod specification the resource requests like `cpu` and `memory` should be specified. This is used to determine the resource utilization and used by the HPA controller to scale the target up or down. To use resource utilization based scaling specify a metric source like this: ```yaml type: Resource resource: name: cpu target: type: Utilization averageUtilization: 60 ``` With this metric the HPA controller will keep the average utilization of the pods in the scaling target at 60%. Utilization is the ratio between the current usage of resource to the requested resources of the pod. See [Algorithm](#algorithm-details) for more details about how the utilization is calculated and averaged. {{< note >}} Since the resource usages of all the containers are summed up the total pod utilization may not accurately represent the individual container resource usage. This could lead to situations where a single container might be running with high usage and the HPA will not scale out because the overall pod usage is still within acceptable limits. {{< /note >}} ### Container resource metrics {{< feature-state feature\_gate\_name="HPAContainerMetrics" >}} The HorizontalPodAutoscaler API also supports a container metric source where the HPA can track the resource usage of individual containers across a set of Pods, in order to scale the target resource. This lets you configure scaling thresholds for the containers that matter most in a particular Pod. For example, if you have a web application and a sidecar container that provides logging, you can scale based on the resource use of the web application, ignoring the sidecar container and its resource use. If you
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale.md
|
[
0.011931675486266613,
-0.03124304860830307,
0.052365221083164215,
0.06705353409051895,
-0.024870671331882477,
-0.03633255511522293,
-0.05962522700428963,
-0.002269246382638812,
0.04603534936904907,
0.04276532679796219,
-0.0038870915304869413,
-0.0142727205529809,
-0.07699869573116302,
-0.041183628141880035,
0.0029672628734260798,
-0.03299140930175781,
0.08171582221984863,
-0.03005608171224594,
-0.06445066630840302,
-0.025894328951835632,
0.01839776337146759,
-0.02411796897649765,
0.010083242319524288,
0.038568612188100815,
0.0019058589823544025,
0.01480916328728199,
-0.08271212875843048,
-0.04848538339138031,
0.046371497213840485,
-0.02246466651558876,
-0.08189254254102707,
0.0019252952188253403,
0.03845642879605293,
0.04415658116340637,
0.04235279932618141,
0.08583201467990875,
0.0008676961297169328,
-0.0831930860877037,
-0.08917759358882904,
0.0176338329911232,
0.01546536572277546,
-0.08376193046569824,
-0.10414134711027145,
0.020482143387198448,
-0.015994492918252945,
0.01760944165289402,
-0.03313257545232773,
-0.05587936192750931,
0.008071588352322578,
-0.00928418431431055,
-0.022872094064950943,
-0.07897064834833145,
0.08950503915548325,
-0.006914466619491577,
0.12543946504592896,
0.07498964667320251,
0.05503968521952629,
0.02276381477713585,
0.05916876345872879,
-0.01378301065415144,
0.004502198193222284,
-0.04427720978856087,
0.0211197417229414,
-0.049454376101493835,
0.06004142761230469,
-0.029239941388368607,
0.028596095740795135,
-0.037783410400152206,
0.05142277479171753,
0.047561898827552795,
0.06529997289180756,
0.017494846135377884,
0.007570120971649885,
-0.009464770555496216,
-0.022021589800715446,
0.022349923849105835,
-0.055865511298179626,
0.035008806735277176,
0.03523767367005348,
-0.06987766176462173,
0.006114628165960312,
0.049971528351306915,
0.05645398050546646,
-0.039148956537246704,
-0.04829565808176994,
0.04993552342057228,
0.0607081763446331,
-0.021578246727585793,
0.0201585553586483,
-0.0021770114544779062,
0.02448495477437973,
-0.009085031226277351,
-0.003711686935275793,
-0.05711375176906586,
0.01837005838751793,
-0.03270982950925827,
-0.05359474569559097,
-0.03339024633169174,
-0.00995281059294939,
-0.013494140468537807,
0.06703044474124908,
0.035771120339632034,
0.05107112228870392,
0.061687130481004715,
0.08516590297222137,
-0.0384252555668354,
-0.02246253751218319,
0.019513851031661034,
-0.009932823479175568,
0.06277915090322495,
0.05151253938674927,
0.033747125416994095,
0.011287001892924309,
0.06009009853005409,
0.0037648892030119896,
0.06367392092943192,
-0.021196182817220688,
-0.012656614184379578,
0.06991054862737656,
0.09490712732076645,
0.0605272576212883,
-0.09427828341722488,
-0.014022855088114738,
-0.010963257402181625,
-0.04207189008593559,
0.07814717292785645,
-0.04644475877285004,
3.7446044781275845e-33,
0.01057030912488699,
-0.10049592703580856,
0.005479768849909306,
-0.010025175288319588,
-0.04798021912574768,
-0.06865467876195908,
-0.057627007365226746,
0.05607093498110771,
-0.01855471357703209,
-0.03085257299244404,
-0.05112886428833008,
0.0694606825709343,
-0.04337843507528305,
0.04579091817140579,
0.027687087655067444,
-0.11944504827260971,
-0.02870223857462406,
0.036852750927209854,
0.05056808888912201,
0.006606061477214098,
0.06486187875270844,
-0.12698790431022644,
-0.08503535389900208,
-0.012162693776190281,
0.019393596798181534,
-0.007505175191909075,
0.021568620577454567,
-0.1014658659696579,
-0.08324681222438812,
0.054164182394742966,
-0.026630334556102753,
-0.028624046593904495,
-0.007413732819259167,
0.018029389902949333,
-0.1398080438375473,
-0.09182345122098923,
-0.042250100523233414,
0.03845016658306122,
-0.0901724174618721,
-0.06410939246416092,
0.013120328076183796,
0.029323099181056023,
-0.06976907700300217,
-0.13528703153133392,
0.0038500952068716288,
-0.029967408627271652,
0.017533909529447556,
-0.04370952397584915,
0.0017654923722147942,
0.005038462113589048,
0.05525461956858635,
0.02000325545668602,
0.01222964096814394,
-0.07486118376255035,
0.04493553191423416,
-0.02510758489370346,
0.11984983086585999,
-0.03206157684326172,
-0.04199262335896492,
0.013175269588828087,
-0.06199871003627777,
-0.03111986815929413,
0.010327034629881382,
0.008595714345574379,
0.02910652756690979,
0.09612690657377243,
-0.003208240494132042,
0.042744871228933334,
-0.038878049701452255,
0.046265389770269394,
-0.067038893699646,
0.02309243381023407,
-0.02497204579412937,
0.037188950926065445,
-0.04448831453919411,
-0.030890151858329773,
0.024725036695599556,
-0.006540360860526562,
-0.12992088496685028,
0.0005867345607839525,
0.06875548511743546,
0.048518430441617966,
0.014062721282243729,
0.02075560949742794,
-0.042064834386110306,
-0.07087666541337967,
0.024356190115213394,
0.0031307514291256666,
-0.09768708795309067,
0.054177943617105484,
0.027588410302996635,
-0.02582070603966713,
-0.05091159790754318,
0.037202056497335434,
-0.16435948014259338,
-4.658795618311693e-33,
0.08113965392112732,
-0.0467178039252758,
-0.04420708864927292,
0.05124147608876228,
0.010799068957567215,
0.02278248220682144,
0.016727834939956665,
0.07267065346240997,
-0.024072999134659767,
-0.06728963553905487,
-0.031674694269895554,
-0.0565316379070282,
-0.05565823242068291,
0.014575435779988766,
0.00024350685998797417,
0.014785407111048698,
-0.08947525173425674,
-0.049326054751873016,
0.018727358430624008,
0.05085131153464317,
0.026544950902462006,
-0.02408076636493206,
0.023616010323166847,
0.04396193102002144,
-0.005188548471778631,
-0.018977846950292587,
0.014720303006470203,
0.029547670856118202,
-0.05440292879939079,
-0.0491950623691082,
0.043385621160268784,
-0.05895638093352318,
-0.012397952377796173,
0.07532046735286713,
-0.010634246282279491,
-0.036105796694755554,
-0.04718557745218277,
0.02408595010638237,
0.004721400793641806,
0.01117691770195961,
0.11459984630346298,
0.06555318087339401,
-0.06213073432445526,
0.0005643966142088175,
-0.044438671320676804,
-0.027654562145471573,
-0.005751433316618204,
-0.01479326281696558,
-0.039366576820611954,
-0.10000616312026978,
-0.0011659084120765328,
0.004538647830486298,
0.0036752617452293634,
0.09207815676927567,
-0.06899234652519226,
0.05553247034549713,
0.04341479390859604,
0.0009370945044793189,
-0.04034518077969551,
0.0265649426728487,
0.028007226064801216,
-0.09968496114015579,
0.03843606635928154,
-0.004731892608106136,
-0.0008227112120948732,
-0.07161832600831985,
0.04786089062690735,
0.045706503093242645,
-0.007287442218512297,
0.02273644506931305,
0.07303465157747269,
0.0032083371188491583,
0.00493286270648241,
0.018559426069259644,
-0.07472304999828339,
-0.000072575690865051,
0.02352568320930004,
-0.07850431650876999,
0.06467598676681519,
-0.025689469650387764,
-0.12340998649597168,
0.07673490047454834,
-0.007628874387592077,
0.06061612069606781,
0.03407944366335869,
0.04925478994846344,
0.056757569313049316,
0.11078866571187973,
0.038863107562065125,
0.0933416411280632,
0.005508810747414827,
0.006918976549059153,
-0.06027951091527939,
0.09604500979185104,
-0.016011539846658707,
-5.0848964150418396e-8,
0.07195377349853516,
-0.038328420370817184,
0.006585541181266308,
0.1341855376958847,
0.055575087666511536,
-0.04274417459964752,
0.02946733683347702,
0.06252213567495346,
-0.06161458417773247,
0.042400460690259933,
0.00508402893319726,
0.024670982733368874,
-0.07295344024896622,
0.048752278089523315,
0.057724758982658386,
-0.005870770197361708,
-0.0024397624656558037,
0.11468921601772308,
-0.023572012782096863,
-0.08798117935657501,
-0.07087632268667221,
0.0029800767078995705,
-0.02237466536462307,
-0.051990095525979996,
-0.0005452300538308918,
0.007553649600595236,
0.07587295770645142,
0.07569076120853424,
0.053640902042388916,
-0.059397123754024506,
-0.04370613768696785,
0.030422654002904892,
-0.03507719561457634,
0.0145430201664567,
-0.021084442734718323,
0.08076927810907364,
-0.09040608257055283,
0.07194805890321732,
0.021194934844970703,
0.019313683733344078,
-0.002831697231158614,
-0.007671328727155924,
-0.061213359236717224,
-0.001204397645778954,
0.002600880339741707,
0.018346281722187996,
-0.07361330091953278,
0.08945894241333008,
-0.010326539166271687,
0.007401416543871164,
-0.011723784729838371,
-0.008412837982177734,
-0.005068110767751932,
0.04990814998745918,
-0.018883878365159035,
0.017407720908522606,
-0.010418957099318504,
-0.056059855967760086,
-0.018979204818606377,
0.009981530718505383,
0.0615144781768322,
-0.03618399426341057,
-0.020894354209303856,
-0.005848909728229046
] | 0.19358
|
configure scaling thresholds for the containers that matter most in a particular Pod. For example, if you have a web application and a sidecar container that provides logging, you can scale based on the resource use of the web application, ignoring the sidecar container and its resource use. If you revise the target resource to have a new Pod specification with a different set of containers, you should revise the HPA spec if that newly added container should also be used for scaling. If the specified container in the metric source is not present or only present in a subset of the pods then those pods are ignored and the recommendation is recalculated. See [Algorithm](#algorithm-details) for more details about the calculation. To use container resources for autoscaling define a metric source as follows: ```yaml type: ContainerResource containerResource: name: cpu container: application target: type: Utilization averageUtilization: 60 ``` In the above example the HPA controller scales the target such that the average utilization of the cpu in the `application` container of all the pods is 60%. {{< note >}} If you change the name of a container that a HorizontalPodAutoscaler is tracking, you can make that change in a specific order to ensure scaling remains available and effective whilst the change is being applied. Before you update the resource that defines the container (such as a Deployment), you should update the associated HPA to track both the new and old container names. This way, the HPA is able to calculate a scaling recommendation throughout the update process. Once you have rolled out the container name change to the workload resource, tidy up by removing the old container name from the HPA specification. {{< /note >}} ## Scaling on custom metrics {{< feature-state for\_k8s\_version="v1.23" state="stable" >}} (the `autoscaling/v2beta2` API version previously provided this ability as a beta feature) Provided that you use the `autoscaling/v2` API version, you can configure a HorizontalPodAutoscaler to scale based on a custom metric (that is not built in to Kubernetes or any Kubernetes component). The HorizontalPodAutoscaler controller then queries for these custom metrics from the Kubernetes API. See [Support for metrics APIs](#support-for-metrics-apis) for the requirements. ## Scaling on multiple metrics {{< feature-state for\_k8s\_version="v1.23" state="stable" >}} (the `autoscaling/v2beta2` API version previously provided this ability as a beta feature) Provided that you use the `autoscaling/v2` API version, you can specify multiple metrics for a HorizontalPodAutoscaler to scale on. Then, the HorizontalPodAutoscaler controller evaluates each metric, and proposes a new scale based on that metric. The HorizontalPodAutoscaler takes the maximum scale recommended for each metric and sets the workload to that size (provided that this isn't larger than the overall maximum that you configured). ## Support for metrics APIs By default, the HorizontalPodAutoscaler controller retrieves metrics from a series of APIs. In order for it to access these APIs, cluster administrators must ensure that: - The [API aggregation layer](/docs/tasks/extend-kubernetes/configure-aggregation-layer/) is enabled. - The corresponding APIs are registered: - For resource metrics, this is the `metrics.k8s.io` [API](/docs/reference/external-api/metrics.v1beta1/), generally provided by [metrics-server](https://github.com/kubernetes-sigs/metrics-server). It can be launched as a cluster add-on. - For custom metrics, this is the `custom.metrics.k8s.io` [API](/docs/reference/external-api/custom-metrics.v1beta2/). It's provided by "adapter" API servers provided by metrics solution vendors. Check with your metrics pipeline to see if there is a Kubernetes metrics adapter available. - For external metrics, this is the `external.metrics.k8s.io` [API](/docs/reference/external-api/external-metrics.v1beta1/). It may be provided by the custom metrics adapters provided above. For more information on these different metrics paths and how they differ please see the relevant design proposals for [the HPA V2](https://git.k8s.io/design-proposals-archive/autoscaling/hpa-v2.md), [custom.metrics.k8s.io](https://git.k8s.io/design-proposals-archive/instrumentation/custom-metrics-api.md) and [external.metrics.k8s.io](https://git.k8s.io/design-proposals-archive/instrumentation/external-metrics-api.md). For examples of how to use them see [the walkthrough for using
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale.md
|
[
0.019053444266319275,
0.033898234367370605,
-0.018415939062833786,
0.02609301544725895,
-0.008292829617857933,
-0.08787218481302261,
-0.009660805575549603,
0.040432605892419815,
-0.04101492837071419,
-0.01038308348506689,
-0.018869338557124138,
-0.07117689400911331,
-0.058248065412044525,
-0.011243047192692757,
-0.0395166240632534,
-0.053058475255966187,
0.10118122398853302,
0.06859041750431061,
-0.06576716899871826,
-0.024677520617842674,
0.06143096461892128,
-0.040051285177469254,
0.001257064170204103,
0.025348985567688942,
-0.003727559931576252,
0.021336983889341354,
-0.04186420887708664,
-0.03953082859516144,
0.05859196186065674,
0.003270992310717702,
-0.041077662259340286,
0.024952588602900505,
0.02422262355685234,
0.017806636169552803,
0.03654669597744942,
0.016064133495092392,
-0.005123363807797432,
-0.11198563873767853,
0.00918585155159235,
-0.006169192958623171,
-0.011678800918161869,
-0.016393184661865234,
-0.11661408096551895,
0.057274069637060165,
-0.005157632753252983,
-0.08061239123344421,
-0.06763169914484024,
-0.013630884699523449,
-0.030894950032234192,
0.0013703873846679926,
0.0318315215408802,
-0.06002853065729141,
0.007632987108081579,
-0.008678044192492962,
-0.015576350502669811,
-0.0032146782614290714,
0.08138280361890793,
0.051129329949617386,
0.06548922508955002,
0.01461411640048027,
-0.00193086510989815,
-0.03292792662978172,
0.007754839491099119,
-0.03882155939936638,
0.10057085752487183,
-0.07463589310646057,
0.04127080738544464,
-0.049748074263334274,
-0.02580973692238331,
0.058108825236558914,
0.05419575423002243,
-0.022492898628115654,
0.07241196930408478,
-0.05777863413095474,
0.01733882911503315,
-0.009794358164072037,
-0.12304261326789856,
0.02069535106420517,
0.007425261195749044,
0.02481020614504814,
0.0005421012174338102,
0.06433988362550735,
0.014998666010797024,
-0.026707489043474197,
-0.04163092374801636,
-0.038018666207790375,
0.011249260045588017,
-0.01279193814843893,
0.09125997871160507,
0.004388599656522274,
0.05781307816505432,
0.020065804943442345,
-0.03842565417289734,
-0.06935406476259232,
0.07207117229700089,
-0.05359181761741638,
-0.09633391350507736,
-0.06109754741191864,
0.0715872123837471,
-0.014312357641756535,
0.029979314655065536,
0.06618586927652359,
0.05912481248378754,
0.01962357945740223,
0.08767066895961761,
0.003397088497877121,
-0.059120062738657,
0.045982785522937775,
0.034985266625881195,
0.0433909110724926,
-0.0017021821113303304,
0.07138047367334366,
-0.007452889811247587,
0.01828690618276596,
0.008428506553173065,
0.016263790428638458,
0.022290300577878952,
-0.062169820070266724,
-0.013305007480084896,
0.03683720529079437,
-0.025376085191965103,
-0.08028756827116013,
0.05441737547516823,
-0.008467781357467175,
0.020368369296193123,
0.06239531189203262,
-0.11715197563171387,
3.388095775964401e-33,
-0.027371808886528015,
-0.0612465962767601,
0.006230449769645929,
-0.07758486270904541,
-0.015631556510925293,
-0.038509760051965714,
-0.03114735335111618,
-0.01685992069542408,
-0.015185357071459293,
-0.020441511645913124,
-0.06296686083078384,
0.13393503427505493,
-0.02995346114039421,
-0.01723480597138405,
0.04221772029995918,
-0.06095856800675392,
-0.025723066180944443,
0.08155898749828339,
0.06130188703536987,
-0.03440845012664795,
0.03290709853172302,
-0.0941816195845604,
-0.018135596066713333,
-0.017700491473078728,
0.031450897455215454,
-0.013499397784471512,
-0.001425882917828858,
-0.1126473993062973,
-0.09851600229740143,
0.0386427566409111,
0.03861696645617485,
-0.025923380628228188,
0.022771265357732773,
0.010958895087242126,
-0.05655771493911743,
-0.05983075872063637,
0.01265967171639204,
0.03592332825064659,
-0.037619348615407944,
-0.021656736731529236,
0.04794249311089516,
0.03949577361345291,
0.05741440877318382,
-0.11067535728216171,
-0.04231998324394226,
-0.016602659597992897,
0.041136566549539566,
-0.031168373301625252,
-0.051453739404678345,
-0.012194480746984482,
0.07372362166643143,
-0.0315859355032444,
0.019145729020237923,
-0.030767712742090225,
-0.0032920383382588625,
-0.06508991122245789,
0.07663572579622269,
0.017288092523813248,
0.08835507929325104,
0.032925013452768326,
-0.07191701233386993,
-0.07297257333993912,
-0.008119337260723114,
0.012587485834956169,
0.03256997466087341,
0.051058802753686905,
-0.025359902530908585,
0.04243791103363037,
-0.031108280643820763,
0.10375142097473145,
0.0017927244771271944,
-0.0005245333886705339,
0.01514673512428999,
0.04064105451107025,
0.005882985889911652,
-0.05223650112748146,
0.05804607272148132,
0.06484849750995636,
-0.1572382152080536,
0.02083674818277359,
-0.06404178589582443,
0.12547193467617035,
0.022842098027467728,
-0.03671620413661003,
-0.07647489011287689,
-0.1153898686170578,
-0.012476201169192791,
0.04877747967839241,
-0.09097940474748611,
0.05778862535953522,
0.01598258689045906,
-0.031263742595911026,
0.020098619163036346,
0.011574388481676579,
-0.08318254351615906,
-3.592509100784612e-33,
0.009933515451848507,
0.006128289271146059,
0.02564934641122818,
0.04148165136575699,
0.021186906844377518,
0.004840190522372723,
0.00307461223565042,
0.04900876060128212,
0.012594339437782764,
-0.03710005059838295,
-0.056899797171354294,
-0.020885340869426727,
-0.002348710084334016,
0.06416049599647522,
-0.06684419512748718,
0.04937061294913292,
-0.0644805058836937,
-0.059099990874528885,
0.028567524626851082,
0.027736524119973183,
0.014149852097034454,
0.001462996588088572,
0.055453669279813766,
0.09153338521718979,
0.07118652015924454,
-0.07448595762252808,
-0.027569076046347618,
-0.01938348449766636,
0.01713157817721367,
-0.12701018154621124,
0.003513701492920518,
-0.08283380419015884,
0.027782198041677475,
0.059227392077445984,
0.01587696373462677,
-0.047908734530210495,
-0.05906785652041435,
0.080611452460289,
0.040700849145650864,
0.09672192484140396,
0.08167549967765808,
-0.0566004253923893,
-0.10656861215829849,
-0.022627128288149834,
-0.05331272631883621,
-0.015040906146168709,
0.018709275871515274,
-0.02976001426577568,
-0.00816742330789566,
-0.08635523915290833,
0.051229365170001984,
0.017534563317894936,
-0.008993188850581646,
0.07571537792682648,
-0.014049194753170013,
0.07980439811944962,
0.02593359909951687,
0.020258236676454544,
-0.04429300129413605,
0.005452741868793964,
0.08946286141872406,
-0.046055302023887634,
-0.00007196709339041263,
-0.011486902832984924,
-0.04621950909495354,
-0.02777077443897724,
0.018513532355427742,
-0.00674137519672513,
-0.031041232869029045,
0.020407140254974365,
0.053342025727033615,
0.026088327169418335,
0.06978476792573929,
0.07424785196781158,
-0.10745171457529068,
-0.0958021879196167,
0.031247129663825035,
-0.07138165831565857,
0.1124403327703476,
-0.024816086515784264,
-0.09261824935674667,
0.0970831960439682,
-0.014578428119421005,
0.008890790864825249,
0.025242328643798828,
0.05787663161754608,
0.07687593251466751,
0.04430805891752243,
-0.01789255253970623,
0.0892702117562294,
-0.015643298625946045,
-0.029253613203763962,
-0.050345949828624725,
0.07181341201066971,
-0.02457992173731327,
-4.8337302160916806e-8,
0.02323439158499241,
-0.01319771260023117,
0.018375122919678688,
0.11218908429145813,
0.020129211246967316,
-0.039836686104536057,
0.0437714084982872,
0.08478560298681259,
-0.033526599407196045,
0.06902346760034561,
0.04380640760064125,
-0.047813523560762405,
-0.037366386502981186,
0.03638463467359543,
0.06103752553462982,
-0.019877776503562927,
0.048689015209674835,
0.04614282771945,
-0.03345270827412605,
-0.0908447653055191,
-0.047992464154958725,
0.02297118864953518,
0.00635134894400835,
0.010145241394639015,
0.020555883646011353,
0.0032990213949233294,
0.058294400572776794,
0.03924933820962906,
0.02704836241900921,
-0.06631344556808472,
-0.03564714267849922,
0.02363256923854351,
-0.054915159940719604,
0.05938318744301796,
-0.0021223619114607573,
0.022912299260497093,
-0.10137072950601578,
0.06958640366792679,
0.015806075185537338,
0.02814214676618576,
-0.012931370176374912,
-0.05663876608014107,
-0.03683825954794884,
-0.035381510853767395,
0.02849283255636692,
0.07974672317504883,
-0.06320572644472122,
0.050477534532547,
0.01148722693324089,
0.03610461205244064,
0.07063319534063339,
-0.044191379100084305,
0.019316647201776505,
0.05738886445760727,
0.05516071617603302,
-0.012107979506254196,
-0.02328483760356903,
-0.03800949454307556,
0.0481128953397274,
-0.03225456550717354,
0.04868685454130173,
-0.024494966492056847,
-0.030668729916214943,
-0.01790882833302021
] | 0.080815
|
`external.metrics.k8s.io` [API](/docs/reference/external-api/external-metrics.v1beta1/). It may be provided by the custom metrics adapters provided above. For more information on these different metrics paths and how they differ please see the relevant design proposals for [the HPA V2](https://git.k8s.io/design-proposals-archive/autoscaling/hpa-v2.md), [custom.metrics.k8s.io](https://git.k8s.io/design-proposals-archive/instrumentation/custom-metrics-api.md) and [external.metrics.k8s.io](https://git.k8s.io/design-proposals-archive/instrumentation/external-metrics-api.md). For examples of how to use them see [the walkthrough for using custom metrics](/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#autoscaling-on-multiple-metrics-and-custom-metrics) and [the walkthrough for using external metrics](/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#autoscaling-on-metrics-not-related-to-kubernetes-objects). ## Configurable scaling behavior {{< feature-state for\_k8s\_version="v1.23" state="stable" >}} (the `autoscaling/v2beta2` API version previously provided this ability as a beta feature) If you use the `v2` HorizontalPodAutoscaler API, you can use the `behavior` field (see the [API reference](/docs/reference/kubernetes-api/workload-resources/horizontal-pod-autoscaler-v2/#HorizontalPodAutoscalerSpec)) to configure separate scale-up and scale-down behaviors. You specify these behaviors by setting `scaleUp` and / or `scaleDown` under the `behavior` field. Scaling policies let you control the rate of change of replicas while scaling. Also two settings can be used to prevent [flapping](#flapping): you can specify a \_stabilization window\_ for smoothing replica counts, and a tolerance to ignore minor metric fluctuations below a specified threshold. ### Scaling policies One or more scaling policies can be specified in the `behavior` section of the spec. When multiple policies are specified the policy which allows the highest amount of change is the policy which is selected by default. The following example shows this behavior while scaling down: ```yaml behavior: scaleDown: policies: - type: Pods value: 4 periodSeconds: 60 - type: Percent value: 10 periodSeconds: 60 ``` `periodSeconds` indicates the length of time in the past for which the policy must hold true. The maximum value that you can set for `periodSeconds` is 1800 (half an hour). The first policy \_(Pods)\_ allows at most 4 replicas to be scaled down in one minute. The second policy \_(Percent)\_ allows at most 10% of the current replicas to be scaled down in one minute. Since by default the policy which allows the highest amount of change is selected, the second policy will only be used when the number of pod replicas is more than 40. With 40 or less replicas, the first policy will be applied. For instance if there are 80 replicas and the target has to be scaled down to 10 replicas then during the first step 8 replicas will be reduced. In the next iteration when the number of replicas is 72, 10% of the pods is 7.2 but the number is rounded up to 8. On each loop of the autoscaler controller the number of pods to be change is re-calculated based on the number of current replicas. When the number of replicas falls below 40 the first policy \_(Pods)\_ is applied and 4 replicas will be reduced at a time. The policy selection can be changed by specifying the `selectPolicy` field for a scaling direction. By setting the value to `Min` which would select the policy which allows the smallest change in the replica count. Setting the value to `Disabled` completely disables scaling in that direction. ### Stabilization window The stabilization window is used to restrict the [flapping](#flapping) of replica count when the metrics used for scaling keep fluctuating. The autoscaling algorithm uses this window to infer a previous desired state and avoid unwanted changes to workload scale. For example, in the following example snippet, a stabilization window is specified for `scaleDown`. ```yaml behavior: scaleDown: stabilizationWindowSeconds: 300 ``` When the metrics indicate that the target should be scaled down the algorithm looks into previously computed desired states, and uses the highest value from the specified interval. In the above example, all desired states from the past 5 minutes will be considered. This approximates a rolling maximum, and avoids having the scaling algorithm frequently
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale.md
|
[
-0.07828186452388763,
-0.04795440286397934,
-0.03852666914463043,
-0.000676831288728863,
-0.05828969553112984,
-0.026869414374232292,
-0.05624477192759514,
0.10559525340795517,
0.04587428644299507,
-0.054372984915971756,
-0.0004221807175781578,
-0.058684222400188446,
-0.04483043774962425,
0.007452239282429218,
-0.061031274497509,
-0.04173994064331055,
0.07502815127372742,
0.04546663537621498,
-0.04006773233413696,
-0.0047731585800647736,
0.08082804828882217,
0.02739216946065426,
0.07634207606315613,
0.037019409239292145,
-0.027414560317993164,
-0.029334409162402153,
-0.017822405323386192,
0.033413875848054886,
-0.021645864471793175,
0.013204255141317844,
-0.012938786298036575,
0.06106908991932869,
-0.016297444701194763,
-0.01785682700574398,
0.03892320394515991,
0.06708451360464096,
0.030064787715673447,
-0.029448028653860092,
-0.07448745518922806,
-0.043827857822179794,
0.0014875613851472735,
-0.02097848244011402,
-0.007282568141818047,
0.01485805120319128,
-0.035954419523477554,
-0.02117956057190895,
-0.08027452230453491,
-0.04512517899274826,
-0.07495630532503128,
0.04473091661930084,
-0.0074228690937161446,
-0.06474880129098892,
-0.026136014610528946,
0.03149884194135666,
0.10749112814664841,
0.027083151042461395,
-0.017328746616840363,
0.05330580472946167,
0.034739553928375244,
0.004206879064440727,
0.05451981723308563,
-0.02246580831706524,
-0.06084652245044708,
0.02752034179866314,
0.02520081214606762,
-0.038821399211883545,
0.03793727234005928,
-0.007955633103847504,
-0.02344573475420475,
-0.010087110102176666,
-0.02500873990356922,
-0.05062536522746086,
-0.013936675153672695,
-0.03646935895085335,
0.04357316344976425,
0.033237144351005554,
-0.035728588700294495,
0.03620035946369171,
0.003229688387364149,
-0.15553990006446838,
-0.007300239987671375,
0.0920105054974556,
0.016286063939332962,
0.05027792602777481,
0.021921740844845772,
0.006400648504495621,
0.013193497434258461,
-0.005568045657128096,
0.1001051589846611,
-0.007007211446762085,
0.07435930520296097,
-0.02623596414923668,
-0.10021761059761047,
-0.09178192913532257,
0.015931468456983566,
-0.025720128789544106,
-0.05921494960784912,
0.003785246517509222,
0.0534617155790329,
-0.007293234579265118,
-0.007784300018101931,
0.021189061924815178,
-0.0627729743719101,
0.08212973177433014,
0.08001099526882172,
0.010368786752223969,
-0.021092509850859642,
0.04326096177101135,
0.013897158205509186,
0.08406895399093628,
0.033571090549230576,
0.004671774804592133,
-0.0055228001438081264,
-0.052328769117593765,
0.026150697842240334,
0.03836566582322121,
-0.018799731507897377,
-0.03968583047389984,
0.12671229243278503,
0.06978777050971985,
-0.09024227410554886,
-0.07729168236255646,
0.02736344374716282,
-0.0043350630439817905,
0.01818116195499897,
0.0698862075805664,
-0.10668998956680298,
-1.1932920699777062e-34,
0.04950171336531639,
-0.008258537389338017,
0.043250225484371185,
-0.08501263707876205,
-0.034000955522060394,
-0.04884094372391701,
-0.08746487647294998,
-0.006514288950711489,
0.012079380452632904,
-0.03561389446258545,
-0.046905480325222015,
0.15248437225818634,
-0.015619177371263504,
-0.030408380553126335,
0.09031514823436737,
-0.01582607999444008,
-0.05968908220529556,
0.10716404020786285,
0.053149715065956116,
0.028438301756978035,
0.09551562368869781,
-0.06981838494539261,
0.022491244599223137,
0.02118528261780739,
0.07120093703269958,
0.01287844032049179,
0.05294381454586983,
0.0018776822835206985,
-0.09011346846818924,
0.03826182708144188,
0.016386106610298157,
-0.022918978706002235,
-0.008816692978143692,
-0.021913807839155197,
-0.054781291633844376,
-0.07764437049627304,
-0.11598822474479675,
0.03138332441449165,
-0.0870635136961937,
-0.03299796208739281,
0.06879826635122299,
0.014565791934728622,
-0.027472276240587234,
-0.0959664061665535,
-0.0796731561422348,
-0.015026549808681011,
0.015193738043308258,
-0.028119049966335297,
0.09890655428171158,
-0.021965740248560905,
0.034303147345781326,
-0.006286866031587124,
0.03205513954162598,
-0.038718096911907196,
0.009889542125165462,
-0.02488846331834793,
0.05963491275906563,
-0.01707880198955536,
0.03275081515312195,
0.023572411388158798,
-0.05089856684207916,
0.041761551052331924,
0.05431084334850311,
-0.053665079176425934,
0.048716526478528976,
-0.02034001238644123,
-0.0136290043592453,
0.037416972219944,
-0.025171656161546707,
0.0029015426989644766,
-0.04467938840389252,
0.019527433440089226,
0.011604412458837032,
0.0324796661734581,
-0.00040344317676499486,
-0.07703296095132828,
0.023052727803587914,
0.011881890706717968,
-0.08235092461109161,
-0.014923760667443275,
-0.10303081572055817,
0.08190541714429855,
-0.0016491682035848498,
-0.0457695908844471,
-0.014455421827733517,
-0.038424812257289886,
0.04771551117300987,
-0.02598799392580986,
-0.08815012872219086,
-0.0088194003328681,
-0.028049562126398087,
-0.011933116242289543,
-0.06024061515927315,
0.020630162209272385,
-0.11736306548118591,
-2.6267240441749744e-33,
0.03420450538396835,
0.04990345984697342,
0.04671662673354149,
0.028514087200164795,
0.0439794659614563,
0.006962227635085583,
-0.010679288767278194,
0.10261037945747375,
0.05138826742768288,
0.03364961966872215,
-0.0315980464220047,
0.006637374870479107,
0.07665347307920456,
0.040344852954149246,
0.043960124254226685,
0.0016219844110310078,
-0.1044657900929451,
-0.055599913001060486,
0.011269545182585716,
-0.02569197490811348,
0.05532427132129669,
0.04058133810758591,
-0.012105925008654594,
0.053683310747146606,
0.01308650802820921,
-0.06770384311676025,
-0.035433925688266754,
0.011472045443952084,
-0.06612051278352737,
-0.0599159374833107,
0.0370839424431324,
-0.035431865602731705,
-0.07117396593093872,
0.044289518147706985,
-0.020364981144666672,
-0.03293155878782272,
-0.02885269559919834,
0.022099724039435387,
-0.0015052087837830186,
0.0630953311920166,
0.07710420340299606,
0.017410721629858017,
-0.050510793924331665,
0.031005937606096268,
-0.05978343263268471,
0.0011247893562540412,
-0.011495151557028294,
0.008271923288702965,
-0.06564079970121384,
-0.14549574255943298,
0.03827153518795967,
0.034871116280555725,
-0.03562021255493164,
0.06984750926494598,
-0.03330325335264206,
0.07534785568714142,
0.04748835414648056,
0.03452799469232559,
-0.029239892959594727,
-0.012465394102036953,
0.06518986076116562,
-0.12049395591020584,
0.01961989514529705,
0.040775950998067856,
-0.04782009869813919,
-0.01045833621174097,
0.002276864368468523,
-0.06241123378276825,
-0.07615404576063156,
0.047560323029756546,
-0.011522578075528145,
0.0006579638575203717,
-0.016711201518774033,
0.004400287289172411,
-0.012325316667556763,
-0.017589664086699486,
0.07233942300081253,
-0.033442698419094086,
0.05767938494682312,
-0.007082919590175152,
-0.06535003334283829,
0.058828480541706085,
0.05904831364750862,
0.06710384041070938,
0.02465491183102131,
0.00822833925485611,
0.051349785178899765,
0.10876408219337463,
0.01513751596212387,
0.057340990751981735,
-0.01111212745308876,
-0.02011619508266449,
-0.051398422569036484,
0.06491567939519882,
-0.040297530591487885,
-4.665379549351201e-8,
0.000847198476549238,
-0.02181329019367695,
-0.027495412155985832,
0.0738186165690422,
-0.07168285548686981,
-0.02527492865920067,
-0.009658966213464737,
0.10453332960605621,
0.01837151311337948,
0.05009480193257332,
0.05981050431728363,
-0.03173838555812836,
-0.053267765790224075,
0.07673074305057526,
-0.028797464445233345,
-0.048881784081459045,
-0.021286504343152046,
0.09361636638641357,
-0.06007020175457001,
0.0190664641559124,
-0.00023299192253034562,
0.05615837499499321,
0.018483750522136688,
-0.07987391203641891,
0.012903762981295586,
-0.004882334265857935,
-0.0007884582737460732,
0.008576422929763794,
-0.03404807671904564,
-0.10180460661649704,
0.0340765081346035,
0.07637982070446014,
0.0032333603594452143,
-0.003056740388274193,
-0.034247174859046936,
0.04866321012377739,
-0.08360186964273453,
0.11070038378238678,
-0.0023474679328501225,
0.09810687601566315,
0.0023416297044605017,
-0.0897052064538002,
-0.08922021836042404,
0.015525558032095432,
0.040034838020801544,
0.049434516578912735,
-0.042579054832458496,
0.05065056309103966,
-0.0688231810927391,
0.052949707955121994,
-0.02191745862364769,
-0.0625867247581482,
0.004346187692135572,
-0.03679483011364937,
0.04728815704584122,
-0.06108465418219566,
-0.033966802060604095,
-0.06924674659967422,
0.05350438505411148,
0.032298240810632706,
0.046734150499105453,
-0.025144366547465324,
-0.012926503084599972,
-0.008760842494666576
] | 0.180374
|
the target should be scaled down the algorithm looks into previously computed desired states, and uses the highest value from the specified interval. In the above example, all desired states from the past 5 minutes will be considered. This approximates a rolling maximum, and avoids having the scaling algorithm frequently remove Pods only to trigger recreating an equivalent Pod just moments later. ### Tolerance {#tolerance} {{< feature-state feature\_gate\_name="HPAConfigurableTolerance" >}} The `tolerance` field configures a threshold for metric variations, preventing the autoscaler from scaling for changes below that value. This tolerance is defined as the amount of variation around the desired metric value under which no scaling will occur. For example, consider a HorizontalPodAutoscaler configured with a target memory consumption of 100MiB and a scale-up tolerance of 5%: ```yaml behavior: scaleUp: tolerance: 0.05 # 5% tolerance for scale up ``` With this configuration, the HPA algorithm will only consider scaling up if the memory consumption is higher than 105MiB (that is: 5% above the target). If you don't set this field, the HPA applies the default cluster-wide tolerance of 10%. This default can be updated for both scale-up and scale-down using the [kube-controller-manager](/docs/reference/command-line-tools-reference/kube-controller-manager/) `--horizontal-pod-autoscaler-tolerance` command line argument. (You can't use the Kubernetes API to configure this default value.) ### Default behavior To use the custom scaling not all fields have to be specified. Only values which need to be customized can be specified. These custom values are merged with default values. The default values match the existing behavior in the HPA algorithm. ```yaml behavior: scaleDown: stabilizationWindowSeconds: 300 policies: - type: Percent value: 100 periodSeconds: 15 scaleUp: stabilizationWindowSeconds: 0 policies: - type: Percent value: 100 periodSeconds: 15 - type: Pods value: 4 periodSeconds: 15 selectPolicy: Max ``` For scaling down the stabilization window is \_300\_ seconds (or the value of the `--horizontal-pod-autoscaler-downscale-stabilization` command line option, if provided). There is only a single policy for scaling down which allows a 100% of the currently running replicas to be removed which means the scaling target can be scaled down to the minimum allowed replicas. For scaling up there is no stabilization window. When the metrics indicate that the target should be scaled up the target is scaled up immediately. There are 2 policies where 4 pods or a 100% of the currently running replicas may at most be added every 15 seconds till the HPA reaches its steady state. ### Example: change downscale stabilization window To provide a custom downscale stabilization window of 1 minute, the following behavior would be added to the HPA: ```yaml behavior: scaleDown: stabilizationWindowSeconds: 60 ``` ### Example: limit scale down rate To limit the rate at which pods are removed by the HPA to 10% per minute, the following behavior would be added to the HPA: ```yaml behavior: scaleDown: policies: - type: Percent value: 10 periodSeconds: 60 ``` To ensure that no more than 5 Pods are removed per minute, you can add a second scale-down policy with a fixed size of 5, and set `selectPolicy` to minimum. Setting `selectPolicy` to `Min` means that the autoscaler chooses the policy that affects the smallest number of Pods: ```yaml behavior: scaleDown: policies: - type: Percent value: 10 periodSeconds: 60 - type: Pods value: 5 periodSeconds: 60 selectPolicy: Min ``` ### Example: disable scale down The `selectPolicy` value of `Disabled` turns off scaling the given direction. So to prevent downscaling the following policy would be used: ```yaml behavior: scaleDown: selectPolicy: Disabled ``` ## Support for HorizontalPodAutoscaler in kubectl HorizontalPodAutoscaler, like every API resource, is supported in a standard way by `kubectl`. You can create a new autoscaler using `kubectl create` command. You
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale.md
|
[
0.015862921252846718,
0.008073078468441963,
-0.037973787635564804,
0.003925842233002186,
-0.03492172062397003,
-0.044443659484386444,
-0.0361897237598896,
0.04527835175395012,
-0.008793570101261139,
-0.039299946278333664,
0.0003703781112562865,
-0.015856262296438217,
-0.014471860602498055,
-0.008235080167651176,
-0.02996830828487873,
0.0033017206005752087,
0.0886467695236206,
0.05952230468392372,
-0.04841015860438347,
-0.04677816480398178,
0.07061004638671875,
-0.012572675943374634,
-0.00810317974537611,
0.08620285242795944,
-0.04922337457537651,
0.026104381307959557,
-0.024167994037270546,
-0.036374203860759735,
0.04732414707541466,
-0.01841670088469982,
-0.0283074788749218,
0.02321934700012207,
0.026580404490232468,
0.0061032469384372234,
-0.0033201673068106174,
0.01971856877207756,
-0.036737389862537384,
-0.1279088705778122,
-0.015250376425683498,
-0.039189908653497696,
0.015954041853547096,
-0.03729866445064545,
-0.08842174708843231,
0.027872903272509575,
0.012815328314900398,
0.00035720324376598,
-0.06741809099912643,
-0.020860057324171066,
-0.05392313376069069,
-0.019969020038843155,
0.014189480803906918,
-0.08670230954885483,
0.020722229033708572,
0.041702717542648315,
0.05537902191281319,
0.020976506173610687,
0.05988241359591484,
0.07764539867639542,
0.06701038777828217,
-0.03926216438412666,
-0.008333858102560043,
-0.05174373462796211,
-0.004178573843091726,
-0.03428751602768898,
0.059800177812576294,
-0.06824828684329987,
0.05747571215033531,
-0.08463006466627121,
0.034016985446214676,
0.0670686736702919,
0.05112484470009804,
-0.013831520453095436,
0.07245789468288422,
-0.03137463331222534,
0.028965234756469727,
-0.014461993239820004,
-0.11990796774625778,
0.017985546961426735,
0.048092227429151535,
0.018743373453617096,
-0.003710861084982753,
0.020235812291502953,
0.01214724499732256,
-0.0007779644802212715,
0.004189840983599424,
-0.04331732168793678,
-0.018659571185708046,
-0.0010231146588921547,
0.10602740943431854,
0.009801018051803112,
0.029801221564412117,
0.028437664732336998,
-0.04927367717027664,
-0.0773988738656044,
0.006975934840738773,
-0.05662298575043678,
-0.016131458804011345,
-0.03492626175284386,
0.01813443750143051,
-0.03246159851551056,
0.04609380289912224,
0.0167232733219862,
0.010541494004428387,
0.03575094789266586,
0.0905923917889595,
-0.04768100008368492,
-0.03945966064929962,
-0.004350852686911821,
0.03696529567241669,
0.055747441947460175,
0.021416744217276573,
0.04600934684276581,
0.05521668493747711,
0.03352710232138634,
0.008404265157878399,
0.06733555346727371,
-0.021353119984269142,
0.011024932377040386,
0.030971184372901917,
-0.005548147018998861,
-0.0804920643568039,
-0.06821490079164505,
0.01711602695286274,
-0.022903982549905777,
-0.02321174181997776,
0.09794589132070541,
-0.09541168063879013,
4.8836930342209365e-33,
-0.00766382971778512,
-0.07678721100091934,
-0.049853794276714325,
-0.11975489556789398,
-0.03575428947806358,
-0.05974279344081879,
-0.05435403063893318,
-0.013295979239046574,
-0.01868441514670849,
-0.052115436643362045,
-0.028070826083421707,
0.05724078789353371,
-0.04598549008369446,
0.040503934025764465,
0.09227634221315384,
-0.11726067215204239,
-0.025293152779340744,
0.10960227996110916,
0.015035660937428474,
-0.016688557341694832,
0.07781590521335602,
-0.09987663477659225,
-0.04242103174328804,
-0.013260042294859886,
-0.016523852944374084,
-0.019003700464963913,
-0.04008978605270386,
-0.04765138402581215,
-0.11765491962432861,
0.046218786388635635,
-0.05979953706264496,
0.0011640486773103476,
-0.019932400435209274,
-0.005087809171527624,
-0.020587312057614326,
-0.07125318050384521,
-0.023213107138872147,
-0.02810726687312126,
-0.02830358035862446,
-0.08222147822380066,
0.03545811027288437,
0.05269170179963112,
0.04255984351038933,
-0.08732672035694122,
-0.006224230397492647,
-0.01865207776427269,
0.06133095547556877,
-0.016268396750092506,
-0.05016479268670082,
0.007278102450072765,
0.08511469513177872,
-0.04201279208064079,
0.027078712359070778,
-0.07263074070215225,
0.027815230190753937,
-0.03877456858754158,
0.06032898277044296,
-0.01607944816350937,
0.03814653307199478,
0.055374495685100555,
-0.020512236282229424,
-0.08272489905357361,
0.032867852598428726,
0.003022289602085948,
0.07518475502729416,
0.08959108591079712,
-0.04215584322810173,
0.04032712057232857,
-0.05469651147723198,
0.09764020144939423,
0.04556846246123314,
0.021819476038217545,
-0.02160418964922428,
0.00424195546656847,
-0.012817624025046825,
-0.07186349481344223,
0.13834930956363678,
0.08230400085449219,
-0.1067473292350769,
-0.028175663203001022,
-0.035132281482219696,
0.11923959851264954,
-0.027671227231621742,
-0.0033438082318753004,
-0.014439502730965614,
-0.09641659259796143,
0.02522692270576954,
0.0042116036638617516,
-0.1877749115228653,
0.04129263386130333,
0.03898550570011139,
-0.051612306386232376,
0.0518709272146225,
0.04891936853528023,
-0.10896191745996475,
-4.3373519126335386e-33,
0.027215173467993736,
-0.029814161360263824,
0.057178959250450134,
0.06781747937202454,
-0.004893045406788588,
0.022567998617887497,
-0.019289351999759674,
0.06879018247127533,
0.04940783232450485,
-0.07067447155714035,
-0.060944054275751114,
-0.009801369160413742,
0.00540150934830308,
0.04302747920155525,
-0.07695164531469345,
0.01991044357419014,
-0.05395030975341797,
-0.07179664820432663,
-0.005382619332522154,
0.034993741661310196,
0.08357744663953781,
-0.013361798599362373,
0.005492731463164091,
0.09220832586288452,
0.03144286200404167,
-0.07014818489551544,
-0.05290241912007332,
0.0132818091660738,
-0.013992812484502792,
-0.10629014670848846,
0.0005414126790128648,
-0.05070395767688751,
-0.04467138275504112,
0.007783892564475536,
0.033168304711580276,
-0.047770339995622635,
0.01165089476853609,
0.030575236305594444,
0.05004509165883064,
0.08284173160791397,
0.11799998581409454,
0.030411262065172195,
-0.11645723879337311,
0.01845373399555683,
0.0226148571819067,
0.01803896762430668,
0.027996329590678215,
0.014190439134836197,
-0.02579178474843502,
-0.03746233135461807,
0.007059373892843723,
0.029446037486195564,
-0.015075075440108776,
0.10527143627405167,
-0.06439152359962463,
0.07011518627405167,
0.013219684362411499,
0.009197836741805077,
-0.033675238490104675,
-0.02615918219089508,
0.019936272874474525,
-0.09691005945205688,
0.009860413148999214,
-0.012005741707980633,
-0.04006632789969444,
0.06454819440841675,
0.03747963905334473,
0.023307261988520622,
0.006784760393202305,
0.023203296586871147,
0.08975140005350113,
0.027854355052113533,
0.08504403382539749,
0.015887869521975517,
-0.06127754598855972,
-0.09869721531867981,
0.01053779199719429,
-0.09570983052253723,
0.08280323445796967,
-0.04139615222811699,
-0.09211190044879913,
0.0999055728316307,
-0.022818712517619133,
0.02354004792869091,
0.05272700637578964,
0.05874883010983467,
-0.011333496309816837,
0.038992661982774734,
0.034087326377630234,
0.08319969475269318,
0.005840637721121311,
-0.010460481978952885,
-0.056256555020809174,
0.04612446948885918,
-0.05003403499722481,
-5.382734258319033e-8,
-0.00729156332090497,
0.0006033023819327354,
-0.018144750967621803,
0.09450937062501907,
0.06142668053507805,
-0.014418943785130978,
0.060637474060058594,
-0.005868262145668268,
-0.0015242112567648292,
0.00003510534588713199,
0.10882094502449036,
-0.02542034536600113,
-0.06224962696433067,
0.03476692736148834,
0.06318338215351105,
-0.008046811446547508,
0.06032150983810425,
0.022571736946702003,
-0.01966378465294838,
-0.004371372051537037,
-0.031175589188933372,
-0.009823662228882313,
0.009770031087100506,
0.009526671841740608,
0.039378657937049866,
-0.0016450207913294435,
0.03503052890300751,
0.0900554284453392,
0.005767574533820152,
-0.04568873718380928,
-0.0038070951122790575,
0.028197862207889557,
-0.04665573313832283,
0.08988898247480392,
-0.005940611939877272,
0.02763325721025467,
-0.05566088482737541,
0.09699703752994537,
0.02302088774740696,
0.03556986153125763,
-0.0034815859980881214,
-0.021109800785779953,
-0.07987730205059052,
0.02617373876273632,
0.004750847350805998,
0.07494436949491501,
0.0026465612463653088,
0.029129208996891975,
0.009472100995481014,
0.06973061710596085,
0.05399573594331741,
-0.0036956951953470707,
0.02951662987470627,
0.04201935604214668,
-0.01307215541601181,
-0.03373773396015167,
-0.008821742609143257,
-0.029750727117061615,
0.004763924982398748,
-0.017110785469412804,
0.0821387991309166,
-0.0320843942463398,
-0.02174113690853119,
-0.016781702637672424
] | 0.136708
|
scaling the given direction. So to prevent downscaling the following policy would be used: ```yaml behavior: scaleDown: selectPolicy: Disabled ``` ## Support for HorizontalPodAutoscaler in kubectl HorizontalPodAutoscaler, like every API resource, is supported in a standard way by `kubectl`. You can create a new autoscaler using `kubectl create` command. You can list autoscalers by `kubectl get hpa` or get detailed description by `kubectl describe hpa`. Finally, you can delete an autoscaler using `kubectl delete hpa`. In addition, there is a special `kubectl autoscale` command for creating a HorizontalPodAutoscaler object. For instance, executing `kubectl autoscale rs foo --min=2 --max=5 --cpu-percent=80` will create an autoscaler for ReplicaSet \_foo\_, with target CPU utilization set to `80%` and the number of replicas between 2 and 5. ## Implicit maintenance-mode deactivation You can implicitly deactivate the HPA for a target without the need to change the HPA configuration itself. If the target's desired replica count is set to 0, and the HPA's minimum replica count is greater than 0, the HPA stops adjusting the target (and sets the `ScalingActive` Condition on itself to `false`) until you reactivate it by manually adjusting the target's desired replica count or HPA's minimum replica count. ### Migrating Deployments and StatefulSets to horizontal autoscaling When an HPA is enabled, it is recommended that the value of `spec.replicas` of the Deployment and / or StatefulSet be removed from their {{< glossary\_tooltip text="manifest(s)" term\_id="manifest" >}}. If this isn't done, any time a change to that object is applied, for example via `kubectl apply -f deployment.yaml`, this will instruct Kubernetes to scale the current number of Pods to the value of the `spec.replicas` key. This may not be desired and could be troublesome when an HPA is active, resulting in thrashing or flapping behavior. Keep in mind that the removal of `spec.replicas` may incur a one-time degradation of Pod counts as the default value of this key is 1 (reference [Deployment Replicas](/docs/concepts/workloads/controllers/deployment#replicas)). Upon the update, all Pods except 1 will begin their termination procedures. Any deployment application afterwards will behave as normal and respect a rolling update configuration as desired. You can avoid this degradation by choosing one of the following two methods based on how you are modifying your deployments: {{< tabs name="fix\_replicas\_instructions" >}} {{% tab name="Client Side Apply (this is the default)" %}} 1. `kubectl apply edit-last-applied deployment/` 2. In the editor, remove `spec.replicas`. When you save and exit the editor, `kubectl` applies the update. No changes to Pod counts happen at this step. 3. You can now remove `spec.replicas` from the manifest. If you use source code management, also commit your changes or take whatever other steps for revising the source code are appropriate for how you track updates. 4. From here on out you can run `kubectl apply -f deployment.yaml` {{% /tab %}} {{% tab name="Server Side Apply" %}} When using the [Server-Side Apply](/docs/reference/using-api/server-side-apply/) you can follow the [transferring ownership](/docs/reference/using-api/server-side-apply/#transferring-ownership) guidelines, which cover this exact use case. {{% /tab %}} {{< /tabs >}} ## {{% heading "whatsnext" %}} If you configure autoscaling in your cluster, you may also want to consider using [node autoscaling](/docs/concepts/cluster-administration/node-autoscaling/) to ensure you are running the right number of nodes. You can also read more about [\_vertical\_ Pod autoscaling](/docs/concepts/workloads/autoscaling/vertical-pod-autoscale/). For more information on HorizontalPodAutoscaler: - Read a [walkthrough example](/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/) for horizontal pod autoscaling. - Read documentation for [`kubectl autoscale`](/docs/reference/generated/kubectl/kubectl-commands/#autoscale). - If you would like to write your own custom metrics adapter, check out the [boilerplate](https://github.com/kubernetes-sigs/custom-metrics-apiserver) to get started. - Read the [API reference](/docs/reference/kubernetes-api/workload-resources/horizontal-pod-autoscaler-v2/) for HorizontalPodAutoscaler.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale.md
|
[
-0.02909121662378311,
0.041932255029678345,
0.04219468683004379,
-0.011017147451639175,
-0.10931047797203064,
-0.0763978511095047,
-0.050323568284511566,
-0.00021504076721612364,
0.007868773303925991,
0.03181329369544983,
-0.001502125058323145,
-0.045195527374744415,
-0.04756764695048332,
-0.025930898264050484,
-0.02929091267287731,
-0.019779950380325317,
0.039477989077568054,
0.05207105353474617,
-0.09167399257421494,
-0.05480460822582245,
0.0043174088932573795,
-0.03394704684615135,
-0.023665493354201317,
0.07989581674337387,
-0.007452558726072311,
-0.03711184859275818,
-0.021679712459445,
0.013943209312856197,
0.010204227641224861,
-0.06991240382194519,
-0.04011180251836777,
0.04271801561117172,
-0.00516866659745574,
0.04081623628735542,
0.050623536109924316,
0.0471256822347641,
-0.03946901112794876,
-0.10402720421552658,
-0.027667755261063576,
-0.021324031054973602,
0.05889469012618065,
-0.03541695326566696,
-0.13220466673374176,
0.011405259370803833,
-0.017052141949534416,
0.016164204105734825,
-0.10538849234580994,
-0.008394020609557629,
0.012878582812845707,
-0.03410385549068451,
0.013978563249111176,
-0.07372571527957916,
0.021669041365385056,
-0.02255471982061863,
0.05954451486468315,
-0.020383091643452644,
0.08203531801700592,
0.02265249937772751,
0.06717152148485184,
0.029988810420036316,
0.040012769401073456,
0.028774909675121307,
0.009476603008806705,
-0.03586101159453392,
-0.009191098622977734,
-0.015323109924793243,
0.010107184760272503,
-0.06692823767662048,
0.027811871841549873,
0.09655118733644485,
0.06131565570831299,
-0.048606228083372116,
0.03209836035966873,
-0.010367108508944511,
-0.005661208648234606,
-0.034584179520606995,
-0.1466216742992401,
0.017251303419470787,
0.017059776932001114,
0.00026682892348617315,
0.012552238069474697,
0.05911286920309067,
0.011981586925685406,
0.04293844848871231,
-0.07457835227251053,
-0.045585714280605316,
0.0003552603011485189,
-0.04099290072917938,
0.12874291837215424,
0.0006714077317155898,
0.01569901406764984,
0.007545387372374535,
0.005776228848844767,
-0.08331470191478729,
0.02137901820242405,
-0.08504696935415268,
-0.0478861965239048,
-0.10244761407375336,
0.03401782363653183,
-0.03243745490908623,
0.06796538084745407,
0.027545539662241936,
0.07608190178871155,
0.05656778812408447,
0.01865672506392002,
-0.050366077572107315,
-0.05148138850927353,
0.017719872295856476,
0.02436227723956108,
0.04540035128593445,
-0.04571720212697983,
0.11465932428836823,
-0.016828350722789764,
0.015201437287032604,
-0.015009456314146519,
0.07167106866836548,
0.07157521694898605,
-0.03192569687962532,
0.018772067502141,
0.005328714847564697,
0.000550520489923656,
-0.051854208111763,
-0.007116909138858318,
-0.002885740716010332,
0.037434279918670654,
0.08632146567106247,
-0.07450872659683228,
5.689849631408754e-33,
0.017276911064982414,
-0.08507240563631058,
0.05528896674513817,
-0.08275093138217926,
-0.028557682409882545,
-0.025318672880530357,
-0.056249529123306274,
-0.027345264330506325,
-0.041654232889413834,
-0.06211618334054947,
-0.025800932198762894,
0.08825068920850754,
-0.014985660091042519,
0.019093824550509453,
0.05713294446468353,
-0.06948605179786682,
0.013702954165637493,
0.09967675805091858,
0.028006022796034813,
-0.033462852239608765,
0.09313135594129562,
-0.10538934171199799,
-0.046556256711483,
-0.0026721996255218983,
-0.0006459407741203904,
-0.05088789388537407,
-0.004583414644002914,
-0.09206213057041168,
-0.1238175630569458,
0.03575426712632179,
-0.06307793408632278,
-0.06061255559325218,
-0.02077348716557026,
0.015404589474201202,
-0.10541350394487381,
-0.056214988231658936,
-0.06873252242803574,
0.039550285786390305,
-0.08656299114227295,
-0.008777931332588196,
0.05122902989387512,
0.008569404482841492,
-0.006834439467638731,
-0.08291671425104141,
0.03530515357851982,
0.015922071412205696,
0.07854603230953217,
-0.02128220722079277,
-0.07412875443696976,
-0.044510625302791595,
0.09029781818389893,
0.00048480668920092285,
0.051766812801361084,
-0.08425456285476685,
0.055147893726825714,
-0.013704031705856323,
0.1744169443845749,
-0.02771843411028385,
0.02293470874428749,
-0.03858521953225136,
-0.038610704243183136,
-0.04515757039189339,
-0.034408412873744965,
0.03396597132086754,
0.052892912179231644,
-0.026072800159454346,
-0.057052578777074814,
0.029291313141584396,
-0.09990682452917099,
0.07522740215063095,
-0.006721422541886568,
0.031063159927725792,
0.01595640741288662,
0.03021572344005108,
-0.036081407219171524,
-0.07570018619298935,
0.02566167339682579,
0.0459115207195282,
-0.11182195693254471,
0.012814073823392391,
0.03176560997962952,
0.05082195624709129,
0.02382432110607624,
-0.03954105079174042,
0.012038281187415123,
-0.08315412700176239,
0.04430009797215462,
-0.014332861639559269,
-0.07357849180698395,
0.04450307413935661,
-0.04116686433553696,
-0.06696832925081253,
-0.0040716612711548805,
0.024090226739645004,
-0.07056554406881332,
-6.77204132218643e-33,
0.0670933723449707,
-0.026790639385581017,
0.052531007677316666,
0.047157108783721924,
0.00025380111765116453,
0.028599482029676437,
0.014449718408286572,
0.15287946164608002,
-0.033974602818489075,
-0.07301083952188492,
-0.04468526691198349,
-0.008134040050208569,
0.018044384196400642,
0.014112569391727448,
0.006370624527335167,
0.055063944309949875,
-0.031274233013391495,
-0.0056419516913592815,
-0.019356055185198784,
0.04781772196292877,
0.011066978797316551,
-0.004568975884467363,
0.030098235234618187,
0.07449974864721298,
0.06228048726916313,
-0.05791464447975159,
-0.05520516261458397,
0.08814382553100586,
-0.06398841738700867,
-0.036293208599090576,
-0.013930661603808403,
-0.05651942640542984,
0.03486470878124237,
0.02336185611784458,
-0.004787256941199303,
-0.05718466639518738,
-0.044589608907699585,
0.07449573278427124,
0.0067050582729279995,
0.04388677328824997,
0.05340982973575592,
0.0014848969876766205,
-0.04299343377351761,
-0.006937490776181221,
-0.0224133413285017,
-0.01644793525338173,
0.03148716315627098,
-0.028519995510578156,
-0.04335123673081398,
-0.06805315613746643,
-0.0407024584710598,
0.01692832261323929,
0.012463361024856567,
0.08581304550170898,
-0.024742882698774338,
0.07507336139678955,
0.022722909227013588,
0.024932151660323143,
-0.05871043726801872,
-0.011784358881413937,
0.04744062200188637,
-0.10555963218212128,
0.05567797273397446,
0.0006996875163167715,
0.000418521260144189,
-0.02551320008933544,
0.0337645560503006,
-0.0037102585192769766,
-0.03477488085627556,
0.020773572847247124,
0.02493629977107048,
0.056082963943481445,
0.011393741704523563,
0.04271584376692772,
-0.024620315060019493,
-0.0576292984187603,
0.008625932969152927,
-0.021529071033000946,
0.08796472102403641,
-0.0027117591816931963,
-0.046527620404958725,
0.05608366057276726,
0.009291145950555801,
0.025436347350478172,
0.007451348938047886,
0.036311253905296326,
-0.020846858620643616,
0.09116729348897934,
0.04022593051195145,
0.11731152981519699,
0.003051432315260172,
-0.045514464378356934,
-0.01759403571486473,
0.06389427185058594,
-0.004206261597573757,
-4.51775754584105e-8,
0.007539340760558844,
-0.01185674499720335,
-0.01515823882073164,
0.10417470335960388,
0.038477178663015366,
-0.06779860705137253,
0.006515107583254576,
0.09464435279369354,
0.03418566286563873,
-0.016298288479447365,
0.021064769476652145,
0.023012252524495125,
-0.05162441357970238,
0.07086914032697678,
0.028396576642990112,
-0.039500247687101364,
0.03799301013350487,
0.05863137170672417,
-0.002693920861929655,
-0.05729499086737633,
-0.06830369681119919,
0.0015692790038883686,
0.00029727950459346175,
0.019706225022673607,
0.05069498345255852,
0.022003410384058952,
0.034967780113220215,
0.05463361740112305,
0.060018595308065414,
-0.02658802643418312,
-0.04218795523047447,
0.02908126451075077,
-0.04719347879290581,
0.08146748691797256,
0.003718483028933406,
0.002767713740468025,
-0.10315131396055222,
0.12498095631599426,
-0.01226020883768797,
0.008601212874054909,
0.013978916220366955,
0.005074340384453535,
-0.14716854691505432,
-0.0059423744678497314,
0.03195531666278839,
0.07116815447807312,
-0.01944049820303917,
0.02444268763065338,
0.005292667541652918,
0.0385446771979332,
0.04745369404554367,
-0.04525011405348778,
0.04676058515906334,
0.10305557399988174,
-0.02852129191160202,
0.031028782948851585,
0.005610697437077761,
-0.04546960070729256,
-0.019378555938601494,
0.010678100399672985,
0.02655044198036194,
-0.04428277164697647,
-0.01672590896487236,
0.010267113335430622
] | 0.108217
|
documentation for [`kubectl autoscale`](/docs/reference/generated/kubectl/kubectl-commands/#autoscale). - If you would like to write your own custom metrics adapter, check out the [boilerplate](https://github.com/kubernetes-sigs/custom-metrics-apiserver) to get started. - Read the [API reference](/docs/reference/kubernetes-api/workload-resources/horizontal-pod-autoscaler-v2/) for HorizontalPodAutoscaler.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale.md
|
[
0.020694486796855927,
-0.010148578323423862,
0.027176789939403534,
-0.03268555924296379,
-0.11368420720100403,
-0.0008597050909884274,
-0.027194054797291756,
0.0666840448975563,
0.025367816910147667,
0.004775614477694035,
-0.025424739345908165,
-0.06079631671309471,
-0.031608108431100845,
0.012753710150718689,
-0.05860639736056328,
-0.049708254635334015,
0.02143966220319271,
0.10724502056837082,
-0.04992937669157982,
-0.07625031471252441,
0.02214297093451023,
-0.048424795269966125,
0.005488830152899027,
-0.009643130004405975,
-0.016896970570087433,
-0.04762536287307739,
-0.022640330716967583,
-0.03883424028754234,
-0.00023709062952548265,
-0.030915765091776848,
-0.06718389689922333,
0.039373330771923065,
0.055997613817453384,
0.02778264880180359,
0.005529188085347414,
0.0118454834446311,
-0.0027597546577453613,
-0.09632191061973572,
-0.07688046246767044,
-0.008568964898586273,
0.017627058550715446,
-0.0646926537156105,
-0.02321586012840271,
0.007455719634890556,
-0.05552580580115318,
0.008745960891246796,
-0.0746779665350914,
-0.013975844718515873,
0.00680973194539547,
0.01835484988987446,
0.024676281958818436,
-0.07737474143505096,
0.021678222343325615,
0.02337414212524891,
0.07397730648517609,
0.02752479910850525,
0.026898954063653946,
0.005123615730553865,
0.11079728603363037,
-0.0307601448148489,
0.06978386640548706,
0.022436300292611122,
-0.0007884762599132955,
-0.04421977698802948,
-0.0031129701528698206,
-0.004145337268710136,
-0.004956155549734831,
-0.014136956073343754,
-0.019819816574454308,
0.025006219744682312,
-0.005523750092834234,
-0.07374386489391327,
-0.009514936245977879,
-0.03804069757461548,
0.012845280580222607,
-0.02173731103539467,
-0.07154764980077744,
0.06679514795541763,
-0.012102189473807812,
-0.018473010510206223,
0.009220033884048462,
0.11425791680812836,
0.08020792156457901,
0.03470059484243393,
-0.031047090888023376,
-0.00523240864276886,
-0.0019489072728902102,
0.011848125606775284,
0.05777675658464432,
-0.03954062610864639,
0.010036158375442028,
-0.02685401774942875,
-0.10113851726055145,
-0.1101108118891716,
0.0028916941955685616,
-0.09989528357982635,
-0.09075243026018143,
-0.0611080601811409,
0.03578665107488632,
-0.06251823902130127,
0.04754607379436493,
0.012872281484305859,
0.0076539237052202225,
0.05377582833170891,
0.10965070873498917,
-0.0009727998985908926,
-0.07055961340665817,
0.0018010082421824336,
0.08491573482751846,
0.0723557099699974,
-0.009491955861449242,
0.0869741216301918,
-0.014065861701965332,
-0.011103641241788864,
0.04415898770093918,
0.06495323032140732,
0.025473227724432945,
-0.032186999917030334,
0.07967092841863632,
0.03123803250491619,
-0.006766681093722582,
-0.06653732061386108,
-0.029509326443076134,
0.01676270179450512,
0.02391873300075531,
0.14825598895549774,
-0.028957460075616837,
2.129736558002079e-34,
-0.018105220049619675,
-0.05250362679362297,
0.05915706232190132,
-0.021786540746688843,
-0.07752389460802078,
-0.054787468165159225,
-0.047975100576877594,
0.020081384107470512,
0.014901346527040005,
-0.12130363285541534,
-0.04201851785182953,
0.12327046692371368,
-0.018726978451013565,
0.03977317735552788,
0.04428761079907417,
-0.08300886303186417,
-0.09010116755962372,
0.04078065603971481,
0.056615401059389114,
-0.006067873444408178,
0.013900941237807274,
-0.10373727232217789,
-0.011694001965224743,
0.033881738781929016,
0.039710529148578644,
-0.067528136074543,
-0.0023499829694628716,
-0.020312564447522163,
-0.11731491982936859,
0.03044819086790085,
-0.028540225699543953,
-0.0766117200255394,
0.021873215213418007,
-0.011230077594518661,
-0.07779518514871597,
-0.06541330367326736,
-0.08223394304513931,
0.09841008484363556,
-0.08239114284515381,
-0.010665965266525745,
0.048082444816827774,
-0.030595920979976654,
-0.036297302693128586,
-0.1135781779885292,
-0.011380801908671856,
0.06363609433174133,
0.07514510303735733,
-0.013251638039946556,
0.0685725137591362,
-0.06779085844755173,
0.07776010781526566,
0.015202701091766357,
0.049732111394405365,
-0.05963755026459694,
0.09180772304534912,
0.02435752935707569,
0.10853587836027145,
-0.02132573351264,
-0.01829414814710617,
0.038198404014110565,
-0.08157391101121902,
-0.052359357476234436,
0.022022949531674385,
0.010717066936194897,
0.05682303383946419,
-0.01625114120543003,
-0.02083437144756317,
0.059359751641750336,
-0.03759540989995003,
0.03237762674689293,
-0.00837781373411417,
0.009647822938859463,
0.01692790538072586,
0.03736863285303116,
-0.03267600014805794,
-0.004042723681777716,
0.015465973876416683,
0.024338489398360252,
-0.05916567146778107,
0.034040436148643494,
-0.005629527382552624,
0.05657019838690758,
0.062397826462984085,
-0.034798476845026016,
0.00793396309018135,
-0.0651409700512886,
0.02975687012076378,
0.00022302688739728183,
-0.06451999396085739,
0.018133005127310753,
-0.014103556983172894,
-0.029791563749313354,
-0.048064909875392914,
0.06830157339572906,
-0.09775277227163315,
-2.2718101572380705e-33,
0.08278251439332962,
0.02190452814102173,
0.002178181428462267,
0.0439869649708271,
0.014035047963261604,
0.015830697491765022,
0.021388739347457886,
0.1463462859392166,
-0.029243571683764458,
-0.04435429722070694,
-0.05402369424700737,
0.0027608212549239397,
-0.000963339174631983,
0.015088445506989956,
-0.025211654603481293,
0.011896107345819473,
-0.07242518663406372,
-0.01742887683212757,
-0.031578149646520615,
0.020562848076224327,
0.05861378461122513,
-0.03003040887415409,
0.029502732679247856,
-0.0011038454249501228,
0.03255380690097809,
-0.05242941901087761,
0.02713395096361637,
0.02686476893723011,
-0.07154174149036407,
-0.035170622169971466,
0.009094261564314365,
-0.07333039492368698,
0.05417444184422493,
0.06633776426315308,
-0.012396511621773243,
-0.0787692666053772,
-0.050614599138498306,
0.05019025877118111,
0.05391431972384453,
0.0005422437097877264,
0.014465685933828354,
0.036804232746362686,
-0.015738818794488907,
-0.05796113237738609,
-0.012151808477938175,
-0.01127644907683134,
0.0004979635705240071,
0.0210095401853323,
-0.039204780012369156,
-0.12507042288780212,
-0.03283622860908508,
0.05031222850084305,
-0.007168053183704615,
0.09341034293174744,
-0.05976467579603195,
0.06779256463050842,
0.04820612445473671,
0.03968866541981697,
-0.0059687476605176926,
0.016386834904551506,
-0.021661842241883278,
-0.14332985877990723,
0.06535324454307556,
0.014110217802226543,
-0.015352729707956314,
-0.002354114316403866,
0.028303558006882668,
-0.017394110560417175,
-0.06839977204799652,
0.0683121532201767,
0.034891121089458466,
0.009665222838521004,
0.04601100832223892,
0.03456554189324379,
-0.04850943759083748,
-0.0495527982711792,
0.07259748876094818,
-0.01583554409444332,
0.08589071035385132,
-0.04233390465378761,
-0.0708061009645462,
0.016763336956501007,
0.019206129014492035,
0.07567988336086273,
-0.0076302653178572655,
0.03429486230015755,
0.04653207212686539,
0.07048223167657852,
0.08012590557336807,
0.1013147234916687,
0.0132295498624444,
-0.02595282718539238,
-0.05020666494965553,
0.04995656758546829,
0.010305066592991352,
-4.467383618589338e-8,
0.0006385851302184165,
0.01013081893324852,
-0.010573534294962883,
0.08265288174152374,
-0.02819693833589554,
0.010599126107990742,
0.009435123763978481,
0.03885280713438988,
-0.01845337636768818,
0.04605856165289879,
-0.00086401985026896,
-0.03182654455304146,
-0.0342693030834198,
0.09012091159820557,
-0.010607383213937283,
-0.06982820481061935,
0.016921434551477432,
0.07975927740335464,
0.0256841778755188,
-0.027634724974632263,
-0.05836745724081993,
0.039174824953079224,
0.04016822203993797,
-0.020388778299093246,
0.029342161491513252,
0.015766413882374763,
-0.01012300793081522,
0.05910511314868927,
0.051929861307144165,
-0.055863529443740845,
-0.005828132387250662,
0.05209038779139519,
-0.06241605803370476,
0.0576559454202652,
-0.0003721913672052324,
0.03627593442797661,
-0.18332073092460632,
0.11384385079145432,
0.004053445532917976,
0.05415889248251915,
0.023051053285598755,
0.0035449527204036713,
-0.08871003985404968,
-0.026976756751537323,
0.034751418977975845,
0.061664704233407974,
-0.06521790474653244,
0.074688620865345,
-0.0224122516810894,
0.03569390997290611,
0.04748640954494476,
-0.04229117929935455,
-0.007241278886795044,
0.01466051023453474,
0.014969727955758572,
0.007608565501868725,
-0.018946023657917976,
-0.044905249029397964,
0.003965472802519798,
-0.004136265721172094,
-0.011333698406815529,
0.01525378879159689,
-0.0948457270860672,
0.00003944174022763036
] | 0.120842
|
In Kubernetes, a \_VerticalPodAutoscaler\_ automatically updates a workload management {{< glossary\_tooltip text="resource" term\_id="api-resource" >}} (such as a {{< glossary\_tooltip text="Deployment" term\_id="deployment" >}} or {{< glossary\_tooltip text="StatefulSet" term\_id="statefulset" >}}), with the aim of automatically adjusting infrastructure {{< glossary\_tooltip text="resource" term\_id="infrastructure-resource" >}} [requests and limits](/docs/concepts/configuration/manage-resources-containers/#requests-and-limits) to match actual usage. Vertical scaling means that the response to increased resource demand is to assign more resources (for example: memory or CPU) to the {{< glossary\_tooltip text="Pods" term\_id="pod" >}} that are already running for the workload. This is also known as \_rightsizing\_, or sometimes \_autopilot\_. This is different from horizontal scaling, which for Kubernetes would mean deploying more Pods to distribute the load. If the resource usage decreases, and the Pod resource requests are above optimal levels, the VerticalPodAutoscaler instructs the workload resource (the Deployment, StatefulSet, or other similar resource) to adjust resource requests back down, preventing resource waste. The VerticalPodAutoscaler is implemented as a Kubernetes API resource and a {{< glossary\_tooltip text="controller" term\_id="controller" >}}. The resource determines the behavior of the controller. The vertical pod autoscaling controller, running within the Kubernetes data plane, periodically adjusts the resource requests and limits of its target (for example, a Deployment) based on analysis of historical resource utilization, the amount of resources available in the cluster, and real-time events such as out-of-memory (OOM) conditions. ## API object The VerticalPodAutoscaler is defined as a {{< glossary\_tooltip text="Custom Resource Definition" term\_id="customresourcedefinition" >}} (CRD) in Kubernetes. Unlike HorizontalPodAutoscaler, which is part of the core Kubernetes API, VPA must be installed separately in your cluster. The current stable API version is `autoscaling.k8s.io/v1`. More details about the VPA installation and API can be found in the [VPA GitHub repository](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler). ## How does a VerticalPodAutoscaler work? {{< mermaid >}} graph BT metrics[Metrics Server] api[API Server] admission[VPA Admission Controller] vpa\_cr[VerticalPodAutoscaler CRD] recommender[VPA recommender] updater[VPA updater] metrics --> recommender recommender -->|Stores Recommendations| vpa\_cr subgraph Application Workload controller[Deployment / RC / StatefulSet] pod[Pod / Container] end vpa\_cr -->|Checks for changes| updater updater -->|Evicts Pod or Updates in place| controller controller -->|Requests new Pod| api api -->|New Pod Creation| admission admission -->|Retrieves latest recommendation| vpa\_cr admission -->|Injects new resource values| api api -->|Creates Pod| controller controller -->|New Pod with Optimal Resources| pod classDef vpa fill:#9FC5E8,stroke:#1E1E1D,stroke-width:1px,color:#1E1E1D; classDef crd fill:#D5A6BD,stroke:#1E1E1D,stroke-width:1px,color:#1E1E1D; classDef metrics fill:#FFD966,stroke:#1E1E1D,stroke-width:1px,color:#1E1E1D; classDef app fill:#B6D7A8,stroke:#1E1E1D,stroke-width:1px,color:#1E1E1D; class recommender,updater,admission vpa; class vpa\_cr crd; class metrics metrics; class controller,pod app; {{< /mermaid >}} Figure 1. VerticalPodAutoscaler controls the resource requests and limits of Pods in a Deployment Kubernetes implements vertical pod autoscaling through multiple cooperating components that run intermittently (it is not a continuous process). The VPA consists of three main components: \* The \_recommender\_, which analyzes resource usage and provides recommendations. \* The \_updater\_, that Pod resource requests either by evicting Pods or modifying them in place. \* And the VPA \_admission controller\_ webhook, which applies resource recommendations to new or recreated Pods. Once during each period, the Recommender queries the resource utilization for Pods targeted by each VerticalPodAutoscaler definition. The Recommender finds the target resource defined by the `targetRef`, then selects the pods based on the target resource's `.spec.selector` labels, and obtains the metrics from the resource metrics API to analyze actual CPU and memory consumption. The Recommender analyzes both current and historical resource usage data (CPU and memory) for each Pod targeted by the VerticalPodAutoscaler. It examines: - Historical consumption patterns over time to identify trends - Peak usage and variance to ensure sufficient headroom - Out-of-memory (OOM) events and other resource-related incidents Based on this analysis, the Recommender calculates three types of recommendations: - Target recommendation (optimal resources for typical usage) - Lower bound (minimum viable resources) -
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/autoscaling/vertical-pod-autoscale.md
|
[
-0.05542536824941635,
0.024758324027061462,
0.0793326124548912,
0.02906484343111515,
-0.07736480236053467,
-0.05267370119690895,
0.05007140710949898,
-0.036715127527713776,
0.08310655504465103,
0.030738383531570435,
-0.0281054750084877,
-0.028336884453892708,
-0.012129967100918293,
-0.024110624566674232,
0.016989370808005333,
0.02474103681743145,
0.0616554394364357,
-0.015843158587813377,
-0.12393791228532791,
-0.04158978536725044,
0.08915238082408905,
-0.00038796180160716176,
0.022311842069029808,
0.022470276802778244,
0.004722782876342535,
0.01485664676874876,
-0.07311070710420609,
-0.01128434482961893,
0.09334307163953781,
0.013763932511210442,
-0.0638386681675911,
0.03172840550541878,
-0.05060695484280586,
0.043007850646972656,
0.06020285189151764,
0.041020289063453674,
-0.06381119787693024,
-0.0016757758567109704,
-0.060167476534843445,
0.05788528546690941,
0.045561421662569046,
-0.06969798356294632,
-0.08093718439340591,
0.012488583102822304,
-0.04494311287999153,
0.06327108293771744,
0.01284907665103674,
-0.039517179131507874,
-0.018307890743017197,
0.018939483910799026,
0.04614192619919777,
-0.0958734080195427,
0.013440247625112534,
0.0034364848397672176,
0.08275914192199707,
0.014344272203743458,
0.03516915813088417,
0.050918616354465485,
0.07495137304067612,
0.005883790552616119,
0.008319223299622536,
-0.02105041779577732,
0.011499366723001003,
-0.012233453802764416,
0.06158602982759476,
0.0080715361982584,
0.02993934229016304,
-0.00028654735069721937,
-0.07338219881057739,
-0.010361850261688232,
0.06478653103113174,
-0.007705812808126211,
0.007272638846188784,
-0.0544058121740818,
0.032814718782901764,
-0.0023825527168810368,
-0.08271372318267822,
0.05324345454573631,
0.05382116883993149,
-0.10796593874692917,
0.08127783983945847,
0.06541401892900467,
0.0837583839893341,
0.07331141084432602,
-0.002875042613595724,
-0.05145153030753136,
0.03779032826423645,
-0.058991190046072006,
0.06856492906808853,
-0.010809262283146381,
0.036559417843818665,
-0.08426965028047562,
0.030570222064852715,
-0.0671023428440094,
0.02162308804690838,
-0.027961989864706993,
-0.03591432422399521,
-0.07038155943155289,
-0.036281440407037735,
-0.02687097154557705,
0.0635375902056694,
-0.031122738495469093,
0.06633880734443665,
0.02417600341141224,
0.027950651943683624,
-0.030961383134126663,
-0.07956065982580185,
0.03661708906292915,
-0.003567290026694536,
0.04063471779227257,
-0.0009033620008267462,
0.08411742746829987,
-0.013694426976144314,
0.014813344925642014,
-0.03540419414639473,
-0.03581041470170021,
-0.019136596471071243,
-0.0234067365527153,
0.04213173687458038,
0.056893255561590195,
0.012672016397118568,
-0.09474457800388336,
-0.013993109576404095,
-0.04684465751051903,
-0.014890015125274658,
0.0632467046380043,
-0.0455252043902874,
2.077918057870696e-33,
0.043320897966623306,
-0.0774930790066719,
-0.018298357725143433,
-0.012873988598585129,
-0.03680865466594696,
-0.08654151111841202,
-0.05867528170347214,
0.007638642564415932,
-0.07185055315494537,
-0.030347762629389763,
-0.03937822952866554,
0.15157504379749298,
-0.04219950735569,
0.06252364069223404,
0.04301854595541954,
-0.010499286465346813,
-0.018250880762934685,
0.09120261669158936,
0.07421469688415527,
-0.0012883894378319383,
0.05754641443490982,
-0.09449063986539841,
-0.02815038524568081,
-0.03398005664348602,
0.06705367565155029,
-0.03981507569551468,
0.006401996128261089,
-0.046782512217760086,
-0.07492667436599731,
0.029727615416049957,
-0.03969848155975342,
-0.014854119159281254,
0.03137664124369621,
-0.01042975578457117,
-0.10741519182920456,
-0.03820517659187317,
-0.05404096469283104,
-0.02527179755270481,
-0.007573334965854883,
-0.039957787841558456,
0.02073582261800766,
-0.0063459319062530994,
-0.01810462214052677,
-0.07175956666469574,
0.025602271780371666,
0.02427157573401928,
0.013530915603041649,
-0.1095489114522934,
-0.020332466810941696,
0.003752548713237047,
0.05243071913719177,
0.016839798539876938,
0.016471009701490402,
-0.021716739982366562,
0.05365096777677536,
0.004175587557256222,
0.04762572422623634,
-0.036868251860141754,
-0.017924515530467033,
-0.008130144327878952,
-0.09284089505672455,
-0.025681311264634132,
-0.05001366510987282,
0.043764252215623856,
0.09335441142320633,
0.04147176072001457,
0.005148950032889843,
0.1338496059179306,
0.0005378698115237057,
-0.010298028588294983,
0.0010642518755048513,
-0.006134419701993465,
0.03193778917193413,
0.04812321439385414,
-0.01456504873931408,
-0.07995441555976868,
-0.004600387532263994,
0.007594372611492872,
-0.13296324014663696,
0.024621475487947464,
0.008157769218087196,
-0.04522589594125748,
0.010800352320075035,
0.028014136478304863,
-0.019018076360225677,
-0.06662457436323166,
0.026745522394776344,
-0.06085677444934845,
-0.06178169324994087,
0.0497455820441246,
-0.011360464617609978,
-0.05319393798708916,
-0.11744680255651474,
0.03521084040403366,
-0.13254590332508087,
-3.56168433282819e-33,
0.11309308558702469,
-0.054621417075395584,
-0.021077735349535942,
0.07633545249700546,
0.013620873913168907,
0.011688712053000927,
0.05529492348432541,
0.06559985876083374,
0.0010352741228416562,
-0.03567661717534065,
-0.029607482254505157,
0.019815130159258842,
-0.03606618940830231,
0.05371689796447754,
-0.00748108746483922,
0.007312408182770014,
-0.12583789229393005,
-0.004984785802662373,
-0.007287345360964537,
0.029364749789237976,
0.0331692136824131,
-0.030320266261696815,
0.02952597104012966,
0.046252429485321045,
0.022699885070323944,
-0.0576787106692791,
-0.01794234849512577,
-0.010408720932900906,
-0.013889474794268608,
-0.045868054032325745,
-0.029826778918504715,
-0.04563940316438675,
-0.04991444945335388,
-0.03792624548077583,
0.016068262979388237,
-0.05261848121881485,
0.009175815619528294,
0.012902791611850262,
-0.0320906937122345,
0.07518109679222107,
0.0607418417930603,
-0.007734287995845079,
0.0006658437778241932,
-0.0807071104645729,
0.0015531941317021847,
0.00926952250301838,
-0.04374540597200394,
-0.06406592577695847,
-0.041618868708610535,
-0.11945231258869171,
0.08820100128650665,
-0.007360044866800308,
-0.005376485642045736,
0.08393475413322449,
-0.04835720360279083,
0.019425619393587112,
0.04597669467329979,
-0.04347473010420799,
-0.057511039078235626,
-0.0020852526649832726,
0.04271155223250389,
-0.09025908261537552,
-0.013136301189661026,
0.011498305015265942,
-0.017666606232523918,
0.004519260488450527,
0.01586090214550495,
-0.008238309063017368,
0.012482487596571445,
-0.0016115362523123622,
-0.01986599713563919,
-0.050612229853868484,
0.06561458110809326,
-0.022581569850444794,
-0.03847980871796608,
-0.017762281000614166,
0.1018953025341034,
-0.09951874613761902,
0.08174300938844681,
-0.06170611456036568,
-0.04607019200921059,
0.04527217522263527,
0.0022578032221645117,
0.03685464337468147,
-0.04648273438215256,
0.06878785043954849,
0.005307566374540329,
0.13115647435188293,
0.04132068529725075,
0.05381627008318901,
-0.04950910806655884,
-0.03825528174638748,
-0.08347379416227341,
0.11486613750457764,
-0.04185646027326584,
-4.9041833705132376e-8,
-0.012724575586616993,
0.15240414440631866,
0.014781655743718147,
0.06723742932081223,
-0.000494450272526592,
-0.02806626446545124,
0.05851776525378227,
0.05986678972840309,
0.030502960085868835,
-0.003853877540677786,
0.01895742304623127,
0.06642432510852814,
-0.01972559094429016,
0.06066298112273216,
0.0026579536497592926,
0.034936364740133286,
-0.043801166117191315,
-0.020703349262475967,
0.011879359371960163,
-0.10129142552614212,
-0.024070193991065025,
0.020905915647745132,
0.014257716946303844,
0.01707141101360321,
0.0065984586253762245,
-0.011621515266597271,
0.04914199933409691,
0.06552782654762268,
0.022756466642022133,
-0.003418830456212163,
-0.03139721229672432,
0.004827872384339571,
-0.09564978629350662,
0.06734509766101837,
0.011656325310468674,
0.018707526847720146,
-0.12485051900148392,
0.0277844350785017,
0.09147729724645615,
0.05352838337421417,
0.017443571239709854,
-0.007444239687174559,
-0.03659066557884216,
0.014756308868527412,
0.06874106824398041,
0.05537835881114006,
-0.05650823190808296,
0.09753585606813431,
-0.009150904603302479,
-0.036765456199645996,
-0.02508397400379181,
0.00975576601922512,
-0.02102726139128208,
0.11000192910432816,
0.000771655875723809,
-0.041916076093912125,
0.0011075818911194801,
-0.009444755502045155,
0.030097050592303276,
0.02570704184472561,
0.04941238462924957,
-0.02978803776204586,
-0.049293000251054764,
0.024981873109936714
] | 0.115032
|
consumption patterns over time to identify trends - Peak usage and variance to ensure sufficient headroom - Out-of-memory (OOM) events and other resource-related incidents Based on this analysis, the Recommender calculates three types of recommendations: - Target recommendation (optimal resources for typical usage) - Lower bound (minimum viable resources) - Upper bound (maximum reasonable resources). These recommendations are stored in the VerticalPodAutoscaler resource's `.status.recommendation` field. The \_updater\_ component monitors the VerticalPodAutoscaler resources and compares current Pod resource requests with the recommendations. When the difference exceeds configured thresholds and the update policy allows it, the updater can either: - Evict Pods, triggering their recreation with new resource requests (traditional approach) - Update Pod resources in place without eviction, when the cluster supports in-place Pod resource updates The chosen method depends on the configured update mode, cluster capabilities, and the type of resource change needed. In-place updates, when available, avoid Pod disruption but may have limitations on which resources can be modified. The updater respects PodDisruptionBudgets to minimize service impact. The \_admission controller\_ operates as a mutating webhook that intercepts Pod creation requests. It checks if the Pod is targeted by a VerticalPodAutoscaler and, if so, applies the recommended resource requests and limits before the Pod is created. More specifically, the admission controller uses the Target recommendation in the VerticalPodAutoscaler resource's `.status.recommendation` stanza as the new resource requests. The admission controller ensures new Pods start with appropriately sized resource allocations, whether they're created during initial deployment, after an eviction by the updater, or due to scaling operations. The VerticalPodAutoscaler requires a metrics source, such as Kubernetes' Metrics Server {{< glossary\_tooltip text="add-on" term\_id="addons" >}}, to be installed in the cluster. The VPA components fetch metrics from the `metrics.k8s.io` API. The Metrics Server needs to be launched separately as it is not deployed by default in most clusters. For more information about resource metrics, see [Metrics Server](/docs/tasks/debug/debug-cluster/resource-metrics-pipeline/#metrics-server). ## Update modes A VerticalPodAutoscaler supports different \_update modes\_ that control how and when resource recommendations are applied to your Pods. You configure the update mode using the `updateMode` field in the VPA spec under `updatePolicy`: ```yaml --- apiVersion: autoscaling.k8s.io/v1 kind: VerticalPodAutoscaler metadata: name: my-app-vpa spec: targetRef: apiVersion: "apps/v1" kind: Deployment name: my-app updatePolicy: updateMode: "Recreate" # Off, Initial, Recreate, InPlaceOrRecreate ``` ### Off {#updateMode-Off} In the \_Off\_ update mode, the VPA recommender still analyzes resource usage and generates recommendations, but these recommendations are not automatically applied to Pods. The recommendations are only stored in the VPA object's `.status` field. You can use a tool such as `kubectl` to view the `.status` and the recommendations in it. ### Initial {#updateMode-Initial} In \_Initial\_ mode, VPA only sets resource requests when Pods are first created. It does not update resources for already running Pods, even if recommendations change over time. The recommendations apply only during Pod creation. ### Recreate {#updateMode-Recreate} In \_Recreate\_ mode, VPA actively manages Pod resources by evicting Pods when their current resource requests differ significantly from recommendations. When a Pod is evicted, the workload controller (managing a Deployment, StatefulSet, etc) creates a replacement Pod, and the VPA admission controller applies the updated resource requests to the new Pod. ### InPlaceOrRecreate {#updateMode-InPlaceOrRecreate} In `InPlaceOrRecreate` mode, VPA attempts to update Pod resource requests and limits without restarting the Pod when possible. However, if in-place updates cannot be performed for a particular resource change, VPA falls back to evicting the Pod (similar to `Recreate` mode) and allowing the workload controller to create a replacement Pod with updated resources. In this mode, the updater applies recommendations in-place using the [Resize Container Resources In-Place](/docs/tasks/configure-pod-container/resize-container-resources/) feature. ### Auto (deprecated) {#updateMode-Auto} {{< note
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/autoscaling/vertical-pod-autoscale.md
|
[
0.025097033008933067,
-0.04179847612977028,
0.024257369339466095,
0.0481843426823616,
0.05421759933233261,
-0.0478978268802166,
0.020879734307527542,
0.0398392379283905,
0.0267032478004694,
0.03777952119708061,
0.024332484230399132,
0.04541702941060066,
0.01295508723706007,
-0.05165502429008484,
0.034542325884103775,
0.005932554602622986,
0.13759656250476837,
-0.0496428944170475,
-0.07976523041725159,
-0.03435660898685455,
0.03758322447538376,
-0.04813767969608307,
0.0032954136840999126,
0.000911592214833945,
-0.03535870462656021,
0.02183281071484089,
-0.03553564101457596,
-0.04035099595785141,
0.050260331481695175,
-0.011196025647222996,
-0.02858719229698181,
0.05802477151155472,
0.061536457389593124,
-0.030002888292074203,
0.015940582379698753,
0.037630703300237656,
-0.013176530599594116,
-0.0695369690656662,
-0.05583321675658226,
0.04973118007183075,
0.002861117711290717,
-0.08282792568206787,
-0.08860839903354645,
0.01757504977285862,
-0.06319651752710342,
0.012502149678766727,
-0.05283717066049576,
-0.05103034898638725,
-0.05854238197207451,
0.007292411755770445,
0.04079139605164528,
-0.05351374298334122,
0.04647084325551987,
0.04597704857587814,
0.06161308288574219,
0.02952607162296772,
0.05424095317721367,
0.049708131700754166,
0.0496506541967392,
-0.009636733680963516,
0.0391097329556942,
-0.08130958676338196,
-0.04582354798913002,
-0.04353554919362068,
0.009188233874738216,
-0.07986044883728027,
0.011567638255655766,
0.034620121121406555,
0.032706983387470245,
-0.036146052181720734,
0.023999834433197975,
0.02867119573056698,
-0.009398641996085644,
-0.07379213720560074,
-0.0343918614089489,
0.03572510555386543,
0.0449395589530468,
0.030869999900460243,
0.05767298862338066,
-0.07475537061691284,
-0.0019362118327990174,
0.03657941892743111,
0.016874708235263824,
-0.07365869730710983,
0.034128475934267044,
-0.041708216071128845,
0.031329695135354996,
-0.02764229103922844,
0.03189753741025925,
0.042383115738630295,
0.0457824245095253,
0.032309047877788544,
0.06093624606728554,
-0.07274284213781357,
-0.011311031877994537,
0.04684928059577942,
-0.0712544247508049,
-0.07490699738264084,
-0.004663887433707714,
0.015336896292865276,
0.05048402398824692,
0.03252686187624931,
0.017362799495458603,
0.02800590544939041,
0.0500127337872982,
-0.08024140447378159,
-0.06097621098160744,
0.0470561645925045,
0.06854274868965149,
0.09085630625486374,
-0.02606908231973648,
0.03054646961390972,
0.01140472013503313,
-0.013117298483848572,
-0.0447281152009964,
0.07654548436403275,
0.0014172455994412303,
0.011809458956122398,
0.029134593904018402,
0.061135683208703995,
0.07570841908454895,
-0.07612520456314087,
0.11788727343082428,
-0.04059803858399391,
-0.013955356553196907,
0.048449430614709854,
-0.03435307741165161,
4.532358711253279e-33,
0.0013272655196487904,
-0.07382018864154816,
-0.02810576744377613,
-0.08072523027658463,
-0.009913294576108456,
-0.03961640223860741,
-0.03824331983923912,
0.025076476857066154,
0.03972075879573822,
-0.073307104408741,
-0.031639352440834045,
0.12858587503433228,
-0.024449847638607025,
0.06331953406333923,
0.09545248001813889,
-0.09590313583612442,
-0.035963065922260284,
0.12913835048675537,
0.05729355663061142,
-0.015749378129839897,
0.07408519834280014,
-0.07524224370718002,
-0.044315241277217865,
0.019276084378361702,
0.0710727646946907,
-0.02286432683467865,
0.07179680466651917,
-0.07716980576515198,
-0.01208589132875204,
0.03665541112422943,
0.02678675949573517,
0.003981804009526968,
-0.02933574467897415,
-0.013289875350892544,
-0.05536865442991257,
-0.020138299092650414,
-0.06899315863847733,
-0.03655409812927246,
-0.034275684505701065,
-0.09329988807439804,
0.0051438696682453156,
-0.013836942613124847,
-0.01764550805091858,
-0.042071130126714706,
0.013523797504603863,
-0.04655489698052406,
0.058115724474191666,
-0.054930679500103,
-0.05050640553236008,
0.018341857939958572,
0.005138769280165434,
-0.022209949791431427,
-0.024178432300686836,
-0.006120866630226374,
-0.02970198541879654,
-0.022613918408751488,
0.009476764127612114,
-0.0038791329134255648,
0.058560702949762344,
0.011564665473997593,
-0.022036755457520485,
-0.04542466253042221,
0.014789046719670296,
-0.01975140906870365,
0.034140463918447495,
0.0816010981798172,
-0.0035269742365926504,
-0.011893006972968578,
0.018262093886733055,
0.07593101263046265,
-0.011409251019358635,
0.05442708730697632,
0.026888854801654816,
0.02842339314520359,
-0.047913558781147,
-0.05232102423906326,
-0.03653225302696228,
0.06327881664037704,
-0.15407408773899078,
-0.048260584473609924,
-0.0401705801486969,
0.02762037143111229,
0.0014274886343628168,
0.042743533849716187,
-0.040770430117845535,
-0.021684883162379265,
0.023425022140145302,
0.03573595732450485,
-0.09842702001333237,
0.03351862356066704,
0.019532328471541405,
-0.01639452949166298,
-0.06322727352380753,
0.022071994841098785,
-0.045281413942575455,
-3.582846169878868e-33,
0.033855315297842026,
-0.02667878568172455,
0.00899291317909956,
0.03893893584609032,
-0.006227323319762945,
-0.057538267225027084,
-0.09938816726207733,
0.055570680648088455,
0.009267318993806839,
-0.08216433972120285,
-0.14800070226192474,
0.01639382354915142,
0.03993302211165428,
0.010951653122901917,
-0.06090616434812546,
0.0422811359167099,
-0.07535389065742493,
-0.08336929976940155,
-0.04295901581645012,
0.03261728957295418,
-0.048764731734991074,
-0.0004168644663877785,
0.01771584525704384,
0.0327867828309536,
0.009043497033417225,
0.008870473131537437,
0.0006902215536683798,
0.00043448255746625364,
-0.003988746553659439,
-0.0840286985039711,
-0.03365959972143173,
-0.09375538676977158,
-0.023477451875805855,
0.019177895039319992,
0.029869265854358673,
-0.01571086421608925,
-0.00753799919039011,
0.021633591502904892,
-0.0615265853703022,
0.0714314728975296,
0.0947735533118248,
0.021856704726815224,
-0.022187739610671997,
0.015160604380071163,
0.00907787587493658,
-0.032954927533864975,
-0.06861844658851624,
0.0035924650728702545,
-0.04296041280031204,
-0.09623568505048752,
0.03348206728696823,
-0.04830733686685562,
-0.02544212155044079,
0.11380217969417572,
0.012854963541030884,
0.01607581041753292,
0.07100094854831696,
0.03465814143419266,
-0.06047713756561279,
-0.019661150872707367,
0.07550898939371109,
-0.024642080068588257,
-0.0012064159382134676,
0.02228132076561451,
-0.025619987398386,
-0.02365361712872982,
0.03214697539806366,
-0.07200673222541809,
-0.002856100909411907,
0.00724599976092577,
0.031634941697120667,
0.018099255859851837,
0.04011005908250809,
-0.004523914307355881,
-0.022138824686408043,
-0.019232874736189842,
0.06590232253074646,
-0.10074301064014435,
0.03843572363257408,
-0.040128130465745926,
-0.1755949854850769,
0.08133301138877869,
0.01102406345307827,
-0.013190951198339462,
-0.014026372693479061,
0.06831959635019302,
0.06942862272262573,
0.036159634590148926,
0.039514441043138504,
0.006159039679914713,
-0.07128801196813583,
-0.009639039635658264,
-0.09373926371335983,
0.07047459483146667,
-0.04555155336856842,
-5.012310211327531e-8,
0.030852388590574265,
-0.010292600840330124,
0.025334782898426056,
0.11487128585577011,
0.09533630311489105,
-0.0584670752286911,
0.037803929299116135,
0.09865240752696991,
-0.00818528514355421,
0.05110419541597366,
0.06586092710494995,
-0.002000075299292803,
-0.0506826676428318,
-0.018990345299243927,
0.11606135964393616,
0.03890115022659302,
0.11169542372226715,
0.04001975059509277,
-0.0624455027282238,
-0.06760095804929733,
-0.07033228129148483,
0.001282348413951695,
0.06332911550998688,
0.01973065733909607,
0.056653495877981186,
0.03283455967903137,
0.11439894139766693,
0.07744807749986649,
0.06304728239774704,
-0.03351340442895889,
0.004726346116513014,
-0.016598675400018692,
0.017353123053908348,
-0.007345828227698803,
-0.03587668389081955,
0.06521126627922058,
-0.1081356555223465,
-0.0008796264883130789,
0.031485605984926224,
0.09923949837684631,
0.02623615227639675,
-0.05157133936882019,
-0.004199087619781494,
0.0410446859896183,
0.03639112412929535,
0.037841733545064926,
-0.06583141535520554,
-0.008808177895843983,
0.005092717241495848,
0.0162212997674942,
-0.05190035700798035,
-0.07562430948019028,
0.01964115910232067,
0.0864819809794426,
0.012183521874248981,
-0.016316605731844902,
-0.04584906995296478,
-0.03874712809920311,
0.07250724732875824,
0.032243359833955765,
0.03999927639961243,
-0.03112241066992283,
-0.055587392300367355,
0.02309245802462101
] | 0.20361
|
for a particular resource change, VPA falls back to evicting the Pod (similar to `Recreate` mode) and allowing the workload controller to create a replacement Pod with updated resources. In this mode, the updater applies recommendations in-place using the [Resize Container Resources In-Place](/docs/tasks/configure-pod-container/resize-container-resources/) feature. ### Auto (deprecated) {#updateMode-Auto} {{< note >}} The `Auto` update mode is \*\*deprecated since VPA version 1.4.0\*\*. Use `Recreate` for eviction-based updates, or `InPlaceOrRecreate` for in-place updates with eviction fallback. {{< /note >}} `Auto` mode is currently an alias for `Recreate` mode and behaves identically. It was introduced to allow for future expansion of automatic update strategies. ## Resource policies Resource policies allow you to fine-tune how the VerticalPodAutoscaler generates recommendations and applies updates. You can set boundaries for resource recommendations, specify which resources to manage, and configure different policies for individual containers within a Pod. You define resource policies in the `resourcePolicy` field of the VPA spec: ```yaml apiVersion: autoscaling.k8s.io/v1 kind: VerticalPodAutoscaler metadata: name: my-app-vpa spec: targetRef: apiVersion: "apps/v1" kind: Deployment name: my-app updatePolicy: updateMode: "Recreate" resourcePolicy: containerPolicies: - containerName: "application" minAllowed: cpu: 100m memory: 128Mi maxAllowed: cpu: 2 memory: 2Gi controlledResources: - cpu - memory controlledValues: RequestsAndLimits ``` #### minAllowed and maxAllowed These fields set boundaries for VPA recommendations. The VPA will never recommend resources below `minAllowed` or above `maxAllowed`, even if the actual usage data suggests different values. #### controlledResources The `controlledResources` field specifies which resource types VPA should manage for a container in a Pod. If not specified, VPA manages both CPU and memory by default. You can restrict VPA to manage only specific resources. Valid resource names include `cpu` and `memory`. ### controlledValues The `controlledValues` field determines whether VPA controls resource requests, limits, or both: RequestsAndLimits : VPA sets both requests and limits. The limit scales proportionally to the request based on the request-to-limit ratio defined in the Pod spec. This is the default mode. RequestsOnly : VPA only sets requests, leaving limits unchanged. Limits are respected and can still trigger throttling or out-of-memory kills if usage exceeds them. See [requests and limits](/docs/concepts/configuration/manage-resources-containers/#requests-and-limits) to learn more about those two concepts. ## LimitRange resources The admission controller and updater VPA components post-process recommendations to comply with the constraints defined in [LimitRanges](/docs/concepts/policy/limit-range/). The LimitRange resources with `type` Pod and Container are checked in the Kubernetes cluster. For example, if the `max` field in a Container LimitRange resource is exceeded, both VPA components lower the limit to the value defined in the `max` field, and the request is proportionally decreased to maintain the request-to-limit ratio in the Pod spec. ## {{% heading "whatsnext" %}} If you configure autoscaling in your cluster, you may also want to consider using [node autoscaling](/docs/concepts/cluster-administration/node-autoscaling/) to ensure you are running the right number of nodes. You can also read more about [\_horizontal\_ Pod autoscaling](/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale/).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/autoscaling/vertical-pod-autoscale.md
|
[
-0.09464206546545029,
0.0175771601498127,
0.02894926257431507,
0.03903116285800934,
0.03100997395813465,
-0.02310606837272644,
-0.01351208332926035,
0.0008872694452293217,
0.040449731051921844,
0.053092051297426224,
0.0391969233751297,
0.06995376944541931,
0.013894808478653431,
-0.022076286375522614,
0.03082653321325779,
0.008840957656502724,
0.0746128037571907,
0.017386218532919884,
-0.06348896026611328,
-0.01679164730012417,
0.02404031716287136,
-0.024437231943011284,
0.018526645377278328,
-0.013515239581465721,
-0.009235717356204987,
0.044199664145708084,
-0.08521196991205215,
-0.019034774973988533,
0.027823247015476227,
-0.02541080117225647,
-0.042680900543928146,
0.057636599987745285,
-0.016890108585357666,
-0.013147976249456406,
0.03591745346784592,
0.08928125351667404,
-0.03874525427818298,
-0.044763948768377304,
-0.049012210220098495,
0.03392471745610237,
0.018839461728930473,
-0.03252016752958298,
-0.095855213701725,
-0.0013513807207345963,
-0.057667672634124756,
0.02811085619032383,
-0.0003808783076237887,
-0.057845622301101685,
-0.033409591764211655,
-0.05552426725625992,
0.0770730972290039,
-0.08675825595855713,
0.07170073688030243,
-0.014277780428528786,
0.028355788439512253,
0.0688527375459671,
0.07065872848033905,
0.08244215697050095,
0.0763806477189064,
-0.010562287643551826,
0.08428072929382324,
-0.00022635846107732505,
0.006574920378625393,
-0.05401955917477608,
0.015945106744766235,
-0.0849931538105011,
0.06759201735258102,
-0.01758558303117752,
-0.006534739397466183,
-0.004008826799690723,
-0.0401235930621624,
0.07528190314769745,
0.016601864248514175,
-0.04292092099785805,
0.014808415435254574,
-0.013242612592875957,
-0.031246289610862732,
0.04260999336838722,
0.028928669169545174,
-0.029148103669285774,
0.0352754145860672,
0.022684747353196144,
-0.0027653498109430075,
-0.045169342309236526,
-0.011083812452852726,
0.005622004624456167,
0.029962187632918358,
-0.10955981910228729,
0.10801348090171814,
-0.0017057697987183928,
0.037499260157346725,
-0.05179833248257637,
0.040150757879018784,
-0.05571278557181358,
0.008409202098846436,
-0.042186930775642395,
-0.07341528683900833,
-0.04921855032444,
0.001434918725863099,
0.0202469602227211,
0.0627932995557785,
-0.005731283687055111,
0.0282430462539196,
0.025698136538267136,
0.07369335740804672,
-0.012924578972160816,
-0.04632994160056114,
0.09079275280237198,
0.01955266110599041,
0.09892851114273071,
-0.05229916796088219,
0.01785643771290779,
0.032586079090833664,
-0.028648020699620247,
-0.06458298116922379,
0.0510316826403141,
-0.040762562304735184,
0.023065589368343353,
-0.013771350495517254,
0.05123189091682434,
0.1196649894118309,
-0.05624055862426758,
0.029497820883989334,
-0.05342951789498329,
-0.03364461660385132,
0.023675138130784035,
0.0004398844903334975,
3.273389200501239e-33,
0.05526233837008476,
-0.07165483385324478,
0.004423940554261208,
0.02694792114198208,
0.055025484412908554,
0.04420916736125946,
-0.030497925356030464,
0.05180168151855469,
0.020332209765911102,
-0.08668259531259537,
-0.011348087340593338,
0.09428352117538452,
-0.0483802892267704,
0.08040846139192581,
-0.005670176353305578,
-0.08154642581939697,
-0.03089549019932747,
0.08041365444660187,
0.10844957083463669,
-0.03009883128106594,
0.03641447797417641,
0.014421866275370121,
0.0056878323666751385,
-0.06654989719390869,
0.026624444872140884,
-0.011169886216521263,
0.05635649338364601,
-0.03836369886994362,
-0.03805297240614891,
-0.011844374239444733,
-0.029680529609322548,
0.011523491702973843,
0.02277747541666031,
0.04368529096245766,
-0.09231925010681152,
-0.04491636902093887,
-0.030689392238855362,
-0.028089571744203568,
-0.08601042628288269,
-0.057817958295345306,
0.10611075162887573,
0.018177540972828865,
-0.026301272213459015,
-0.056746531277894974,
0.03765968978404999,
-0.05547444522380829,
0.06847662478685379,
0.008620468899607658,
-0.03200867027044296,
-0.04237407445907593,
0.031032251194119453,
0.03310820087790489,
-0.052022408694028854,
-0.07949866354465485,
-0.0509304441511631,
-0.08143305033445358,
0.010682952590286732,
0.03840514272451401,
0.03474220260977745,
-0.05087927728891373,
-0.013235731981694698,
0.01800815388560295,
0.03492983430624008,
-0.015913907438516617,
0.04660990461707115,
0.05426662415266037,
-0.019268883392214775,
0.04558788239955902,
0.03741510957479477,
0.034794535487890244,
-0.04197363927960396,
0.011923781596124172,
0.01254592277109623,
0.09786659479141235,
-0.0408882200717926,
-0.14397062361240387,
-0.061950474977493286,
0.026174603030085564,
-0.11516402661800385,
0.008316471241414547,
-0.014146125875413418,
0.046725448220968246,
0.07424154132604599,
0.04252171888947487,
-0.04047887399792671,
-0.0912100076675415,
0.04322100058197975,
-0.0029874814208596945,
-0.018629098311066628,
-0.01576249487698078,
0.04084715619683266,
-0.07331356406211853,
0.00784911960363388,
0.022917741909623146,
0.011583148501813412,
-4.368694265446307e-33,
0.03598121181130409,
-0.030680889263749123,
-0.042575422674417496,
0.03969118744134903,
-0.025387240573763847,
-0.041999101638793945,
-0.053664688020944595,
0.07306206226348877,
-0.012632124125957489,
-0.14050303399562836,
-0.11088569462299347,
0.007227641064673662,
0.022177262231707573,
0.03147832304239273,
-0.062397684901952744,
0.05317360907793045,
-0.12901446223258972,
-0.11339255422353745,
-0.08581769466400146,
0.059322286397218704,
0.02390321157872677,
0.022107578814029694,
0.03939040005207062,
0.12342037260532379,
0.06342681497335434,
-0.08704590797424316,
0.06080024689435959,
0.04636558145284653,
-0.02078387513756752,
-0.032246463000774384,
0.020473992452025414,
-0.11112970858812332,
-0.07622208446264267,
0.06028859689831734,
0.015339014120399952,
-0.03564126789569855,
-0.07418210059404373,
0.02228272706270218,
-0.0024584545753896236,
0.06796111911535263,
0.08814669400453568,
-0.049625907093286514,
0.0017390227876603603,
0.02060660906136036,
0.0010686008026823401,
-0.028210602700710297,
0.012932282872498035,
-0.03605856001377106,
-0.050265610218048096,
-0.08270128816366196,
0.014874479733407497,
-0.0797680988907814,
-0.03706809878349304,
0.05934637039899826,
0.07228583842515945,
0.032773442566394806,
0.034900639206171036,
0.030932679772377014,
-0.0158531591296196,
0.020279625430703163,
0.046786632388830185,
0.0007965306285768747,
0.05054520070552826,
0.013208129443228245,
-0.038430698215961456,
-0.019876182079315186,
0.017634432762861252,
-0.07085588574409485,
0.004008810967206955,
0.003087456338107586,
0.0356534980237484,
0.03202540799975395,
-0.008639957755804062,
-0.008607755415141582,
0.008444092236459255,
-0.07786177098751068,
0.0723225325345993,
-0.09085359424352646,
0.015278284437954426,
-0.059116996824741364,
-0.1394684612751007,
0.007524878717958927,
0.0005753621808253229,
-0.02411452680826187,
-0.02392604388296604,
0.10756891965866089,
0.03633943572640419,
0.08366856724023819,
0.04326756298542023,
0.059430480003356934,
-0.03796469420194626,
-0.06228252872824669,
-0.10187342017889023,
0.10624957084655762,
-0.022714946419000626,
-5.419751047952559e-8,
0.014424046501517296,
0.07682470977306366,
-0.020655754953622818,
0.08757329732179642,
0.06181051582098007,
-0.11365889757871628,
0.04946301132440567,
0.05915335565805435,
0.002414445858448744,
-0.0025752712972462177,
0.01799819990992546,
-0.01881870999932289,
0.015369091182947159,
-0.021646833047270775,
0.04739536717534065,
0.006239009089767933,
0.044277988374233246,
0.11969506740570068,
-0.041394952684640884,
-0.09845209866762161,
-0.04492083564400673,
-0.030507130548357964,
0.02895856648683548,
0.005896219052374363,
0.06543508172035217,
-0.011803328059613705,
0.0006692790193483233,
0.05398457869887352,
0.048447784036397934,
-0.03582586348056793,
0.0506088063120842,
0.0005890836473554373,
0.017462633550167084,
0.014941208995878696,
-0.03653990477323532,
0.02637028694152832,
-0.022367751225829124,
0.033094365149736404,
0.015885300934314728,
-0.03158646821975708,
0.04517893120646477,
-0.011776755563914776,
-0.007666525896638632,
-0.00894800666719675,
-0.01581696793437004,
-0.018101030960679054,
-0.053242359310388565,
-0.0009572213748469949,
-0.005359356291592121,
-0.012860752642154694,
0.03481217101216316,
-0.0045914966613054276,
0.027011893689632416,
0.08918386697769165,
0.10872472822666168,
-0.030166983604431152,
-0.03912254050374031,
0.008902001194655895,
0.024679824709892273,
0.02440163865685463,
-0.023725662380456924,
-0.07211817800998688,
-0.04205870255827904,
-0.015950800850987434
] | 0.08909
|
{{< feature-state for\_k8s\_version="v1.23" state="stable" >}} When your Job has finished, it's useful to keep that Job in the API (and not immediately delete the Job) so that you can tell whether the Job succeeded or failed. Kubernetes' TTL-after-finished {{}} provides a TTL (time to live) mechanism to limit the lifetime of Job objects that have finished execution. ## Cleanup for finished Jobs The TTL-after-finished controller is only supported for Jobs. You can use this mechanism to clean up finished Jobs (either `Complete` or `Failed`) automatically by specifying the `.spec.ttlSecondsAfterFinished` field of a Job, as in this [example](/docs/concepts/workloads/controllers/job/#clean-up-finished-jobs-automatically). The TTL-after-finished controller assumes that a Job is eligible to be cleaned up TTL seconds after the Job has finished. The timer starts once the status condition of the Job changes to show that the Job is either `Complete` or `Failed`; once the TTL has expired, that Job becomes eligible for [cascading](/docs/concepts/architecture/garbage-collection/#cascading-deletion) removal. When the TTL-after-finished controller cleans up a job, it will delete it cascadingly, that is to say it will delete its dependent objects together with it. Kubernetes honors object lifecycle guarantees on the Job, such as waiting for [finalizers](/docs/concepts/overview/working-with-objects/finalizers/). You can set the TTL seconds at any time. Here are some examples for setting the `.spec.ttlSecondsAfterFinished` field of a Job: \* Specify this field in the Job manifest, so that a Job can be cleaned up automatically some time after it finishes. \* Manually set this field of existing, already finished Jobs, so that they become eligible for cleanup. \* Use a [mutating admission webhook](/docs/reference/access-authn-authz/admission-controllers/#mutatingadmissionwebhook) to set this field dynamically at Job creation time. Cluster administrators can use this to enforce a TTL policy for finished jobs. \* Use a [mutating admission webhook](/docs/reference/access-authn-authz/admission-controllers/#mutatingadmissionwebhook) to set this field dynamically after the Job has finished, and choose different TTL values based on job status, labels. For this case, the webhook needs to detect changes to the `.status` of the Job and only set a TTL when the Job is being marked as completed. \* Write your own controller to manage the cleanup TTL for Jobs that match a particular {{< glossary\_tooltip term\_id="selector" text="selector" >}}. ## Caveats ### Updating TTL for finished Jobs You can modify the TTL period, e.g. `.spec.ttlSecondsAfterFinished` field of Jobs, after the job is created or has finished. If you extend the TTL period after the existing `ttlSecondsAfterFinished` period has expired, Kubernetes doesn't guarantee to retain that Job, even if an update to extend the TTL returns a successful API response. ### Time skew Because the TTL-after-finished controller uses timestamps stored in the Kubernetes jobs to determine whether the TTL has expired or not, this feature is sensitive to time skew in your cluster, which may cause the control plane to clean up Job objects at the wrong time. Clocks aren't always correct, but the difference should be very small. Please be aware of this risk when setting a non-zero TTL. ## {{% heading "whatsnext" %}} \* Read [Clean up Jobs automatically](/docs/concepts/workloads/controllers/job/#clean-up-finished-jobs-automatically) \* Refer to the [Kubernetes Enhancement Proposal](https://github.com/kubernetes/enhancements/blob/master/keps/sig-apps/592-ttl-after-finish/README.md) (KEP) for adding this mechanism.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/ttlafterfinished.md
|
[
-0.030547553673386574,
0.02330128662288189,
0.07075488567352295,
0.00881022959947586,
-0.020693190395832062,
0.00874380487948656,
-0.03790011256933212,
-0.06236384063959122,
0.07994340360164642,
0.019413968548178673,
-0.03196224197745323,
0.015388159081339836,
-0.03793209418654442,
0.005399365443736315,
-0.03571496531367302,
-0.03549544885754585,
0.0014004455879330635,
-0.02540368027985096,
-0.03220565989613533,
-0.09711314737796783,
0.05021071061491966,
0.04556659981608391,
0.043342575430870056,
0.046328265219926834,
-0.06445593386888504,
0.03795650228857994,
-0.012208238244056702,
-0.03079834021627903,
0.055320028215646744,
0.0003737575898412615,
-0.10898318141698837,
-0.0024665361270308495,
-0.033997807651758194,
-0.026154737919569016,
0.06263662874698639,
0.10758712887763977,
-0.02783760242164135,
-0.03848448768258095,
-0.05411567538976669,
0.009314662776887417,
0.07474499195814133,
-0.07496064901351929,
-0.15529878437519073,
-0.02176126092672348,
0.011441705748438835,
-0.014318723231554031,
-0.0794558972120285,
-0.045584145933389664,
-0.01337828766554594,
-0.016719244420528412,
0.07510215044021606,
-0.06215716525912285,
0.09554623067378998,
0.03905230388045311,
0.07066890597343445,
0.04631587117910385,
-0.01964714378118515,
0.010943379253149033,
0.021450484171509743,
0.013710875995457172,
0.027322111651301384,
-0.020566746592521667,
-0.02548023872077465,
-0.03491676226258278,
0.05934077873826027,
0.029393581673502922,
0.045138657093048096,
-0.04649757593870163,
0.052761856466531754,
0.03153087571263313,
-0.02044924534857273,
-0.05775940790772438,
-0.04479937255382538,
0.009209959767758846,
-0.03669325262308121,
0.03676252067089081,
0.003068700199946761,
-0.008808658458292484,
-0.05414088815450668,
-0.05488899350166321,
-0.029284479096531868,
-0.07553195208311081,
0.039944589138031006,
-0.015145840123295784,
-0.060993801802396774,
0.024416496977210045,
-0.0629296600818634,
-0.04511616379022598,
0.09874304383993149,
-0.029666313901543617,
0.004398156423121691,
-0.04101609066128731,
0.04135383665561676,
-0.122097447514534,
-0.0032632825896143913,
0.015093376860022545,
-0.009717818349599838,
0.08883499354124069,
0.010388688184320927,
-0.0005368662532418966,
-0.00834315549582243,
-0.03414797782897949,
-0.014085391536355019,
0.02816241793334484,
0.043983664363622665,
-0.0193743035197258,
-0.029312731698155403,
-0.007866326719522476,
-0.02667943201959133,
-0.013650132343173027,
-0.016213634982705116,
0.03915827348828316,
0.023633407428860664,
0.05533714219927788,
0.03203967958688736,
0.029996205121278763,
-0.012046266347169876,
0.06925056874752045,
0.046212684363126755,
0.12377101182937622,
0.05852008983492851,
-0.04944122955203056,
-0.02366044744849205,
0.0467187836766243,
-0.030924925580620766,
-0.004842058289796114,
0.08336720615625381,
1.325853394439401e-33,
0.06609214097261429,
-0.028098568320274353,
-0.0026788595132529736,
-0.009506634436547756,
0.043287839740514755,
-0.06819121539592743,
0.008488452062010765,
-0.0017539904220029712,
0.019917035475373268,
0.009391039609909058,
-0.0677281990647316,
0.024424226954579353,
-0.06875371932983398,
-0.05797690153121948,
-0.01831747218966484,
0.01905111037194729,
-0.01323764119297266,
-0.004149680491536856,
0.04129122570157051,
0.003065215889364481,
0.12775316834449768,
-0.043882500380277634,
-0.052253734320402145,
0.027110440656542778,
0.04806822910904884,
-0.05099523067474365,
0.023427942767739296,
-0.023722155019640923,
-0.09779424965381622,
0.02461666241288185,
-0.0022816669661551714,
0.026991499587893486,
-0.029962170869112015,
0.03722458332777023,
-0.1543874889612198,
-0.0466659814119339,
-0.04578263685107231,
0.02089018188416958,
-0.019700512290000916,
-0.014915787614881992,
-0.028795436024665833,
-0.00395823223516345,
-0.08867578208446503,
-0.02875172719359398,
0.021321363747119904,
-0.1112930104136467,
0.004213513340801001,
-0.0426301471889019,
0.06558554619550705,
0.07624316215515137,
0.07855825871229172,
-0.004458490293473005,
0.026601087301969528,
-0.0583663284778595,
0.022429900243878365,
0.02172227017581463,
0.1348402053117752,
-0.08014506846666336,
-0.05470110476016998,
0.027079852297902107,
-0.0023189415223896503,
-0.04981078580021858,
-0.032969970256090164,
0.009225304238498211,
0.008027114905416965,
0.014249627478420734,
0.030308827757835388,
0.047207240015268326,
-0.043649330735206604,
-0.08202207088470459,
-0.0680449828505516,
0.05258385092020035,
0.010882760398089886,
-0.020076781511306763,
0.0031821918673813343,
-0.08908190578222275,
0.058979056775569916,
-0.01029986422508955,
-0.09211071580648422,
0.06784094125032425,
0.07653877139091492,
-0.07986436784267426,
-0.07454802095890045,
0.005905552767217159,
0.1148914098739624,
0.026776500046253204,
0.04747142270207405,
-0.05359575152397156,
0.002033349359408021,
0.03362530842423439,
-0.039107777178287506,
-0.028741290792822838,
-0.005930802319198847,
0.036079466342926025,
-0.032417166978120804,
-3.2500677599229094e-33,
0.1268145740032196,
-0.013586011715233326,
-0.0364275686442852,
0.03062989003956318,
-0.008477860130369663,
-0.025674453005194664,
0.005242517683655024,
0.05073488503694534,
-0.05963422730565071,
-0.0849619209766388,
0.036101505160331726,
-0.0019440404139459133,
0.023679809644818306,
0.05092589929699898,
-0.12692441046237946,
0.012396182864904404,
-0.059509359300136566,
-0.03613625094294548,
-0.06077946349978447,
0.02913205511868,
0.030503835529088974,
-0.06035534292459488,
-0.002238769782707095,
0.06707599759101868,
-0.007680142764002085,
-0.04418086260557175,
-0.004021282773464918,
0.0005437623476609588,
-0.08372706919908524,
-0.010278258472681046,
0.054017554968595505,
-0.07851644605398178,
0.03284268081188202,
0.06219048798084259,
0.0730716735124588,
-0.0853978618979454,
0.003026367165148258,
0.0276287030428648,
0.012346948496997356,
0.04539044201374054,
0.1414574235677719,
0.014349443838000298,
-0.043743032962083817,
-0.017444269731640816,
-0.08278249204158783,
-0.0017357086762785912,
0.03949211910367012,
-0.05419071391224861,
0.006334186531603336,
-0.10393750667572021,
0.044157784432172775,
0.043300431221723557,
-0.04802803695201874,
0.10746995359659195,
-0.029272671788930893,
-0.005448192358016968,
0.059372324496507645,
-0.020665332674980164,
-0.060092102736234665,
0.05488895997405052,
0.011010466143488884,
-0.05775017291307449,
0.12660762667655945,
0.04853338003158569,
0.07648421823978424,
-0.07266535609960556,
0.035956352949142456,
0.09606215357780457,
0.02497992292046547,
0.01664806716144085,
-0.02747422270476818,
0.015067809261381626,
0.006543886847794056,
0.06642210483551025,
-0.0033123320899903774,
-0.05873294919729233,
-0.006284590344876051,
-0.06916873902082443,
0.036277011036872864,
0.007700960151851177,
-0.06752079725265503,
0.010840929113328457,
-0.08002821356058121,
-0.002303528366610408,
0.008136316202580929,
0.10861183702945709,
-0.0018458752892911434,
0.10042840987443924,
0.06534712761640549,
0.031359169632196426,
0.010821530595421791,
0.015045578591525555,
-0.05102121829986572,
0.07315286248922348,
-0.008206747472286224,
-5.26271222156538e-8,
0.02758442983031273,
0.020437058061361313,
-0.05177608132362366,
-0.009939800016582012,
0.06699618697166443,
-0.061932820826768875,
0.010166664607822895,
0.02368323504924774,
-0.013506951741874218,
-0.08813504129648209,
-0.012385917827486992,
0.05187644436955452,
-0.05788431689143181,
-0.0064985789358615875,
0.04933121055364609,
-0.04166058078408241,
0.0213767196983099,
0.047550033777952194,
0.031521156430244446,
-0.09400038421154022,
0.0049513098783791065,
-0.016309024766087532,
0.0299350768327713,
-0.034431807696819305,
-0.021549630910158157,
0.06409990787506104,
0.05879572778940201,
0.10408001393079758,
0.02429174818098545,
0.007628495339304209,
0.006321256514638662,
-0.02848382666707039,
-0.07052548974752426,
0.057608120143413544,
0.03289132937788963,
0.06435291469097137,
-0.02173648774623871,
-0.01951770856976509,
-0.0014788700500503182,
0.06218560412526131,
0.0005297400057315826,
0.05785277113318443,
-0.10838780552148819,
0.01580718718469143,
0.038404110819101334,
0.03705373778939247,
0.016482779756188393,
0.015287031419575214,
-0.025410370901226997,
-0.03373261168599129,
-0.029690809547901154,
-0.0405428484082222,
-0.03761666640639305,
0.11115878820419312,
-0.09407804161310196,
-0.026681069284677505,
0.03935400769114494,
-0.0834479108452797,
-0.0166896004229784,
-0.024542763829231262,
0.04599759727716446,
-0.0474519357085228,
0.020966582000255585,
-0.02099747769534588
] | 0.110384
|
{{< feature-state for\_k8s\_version="v1.21" state="stable" >}} A \_CronJob\_ creates {{< glossary\_tooltip term\_id="job" text="Jobs" >}} on a repeating schedule. CronJob is meant for performing regular scheduled actions such as backups, report generation, and so on. One CronJob object is like one line of a \_crontab\_ (cron table) file on a Unix system. It runs a Job periodically on a given schedule, written in [Cron](https://en.wikipedia.org/wiki/Cron) format. CronJobs have limitations and idiosyncrasies. For example, in certain circumstances, a single CronJob can create multiple concurrent Jobs. See the [limitations](#cron-job-limitations) below. When the control plane creates new Jobs and (indirectly) Pods for a CronJob, the `.metadata.name` of the CronJob is part of the basis for naming those Pods. The name of a CronJob must be a valid [DNS subdomain](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names) value, but this can produce unexpected results for the Pod hostnames. For best compatibility, the name should follow the more restrictive rules for a [DNS label](/docs/concepts/overview/working-with-objects/names#dns-label-names). Even when the name is a DNS subdomain, the name must be no longer than 52 characters. This is because the CronJob controller will automatically append 11 characters to the name you provide and there is a constraint that the length of a Job name is no more than 63 characters. ## Example This example CronJob manifest prints the current time and a hello message every minute: {{% code\_sample file="application/job/cronjob.yaml" %}} ([Running Automated Tasks with a CronJob](/docs/tasks/job/automated-tasks-with-cron-jobs/) takes you through this example in more detail). ## Writing a CronJob spec ### Schedule syntax The `.spec.schedule` field is required. The value of that field follows the [Cron](https://en.wikipedia.org/wiki/Cron) syntax: ``` # ┌───────────── minute (0 - 59) # │ ┌───────────── hour (0 - 23) # │ │ ┌───────────── day of the month (1 - 31) # │ │ │ ┌───────────── month (1 - 12) # │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday) # │ │ │ │ │ OR sun, mon, tue, wed, thu, fri, sat # │ │ │ │ │ # │ │ │ │ │ # \* \* \* \* \* ``` For example, `0 3 \* \* 1` means this task is scheduled to run weekly on a Monday at 3 AM. The format also includes extended "Vixie cron" step values. As explained in the [FreeBSD manual](https://www.freebsd.org/cgi/man.cgi?crontab%285%29): > Step values can be used in conjunction with ranges. Following a range > with `/` specifies skips of the number's value through the > range. For example, `0-23/2` can be used in the hours field to specify > command execution every other hour (the alternative in the V7 standard is > `0,2,4,6,8,10,12,14,16,18,20,22`). Steps are also permitted after an > asterisk, so if you want to say "every two hours", just use `\*/2`. {{< note >}} A question mark (`?`) in the schedule has the same meaning as an asterisk `\*`, that is, it stands for any of available value for a given field. {{< /note >}} Other than the standard syntax, some macros like `@monthly` can also be used: | Entry | Description | Equivalent to | | ------------- | ------------- |------------- | | @yearly (or @annually) | Run once a year at midnight of 1 January | 0 0 1 1 \* | | @monthly | Run once a month at midnight of the first day of the month | 0 0 1 \* \* | | @weekly | Run once a week at midnight on Sunday morning | 0 0 \* \* 0 | | @daily (or @midnight) | Run once a day at midnight | 0 0 \* \* \* | | @hourly | Run once an hour at the beginning
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/cron-jobs.md
|
[
-0.14827324450016022,
-0.02018497884273529,
-0.01707279309630394,
0.01588079333305359,
-0.04506261646747589,
-0.011287172324955463,
0.055101849138736725,
-0.05439237505197525,
0.006005927454680204,
-0.006755684036761522,
-0.023312905803322792,
-0.030763961374759674,
0.020427091047167778,
-0.03484293818473816,
-0.06000223010778427,
0.027784569188952446,
-0.011855385266244411,
-0.0878181979060173,
-0.04883910343050957,
-0.01766742765903473,
0.10015606880187988,
0.04636536166071892,
0.01968776062130928,
0.08396795392036438,
-0.062398821115493774,
0.005475469399243593,
-0.03468741476535797,
0.0016985104884952307,
0.01814427226781845,
0.0714898332953453,
-0.024090828374028206,
0.04526139795780182,
-0.03234095871448517,
0.0593114010989666,
0.07165297120809555,
0.08025086671113968,
-0.0057618869468569756,
0.018039094284176826,
-0.02218051441013813,
0.01634005270898342,
0.03701453283429146,
0.01584276743233204,
-0.036591339856386185,
-0.023471340537071228,
-0.044867850840091705,
-0.011136607266962528,
-0.02621632255613804,
-0.03442642092704773,
-0.03763933479785919,
0.010635176673531532,
-0.0024711003061383963,
-0.09698322415351868,
-0.013492030091583729,
0.11356250941753387,
0.11846628040075302,
0.06440898030996323,
-0.04271004721522331,
0.011682267300784588,
0.02638302929699421,
0.010332627221941948,
-0.010940941981971264,
0.01138748787343502,
-0.00011789571726694703,
0.011508059687912464,
0.056200578808784485,
-0.027352621778845787,
-0.09818809479475021,
-0.042780596762895584,
-0.013447157107293606,
-0.07030785828828812,
-0.06822194904088974,
-0.029374366626143456,
-0.03941403701901436,
0.02561153657734394,
0.04105912148952484,
0.013966134749352932,
-0.010164301842451096,
-0.01770707592368126,
-0.05109548568725586,
-0.16916300356388092,
-0.06380490958690643,
-0.02793935500085354,
0.0539492666721344,
0.0124999163672328,
0.003126873867586255,
-0.056445322930812836,
0.07175475358963013,
-0.028878025710582733,
0.11694657057523727,
0.04464215412735939,
0.03971654176712036,
-0.07584797590970993,
0.09498361498117447,
-0.10717172920703888,
-0.019148092716932297,
0.013594797812402248,
0.022741468623280525,
0.08373196423053741,
0.03435508906841278,
-0.010902426205575466,
0.03163392096757889,
-0.014283069409430027,
0.07632981985807419,
0.017491770908236504,
-0.020375410094857216,
0.0056473128497600555,
-0.08472461998462677,
-0.030977245420217514,
-0.0490480437874794,
-0.03963630646467209,
-0.012137236073613167,
0.13462300598621368,
0.010469074361026287,
-0.05275139957666397,
0.01668652892112732,
0.0032884874381124973,
-0.12818783521652222,
0.006232981104403734,
0.0650600790977478,
0.10291668772697449,
0.030415473505854607,
-0.05885297805070877,
-0.027703022584319115,
-0.10330154001712799,
-0.04024391993880272,
0.04368453845381737,
-0.01098428200930357,
4.8868819299895266e-33,
0.00121118628885597,
-0.03046288713812828,
-0.049748439341783524,
-0.021874912083148956,
0.003913972061127424,
-0.027474230155348778,
-0.0552937276661396,
0.07445163279771805,
-0.027545256540179253,
-0.017055774107575417,
-0.024009019136428833,
0.06855785846710205,
-0.0012927347561344504,
0.015083730220794678,
-0.04198702797293663,
-0.004132309462875128,
0.012768158689141273,
0.07340139150619507,
0.02122412621974945,
0.03613770380616188,
0.03430929034948349,
0.040381286293268204,
-0.06852631270885468,
0.012080543674528599,
0.03683937340974808,
-0.011775627732276917,
0.014871666207909584,
0.013219507411122322,
-0.06618911772966385,
0.03547880798578262,
-0.000756842375267297,
0.10904458910226822,
-0.0007686783792451024,
0.036828335374593735,
-0.06908442825078964,
0.004529302008450031,
-0.033336441963911057,
-0.0749189481139183,
-0.030134784057736397,
-0.07324616611003876,
0.029100580140948296,
-0.02036231942474842,
-0.08434910327196121,
-0.024470163509249687,
0.02601483277976513,
-0.05045061558485031,
0.014278273098170757,
-0.0254509374499321,
0.033380914479494095,
0.06165561079978943,
0.04385341703891754,
0.04917391762137413,
0.08581585437059402,
-0.006630720570683479,
-0.005183547735214233,
0.05730922147631645,
0.022619089111685753,
-0.0839744582772255,
0.07191834598779678,
0.03997751697897911,
-0.012426055036485195,
0.03882446885108948,
-0.04310870170593262,
0.07105925679206848,
0.03603208810091019,
0.03387027978897095,
0.06386535614728928,
0.003579971380531788,
0.06078004091978073,
0.02114011161029339,
-0.01978285238146782,
0.03480460122227669,
-0.040128275752067566,
-0.04842309281229973,
0.06753849238157272,
-0.10909918695688248,
0.06384353339672089,
-0.06560467183589935,
-0.13919204473495483,
0.04661822319030762,
-0.010886217467486858,
-0.0274103544652462,
-0.002681704005226493,
-0.06855935603380203,
0.016324443742632866,
-0.008965197950601578,
-0.008441020734608173,
-0.0400816984474659,
-0.00810482818633318,
-0.012740355916321278,
0.010589119978249073,
-0.0705190896987915,
-0.07408104836940765,
0.04270031675696373,
-0.06314673274755478,
-7.247500134419244e-33,
0.08120875805616379,
-0.06577662378549576,
-0.018777206540107727,
0.01816716603934765,
-0.020513027906417847,
0.012883204966783524,
0.0044562253169715405,
0.001525414758361876,
-0.051910150796175,
-0.08911269158124924,
-0.025652850046753883,
-0.018001241609454155,
0.010155822150409222,
-0.00369407725520432,
0.060583844780921936,
-0.010192430578172207,
-0.07099457830190659,
-0.024150488898158073,
-0.04942008852958679,
0.06257251650094986,
0.03105579875409603,
0.016474999487400055,
-0.03704490512609482,
0.08559766411781311,
0.0019384626066312194,
-0.04627690464258194,
-0.05961866304278374,
0.022412866353988647,
0.06136269122362137,
-0.0011208363575860858,
-0.017696000635623932,
-0.08041161298751831,
-0.025430159643292427,
0.023059887811541557,
-0.03568947687745094,
-0.10014393925666809,
-0.01604357920587063,
-0.08058507740497589,
0.015305627137422562,
0.05024910718202591,
0.1457991749048233,
0.01410716399550438,
-0.007121286820620298,
-0.01590506173670292,
-0.06354671716690063,
0.03861621022224426,
-0.06808975338935852,
0.06223287433385849,
-0.03094491921365261,
-0.08953061699867249,
0.0144603056833148,
-0.04151790589094162,
-0.07066266983747482,
0.0051717800088226795,
0.016670137643814087,
0.008212339133024216,
-0.004267795477062464,
-0.034695226699113846,
-0.050641708076000214,
0.05882107466459274,
0.023569874465465546,
-0.03763648867607117,
0.048120323568582535,
0.08999539166688919,
0.05085410550236702,
-0.0030425277072936296,
-0.022504378110170364,
-0.04526190087199211,
0.00932166539132595,
-0.016482001170516014,
0.028293592855334282,
0.006415638606995344,
-0.015385610051453114,
-0.03444408252835274,
-0.0263365488499403,
0.018555745482444763,
-0.01742887683212757,
-0.1315818578004837,
-0.07465013116598129,
0.048443734645843506,
-0.05021641403436661,
0.008947893977165222,
0.08570197224617004,
0.08805949240922928,
-0.061628732830286026,
0.019341640174388885,
-0.03854317218065262,
0.1110004335641861,
0.037785328924655914,
0.014194642193615437,
0.041023578494787216,
-0.03735063225030899,
-0.04760938882827759,
0.18748825788497925,
0.036848150193691254,
-6.585469947140155e-8,
-0.011523771099746227,
0.09842570871114731,
0.0355120487511158,
0.0018201902275905013,
0.07394599169492722,
-0.06867974251508713,
0.045532576739788055,
-0.03903765603899956,
0.03037821501493454,
0.01933971419930458,
0.01917911134660244,
-0.04872817173600197,
-0.0043895673006772995,
0.05489949509501457,
0.03695627674460411,
0.0314055010676384,
-0.019622772932052612,
-0.0034712902270257473,
0.0033448270987719297,
0.008412512950599194,
0.027385547757148743,
-0.04718447104096413,
0.06868519634008408,
0.03922010958194733,
-0.04235462099313736,
0.029120756313204765,
-0.024316731840372086,
0.1330328732728958,
-0.04065471142530441,
0.03197954222559929,
-0.012510380707681179,
-0.006864386610686779,
-0.014818241819739342,
0.05380955711007118,
-0.015310120768845081,
0.041568972170352936,
-0.042753852903842926,
-0.055127400904893875,
0.050755031406879425,
-0.003236645134165883,
0.04662510007619858,
-0.0208682119846344,
-0.05677357316017151,
0.015561254695057869,
0.01206214539706707,
0.0784948319196701,
-0.10026837140321732,
-0.005140293855220079,
-0.04868707433342934,
-0.02877097949385643,
-0.05342920497059822,
0.02727740816771984,
0.015131959691643715,
0.08013905584812164,
0.005267332307994366,
-0.004438580945134163,
0.04026240482926369,
-0.09289577603340149,
0.055488456040620804,
-0.028805529698729515,
0.0060353511944413185,
0.024925116449594498,
0.0322188064455986,
-0.01870129443705082
] | 0.170342
|
\* \* | | @weekly | Run once a week at midnight on Sunday morning | 0 0 \* \* 0 | | @daily (or @midnight) | Run once a day at midnight | 0 0 \* \* \* | | @hourly | Run once an hour at the beginning of the hour | 0 \* \* \* \* | To generate CronJob schedule expressions, you can also use web tools like [crontab.guru](https://crontab.guru/). ### Job template The `.spec.jobTemplate` defines a template for the Jobs that the CronJob creates, and it is required. It has exactly the same schema as a [Job](/docs/concepts/workloads/controllers/job/), except that it is nested and does not have an `apiVersion` or `kind`. You can specify common metadata for the templated Jobs, such as {{< glossary\_tooltip text="labels" term\_id="label" >}} or {{< glossary\_tooltip text="annotations" term\_id="annotation" >}}. For information about writing a Job `.spec`, see [Writing a Job Spec](/docs/concepts/workloads/controllers/job/#writing-a-job-spec). ### Deadline for delayed Job start {#starting-deadline} The `.spec.startingDeadlineSeconds` field is optional. This field defines a deadline (in whole seconds) for starting the Job, if that Job misses its scheduled time for any reason. After missing the deadline, the CronJob skips that instance of the Job (future occurrences are still scheduled). For example, if you have a backup Job that runs twice a day, you might allow it to start up to 8 hours late, but no later, because a backup taken any later wouldn't be useful: you would instead prefer to wait for the next scheduled run. For Jobs that miss their configured deadline, Kubernetes treats them as failed Jobs. If you don't specify `startingDeadlineSeconds` for a CronJob, the Job occurrences have no deadline. If the `.spec.startingDeadlineSeconds` field is set (not null), the CronJob controller measures the time between when a Job is expected to be created and now. If the difference is higher than that limit, it will skip this execution. For example, if it is set to `200`, it allows a Job to be created for up to 200 seconds after the actual schedule. ### Concurrency policy The `.spec.concurrencyPolicy` field is also optional. It specifies how to treat concurrent executions of a Job that is created by this CronJob. The spec may specify only one of the following concurrency policies: \* `Allow` (default): The CronJob allows concurrently running Jobs \* `Forbid`: The CronJob does not allow concurrent runs; if it is time for a new Job run and the previous Job run hasn't finished yet, the CronJob skips the new Job run. Also note that when the previous Job run finishes, `.spec.startingDeadlineSeconds` is still taken into account and may result in a new Job run. \* `Replace`: If it is time for a new Job run and the previous Job run hasn't finished yet, the CronJob replaces the currently running Job run with a new Job run Note that concurrency policy only applies to the Jobs created by the same CronJob. If there are multiple CronJobs, their respective Jobs are always allowed to run concurrently. ### Schedule suspension You can suspend execution of Jobs for a CronJob, by setting the optional `.spec.suspend` field to true. The field defaults to false. This setting does \_not\_ affect Jobs that the CronJob has already started. If you do set that field to true, all subsequent executions are suspended (they remain scheduled, but the CronJob controller does not start the Jobs to run the tasks) until you unsuspend the CronJob. {{< caution >}} Executions that are suspended during their scheduled time count as missed Jobs. When `.spec.suspend` changes from `true` to `false` on an existing CronJob without a [starting deadline](#starting-deadline), the missed Jobs
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/cron-jobs.md
|
[
-0.1562274694442749,
0.029150431975722313,
-0.02447040192782879,
0.04477269947528839,
-0.0648433268070221,
0.015136150643229485,
-0.03606727346777916,
-0.035401761531829834,
-0.07944116741418839,
-0.010480571538209915,
-0.05649982765316963,
-0.07887174934148788,
0.006277607288211584,
0.03868817538022995,
-0.014443719759583473,
0.022525059059262276,
0.0031159406062215567,
-0.0713958889245987,
0.031007247045636177,
-0.017872696742415428,
0.10022693872451782,
0.05436895042657852,
0.0451643168926239,
0.034298524260520935,
-0.011075090616941452,
-0.023877454921603203,
0.045825179666280746,
-0.050137411803007126,
0.04424654319882393,
0.08424493670463562,
-0.03023936040699482,
-0.044059619307518005,
-0.024735722690820694,
0.07056991010904312,
0.09853716194629669,
0.08615367114543915,
0.03967583179473877,
0.06223844736814499,
0.000569524709135294,
0.04321206733584404,
0.0687282606959343,
-0.026996558532118797,
-0.07831992954015732,
-0.07333345711231232,
-0.016244497150182724,
-0.07617083936929703,
-0.007268237415701151,
-0.015287285670638084,
-0.08226154744625092,
0.07045381516218185,
0.056427791714668274,
-0.12654559314250946,
-0.03495948016643524,
0.039121050387620926,
0.07055939733982086,
0.06705471873283386,
-0.0036902809515595436,
-0.031974907964468,
0.11714662611484528,
0.013360288925468922,
-0.02109631896018982,
0.015381047502160072,
-0.0014147524489089847,
-0.036969270557165146,
0.020317956805229187,
-0.07046438008546829,
-0.0935605987906456,
-0.00348813459277153,
0.020737342536449432,
-0.025173133239150047,
-0.10167423635721207,
-0.030430864542722702,
0.0007868495304137468,
-0.019493497908115387,
-0.014450645074248314,
0.03644992783665657,
0.04420658200979233,
-0.039173148572444916,
-0.04423188418149948,
-0.09069733321666718,
-0.0747210681438446,
-0.02307862788438797,
0.043393902480602264,
0.07170126587152481,
0.023643823340535164,
-0.028926962986588478,
0.06797447055578232,
0.06252611428499222,
0.15488992631435394,
-0.032099224627017975,
0.04903382807970047,
-0.007324571721255779,
-0.02902430109679699,
-0.13493157923221588,
0.0184153001755476,
-0.0011208063224330544,
-0.011302253231406212,
0.029513796791434288,
-0.0056852735579013824,
0.008285545744001865,
0.009286308661103249,
-0.04143976792693138,
0.03733803704380989,
-0.03702467679977417,
0.030226046219468117,
0.06455440819263458,
-0.06864791363477707,
0.03301570564508438,
-0.09560368955135345,
-0.028288505971431732,
0.025506531819701195,
0.11797337979078293,
0.03127237409353256,
-0.06472162902355194,
0.020853327587246895,
0.00622912310063839,
-0.06596188992261887,
0.024101709946990013,
-0.014249438419938087,
0.1313447207212448,
0.03086421824991703,
0.023450542241334915,
-0.014628073200583458,
-0.0520765595138073,
0.025549720972776413,
0.008216271176934242,
0.05023512616753578,
3.617864881273833e-33,
0.040575768798589706,
0.011769614182412624,
-0.029394134879112244,
0.0031945451628416777,
0.017996903508901596,
-0.043506499379873276,
-0.005683458410203457,
0.07129372656345367,
0.03869863227009773,
-0.024671737104654312,
-0.01290361862629652,
0.041015658527612686,
-0.025195881724357605,
0.05596674978733063,
-0.07756831496953964,
0.0016812649555504322,
0.03468090295791626,
-0.023778747767210007,
0.04796195402741432,
-0.011309388093650341,
-0.010345781221985817,
0.0045334575697779655,
-0.11440330743789673,
-0.0037993979640305042,
-0.02052115648984909,
-0.046796537935733795,
0.05839623138308525,
0.0030719817150384188,
-0.04770432040095329,
0.02296445518732071,
0.0669734925031662,
0.01531931385397911,
-0.007550730369985104,
0.05369509756565094,
-0.00904976949095726,
0.06266221404075623,
-0.004187567625194788,
-0.014014205895364285,
-0.002075158292427659,
-0.002244442468509078,
-0.01185581274330616,
-0.028396936133503914,
-0.05240130424499512,
-0.1083509624004364,
0.03781048581004143,
-0.013796973042190075,
0.07703203707933426,
-0.061232540756464005,
0.08298693597316742,
0.024454668164253235,
0.06379400938749313,
0.023241568356752396,
0.09471442550420761,
-0.04595335200428963,
-0.01506887935101986,
0.04085570201277733,
0.036168500781059265,
-0.05601353570818901,
0.10956375300884247,
0.016378797590732574,
-0.016216862946748734,
-0.05960636958479881,
-0.06044619157910347,
-0.021529462188482285,
-0.037525761872529984,
-0.049730636179447174,
0.026336712762713432,
-0.026640944182872772,
0.05277630314230919,
0.02932034619152546,
0.037307702004909515,
0.06145528331398964,
-0.0053898184560239315,
-0.0056139216758310795,
0.050732094794511795,
-0.05551024153828621,
0.09243521839380264,
0.00971632543951273,
-0.1558942198753357,
0.05663291737437248,
0.02015669457614422,
0.029994774609804153,
0.045792657881975174,
-0.068684883415699,
0.0915592685341835,
-0.03881031274795532,
0.01782793551683426,
0.030562149360775948,
0.02796698361635208,
-0.050531502813100815,
0.02109115570783615,
-0.10425429046154022,
-0.05359146371483803,
0.011369675397872925,
-0.011547615751624107,
-3.9655485595982185e-33,
0.0772523507475853,
-0.01595219410955906,
-0.03478512540459633,
0.024380968883633614,
-0.00612199492752552,
-0.0028944516088813543,
0.043944720178842545,
0.014751104637980461,
-0.019038613885641098,
0.018887413665652275,
0.023038364946842194,
0.0031728590838611126,
-0.03899576514959335,
-0.026270555332303047,
0.015676140785217285,
-0.0029130938928574324,
-0.10751496255397797,
-0.047661155462265015,
-0.06395497918128967,
0.08155802637338638,
0.005924663506448269,
-0.012331539765000343,
0.0007155887433327734,
0.029233667999505997,
0.07255927473306656,
0.03676009923219681,
-0.05087009072303772,
0.054918184876441956,
-0.0201755128800869,
0.0637139081954956,
-0.07424475252628326,
-0.07778386771678925,
0.03289438784122467,
0.007504544220864773,
-0.003396009560674429,
-0.09199128299951553,
-0.04746561497449875,
0.04285196587443352,
0.020129039883613586,
0.07025439292192459,
0.11165198683738708,
-0.05596568062901497,
-0.0018358927918598056,
-0.044119879603385925,
-0.06055250018835068,
0.043080031871795654,
0.003265639068558812,
0.015073788352310658,
-0.09171392023563385,
-0.07259409129619598,
0.00820245873183012,
0.009441698901355267,
-0.07507149875164032,
-0.009359966963529587,
0.009309415705502033,
-0.05691703408956528,
0.04861671105027199,
-0.09058692306280136,
-0.030169829726219177,
0.10930757224559784,
0.01012643426656723,
-0.022100631147623062,
0.07283809036016464,
0.04401709884405136,
-0.008085592649877071,
-0.06220162287354469,
-0.04273892939090729,
-0.01632106304168701,
-0.03166960924863815,
-0.011593440547585487,
-0.036802031099796295,
-0.012132389470934868,
0.010526016354560852,
-0.041812263429164886,
-0.06446320563554764,
-0.008377429097890854,
0.0017891961615532637,
-0.05560118332505226,
-0.032727837562561035,
0.05558478832244873,
-0.03452843800187111,
-0.02330303005874157,
0.05196985602378845,
0.06944243609905243,
-0.07503343373537064,
0.008384394459426403,
0.007033742498606443,
0.06998142600059509,
0.00007592825568281114,
0.047536540776491165,
-0.010025179013609886,
-0.042381156235933304,
0.018544455990195274,
0.13109561800956726,
0.07801616936922073,
-5.6404950043997815e-8,
-0.012981764040887356,
0.0722489207983017,
0.08055204153060913,
0.01630202680826187,
-0.01843762770295143,
-0.0985892117023468,
0.04444387927651405,
-0.07037387788295746,
0.030465226620435715,
0.07248009741306305,
0.03405052050948143,
-0.05660216510295868,
-0.007160078268498182,
0.02672344632446766,
-0.0021877342369407415,
0.01175448764115572,
0.0025780494324862957,
-0.031534817069768906,
0.020758433267474174,
-0.06874100863933563,
0.04995559900999069,
-0.033891960978507996,
0.02627616375684738,
0.014173963107168674,
0.030166802927851677,
0.0730695128440857,
-0.08337025344371796,
0.08425676822662354,
0.015760423615574837,
0.07895093411207199,
-0.013075067661702633,
-0.014532838016748428,
-0.00975409708917141,
-0.004609701223671436,
-0.0588473342359066,
-0.019127150997519493,
-0.06237554922699928,
-0.08376525342464447,
0.004044882953166962,
0.042084090411663055,
0.091942198574543,
-0.00020387762924656272,
-0.0026750967372208834,
-0.06627504527568817,
0.009690126404166222,
0.0390615276992321,
-0.03597797825932503,
0.0026804462540894747,
0.0013969694264233112,
0.0166682880371809,
-0.015399578958749771,
-0.0040464866906404495,
0.029632583260536194,
-0.0015331663889810443,
-0.03928181901574135,
-0.033721208572387695,
0.03783012926578522,
-0.13278914988040924,
0.0005838355282321572,
-0.031388942152261734,
0.03782830759882927,
0.012259028851985931,
0.019030995666980743,
-0.05193726345896721
] | 0.000837
|
the CronJob controller does not start the Jobs to run the tasks) until you unsuspend the CronJob. {{< caution >}} Executions that are suspended during their scheduled time count as missed Jobs. When `.spec.suspend` changes from `true` to `false` on an existing CronJob without a [starting deadline](#starting-deadline), the missed Jobs are scheduled immediately. {{< /caution >}} ### Jobs history limits The `.spec.successfulJobsHistoryLimit` and `.spec.failedJobsHistoryLimit` fields specify how many completed and failed Jobs should be kept. Both fields are optional. \* `.spec.successfulJobsHistoryLimit`: This field specifies the number of successful finished jobs to keep. The default value is `3`. Setting this field to `0` will not keep any successful jobs. \* `.spec.failedJobsHistoryLimit`: This field specifies the number of failed finished jobs to keep. The default value is `1`. Setting this field to `0` will not keep any failed jobs. For another way to clean up Jobs automatically, see [Clean up finished Jobs automatically](/docs/concepts/workloads/controllers/job/#clean-up-finished-jobs-automatically). ### Time zones {{< feature-state for\_k8s\_version="v1.27" state="stable" >}} For CronJobs with no time zone specified, the {{< glossary\_tooltip term\_id="kube-controller-manager" text="kube-controller-manager" >}} interprets schedules relative to its local time zone. You can specify a time zone for a CronJob by setting `.spec.timeZone` to the name of a valid [time zone](https://en.wikipedia.org/wiki/List\_of\_tz\_database\_time\_zones). For example, setting `.spec.timeZone: "Etc/UTC"` instructs Kubernetes to interpret the schedule relative to Coordinated Universal Time. A time zone database from the Go standard library is included in the binaries and used as a fallback in case an external database is not available on the system. ## CronJob limitations {#cron-job-limitations} ### Unsupported TimeZone specification Specifying a timezone using `CRON\_TZ` or `TZ` variables inside `.spec.schedule` is \*\*not officially supported\*\* (and never has been). If you try to set a schedule that includes `TZ` or `CRON\_TZ` timezone specification, Kubernetes will fail to create or update the resource with a validation error. You should specify time zones using the [time zone field](#time-zones), instead. ### Modifying a CronJob By design, a CronJob contains a template for \_new\_ Jobs. If you modify an existing CronJob, the changes you make will apply to new Jobs that start to run after your modification is complete. Jobs (and their Pods) that have already started continue to run without changes. That is, the CronJob does \_not\_ update existing Jobs, even if those remain running. ### Job creation A CronJob creates a Job object approximately once per execution time of its schedule. The scheduling is approximate because there are certain circumstances where two Jobs might be created, or no Job might be created. Kubernetes tries to avoid those situations, but does not completely prevent them. Therefore, the Jobs that you define should be \_idempotent\_. Starting with Kubernetes v1.32, CronJobs apply an annotation `batch.kubernetes.io/cronjob-scheduled-timestamp` to their created Jobs. This annotation indicates the originally scheduled creation time for the Job and is formatted in RFC3339. If `startingDeadlineSeconds` is set to a large value or left unset (the default) and if `concurrencyPolicy` is set to `Allow`, the Jobs will always run at least once. {{< caution >}} If `startingDeadlineSeconds` is set to a value less than 10 seconds, the CronJob may not be scheduled. This is because the CronJob controller checks things every 10 seconds. {{< /caution >}} For every CronJob, the CronJob {{< glossary\_tooltip term\_id="controller" >}} checks how many schedules it missed in the duration from its last scheduled time until now. If there are more than 100 missed schedules, then it does not start the Job and logs the error. ``` Cannot determine if job needs to be started. Too many missed start time (> 100). Set or decrease .spec.startingDeadlineSeconds or check clock skew. ``` It is important to note that
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/cron-jobs.md
|
[
-0.10399635881185532,
0.011744119226932526,
0.0018497096607461572,
0.06643515080213547,
0.04002100229263306,
0.025648005306720734,
-0.0471733920276165,
-0.012859368696808815,
-0.08818628638982773,
-0.008414961397647858,
-0.00007257991092046723,
-0.018327997997403145,
0.008131899870932102,
0.006227787584066391,
-0.09901010990142822,
-0.047236908227205276,
-0.05741903558373451,
-0.05673029646277428,
0.045575983822345734,
-0.05067771300673485,
0.06607210636138916,
0.07815703749656677,
0.037514764815568924,
0.05899481475353241,
-0.04091211035847664,
-0.03884805366396904,
-0.0073791379109025,
-0.034739550203084946,
-0.047733087092638016,
0.058712154626846313,
-0.02552800253033638,
-0.05926675349473953,
-0.024918999522924423,
-0.019364088773727417,
0.06656785309314728,
0.060384754091501236,
0.018684348091483116,
0.011753763072192669,
-0.006906472146511078,
0.001618688926100731,
0.02197381854057312,
0.019272683188319206,
-0.07606643438339233,
-0.04987715184688568,
0.01578131504356861,
-0.05522220581769943,
-0.06451427936553955,
-0.10427156835794449,
-0.031902458518743515,
0.020188497379422188,
0.004766944795846939,
-0.0030717123299837112,
0.0412919782102108,
0.06843984872102737,
0.05561547726392746,
0.08523004502058029,
-0.010152436792850494,
-0.04244516044855118,
0.030578937381505966,
0.0003638507623691112,
-0.007640872150659561,
-0.021769100800156593,
-0.025564193725585938,
-0.06594271957874298,
0.0038872610311955214,
-0.01331489160656929,
-0.03767104819417,
-0.046254295855760574,
0.03472275286912918,
0.055339470505714417,
-0.07448794692754745,
-0.0034234817139804363,
-0.09030821919441223,
0.009239460341632366,
-0.05059784650802612,
0.008502245880663395,
0.014332708902657032,
-0.06295368075370789,
-0.08310835808515549,
-0.08101648837327957,
-0.10670030117034912,
-0.16368666291236877,
0.017827151343226433,
0.023116499185562134,
-0.029089052230119705,
0.012232073582708836,
0.013367688283324242,
0.004703369922935963,
0.0964444950222969,
-0.03140568733215332,
0.09000487625598907,
-0.029019884765148163,
-0.010922793298959732,
0.037158459424972534,
-0.01322819571942091,
0.01059024315327406,
0.026248883455991745,
0.09543164819478989,
-0.016622813418507576,
0.03529940918087959,
0.023820895701646805,
-0.02105678617954254,
0.02612093649804592,
-0.011379986070096493,
0.041720300912857056,
0.0844934731721878,
-0.013760348781943321,
0.04805269464850426,
-0.08341952413320541,
0.0013240899424999952,
0.020754484459757805,
0.08323071151971817,
-0.014462204650044441,
0.00036271853605285287,
0.04279213771224022,
0.12065386772155762,
0.002420126460492611,
0.09230300784111023,
-0.03494108095765114,
0.08755917847156525,
0.09610271453857422,
0.10188411176204681,
0.03026336058974266,
-0.05566816031932831,
0.0032631405629217625,
-0.0028862585313618183,
0.047870635986328125,
4.832100954505331e-33,
0.0896294042468071,
-0.03289961442351341,
-0.06532835960388184,
-0.010675564408302307,
0.0206576120108366,
0.018028229475021362,
-0.04029868170619011,
0.09453676640987396,
0.01719098724424839,
0.008402496576309204,
0.0028840682934969664,
-0.010437662713229656,
-0.05526167154312134,
-0.04042400047183037,
-0.07994122058153152,
-0.07879889011383057,
0.02903917245566845,
-0.01028318703174591,
0.062259938567876816,
-0.05902450904250145,
0.01446143165230751,
-0.0519065223634243,
-0.08614394068717957,
0.031639158725738525,
-0.028510747477412224,
-0.006351019721478224,
0.04800461605191231,
0.03553387522697449,
-0.08702384680509567,
0.03875482827425003,
0.010171549394726753,
0.06921926140785217,
-0.03439098969101906,
0.01699284464120865,
-0.017848622053861618,
0.04439009353518486,
-0.04097728431224823,
-0.04226977005600929,
0.021905161440372467,
-0.06340569257736206,
-0.07906536757946014,
0.00008393604366574436,
-0.06711620092391968,
-0.05787138640880585,
0.057023365050554276,
-0.12192998826503754,
0.06764122098684311,
0.020981740206480026,
0.06792321056127548,
0.09250666201114655,
0.06308568269014359,
0.03390169143676758,
0.07522152364253998,
-0.03024125099182129,
-0.06473389267921448,
0.03732630982995033,
0.0625489130616188,
-0.011008160188794136,
0.06986595690250397,
-0.013952847570180893,
0.08010762184858322,
-0.053060077130794525,
-0.07834915816783905,
0.010718733072280884,
-0.00205049104988575,
0.06777031719684601,
0.050737980753183365,
0.0062945387326180935,
-0.009988514706492424,
-0.02401837147772312,
-0.04030487686395645,
0.05181441083550453,
0.02839716337621212,
0.006548647303134203,
0.009184096939861774,
-0.028947269544005394,
0.0848708301782608,
-0.03728337585926056,
-0.10682989656925201,
0.02989620715379715,
0.07562354952096939,
0.0342334546148777,
-0.023655550554394722,
-0.10881778597831726,
0.07904716581106186,
0.019463375210762024,
0.048957496881484985,
0.06717992573976517,
0.03629651293158531,
-0.0033224388025701046,
0.019035987555980682,
-0.041996460407972336,
0.02642369084060192,
0.0719396099448204,
-0.005340576171875,
-4.9727539963690025e-33,
0.06305478513240814,
-0.004519942682236433,
-0.034939032047986984,
0.009854472242295742,
0.01819460093975067,
-0.003917593043297529,
0.053306806832551956,
0.0021979985758662224,
-0.06274232268333435,
-0.13932758569717407,
0.014956025406718254,
-0.04967261850833893,
-0.03849739581346512,
-0.03549831360578537,
-0.004990969318896532,
0.011383426375687122,
-0.009866258129477501,
-0.021877346560359,
-0.09547842293977737,
0.07972743362188339,
0.027905292809009552,
0.006244252435863018,
-0.06846201419830322,
0.0697435662150383,
-0.024711864069104195,
0.02258434146642685,
-0.09253502637147903,
-0.00018971458484884351,
-0.03727208077907562,
0.02581057697534561,
0.04679920896887779,
-0.056534264236688614,
0.040460530668497086,
0.06508433818817139,
0.05989311262965202,
-0.11925748735666275,
-0.07826696336269379,
0.021120760589838028,
0.022852253168821335,
0.0872095450758934,
0.17064416408538818,
0.007346841506659985,
-0.03110918588936329,
-0.05241703614592552,
-0.0351698212325573,
0.02916742116212845,
0.011841541156172752,
-0.0032241211738437414,
-0.08506624400615692,
-0.0647338256239891,
-0.038418155163526535,
-0.018430396914482117,
-0.03862850368022919,
0.009176598861813545,
0.09336787462234497,
-0.047784242779016495,
0.04593992978334427,
-0.06783927977085114,
-0.04170049726963043,
0.048585668206214905,
-0.010141592472791672,
0.010011800564825535,
0.055070362985134125,
0.05391440913081169,
0.039161089807748795,
-0.025743138045072556,
-0.004484334494918585,
0.018266459926962852,
0.032819073647260666,
0.0027593718841671944,
0.0035165646113455296,
0.07148775458335876,
0.02831840142607689,
-0.03459126874804497,
-0.029362516477704048,
-0.015950702130794525,
-0.07168266922235489,
-0.043479353189468384,
-0.0573192723095417,
0.03511851653456688,
0.04858807101845741,
-0.011420839466154575,
0.03915853425860405,
0.007793940603733063,
-0.03766997531056404,
0.051304761320352554,
-0.05386422574520111,
0.048455849289894104,
0.005664402153342962,
-0.008324099704623222,
-0.051602091640233994,
-0.043680306524038315,
0.07666686177253723,
0.03764651343226433,
0.00827164575457573,
-5.526948854139846e-8,
0.0425240658223629,
0.09532561153173447,
0.03876502439379692,
0.011663493700325489,
0.03314555808901787,
-0.11951756477355957,
-0.002248231554403901,
0.006850003730505705,
0.03248857334256172,
0.019993770867586136,
-0.005232524126768112,
-0.046833448112010956,
-0.01909836381673813,
0.029504496604204178,
0.010929420590400696,
-0.03702686354517937,
0.06274901330471039,
0.05880691483616829,
0.04056151956319809,
0.0044603534042835236,
0.000016842541299411096,
-0.026783376932144165,
-0.010838962160050869,
-0.0010219048708677292,
0.02663601003587246,
0.06673725694417953,
-0.015041520819067955,
0.09802945703268051,
0.04643644392490387,
0.07011312991380692,
-0.023013874888420105,
-0.06277891248464584,
0.02621721662580967,
-0.0017871781019493937,
-0.07927839457988739,
0.07088807225227356,
0.018686184659600258,
-0.09074198454618454,
-0.01566341333091259,
0.029704628512263298,
0.05501468852162361,
0.04685835912823677,
-0.014582366682589054,
-0.038079701364040375,
0.010289547964930534,
-0.03293618932366371,
-0.04440546780824661,
0.010249069891870022,
-0.03468446433544159,
-0.047149866819381714,
-0.05275852978229523,
-0.012674395926296711,
0.039614394307136536,
0.0453958623111248,
-0.02587154321372509,
0.03752043843269348,
0.03779273480176926,
-0.1109001487493515,
-0.06374075263738632,
-0.035144954919815063,
0.0690242126584053,
-0.05711600184440613,
-0.053138360381126404,
-0.024616088718175888
] | 0.013707
|
If there are more than 100 missed schedules, then it does not start the Job and logs the error. ``` Cannot determine if job needs to be started. Too many missed start time (> 100). Set or decrease .spec.startingDeadlineSeconds or check clock skew. ``` It is important to note that if the `startingDeadlineSeconds` field is set (not `nil`), the controller counts how many missed Jobs occurred from the value of `startingDeadlineSeconds` until now rather than from the last scheduled time until now. For example, if `startingDeadlineSeconds` is `200`, the controller counts how many missed Jobs occurred in the last 200 seconds. A CronJob is counted as missed if it has failed to be created at its scheduled time. For example, if `concurrencyPolicy` is set to `Forbid` and a CronJob was attempted to be scheduled when there was a previous schedule still running, then it would count as missed. For example, suppose a CronJob is set to schedule a new Job every one minute beginning at `08:30:00`, and its `startingDeadlineSeconds` field is not set. If the CronJob controller happens to be down from `08:29:00` to `10:21:00`, the Job will not start as the number of missed Jobs which missed their schedule is greater than 100. To illustrate this concept further, suppose a CronJob is set to schedule a new Job every one minute beginning at `08:30:00`, and its `startingDeadlineSeconds` is set to 200 seconds. If the CronJob controller happens to be down for the same period as the previous example (`08:29:00` to `10:21:00`,) the Job will still start at 10:22:00. This happens as the controller now checks how many missed schedules happened in the last 200 seconds (i.e., 3 missed schedules), rather than from the last scheduled time until now. The CronJob is only responsible for creating Jobs that match its schedule, and the Job in turn is responsible for the management of the Pods it represents. ## {{% heading "whatsnext" %}} \* Learn about [Pods](/docs/concepts/workloads/pods/) and [Jobs](/docs/concepts/workloads/controllers/job/), two concepts that CronJobs rely upon. \* Read about the detailed [format](https://pkg.go.dev/github.com/robfig/cron/v3#hdr-CRON\_Expression\_Format) of CronJob `.spec.schedule` fields. \* For instructions on creating and working with CronJobs, and for an example of a CronJob manifest, see [Running automated tasks with CronJobs](/docs/tasks/job/automated-tasks-with-cron-jobs/). \* `CronJob` is part of the Kubernetes REST API. Read the {{< api-reference page="workload-resources/cron-job-v1" >}} API reference for more details.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/cron-jobs.md
|
[
-0.07526704668998718,
-0.046805109828710556,
-0.08413957059383392,
0.05532212555408478,
0.0021286485716700554,
0.0010069471318274736,
-0.02380102127790451,
0.0010025306837633252,
0.0566706582903862,
0.013120885007083416,
0.0393638089299202,
-0.06303878873586655,
0.024275150150060654,
-0.02553631365299225,
-0.07261326164007187,
-0.0890863686800003,
-0.019144127145409584,
-0.11289157718420029,
-0.023817623034119606,
-0.027516115456819534,
0.028056267648935318,
0.05694252625107765,
-0.018450649455189705,
0.052126444876194,
-0.10129360854625702,
-0.046428561210632324,
-0.048972807824611664,
0.0066535682417452335,
-0.016033560037612915,
0.04668392613530159,
-0.0776972770690918,
-0.046412933617830276,
-0.008442754857242107,
0.04431876540184021,
0.07565890997648239,
0.03842215612530708,
0.039674606174230576,
0.0013202108675614,
-0.0194389745593071,
0.0016120565123856068,
0.0439857579767704,
0.017201563343405724,
-0.032259006053209305,
0.012864059768617153,
0.031008180230855942,
-0.034291330724954605,
-0.08930113166570663,
-0.03911621868610382,
-0.04506538063287735,
-0.00232645939104259,
0.013558234088122845,
0.006489083636552095,
0.05600278079509735,
0.04327214136719704,
0.09796596318483353,
0.10624556988477707,
-0.041500333696603775,
-0.008965200744569302,
0.0347881093621254,
0.026274021714925766,
-0.011272412724792957,
-0.01193143893033266,
-0.06054864078760147,
-0.07273679226636887,
0.06075538694858551,
-0.026365388184785843,
-0.01667456515133381,
-0.07699744403362274,
0.07061771303415298,
0.0245120320469141,
-0.04431141912937164,
-0.012307181023061275,
-0.0787859857082367,
0.09103968739509583,
-0.04656684026122093,
0.019159823656082153,
0.04769269749522209,
-0.02550765685737133,
-0.05339851230382919,
-0.10359787195920944,
-0.15252725780010223,
-0.10931892693042755,
-0.020661376416683197,
0.019469382241368294,
0.05801163241267204,
-0.01654990389943123,
0.06893796473741531,
0.07230795174837112,
0.08545317500829697,
-0.012501455843448639,
0.055132344365119934,
0.020911533385515213,
-0.033210430294275284,
0.010704673826694489,
0.025024965405464172,
0.09482644498348236,
-0.012165609747171402,
0.1075640469789505,
-0.009824252687394619,
0.012770764529705048,
0.005164759233593941,
-0.017806023359298706,
0.04790422320365906,
0.01597444713115692,
0.03420180454850197,
0.035207320004701614,
0.007450540084391832,
0.030260572209954262,
-0.1478726714849472,
-0.01748725026845932,
0.056630708277225494,
0.048503339290618896,
0.10888645052909851,
0.0011858093785122037,
0.09491574764251709,
0.028368299826979637,
-0.002928186906501651,
0.007106343284249306,
-0.004735072609037161,
0.0596981905400753,
0.026730414479970932,
0.062006525695323944,
0.05885099247097969,
-0.06510371714830399,
-0.0015609851107001305,
0.005636600777506828,
0.07947094738483429,
8.658216047628856e-33,
0.024009836837649345,
-0.023924248293042183,
0.008709548972547054,
-0.03867717087268829,
-0.0037873582914471626,
0.007820727303624153,
-0.08038769662380219,
0.06476840376853943,
0.09990131109952927,
0.014398478902876377,
-0.02421020157635212,
-0.053322214633226395,
-0.02827819250524044,
-0.03171823173761368,
-0.027917657047510147,
0.0021391683258116245,
0.08801841735839844,
-0.07305479794740677,
0.025772837921977043,
0.017145149409770966,
-0.022926494479179382,
-0.09509392082691193,
-0.0665849819779396,
-0.03352389112114906,
0.015734007582068443,
0.006838333327323198,
0.007845754735171795,
-0.006632006261497736,
-0.008416703902184963,
0.03504210710525513,
0.08584931492805481,
0.03925243765115738,
-0.03479960933327675,
0.005868985783308744,
0.039458274841308594,
0.025205440819263458,
0.039368294179439545,
0.0022057604510337114,
-0.047951191663742065,
-0.0012096167774870992,
-0.11397162079811096,
-0.0071015856228768826,
-0.10597333312034607,
-0.0465022437274456,
-0.00851343385875225,
-0.07005836069583893,
0.0790841206908226,
0.03182247281074524,
-0.004233113955706358,
0.1013740599155426,
0.025966966524720192,
0.06988269090652466,
0.0855817198753357,
-0.033787164837121964,
-0.0446445569396019,
-0.015080014243721962,
0.0378766730427742,
-0.062380656599998474,
0.04079911485314369,
0.07280147820711136,
0.061411552131175995,
-0.09720224887132645,
-0.03930375725030899,
-0.006609814241528511,
0.009368845261633396,
0.06821998208761215,
0.037249889224767685,
-0.07130568474531174,
0.028390293940901756,
0.002789334859699011,
-0.01699436642229557,
-0.020381350070238113,
0.03384479135274887,
0.03710195794701576,
0.05544222146272659,
-0.03888382017612457,
0.08656533807516098,
-0.028546681627631187,
-0.060946207493543625,
0.03442741930484772,
0.06590378284454346,
0.006861897185444832,
0.006043683737516403,
-0.07282677292823792,
0.02616567723453045,
-0.0357900932431221,
0.014127582311630249,
0.03923043981194496,
-0.05205315351486206,
-0.06015770509839058,
0.04237690195441246,
-0.06181925907731056,
-0.010059844702482224,
0.07349633425474167,
-0.018332766368985176,
-8.445018841272126e-33,
-0.02192237786948681,
-0.027146004140377045,
0.010476458817720413,
0.006575038656592369,
0.028795944526791573,
-0.02465038001537323,
0.009587213397026062,
-0.030816614627838135,
0.015846578404307365,
-0.07418407499790192,
0.04160044342279434,
-0.025460386648774147,
-0.05612131208181381,
0.024820547550916672,
-0.06380634009838104,
-0.008368713781237602,
-0.028701452538371086,
-0.1113109290599823,
-0.02454523555934429,
0.03866080194711685,
0.10213524848222733,
0.006937986705452204,
-0.05285440757870674,
0.04686384275555611,
-0.02533034235239029,
0.0671258419752121,
-0.08917566388845444,
-0.031072884798049927,
-0.09308792650699615,
-0.02154827117919922,
0.11327523738145828,
-0.12507803738117218,
0.04033837839961052,
0.06907431036233902,
-0.006568754557520151,
-0.041803982108831406,
-0.03793337196111679,
0.07588163018226624,
-0.03344254940748215,
0.060659315437078476,
0.15909238159656525,
0.01619185321033001,
0.0038785282522439957,
-0.06349481642246246,
-0.08511335402727127,
0.03843579441308975,
-0.00991083588451147,
0.029317669570446014,
-0.03642194718122482,
-0.007766606751829386,
-0.04364224150776863,
0.041002389043569565,
0.00862783845514059,
0.08108305186033249,
0.07114935666322708,
-0.011843513697385788,
0.020355109125375748,
-0.05100545659661293,
-0.03663729131221771,
0.04607849195599556,
-0.0513138547539711,
-0.05225787311792374,
0.03695255145430565,
0.032113850116729736,
0.03536474332213402,
0.009173664264380932,
0.035598259419202805,
-0.007123742252588272,
0.11364526301622391,
-0.052086323499679565,
0.02506597526371479,
0.05209343135356903,
-0.0511845126748085,
-0.044588085263967514,
-0.08464889973402023,
0.007739698514342308,
-0.026433518156409264,
-0.07457394152879715,
-0.04558257386088371,
0.044616322964429855,
-0.030655767768621445,
-0.084259994328022,
0.04326663911342621,
0.037325870245695114,
-0.06182004138827324,
0.06466887146234512,
0.015483628027141094,
0.004120853263884783,
0.007304392289370298,
-0.0445682592689991,
-0.00976721290498972,
0.0039352476596832275,
0.015040448866784573,
0.08082067221403122,
-0.011181999929249287,
-6.432746602058614e-8,
-0.016633475199341774,
0.018683576956391335,
0.048075418919324875,
-0.04369122162461281,
0.08557726442813873,
-0.10603827983140945,
0.03664981946349144,
-0.08273247629404068,
-0.03454027697443962,
0.05030141398310661,
0.03621906042098999,
-0.035869110375642776,
-0.05233811214566231,
-0.018739506602287292,
0.05434945970773697,
-0.04847176373004913,
0.05393306165933609,
0.046326566487550735,
0.015298211015760899,
-0.02509705163538456,
0.004362650215625763,
0.00866688508540392,
-0.02031708136200905,
-0.013650644570589066,
-0.013956941664218903,
0.014621629379689693,
0.002856101142242551,
0.10760435461997986,
-0.007334291003644466,
0.043581362813711166,
0.029890676960349083,
-0.0077216471545398235,
0.050532832741737366,
0.0003490053641144186,
-0.05885433778166771,
0.06412825733423233,
0.01369693037122488,
-0.07379905879497528,
-0.05594157427549362,
-0.04445682093501091,
0.036771200597286224,
-0.02950926497578621,
0.030075678601861,
-0.006538064684718847,
0.04833490401506424,
-0.003020408097654581,
-0.06176740303635597,
-0.0011465304996818304,
-0.013278601691126823,
-0.09093038737773895,
-0.007880724966526031,
0.00042864662827923894,
0.02882857620716095,
0.0219408068805933,
-0.026806725189089775,
0.020320570096373558,
0.05919535458087921,
-0.12964794039726257,
-0.005499039310961962,
-0.000011351448847563006,
0.027474697679281235,
-0.007810951676219702,
-0.04223936051130295,
-0.005652323365211487
] | 0.028939
|
A \_DaemonSet\_ ensures that all (or some) Nodes run a copy of a Pod. As nodes are added to the cluster, Pods are added to them. As nodes are removed from the cluster, those Pods are garbage collected. Deleting a DaemonSet will clean up the Pods it created. Some typical uses of a DaemonSet are: - running a cluster storage daemon on every node - running a logs collection daemon on every node - running a node monitoring daemon on every node In a simple case, one DaemonSet, covering all nodes, would be used for each type of daemon. A more complex setup might use multiple DaemonSets for a single type of daemon, but with different flags and/or different memory and cpu requests for different hardware types. ## Writing a DaemonSet Spec ### Create a DaemonSet You can describe a DaemonSet in a YAML file. For example, the `daemonset.yaml` file below describes a DaemonSet that runs the fluentd-elasticsearch Docker image: {{% code\_sample file="controllers/daemonset.yaml" %}} Create a DaemonSet based on the YAML file: ``` kubectl apply -f https://k8s.io/examples/controllers/daemonset.yaml ``` ### Required Fields As with all other Kubernetes config, a DaemonSet needs `apiVersion`, `kind`, and `metadata` fields. For general information about working with config files, see [running stateless applications](/docs/tasks/run-application/run-stateless-application-deployment/) and [object management using kubectl](/docs/concepts/overview/working-with-objects/object-management/). The name of a DaemonSet object must be a valid [DNS subdomain name](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names). A DaemonSet also needs a [`.spec`](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) section. ### Pod Template The `.spec.template` is one of the required fields in `.spec`. The `.spec.template` is a [pod template](/docs/concepts/workloads/pods/#pod-templates). It has exactly the same schema as a {{< glossary\_tooltip text="Pod" term\_id="pod" >}}, except it is nested and does not have an `apiVersion` or `kind`. In addition to required fields for a Pod, a Pod template in a DaemonSet has to specify appropriate labels (see [pod selector](#pod-selector)). A Pod Template in a DaemonSet must have a [`RestartPolicy`](/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy) equal to `Always`, or be unspecified, which defaults to `Always`. ### Pod Selector The `.spec.selector` field is a pod selector. It works the same as the `.spec.selector` of a [Job](/docs/concepts/workloads/controllers/job/). You must specify a pod selector that matches the labels of the `.spec.template`. Also, once a DaemonSet is created, its `.spec.selector` can not be mutated. Mutating the pod selector can lead to the unintentional orphaning of Pods, and it was found to be confusing to users. The `.spec.selector` is an object consisting of two fields: \* `matchLabels` - works the same as the `.spec.selector` of a [ReplicationController](/docs/concepts/workloads/controllers/replicationcontroller/). \* `matchExpressions` - allows to build more sophisticated selectors by specifying key, list of values and an operator that relates the key and values. When the two are specified the result is ANDed. The `.spec.selector` must match the `.spec.template.metadata.labels`. Config with these two not matching will be rejected by the API. ### Running Pods on select Nodes If you specify a `.spec.template.spec.nodeSelector`, then the DaemonSet controller will create Pods on nodes which match that [node selector](/docs/concepts/scheduling-eviction/assign-pod-node/). Likewise if you specify a `.spec.template.spec.affinity`, then DaemonSet controller will create Pods on nodes which match that [node affinity](/docs/concepts/scheduling-eviction/assign-pod-node/). If you do not specify either, then the DaemonSet controller will create Pods on all nodes. ## How Daemon Pods are scheduled A DaemonSet can be used to ensure that all eligible nodes run a copy of a Pod. The DaemonSet controller creates a Pod for each eligible node and adds the `spec.affinity.nodeAffinity` field of the Pod to match the target host. After the Pod is created, the default scheduler typically takes over and then binds the Pod to the target host by setting the `.spec.nodeName` field. If the new Pod cannot fit on the node, the default scheduler may
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/daemonset.md
|
[
-0.0330006368458271,
0.02824706770479679,
0.013907836750149727,
0.027511542662978172,
0.04049254208803177,
-0.038595639169216156,
0.013445096090435982,
-0.012991932220757008,
0.08913913369178772,
0.032226551324129105,
-0.000689104781486094,
0.012195250019431114,
0.01069599948823452,
-0.0875943973660469,
0.007881440222263336,
-0.033722929656505585,
0.04443694278597832,
0.010944957844913006,
-0.03106754645705223,
-0.0008186186896637082,
-0.03294139355421066,
-0.008883313275873661,
0.0029957566875964403,
0.041212085634469986,
-0.11596833169460297,
0.024333463981747627,
-0.05252024531364441,
-0.038195379078388214,
0.012753014452755451,
0.02048299089074135,
0.0011528253089636564,
0.026381831616163254,
0.0008696528384461999,
0.05759967863559723,
0.009106103330850601,
0.13905911147594452,
0.05847402662038803,
-0.09743162989616394,
-0.15293507277965546,
0.05700511485338211,
0.05670899152755737,
-0.02216532826423645,
-0.08072907477617264,
-0.00894450768828392,
-0.028592420741915703,
-0.008912571705877781,
-0.11350192129611969,
-0.03613978996872902,
-0.019825484603643417,
-0.08236899226903915,
0.04602465778589249,
-0.03241046890616417,
0.05706305056810379,
0.03515061363577843,
0.05572833493351936,
0.0526466928422451,
-0.00032371460110880435,
0.0460922010242939,
0.006169781554490328,
0.00972870271652937,
-0.004509296268224716,
0.0250103622674942,
0.017640110105276108,
-0.041625987738370895,
0.06870304048061371,
-0.011771083809435368,
0.0003411778889130801,
0.014002751559019089,
0.13127849996089935,
-0.025024309754371643,
0.03371622413396835,
-0.027542436495423317,
0.023297756910324097,
-0.01259872131049633,
-0.0534701943397522,
0.04255750775337219,
0.002314953599125147,
-0.00033881529816426337,
-0.051118407398462296,
-0.0658496841788292,
-0.06320897489786148,
0.05823212116956711,
0.06198326125741005,
-0.029248228296637535,
-0.051783237606287,
-0.0010367374634370208,
0.019304972141981125,
-0.04226863756775856,
0.030817048624157906,
0.04972203075885773,
0.03149775415658951,
-0.0009158561006188393,
0.039037708193063736,
-0.12362563610076904,
0.03290903940796852,
0.0581924207508564,
0.023213906213641167,
-0.004181693308055401,
0.048095352947711945,
0.030163848772644997,
0.04619789868593216,
-0.01048451941460371,
-0.01969500258564949,
0.0043091801926493645,
-0.007417906541377306,
-0.048796482384204865,
-0.10247663408517838,
-0.023602699860930443,
0.0007414278225041926,
0.00006852367368992418,
0.006255772430449724,
0.029657168313860893,
-0.04063202068209648,
0.06720783561468124,
0.006001776084303856,
0.03928081691265106,
-0.024711882695555687,
0.0026738920714706182,
0.002812678227201104,
0.10097955912351608,
0.004926682915538549,
-0.0715869590640068,
0.035869330167770386,
-0.014245431870222092,
-0.011508828029036522,
0.05867181345820427,
-0.04702701047062874,
4.611004426111075e-33,
0.0603027269244194,
-0.08841177821159363,
-0.03193283826112747,
-0.04507117718458176,
0.03397197648882866,
0.030187265947461128,
-0.022826625034213066,
0.07365898787975311,
-0.002441935706883669,
-0.004278597421944141,
-0.07835619896650314,
0.1048337072134018,
-0.020118465647101402,
0.051654815673828125,
0.06929212063550949,
-0.07616707682609558,
-0.03771919012069702,
0.02392728626728058,
0.10716641694307327,
-0.048340484499931335,
0.059113435447216034,
0.06424833089113235,
-0.04255307465791702,
0.015792639926075935,
0.01127553265541792,
-0.036783624440431595,
-0.012010147795081139,
-0.06583070009946823,
-0.03560086339712143,
0.04135299101471901,
-0.0780576542019844,
0.012037116102874279,
-0.003340458730235696,
0.05671706050634384,
-0.07104283571243286,
-0.004626131150871515,
-0.06111755594611168,
-0.00043653594912029803,
-0.08082835376262665,
-0.08367989957332611,
0.03639554977416992,
0.021920865401625633,
-0.03752127289772034,
-0.04881737008690834,
-0.006171479821205139,
-0.02472805045545101,
0.020030854269862175,
-0.05025969073176384,
0.028399035334587097,
0.004024237859994173,
0.028535299003124237,
-0.030404210090637207,
0.10238444060087204,
-0.04769599065184593,
0.005288871470838785,
0.006111849099397659,
0.03301307186484337,
-0.09536416083574295,
0.01583944633603096,
-0.00862912554293871,
0.014510341919958591,
-0.030280712991952896,
0.04200698062777519,
0.04452621936798096,
0.06984631717205048,
0.035130321979522705,
0.07009170949459076,
0.05311531201004982,
0.0052422224543988705,
0.03569585457444191,
-0.03334229439496994,
0.05347348749637604,
-0.052389223128557205,
0.03198031336069107,
-0.013876944780349731,
-0.05689019709825516,
0.02439715526998043,
-0.010836094617843628,
-0.1714218407869339,
0.007756581995636225,
-0.008397494442760944,
0.01732083596289158,
-0.060416143387556076,
0.0744481310248375,
-0.028296543285250664,
-0.011606820859014988,
0.05689496174454689,
0.054067306220531464,
-0.0012947787763550878,
-0.008312273770570755,
-0.0051847295835614204,
-0.01390670146793127,
-0.06134592741727829,
-0.05387706682085991,
-0.12114103883504868,
-6.181612550287473e-33,
0.0585443489253521,
-0.022384673357009888,
-0.06027890369296074,
0.011065353639423847,
-0.022565318271517754,
-0.0011753508588299155,
0.010783480480313301,
0.0118016442283988,
-0.0631026104092598,
-0.006827755365520716,
-0.030322784557938576,
-0.06242762506008148,
0.045453500002622604,
-0.01838747225701809,
-0.11063095927238464,
-0.014578035101294518,
-0.11645893007516861,
-0.08393707871437073,
0.012732948176562786,
0.012700155377388,
-0.07584837079048157,
-0.05444217473268509,
0.058493372052907944,
0.0631362646818161,
-0.0177704356610775,
-0.03878914192318916,
-0.060715749859809875,
0.016243809834122658,
-0.12296231091022491,
-0.05516519770026207,
0.04932841286063194,
-0.053620751947164536,
0.0005570698413066566,
-0.00039255880983546376,
-0.030539561063051224,
-0.020687557756900787,
0.015881475061178207,
0.048366229981184006,
-0.017339512705802917,
-0.07961399108171463,
0.027759293094277382,
0.03753035515546799,
-0.05583512783050537,
0.022405922412872314,
-0.015568581409752369,
0.012506737373769283,
-0.05726262181997299,
0.015336144715547562,
-0.04403357207775116,
-0.037416670471429825,
-0.05256977304816246,
-0.030817631632089615,
0.011889226734638214,
0.10184203833341599,
-0.06980666518211365,
-0.041794177144765854,
-0.02482414059340954,
0.0881035104393959,
-0.05041701719164848,
0.06862252205610275,
0.1077500507235527,
-0.10331252962350845,
-0.07390231639146805,
0.09789039939641953,
0.00610706489533186,
-0.10202139616012573,
0.021161044016480446,
-0.01332036778330803,
-0.017523376271128654,
0.001445326954126358,
0.07942546159029007,
0.003659905167296529,
0.01398366130888462,
0.0739925354719162,
-0.07497765868902206,
-0.010924520902335644,
0.0272928886115551,
-0.1203823834657669,
0.005798514932394028,
0.027793269604444504,
-0.06689702719449997,
0.057560089975595474,
-0.017354831099510193,
0.019252000376582146,
-0.05304442718625069,
0.03539494052529335,
0.07332547754049301,
0.08075767755508423,
0.01844121888279915,
0.050725627690553665,
0.03913900628685951,
-0.01862388476729393,
-0.08181621879339218,
0.11027170717716217,
-0.039940062910318375,
-5.3065512872763065e-8,
0.0759347453713417,
0.012798339128494263,
0.03379427641630173,
0.0725204348564148,
0.013317394070327282,
-0.05306272953748703,
0.05126684159040451,
0.13222834467887878,
-0.028344139456748962,
-0.01501266099512577,
0.028868285939097404,
-0.02838899940252304,
-0.11220712959766388,
-0.012582254596054554,
0.07726908475160599,
0.031999602913856506,
0.04203882813453674,
0.06977464258670807,
-0.01656552404165268,
-0.03587457165122032,
-0.02021051198244095,
-0.018630949780344963,
-0.00990479625761509,
-0.021657589823007584,
0.008947213180363178,
0.08227922767400742,
0.09517201036214828,
0.05441717058420181,
-0.018766965717077255,
0.004205552861094475,
0.00654610525816679,
-0.04690363630652428,
0.0064895604737102985,
0.027872303500771523,
-0.03287104517221451,
0.07936785370111465,
-0.1588129699230194,
-0.010362494736909866,
0.04671202972531319,
0.016077600419521332,
-0.05524468049407005,
-0.0040472084656357765,
-0.04906423017382622,
-0.0016462464118376374,
0.01330812182277441,
0.007034840527921915,
0.0034634601324796677,
0.04309655353426933,
0.011515088379383087,
0.07242106646299362,
0.023365342989563942,
0.0049558659084141254,
0.023037604987621307,
0.06580603867769241,
0.0067083328031003475,
-0.021371472626924515,
0.015840908512473106,
-0.07044848799705505,
0.04658455774188042,
0.0254053957760334,
-0.00569580215960741,
-0.031158817932009697,
0.0848153606057167,
-0.014832932502031326
] | 0.227909
|
adds the `spec.affinity.nodeAffinity` field of the Pod to match the target host. After the Pod is created, the default scheduler typically takes over and then binds the Pod to the target host by setting the `.spec.nodeName` field. If the new Pod cannot fit on the node, the default scheduler may preempt (evict) some of the existing Pods based on the [priority](/docs/concepts/scheduling-eviction/pod-priority-preemption/#pod-priority) of the new Pod. {{< note >}} If it's important that the DaemonSet pod run on each node, it's often desirable to set the `.spec.template.spec.priorityClassName` of the DaemonSet to a [PriorityClass](/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass) with a higher priority to ensure that this eviction occurs. {{< /note >}} The user can specify a different scheduler for the Pods of the DaemonSet, by setting the `.spec.template.spec.schedulerName` field of the DaemonSet. The original node affinity specified at the `.spec.template.spec.affinity.nodeAffinity` field (if specified) is taken into consideration by the DaemonSet controller when evaluating the eligible nodes, but is replaced on the created Pod with the node affinity that matches the name of the eligible node. ```yaml nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchFields: - key: metadata.name operator: In values: - target-host-name ``` ### Taints and tolerations The DaemonSet controller automatically adds a set of {{< glossary\_tooltip text="tolerations" term\_id="toleration" >}} to DaemonSet Pods: {{< table caption="Tolerations for DaemonSet pods" >}} | Toleration key | Effect | Details | | --------------------------------------------------------------------------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | | [`node.kubernetes.io/not-ready`](/docs/reference/labels-annotations-taints/#node-kubernetes-io-not-ready) | `NoExecute` | DaemonSet Pods can be scheduled onto nodes that are not healthy or ready to accept Pods. Any DaemonSet Pods running on such nodes will not be evicted. | | [`node.kubernetes.io/unreachable`](/docs/reference/labels-annotations-taints/#node-kubernetes-io-unreachable) | `NoExecute` | DaemonSet Pods can be scheduled onto nodes that are unreachable from the node controller. Any DaemonSet Pods running on such nodes will not be evicted. | | [`node.kubernetes.io/disk-pressure`](/docs/reference/labels-annotations-taints/#node-kubernetes-io-disk-pressure) | `NoSchedule` | DaemonSet Pods can be scheduled onto nodes with disk pressure issues. | | [`node.kubernetes.io/memory-pressure`](/docs/reference/labels-annotations-taints/#node-kubernetes-io-memory-pressure) | `NoSchedule` | DaemonSet Pods can be scheduled onto nodes with memory pressure issues. | | [`node.kubernetes.io/pid-pressure`](/docs/reference/labels-annotations-taints/#node-kubernetes-io-pid-pressure) | `NoSchedule` | DaemonSet Pods can be scheduled onto nodes with process pressure issues. | | [`node.kubernetes.io/unschedulable`](/docs/reference/labels-annotations-taints/#node-kubernetes-io-unschedulable) | `NoSchedule` | DaemonSet Pods can be scheduled onto nodes that are unschedulable. | | [`node.kubernetes.io/network-unavailable`](/docs/reference/labels-annotations-taints/#node-kubernetes-io-network-unavailable) | `NoSchedule` | \*\*Only added for DaemonSet Pods that request host networking\*\*, i.e., Pods having `spec.hostNetwork: true`. Such DaemonSet Pods can be scheduled onto nodes with unavailable network.| {{< /table >}} You can add your own tolerations to the Pods of a DaemonSet as well, by defining these in the Pod template of the DaemonSet. Because the DaemonSet controller sets the `node.kubernetes.io/unschedulable:NoSchedule` toleration automatically, Kubernetes can run DaemonSet Pods on nodes that are marked as \_unschedulable\_. If you use a DaemonSet to provide an important node-level function, such as [cluster networking](/docs/concepts/cluster-administration/networking/), it is helpful that Kubernetes places DaemonSet Pods on nodes before they are ready. For example, without that special toleration, you could end up in a deadlock situation where the node is not marked as ready because the network plugin is not running there, and at the same time the network plugin is not running on that node because the node is not yet ready. ## Communicating with Daemon Pods Some possible patterns for communicating with Pods in a DaemonSet are: - \*\*Push\*\*: Pods in the DaemonSet are configured to send updates to another service, such as a stats database. They do not have clients. - \*\*NodeIP and Known Port\*\*: Pods in the DaemonSet can use a `hostPort`, so that the pods are reachable via the node IPs. Clients know the list of node IPs somehow, and know the port by convention. - \*\*DNS\*\*: Create a [headless service](/docs/concepts/services-networking/service/#headless-services) with the
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/daemonset.md
|
[
-0.0004736102418974042,
0.0022806550841778517,
0.030843792483210564,
0.05819001793861389,
0.03727862983942032,
-0.036922551691532135,
-0.020473847165703773,
-0.01390128955245018,
-0.004861032124608755,
0.0089576356112957,
-0.011682447977364063,
-0.002374703297391534,
-0.039092157036066055,
-0.027685439214110374,
0.02231198363006115,
-0.023054737597703934,
0.048296816647052765,
-0.010235436260700226,
0.029086465016007423,
0.008689768612384796,
0.03898821398615837,
-0.017594074830412865,
0.050832148641347885,
0.036122553050518036,
-0.059537433087825775,
-0.035299696028232574,
-0.05916833505034447,
-0.023942042142152786,
0.026924286037683487,
0.00437844917178154,
0.004781580064445734,
0.026363130658864975,
0.04993216320872307,
0.05503210052847862,
0.021551918238401413,
0.1098877489566803,
-0.01066406350582838,
-0.1030658707022667,
-0.06720490753650665,
0.023911263793706894,
0.06946250051259995,
-0.02951730601489544,
-0.09912818670272827,
-0.052576370537281036,
-0.06696271151304245,
-0.012048010714352131,
-0.02864660695195198,
0.02409878559410572,
-0.031724825501441956,
-0.04356284812092781,
0.011977871879935265,
-0.10395924001932144,
0.037231624126434326,
0.005119126755744219,
0.06215899437665939,
0.1498754918575287,
0.06486108154058456,
0.03844780474901199,
0.05204311013221741,
-0.019984113052487373,
-0.006505112629383802,
-0.022481387481093407,
0.029097367078065872,
0.001426522620022297,
0.08661382645368576,
-0.041471682488918304,
0.029241224750876427,
0.046766497194767,
0.06376007199287415,
0.0330372229218483,
0.07610183954238892,
-0.003963280003517866,
0.00792467687278986,
-0.027721775695681572,
-0.037725288420915604,
0.03880513831973076,
-0.008650108240544796,
0.05208843946456909,
-0.03970363736152649,
-0.023590760305523872,
-0.057795923203229904,
-0.004074801225215197,
0.0274385716766119,
-0.04396377131342888,
-0.027479736134409904,
0.012494929134845734,
0.005864787846803665,
-0.018669521436095238,
0.04491490498185158,
0.05135631933808327,
0.03466816619038582,
0.008023321628570557,
-0.017067236825823784,
-0.06967180222272873,
0.03933575749397278,
0.05327233299612999,
-0.019150663167238235,
0.0038464905228465796,
0.023782989010214806,
0.03907245025038719,
0.016201287508010864,
-0.038404107093811035,
-0.051320064812898636,
0.07480277121067047,
0.08322594314813614,
-0.050234097987413406,
-0.09065192937850952,
-0.06432507932186127,
-0.03859104961156845,
0.04713531211018562,
0.08570546656847,
0.04112577810883522,
0.06266190856695175,
0.02312524989247322,
-0.05710883066058159,
0.09503041207790375,
0.012404381297528744,
0.014939897693693638,
0.0139844985678792,
0.05687379837036133,
0.00034234501072205603,
-0.05671575665473938,
0.052774641662836075,
-0.006123005878180265,
-0.0452394038438797,
0.017631925642490387,
-0.03486529365181923,
1.1369062691981497e-33,
0.041186053305864334,
-0.11332610249519348,
-0.038556117564439774,
-0.10350233316421509,
0.019003642722964287,
-0.04713774099946022,
-0.03498934209346771,
0.03605945035815239,
-0.0240002553910017,
-0.04694236069917679,
-0.019116660580039024,
0.028843192383646965,
0.057311005890369415,
-0.028790701180696487,
-0.02233281172811985,
-0.1162140816450119,
-0.032821230590343475,
0.08522023260593414,
0.12591442465782166,
-0.0024664977099746466,
-0.0005638091824948788,
-0.0353877991437912,
-0.11699327826499939,
-0.007856745272874832,
-0.012287863530218601,
0.009622137993574142,
-0.0115840258076787,
-0.12561438977718353,
-0.015242739580571651,
0.02943752519786358,
-0.00022149013238959014,
0.016972489655017853,
0.03377909958362579,
0.07339175790548325,
-0.0957927405834198,
-0.027396829798817635,
-0.0027823804412037134,
0.006682552397251129,
-0.10636657476425171,
-0.09293991327285767,
0.07465656101703644,
0.02940530888736248,
-0.014413909055292606,
-0.04725559055805206,
0.012687766924500465,
-0.06130712106823921,
0.049206074327230453,
-0.016435105353593826,
0.03063718043267727,
-0.0014850158477202058,
0.04225130379199982,
-0.072710320353508,
0.05841328203678131,
-0.08924389630556107,
-0.021391039714217186,
-0.015071095898747444,
0.015572966076433659,
-0.05507183447480202,
0.03777112811803818,
0.017438242211937904,
0.0066769784316420555,
-0.03447757288813591,
-0.028434744104743004,
-0.010603654198348522,
0.08885398507118225,
0.10073742270469666,
-0.028670387342572212,
-0.04094015806913376,
0.007883429527282715,
0.08006611466407776,
-0.047271568328142166,
0.037168730050325394,
-0.08222561329603195,
0.03664969652891159,
-0.014554326422512531,
-0.026059435680508614,
0.01609366200864315,
0.04082028567790985,
-0.1588127464056015,
-0.012174327857792377,
0.0023444215767085552,
0.08455174416303635,
-0.03571397438645363,
0.0583903044462204,
-0.0527753047645092,
-0.031260110437870026,
0.03057033382356167,
0.05077545344829559,
-0.04095418378710747,
0.005840630270540714,
0.09233235567808151,
-0.043787796050310135,
-0.020438488572835922,
0.02008221670985222,
-0.023299315944314003,
-6.62944421470459e-34,
0.06927935779094696,
-0.058075085282325745,
0.005413171369582415,
0.052362896502017975,
0.033357154577970505,
-0.0036965867038816214,
-0.022048834711313248,
-0.014496257528662682,
-0.031559284776449203,
0.0018285621190443635,
-0.040587689727544785,
-0.09194175153970718,
0.04340915009379387,
-0.015347200445830822,
-0.10290690511465073,
-0.003051276784390211,
-0.0920962318778038,
-0.02788507007062435,
0.01725241169333458,
0.02791118435561657,
0.018035488203167915,
-0.0215181615203619,
0.028956767171621323,
0.023032043129205704,
0.06932253390550613,
-0.010026265867054462,
0.033260904252529144,
0.033956386148929596,
-0.08423153311014175,
-0.07198664546012878,
-0.008243578486144543,
-0.10153450071811676,
-0.046460580080747604,
-0.005462275817990303,
0.04136320576071739,
0.029361873865127563,
-0.10399798303842545,
0.10656362771987915,
0.011257035657763481,
0.05699903517961502,
0.0743030458688736,
-0.0017929108580574393,
-0.1046859472990036,
-0.017220355570316315,
-0.040862344205379486,
0.00861506350338459,
0.019397081807255745,
0.03554289788007736,
-0.030292684212327003,
-0.09656127542257309,
-0.030989745631814003,
-0.02512904815375805,
0.04218577593564987,
0.06539341062307358,
0.008999691344797611,
0.009180642664432526,
0.055818650871515274,
0.016053998842835426,
0.0003390093916095793,
0.04715860262513161,
0.13088464736938477,
-0.08231992274522781,
0.02911463938653469,
0.05686876177787781,
-0.0021744139958173037,
-0.09854680299758911,
-0.013261419720947742,
0.000920399441383779,
-0.031949516385793686,
0.02446645498275757,
0.04254000633955002,
0.026377014815807343,
0.049681685864925385,
0.05093395337462425,
-0.035791631788015366,
-0.04015915095806122,
0.04075252637267113,
-0.03179185837507248,
0.02115628309547901,
0.006680986378341913,
-0.09077629446983337,
0.1025458425283432,
-0.016492480412125587,
0.0076018949039280415,
-0.01444873958826065,
0.09404181689023972,
0.08066950738430023,
0.10808536410331726,
0.03917616605758667,
0.040927235037088394,
-0.008717036806046963,
0.005622196942567825,
-0.030945293605327606,
0.049244944006204605,
-0.04926380142569542,
-4.620385496423296e-8,
0.07247506827116013,
0.014724857173860073,
-0.006882527377456427,
0.07946823537349701,
0.07669985294342041,
-0.03479798510670662,
0.05193382874131203,
-0.020546626299619675,
-0.028751470148563385,
0.04825862869620323,
-0.008388102985918522,
0.022017480805516243,
0.01575302705168724,
0.015922412276268005,
0.07036768645048141,
-0.01334667019546032,
0.05810710787773132,
0.01936650089919567,
-0.04151924327015877,
-0.06323699653148651,
-0.06762136518955231,
-0.04042423889040947,
0.0023612238001078367,
-0.020773474127054214,
-0.006909787189215422,
0.0569765567779541,
0.12924379110336304,
0.031044047325849533,
0.06930126994848251,
0.07475614547729492,
-0.09675152599811554,
-0.011114450171589851,
-0.04368017613887787,
0.00199160841293633,
-0.08168525993824005,
0.06018912419676781,
-0.21277539432048798,
0.030162055045366287,
0.009748085401952267,
0.07367458194494247,
-0.026786532253026962,
-0.028712373226881027,
-0.04468105360865593,
-0.02711649239063263,
0.007929221726953983,
-0.0005081525887362659,
0.006467898841947317,
0.038332872092723846,
-0.008696361444890499,
0.05848301202058792,
0.0035662935115396976,
-0.05310990288853645,
0.022678684443235397,
0.0041389185935258865,
0.0020463138353079557,
-0.01436217688024044,
0.0154712600633502,
-0.09637831151485443,
0.008500620722770691,
-0.03661273419857025,
0.006256739608943462,
-0.011485984548926353,
0.0012074635596945882,
-0.012279107235372066
] | 0.122603
|
They do not have clients. - \*\*NodeIP and Known Port\*\*: Pods in the DaemonSet can use a `hostPort`, so that the pods are reachable via the node IPs. Clients know the list of node IPs somehow, and know the port by convention. - \*\*DNS\*\*: Create a [headless service](/docs/concepts/services-networking/service/#headless-services) with the same pod selector, and then discover DaemonSets using the `endpoints` resource or retrieve multiple A records from DNS. - \*\*Service\*\*: Create a service with the same Pod selector, and use the service to reach a daemon on a random node. Use [Service Internal Traffic Policy](/docs/concepts/services-networking/service-traffic-policy/) to limit to pods on the same node. ## Updating a DaemonSet If node labels are changed, the DaemonSet will promptly add Pods to newly matching nodes and delete Pods from newly not-matching nodes. You can modify the Pods that a DaemonSet creates. However, Pods do not allow all fields to be updated. Also, the DaemonSet controller will use the original template the next time a node (even with the same name) is created. You can delete a DaemonSet. If you specify `--cascade=orphan` with `kubectl`, then the Pods will be left on the nodes. If you subsequently create a new DaemonSet with the same selector, the new DaemonSet adopts the existing Pods. If any Pods need replacing the DaemonSet replaces them according to its `updateStrategy`. You can [perform a rolling update](/docs/tasks/manage-daemon/update-daemon-set/) on a DaemonSet. ## Alternatives to DaemonSet ### Init scripts It is certainly possible to run daemon processes by directly starting them on a node (e.g. using `init`, `upstartd`, or `systemd`). This is perfectly fine. However, there are several advantages to running such processes via a DaemonSet: - Ability to monitor and manage logs for daemons in the same way as applications. - Same config language and tools (e.g. Pod templates, `kubectl`) for daemons and applications. - Running daemons in containers with resource limits increases isolation between daemons from app containers. However, this can also be accomplished by running the daemons in a container but not in a Pod. ### Bare Pods It is possible to create Pods directly which specify a particular node to run on. However, a DaemonSet 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, you should use a DaemonSet rather than creating individual Pods. ### Static Pods It is possible to create Pods by writing a file to a certain directory watched by Kubelet. These are called [static pods](/docs/tasks/configure-pod-container/static-pod/). Unlike DaemonSet, static Pods cannot be managed with kubectl or other Kubernetes API clients. Static Pods do not depend on the apiserver, making them useful in cluster bootstrapping cases. Also, static Pods may be deprecated in the future. ### Deployments DaemonSets are similar to [Deployments](/docs/concepts/workloads/controllers/deployment/) in that they both create Pods, and those Pods have processes which are not expected to terminate (e.g. web servers, storage servers). Use a Deployment for stateless services, like frontends, where scaling up and down the number of replicas and rolling out updates are more important than controlling exactly which host the Pod runs on. Use a DaemonSet when it is important that a copy of a Pod always run on all or certain hosts, if the DaemonSet provides node-level functionality that allows other Pods to run correctly on that particular node. For example, [network plugins](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/) often include a component that runs as a DaemonSet. The DaemonSet component makes sure that the node where it's running has working cluster networking. ## {{% heading "whatsnext" %}} \* Learn about [Pods](/docs/concepts/workloads/pods): \* Learn about [static Pods](/docs/tasks/configure-pod-container/static-pod/),
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/daemonset.md
|
[
-0.035475198179483414,
-0.036023057997226715,
0.03034823387861252,
-0.03264826536178589,
-0.05759384483098984,
-0.0447617843747139,
-0.0006687974091619253,
-0.038549039512872696,
0.060028668493032455,
0.05835878849029541,
-0.014211258850991726,
0.020786551758646965,
0.01309980172663927,
-0.08037915825843811,
0.07373268157243729,
-0.04468842223286629,
0.08078264445066452,
0.0054222699254751205,
0.05924106761813164,
-0.010605160146951675,
-0.03620687499642372,
0.028214752674102783,
-0.025736814364790916,
0.0007770375814288855,
-0.08488275110721588,
0.023929907009005547,
-0.026923006400465965,
-0.04519692435860634,
-0.014702369458973408,
0.015701614320278168,
-0.03512827306985855,
0.016025658696889877,
0.02003432810306549,
0.06464245915412903,
0.029344310984015465,
0.02537366934120655,
0.05660238862037659,
0.009225365705788136,
-0.09224613755941391,
0.05152588337659836,
0.063508540391922,
-0.05903696268796921,
-0.04854205623269081,
0.01846366375684738,
0.047881729900836945,
-0.0004318615247029811,
-0.07948774844408035,
0.02181411348283291,
0.0038248312193900347,
-0.04121013358235359,
0.016786843538284302,
-0.10529329627752304,
0.10143329203128815,
0.06269965320825577,
0.07195159047842026,
-0.017258770763874054,
-0.02531016618013382,
0.04479308798909187,
0.05097747594118118,
0.08845555037260056,
0.021169185638427734,
-0.01878735050559044,
0.0415324792265892,
-0.031858161091804504,
0.026890959590673447,
-0.0449160560965538,
-0.03077058121562004,
0.04425514489412308,
0.0489317923784256,
-0.05605297535657883,
0.04068766534328461,
0.047656893730163574,
-0.025788672268390656,
-0.03383389487862587,
-0.0641232579946518,
0.028239894658327103,
0.027122382074594498,
0.08128470927476883,
-0.023730842396616936,
-0.06055435165762901,
-0.010797285474836826,
0.04211224615573883,
0.06126213073730469,
0.07109803706407547,
-0.1348893940448761,
0.019964369013905525,
-0.021684065461158752,
-0.03276236727833748,
-0.02387475222349167,
0.02774054743349552,
-0.08431591093540192,
-0.004196377471089363,
-0.05291337892413139,
-0.1392677277326584,
-0.002402081387117505,
0.05187183991074562,
0.0327892079949379,
-0.04791883006691933,
-0.01945471577346325,
0.02402130886912346,
0.0368528813123703,
-0.009465903975069523,
-0.044779688119888306,
-0.04863554611802101,
0.023360703140497208,
-0.008253405801951885,
-0.09237704426050186,
-0.04605476185679436,
0.09385920315980911,
0.1131620705127716,
-0.007783456705510616,
-0.015361940488219261,
-0.0013996626948937774,
0.027003630995750427,
-0.038042884320020676,
-0.006516439374536276,
0.02085648849606514,
0.03916589915752411,
0.02537800557911396,
0.05130607634782791,
-0.034560125321149826,
-0.03493094816803932,
0.017471646890044212,
-0.01448934618383646,
-0.05167412757873535,
0.09385285526514053,
0.0654849037528038,
3.5267894156820456e-33,
0.11191321164369583,
-0.06778230518102646,
-0.003443785011768341,
-0.031100178137421608,
0.043514128774404526,
-0.039399154484272,
0.0018312286119908094,
0.03875158354640007,
-0.011381682008504868,
-0.004886735696345568,
-0.06227798014879227,
0.07735656946897507,
0.06679312884807587,
-0.022541144862771034,
0.008308107033371925,
-0.035409387201070786,
-0.005849690176546574,
0.00021560642926488072,
0.13474677503108978,
-0.016905324533581734,
0.013018480502068996,
-0.009498142637312412,
-0.012144236825406551,
0.02421402558684349,
0.050509706139564514,
-0.027312427759170532,
-0.08437198400497437,
-0.10650311410427094,
0.07211623340845108,
0.011517336592078209,
-0.01999077945947647,
0.01301419734954834,
0.02092939428985119,
0.024816354736685753,
-0.09497689455747604,
-0.018986841663718224,
-0.031955569982528687,
-0.01893160678446293,
-0.07650022953748703,
-0.08460529148578644,
0.026913991197943687,
-0.008343510329723358,
-0.07164745777845383,
-0.04687715694308281,
-0.03097737766802311,
-0.006076356861740351,
0.00703192176297307,
-0.08572100847959518,
0.03581446781754494,
0.01500239409506321,
0.01396364625543356,
-0.022402731701731682,
-0.02435874566435814,
-0.07146769762039185,
0.046231213957071304,
0.06658320873975754,
-0.0012290949234738946,
0.0225965715944767,
-0.04477463662624359,
0.017613176256418228,
-0.00973054114729166,
-0.0150627251714468,
-0.04974326863884926,
-0.004751325119286776,
0.08156877756118774,
0.06796073913574219,
0.010113105177879333,
-0.014747015200555325,
0.05731470137834549,
0.035188980400562286,
-0.021640099585056305,
0.07331239432096481,
-0.026067817583680153,
0.06601379066705704,
-0.03538123145699501,
-0.018015343695878983,
-0.0433778241276741,
0.003294622991234064,
-0.09788898378610611,
0.026104772463440895,
-0.007000084035098553,
0.03723067045211792,
-0.04395049065351486,
0.10758930444717407,
0.029141217470169067,
0.008001374080777168,
0.05333472788333893,
-0.004934381693601608,
-0.0766758918762207,
0.0007106282864697278,
-0.003907162696123123,
-0.015256206505000591,
-0.07163869589567184,
-0.020711643621325493,
-0.071182981133461,
-5.2199633970828066e-33,
0.019733058288693428,
-0.03717905282974243,
-0.0834256112575531,
0.006083457265049219,
-0.05960344523191452,
-0.039989810436964035,
-0.044121477752923965,
0.038210127502679825,
-0.02192683145403862,
-0.01724970154464245,
-0.0390697717666626,
-0.048477109521627426,
0.04018827900290489,
-0.010866429656744003,
-0.09795026481151581,
-0.006006006151437759,
-0.09777944535017014,
-0.03996353596448898,
-0.0193217471241951,
0.05701305717229843,
-0.08248282968997955,
0.004808823578059673,
0.0473712757229805,
0.03766831010580063,
-0.03327443078160286,
-0.02959587238729,
0.018143391236662865,
0.014374750666320324,
-0.10186624526977539,
-0.09984258562326431,
0.03858158737421036,
-0.051505956798791885,
0.0034888649825006723,
-0.03637951239943504,
-0.015254520811140537,
0.023036610335111618,
-0.040544334799051285,
0.10899976640939713,
0.05476824939250946,
-0.035534754395484924,
0.015177379362285137,
-0.05585932731628418,
-0.08555514365434647,
-0.041747741401195526,
-0.03258540481328964,
-0.022660287097096443,
-0.06397351622581482,
0.10279591381549835,
-0.07475702464580536,
-0.04174140840768814,
-0.006172195542603731,
-0.022147925570607185,
-0.0937390998005867,
0.13783586025238037,
-0.02803901769220829,
0.01233021728694439,
0.030424321070313454,
0.07138719409704208,
0.0030560875311493874,
0.080915167927742,
0.10521858185529709,
-0.13485091924667358,
-0.06350234895944595,
0.1425982415676117,
0.031227706000208855,
-0.035040151327848434,
-0.008626613765954971,
0.04321378841996193,
-0.00481963437050581,
-0.01537614781409502,
0.0676291361451149,
-0.004627636633813381,
0.020078258588910103,
0.05267457664012909,
0.005972298793494701,
-0.019567053765058517,
-0.006361483130604029,
-0.07617199420928955,
0.005549110006541014,
-0.005214493256062269,
-0.0637090802192688,
0.13416138291358948,
-0.051992692053318024,
0.04360847920179367,
0.03164641931653023,
0.06312788277864456,
0.10941048711538315,
0.04077586531639099,
0.060328736901283264,
0.07784952223300934,
-0.0038547127041965723,
0.03315716236829758,
-0.050744201987981796,
0.05093362182378769,
-0.06261225789785385,
-5.2423562379999566e-8,
0.048155736178159714,
0.045414552092552185,
-0.004716843832284212,
0.09164178371429443,
-0.043098412454128265,
0.05212905630469322,
0.03961741924285889,
0.05160648375749588,
-0.020052790641784668,
0.020384328439831734,
-0.03704601898789406,
-0.0024805073626339436,
-0.09655364602804184,
0.027520881965756416,
0.07927800714969635,
0.05118733271956444,
0.09022285789251328,
0.018732037395238876,
-0.005728911608457565,
-0.03535259887576103,
-0.09309175610542297,
-0.040687449276447296,
-0.011785178445279598,
-0.023157544434070587,
-0.00838292483240366,
0.03132165968418121,
0.0671498030424118,
-0.0629400983452797,
0.004111775662750006,
0.040292613208293915,
-0.023220917209982872,
-0.049146868288517,
0.00257064844481647,
0.004928336478769779,
0.0012859267881140113,
0.053734298795461655,
-0.13202781975269318,
0.0033619103487581015,
-0.007389613427221775,
0.06506854295730591,
-0.05145137384533882,
0.00695335166528821,
-0.05416280776262283,
-0.027367141097784042,
0.01718403398990631,
0.010691824369132519,
0.018402190878987312,
0.052383437752723694,
0.02096727304160595,
0.031868357211351395,
0.01053551398217678,
-0.04635313153266907,
0.08102958649396896,
0.0033864076249301434,
0.0061897942796349525,
0.009862481616437435,
-0.021419625729322433,
-0.059042852371931076,
0.015511944890022278,
0.07762396335601807,
-0.03258723020553589,
0.04592495039105415,
0.054867811501026154,
0.03711247444152832
] | 0.191684
|
Pods to run correctly on that particular node. For example, [network plugins](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/) often include a component that runs as a DaemonSet. The DaemonSet component makes sure that the node where it's running has working cluster networking. ## {{% heading "whatsnext" %}} \* Learn about [Pods](/docs/concepts/workloads/pods): \* Learn about [static Pods](/docs/tasks/configure-pod-container/static-pod/), which are useful for running Kubernetes {{< glossary\_tooltip text="control plane" term\_id="control-plane" >}} components. \* Find out how to use DaemonSets: \* [Perform a rolling update on a DaemonSet](/docs/tasks/manage-daemon/update-daemon-set/). \* [Perform a rollback on a DaemonSet](/docs/tasks/manage-daemon/rollback-daemon-set/) (for example, if a roll out didn't work how you expected). \* Understand [how Kubernetes assigns Pods to Nodes](/docs/concepts/scheduling-eviction/assign-pod-node/). \* Learn about [device plugins](/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/) and [add ons](/docs/concepts/cluster-administration/addons/), which often run as DaemonSets. \* `DaemonSet` is a top-level resource in the Kubernetes REST API. Read the {{< api-reference page="workload-resources/daemon-set-v1" >}} object definition to understand the API for daemon sets.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/daemonset.md
|
[
0.002776756649836898,
-0.02867501601576805,
0.023288730531930923,
0.05021410062909126,
-0.007434606086462736,
0.005266173742711544,
-0.011292963288724422,
-0.0062147644348442554,
0.03216595947742462,
0.06360616534948349,
-0.0008318859618157148,
0.02514936961233616,
-0.04466448351740837,
-0.057440679520368576,
0.014682481065392494,
-0.012615497224032879,
0.08782762289047241,
0.01960976980626583,
0.01511293463408947,
-0.03879670798778534,
-0.0033736934419721365,
0.017406661063432693,
0.05952581390738487,
0.01867678575217724,
-0.08707054704427719,
0.03180411830544472,
-0.04797917604446411,
-0.0117189334705472,
-0.0010945481481030583,
0.01759505085647106,
-0.05222143232822418,
0.025365648791193962,
-0.02947940118610859,
0.06689474731683731,
0.014495620504021645,
0.10085985064506531,
0.008654152974486351,
-0.03675392270088196,
-0.06963544338941574,
0.017596468329429626,
0.08560129255056381,
-0.015131289139389992,
-0.05469716712832451,
-0.03499993681907654,
-0.0011915832292288542,
0.013921204954385757,
-0.10468180477619171,
-0.050416260957717896,
-0.005658234003931284,
-0.04386068135499954,
0.03723534569144249,
-0.13269270956516266,
0.06839583814144135,
0.050187159329652786,
0.08676377683877945,
0.07355622202157974,
-0.010296243242919445,
0.07589013874530792,
0.10088431090116501,
-0.0049998220056295395,
0.04029570892453194,
-0.03431766852736473,
0.03804323077201843,
-0.023618776351213455,
0.020708268508315086,
-0.0010063806548714638,
0.02241331711411476,
0.017727509140968323,
0.011394464410841465,
-0.06894274801015854,
0.073346808552742,
0.04191727936267853,
-0.011236206628382206,
-0.016186000779271126,
-0.04854413866996765,
0.025452006608247757,
0.00439901789650321,
0.04374171420931816,
-0.07109189033508301,
-0.04815328121185303,
0.0249975323677063,
0.0767737403512001,
0.061323534697294235,
0.03819494694471359,
-0.06894753873348236,
-0.006368529051542282,
0.0017269912641495466,
-0.08442952483892441,
0.04035801813006401,
0.0003846223989967257,
0.0004357887664809823,
-0.02380714751780033,
0.056660767644643784,
-0.14592817425727844,
0.03464861586689949,
0.036254942417144775,
-0.019353508949279785,
-0.01518330629914999,
0.018356701359152794,
0.008296326734125614,
0.05588086321949959,
-0.011534527875483036,
-0.018254492431879044,
-0.012521295808255672,
0.04337092861533165,
-0.014233781956136227,
-0.07310304790735245,
-0.04781629890203476,
0.05936694145202637,
0.004218485672026873,
-0.0021948995999991894,
0.0627048909664154,
-0.0472344234585762,
0.06010732054710388,
0.005706804804503918,
-0.05526347458362579,
0.04423590376973152,
-0.0004847293021157384,
0.01658027432858944,
0.08133391290903091,
-0.013825986534357071,
-0.07974373549222946,
0.015557099133729935,
0.004068524111062288,
-0.044829461723566055,
0.03526055067777634,
-0.03508981317281723,
1.1231627198561216e-33,
0.05126152187585831,
-0.13394726812839508,
-0.016584673896431923,
0.011390642262995243,
0.07609698176383972,
-0.07906729727983475,
-0.029544755816459656,
0.01340899895876646,
-0.04494501277804375,
0.018950335681438446,
-0.09766155481338501,
0.08049777150154114,
-0.0029293561819940805,
-0.029055796563625336,
0.03009136952459812,
-0.07686757296323776,
-0.04907185211777687,
0.007667143829166889,
0.11037582159042358,
-0.025566795840859413,
0.05837341025471687,
-0.04059111699461937,
-0.026359032839536667,
-0.004520781803876162,
0.03598320111632347,
-0.04578612372279167,
0.01091158576309681,
-0.08981741219758987,
0.00037395450635813177,
0.01814870536327362,
-0.05285842716693878,
0.009748169220983982,
0.03925361856818199,
0.028505763038992882,
-0.16258291900157928,
0.002616513054817915,
-0.08584379404783249,
-0.007313157897442579,
-0.08767062425613403,
-0.04562894254922867,
0.0106721306219697,
0.0023918254300951958,
-0.022327981889247894,
-0.05500433221459389,
0.04093353450298309,
0.018682466819882393,
0.0194317065179348,
-0.10303676128387451,
0.10255659371614456,
0.008860992267727852,
-0.012858210131525993,
-0.059974927455186844,
0.05248302221298218,
-0.05381157249212265,
0.04989372938871384,
0.028133857995271683,
0.042953621596097946,
-0.056959185749292374,
-0.012547779828310013,
0.014744147658348083,
-0.00999478716403246,
-0.02619323320686817,
-0.04683652147650719,
-0.01866300217807293,
0.022957468405365944,
0.10124573111534119,
-0.014350923709571362,
0.04827813431620598,
0.003644918091595173,
0.004474981222301722,
-0.06445641815662384,
0.026079904288053513,
-0.017194416373968124,
0.09031737595796585,
0.0036319231148809195,
-0.03749823942780495,
-0.06677401810884476,
0.014900540001690388,
-0.16959691047668457,
0.026734840124845505,
0.020701540634036064,
-0.04573358595371246,
-0.0639544129371643,
0.10929234325885773,
0.05332252383232117,
-0.043547362089157104,
0.02716485783457756,
-0.010200629942119122,
-0.03722362965345383,
0.03781597688794136,
0.03945251181721687,
-0.030046679079532623,
-0.059108518064022064,
0.012797660194337368,
-0.11571646481752396,
-2.4443009125807867e-33,
0.1230856403708458,
-0.010373368859291077,
-0.046955786645412445,
0.025487571954727173,
-0.021464640274643898,
-0.0034719936084002256,
-0.04052320122718811,
0.026564955711364746,
-0.0460575595498085,
-0.03697614371776581,
-0.030196990817785263,
-0.045328907668590546,
0.014949235133826733,
0.016117895022034645,
-0.08433549851179123,
-0.0046989209949970245,
-0.1087498888373375,
-0.047711893916130066,
0.006346199195832014,
0.03299504891037941,
-0.06343327462673187,
-0.04702143371105194,
0.045021235942840576,
0.022188734263181686,
0.019476836547255516,
0.0190539862960577,
0.05429040268063545,
0.031208179891109467,
-0.0973765030503273,
-0.05495348572731018,
-0.0422324500977993,
-0.07849030941724777,
0.004682124126702547,
0.021110178902745247,
0.04589619114995003,
-0.007521816994994879,
-0.024534421041607857,
0.007703761104494333,
0.014732188545167446,
-0.04318367689847946,
0.05912584066390991,
-0.0027350836899131536,
-0.08836811035871506,
-0.009537451900541782,
-0.012495518662035465,
-0.0028869458474218845,
-0.03606328368186951,
0.03262782096862793,
-0.06976500153541565,
-0.055263761430978775,
-0.03490182384848595,
-0.006243285723030567,
-0.03523533046245575,
0.11780460923910141,
-0.0051156203262507915,
0.03935744985938072,
0.04484758526086807,
0.07376520335674286,
-0.025051023811101913,
0.04350703954696655,
0.06833352148532867,
-0.14835213124752045,
0.020665312185883522,
0.05564169958233833,
-0.04987171292304993,
-0.09267845749855042,
-0.029010837897658348,
0.038369741290807724,
-0.003981679677963257,
0.03324682265520096,
-0.01996449939906597,
0.019573992118239403,
0.06188143417239189,
0.04603693634271622,
-0.04577331617474556,
-0.04989750683307648,
0.07164955139160156,
-0.08721334487199783,
0.06843927502632141,
0.01429694052785635,
-0.045304376631975174,
0.0738082304596901,
-0.0695313811302185,
0.010287394747138023,
0.015915540978312492,
0.0960899293422699,
0.06797606498003006,
0.11848898231983185,
0.07020418345928192,
0.05970107018947601,
0.016957955434918404,
0.01085602305829525,
-0.04355115443468094,
0.12348101288080215,
-0.062176842242479324,
-5.6549747995404687e-8,
0.04325408861041069,
0.08020281046628952,
0.011076578870415688,
0.043453317135572433,
0.012409806251525879,
0.001333072897978127,
0.07129509001970291,
-0.009196620434522629,
-0.07422341406345367,
-0.007344270125031471,
0.01668103225529194,
0.048988182097673416,
-0.07180383801460266,
0.009741181507706642,
0.026858553290367126,
0.011508619412779808,
0.0011564790038391948,
0.05134844034910202,
0.02790561504662037,
-0.02680317498743534,
-0.06456036120653152,
-0.03851890563964844,
-0.025988852605223656,
0.0608956404030323,
0.00031584297539666295,
0.05893976241350174,
0.06506955623626709,
0.02604059688746929,
-0.029049383476376534,
0.00003837882832158357,
-0.048442255705595016,
0.0073253083974123,
-0.061516597867012024,
0.0522276945412159,
-0.05012856796383858,
0.06138139218091965,
-0.15151721239089966,
0.029630621895194054,
0.08002819865942001,
0.07759721577167511,
-0.009730913676321507,
-0.016460061073303223,
-0.01954985409975052,
-0.007192425895482302,
0.021180421113967896,
0.05728177726268768,
0.028598865494132042,
0.07323843985795975,
0.0071116904728114605,
0.019162775948643684,
0.0005137012922205031,
-0.03164469078183174,
0.00210333033464849,
0.08420782536268234,
-0.006360063329339027,
-0.02454371377825737,
-0.013699466362595558,
-0.054937154054641724,
-0.012540007941424847,
0.042590126395225525,
-0.04996541514992714,
0.014625824987888336,
0.024838676676154137,
0.009806688874959946
] | 0.179794
|
A \_Deployment\_ provides declarative updates for {{< glossary\_tooltip text="Pods" term\_id="pod" >}} and {{< glossary\_tooltip term\_id="replica-set" text="ReplicaSets" >}}. You describe a \_desired state\_ in a Deployment, and the Deployment {{< glossary\_tooltip term\_id="controller" >}} changes the actual state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets, or to remove existing Deployments and adopt all their resources with new Deployments. {{< note >}} Do not manage ReplicaSets owned by a Deployment. Consider opening an issue in the main Kubernetes repository if your use case is not covered below. {{< /note >}} ## Use Case The following are typical use cases for Deployments: \* [Create a Deployment to rollout a ReplicaSet](#creating-a-deployment). The ReplicaSet creates Pods in the background. Check the status of the rollout to see if it succeeds or not. \* [Declare the new state of the Pods](#updating-a-deployment) by updating the PodTemplateSpec of the Deployment. A new ReplicaSet is created, and the Deployment gradually scales it up while scaling down the old ReplicaSet, ensuring Pods are replaced at a controlled rate. Each new ReplicaSet updates the revision of the Deployment. \* [Rollback to an earlier Deployment revision](#rolling-back-a-deployment) if the current state of the Deployment is not stable. Each rollback updates the revision of the Deployment. \* [Scale up the Deployment to facilitate more load](#scaling-a-deployment). \* [Pause the rollout of a Deployment](#pausing-and-resuming-a-deployment) to apply multiple fixes to its PodTemplateSpec and then resume it to start a new rollout. \* [Use the status of the Deployment](#deployment-status) as an indicator that a rollout has stuck. \* [Clean up older ReplicaSets](#clean-up-policy) that you don't need anymore. ## Creating a Deployment The following is an example of a Deployment. It creates a ReplicaSet to bring up three `nginx` Pods: {{% code\_sample file="controllers/nginx-deployment.yaml" %}} In this example: \* A Deployment named `nginx-deployment` is created, indicated by the `.metadata.name` field. This name will become the basis for the ReplicaSets and Pods which are created later. See [Writing a Deployment Spec](#writing-a-deployment-spec) for more details. \* The Deployment creates a ReplicaSet that creates three replicated Pods, indicated by the `.spec.replicas` field. \* The `.spec.selector` field defines how the created ReplicaSet finds which Pods to manage. In this case, you select a label that is defined in the Pod template (`app: nginx`). However, more sophisticated selection rules are possible, as long as the Pod template itself satisfies the rule. {{< note >}} The `.spec.selector.matchLabels` field is a map of {key,value} pairs. A single {key,value} in the `matchLabels` map is equivalent to an element of `matchExpressions`, whose `key` field is "key", the `operator` is "In", and the `values` array contains only "value". All of the requirements, from both `matchLabels` and `matchExpressions`, must be satisfied in order to match. {{< /note >}} \* The `.spec.template` field contains the following sub-fields: \* The Pods are labeled `app: nginx`using the `.metadata.labels` field. \* The Pod template's specification, or `.spec` field, indicates that the Pods run one container, `nginx`, which runs the `nginx` [Docker Hub](https://hub.docker.com/) image at version 1.14.2. \* Create one container and name it `nginx` using the `.spec.containers[0].name` field. Before you begin, make sure your Kubernetes cluster is up and running. Follow the steps given below to create the above Deployment: 1. Create the Deployment by running the following command: ```shell kubectl apply -f https://k8s.io/examples/controllers/nginx-deployment.yaml ``` 2. Run `kubectl get deployments` to check if the Deployment was created. If the Deployment is still being created, the output is similar to the following: ``` NAME READY UP-TO-DATE AVAILABLE AGE nginx-deployment 0/3 0 0 1s ``` When you inspect the Deployments in your cluster, the following fields are displayed: \*
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/deployment.md
|
[
-0.06276048719882965,
-0.037218790501356125,
0.0883634015917778,
-0.017394982278347015,
-0.03408537805080414,
-0.05041898041963577,
0.06987310945987701,
-0.10028190910816193,
0.06638434529304504,
0.08490025997161865,
0.05518738552927971,
-0.06027211993932724,
0.02244611643254757,
-0.057519037276506424,
0.03655477613210678,
0.05308224633336067,
0.040555328130722046,
-0.0552782341837883,
-0.08993055671453476,
0.0025579570792615414,
0.02762039750814438,
0.02306496351957321,
0.03463137149810791,
0.10268545895814896,
-0.018271716311573982,
0.036024533212184906,
-0.04624856635928154,
-0.002180773066356778,
0.051455482840538025,
0.026175638660788536,
-0.07016110420227051,
0.05065635219216347,
-0.07713234424591064,
0.03354094177484512,
0.1214248538017273,
0.06924551725387573,
-0.025778234004974365,
0.018216129392385483,
-0.025477495044469833,
0.012016556225717068,
0.061769094318151474,
-0.03966476395726204,
-0.08703645318746567,
-0.012058147229254246,
-0.011208216659724712,
0.05882281810045242,
-0.020343581214547157,
0.0005879881209693849,
0.0021752361208200455,
0.007961560040712357,
0.03341822698712349,
-0.13185256719589233,
0.011822755448520184,
-0.020141350105404854,
0.0851736068725586,
0.01754070818424225,
0.02681632898747921,
0.03180672228336334,
0.08382406830787659,
-0.01775997132062912,
0.07736212015151978,
0.01459161750972271,
-0.013114257715642452,
-0.018608395010232925,
0.015227410942316055,
-0.019855951890349388,
0.04465865716338158,
0.01767265982925892,
-0.0055886367335915565,
-0.013242165558040142,
0.05691381171345711,
0.021310150623321533,
0.045494887977838516,
-0.04303110018372536,
-0.018243897706270218,
0.00006734069029334933,
-0.051218707114458084,
0.06098724156618118,
0.04179898276925087,
-0.09077385812997818,
0.05352514609694481,
0.01931443251669407,
0.09013631194829941,
0.03303203359246254,
-0.06298279017210007,
-0.1155034750699997,
0.05531889200210571,
-0.02024577558040619,
0.07259806245565414,
0.03297138214111328,
-0.010624079033732414,
-0.0932508036494255,
0.0989389568567276,
-0.10099773108959198,
-0.019499437883496284,
0.024356327950954437,
0.018195319920778275,
-0.0027440206613391638,
-0.0010827976511791348,
0.010350130498409271,
0.049655988812446594,
-0.01847350038588047,
0.03306317701935768,
-0.033665407449007034,
-0.020445942878723145,
0.024288421496748924,
-0.1290716677904129,
-0.00472264876589179,
-0.001310171908698976,
0.00357966311275959,
-0.003449939889833331,
0.09097866714000702,
-0.018731573596596718,
0.047266311943531036,
-0.0451398529112339,
-0.04532572254538536,
-0.024191074073314667,
0.006117074750363827,
0.0072687650099396706,
0.07135356217622757,
0.04400217533111572,
-0.09656254947185516,
0.028889751061797142,
-0.0070362817496061325,
-0.06100453436374664,
0.04983809217810631,
-0.013978380709886551,
5.778277938823787e-34,
0.06572757661342621,
-0.05516042932868004,
-0.09802219271659851,
0.025840923190116882,
0.008699951693415642,
-0.018314776942133904,
-0.04233655333518982,
-0.020876800641417503,
-0.08903500437736511,
-0.05406365916132927,
-0.004431209061294794,
0.08897252380847931,
-0.0592069998383522,
0.011993955820798874,
0.019279714673757553,
-0.051153916865587234,
-0.02939836122095585,
0.10987937450408936,
0.06870049238204956,
-0.013886194676160812,
0.021386949345469475,
-0.01745353639125824,
-0.06065676361322403,
-0.058691322803497314,
0.07050266861915588,
-0.010692102834582329,
-0.026526356115937233,
-0.027257293462753296,
-0.04958397522568703,
0.015244717709720135,
-0.021660402417182922,
0.019836485385894775,
0.03726452961564064,
-0.030721204355359077,
-0.10050418972969055,
-0.04320267587900162,
-0.02698688395321369,
-0.0854739174246788,
-0.029355177655816078,
-0.08017051219940186,
0.03826413303613663,
-0.019306747242808342,
-0.021090354770421982,
-0.02168620564043522,
0.04451818764209747,
0.05456195026636124,
0.004724962171167135,
-0.07655544579029083,
0.08060126006603241,
-0.045622073113918304,
0.028229082003235817,
-0.02689575031399727,
-0.0006519217859022319,
-0.06163192167878151,
0.010049366392195225,
0.016218185424804688,
0.03283776342868805,
-0.0772046148777008,
0.0029913834296166897,
-0.06154581531882286,
-0.05916473641991615,
-0.00044952952885068953,
-0.043254055082798004,
0.04089154675602913,
0.088384248316288,
0.06116889417171478,
-0.00862147007137537,
0.07638031989336014,
0.018838737159967422,
0.008022304624319077,
-0.031377341598272324,
0.023190978914499283,
-0.06253643333911896,
0.012682481668889523,
0.03328197821974754,
-0.09990350902080536,
0.005396747030317783,
0.03116164170205593,
-0.10355949401855469,
0.04043707996606827,
0.0033679483458399773,
-0.04592262580990791,
-0.12352713942527771,
0.07097116857767105,
0.03381361439824104,
-0.03210809454321861,
0.026289528235793114,
-0.04647500067949295,
-0.0884733498096466,
0.02344965562224388,
-0.030673924833536148,
-0.05383499339222908,
-0.11474306136369705,
-0.014585957862436771,
-0.08993833512067795,
-3.237003976923443e-33,
0.10301840305328369,
-0.04036610201001167,
0.04507523402571678,
0.04597131907939911,
-0.002281281165778637,
-0.012146705761551857,
0.007357563823461533,
0.07482464611530304,
-0.001006845966912806,
-0.07515787333250046,
-0.017427118495106697,
0.019582124426960945,
-0.025357505306601524,
0.06289256364107132,
-0.07837291806936264,
-0.0005010819295421243,
-0.06727533042430878,
-0.02176971733570099,
0.0035187890753149986,
-0.003388834884390235,
0.01861744374036789,
-0.05363034829497337,
0.04489953815937042,
0.07597649097442627,
0.025474850088357925,
-0.060234539210796356,
-0.02852490544319153,
0.04414369538426399,
0.04187525808811188,
-0.05809159576892853,
0.013969186693429947,
-0.0044044991955161095,
-0.045002855360507965,
-0.02969617396593094,
0.015019859187304974,
-0.0016986987320706248,
0.038275301456451416,
-0.02141636610031128,
-0.054268255829811096,
0.05156291276216507,
0.05013495683670044,
-0.0219135545194149,
-0.06994319707155228,
-0.036081619560718536,
0.020940231159329414,
-0.022148992866277695,
0.0198114812374115,
-0.015924079343676567,
-0.005721391178667545,
-0.06633640080690384,
0.06748796254396439,
-0.038668736815452576,
-0.031703077256679535,
0.032205455005168915,
-0.02653622440993786,
0.013742687180638313,
0.018002653494477272,
-0.016335170716047287,
-0.10029847174882889,
-0.024476144462823868,
0.016695918515324593,
-0.029692593961954117,
0.04277694597840309,
0.02833879180252552,
-0.01298818364739418,
0.013705557212233543,
-0.001797909731976688,
0.03386935964226723,
0.0312599241733551,
-0.022287113592028618,
0.014426598325371742,
-0.048029761761426926,
-0.008215902373194695,
-0.0866624265909195,
0.018824562430381775,
-0.04923342168331146,
0.035972658544778824,
-0.1046726405620575,
0.07323063164949417,
-0.05895708501338959,
-0.04223420098423958,
0.06293293088674545,
0.028795920312404633,
0.02533050626516342,
-0.02022087760269642,
0.04380147531628609,
0.04353805631399155,
0.11711949110031128,
0.05154673010110855,
0.10331173986196518,
-0.04246484115719795,
-0.010215431451797485,
0.006963125895708799,
0.10811813175678253,
-0.0798879861831665,
-4.860604718714967e-8,
-0.021326372399926186,
0.197114035487175,
0.00011584852472878993,
0.04367181286215782,
0.002192233456298709,
-0.002182717900723219,
0.04171784222126007,
-0.04011804610490799,
-0.023599138483405113,
-0.06111323460936546,
-0.02738216519355774,
0.08724425733089447,
-0.030776305124163628,
0.07869058847427368,
-0.03605470061302185,
0.014241958037018776,
-0.062166307121515274,
-0.011815602891147137,
0.000609060691203922,
-0.07190422713756561,
-0.038048114627599716,
0.033137451857328415,
0.04587945342063904,
0.03769901767373085,
-0.04161597043275833,
0.009928807616233826,
0.012809653766453266,
-0.0034161314833909273,
0.017355354502797127,
0.04205816611647606,
0.022458747029304504,
-0.011113542132079601,
-0.06985651701688766,
0.1085611879825592,
0.03866773471236229,
-0.041989393532276154,
-0.10552483797073364,
0.02788412570953369,
0.11567611247301102,
0.025003796443343163,
-0.0386711023747921,
0.02012837864458561,
-0.07898269593715668,
0.043796662241220474,
0.01922612078487873,
0.0406244695186615,
-0.023157430812716484,
-0.011124900542199612,
-0.05488882213830948,
-0.0384688563644886,
-0.005811432842165232,
0.0012460292782634497,
-0.045009762048721313,
0.0903182327747345,
-0.03982648625969887,
-0.016994647681713104,
0.04829292371869087,
0.039729807525873184,
0.070809505879879,
-0.0009859201963990927,
-0.017051413655281067,
-0.05726391822099686,
0.03532905504107475,
0.017968935891985893
] | 0.062707
|
`kubectl get deployments` to check if the Deployment was created. If the Deployment is still being created, the output is similar to the following: ``` NAME READY UP-TO-DATE AVAILABLE AGE nginx-deployment 0/3 0 0 1s ``` When you inspect the Deployments in your cluster, the following fields are displayed: \* `NAME` lists the names of the Deployments in the namespace. \* `READY` displays how many replicas of the application are available to your users. It follows the pattern ready/desired. \* `UP-TO-DATE` displays the number of replicas that have been updated to achieve the desired state. \* `AVAILABLE` displays how many replicas of the application are available to your users. \* `AGE` displays the amount of time that the application has been running. Notice how the number of desired replicas is 3 according to `.spec.replicas` field. 3. To see the Deployment rollout status, run `kubectl rollout status deployment/nginx-deployment`. The output is similar to: ``` Waiting for rollout to finish: 2 out of 3 new replicas have been updated... deployment "nginx-deployment" successfully rolled out ``` 4. Run the `kubectl get deployments` again a few seconds later. The output is similar to this: ``` NAME READY UP-TO-DATE AVAILABLE AGE nginx-deployment 3/3 3 3 18s ``` Notice that the Deployment has created all three replicas, and all replicas are up-to-date (they contain the latest Pod template) and available. 5. To see the ReplicaSet (`rs`) created by the Deployment, run `kubectl get rs`. The output is similar to this: ``` NAME DESIRED CURRENT READY AGE nginx-deployment-75675f5897 3 3 3 18s ``` ReplicaSet output shows the following fields: \* `NAME` lists the names of the ReplicaSets in the namespace. \* `DESIRED` displays the desired number of \_replicas\_ of the application, which you define when you create the Deployment. This is the \_desired state\_. \* `CURRENT` displays how many replicas are currently running. \* `READY` displays how many replicas of the application are available to your users. \* `AGE` displays the amount of time that the application has been running. Notice that the name of the ReplicaSet is always formatted as `[DEPLOYMENT-NAME]-[HASH]`. This name will become the basis for the Pods which are created. The `HASH` string is the same as the `pod-template-hash` label on the ReplicaSet. 6. To see the labels automatically generated for each Pod, run `kubectl get pods --show-labels`. The output is similar to: ``` NAME READY STATUS RESTARTS AGE LABELS nginx-deployment-75675f5897-7ci7o 1/1 Running 0 18s app=nginx,pod-template-hash=75675f5897 nginx-deployment-75675f5897-kzszj 1/1 Running 0 18s app=nginx,pod-template-hash=75675f5897 nginx-deployment-75675f5897-qqcnn 1/1 Running 0 18s app=nginx,pod-template-hash=75675f5897 ``` The created ReplicaSet ensures that there are three `nginx` Pods. {{< note >}} You must specify an appropriate selector and Pod template labels in a Deployment (in this case, `app: nginx`). Do not overlap labels or selectors with other controllers (including other Deployments and StatefulSets). Kubernetes doesn't stop you from overlapping, and if multiple controllers have overlapping selectors those controllers might conflict and behave unexpectedly. {{< /note >}} ### Pod-template-hash label {{< caution >}} Do not change this label. {{< /caution >}} The `pod-template-hash` label is added by the Deployment controller to every ReplicaSet that a Deployment creates or adopts. This label ensures that child ReplicaSets of a Deployment do not overlap. It is generated by hashing the `PodTemplate` of the ReplicaSet and using the resulting hash as the label value that is added to the ReplicaSet selector, Pod template labels, and in any existing Pods that the ReplicaSet might have. ## Updating a Deployment {{< note >}} A Deployment's rollout is triggered if and only if the Deployment's Pod template (that is, `.spec.template`) is changed, for example if the labels or container images
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/deployment.md
|
[
-0.014701560139656067,
0.015564560890197754,
-0.024317637085914612,
0.0030299555510282516,
-0.02260657027363777,
-0.023732777684926987,
-0.06087828800082207,
-0.06681539118289948,
0.08175746351480484,
0.06665243953466415,
0.001440137391909957,
-0.0768941193819046,
0.009884214028716087,
-0.06092017889022827,
0.006060607265681028,
-0.027547603473067284,
-0.014904155395925045,
-0.0683845803141594,
-0.04290872812271118,
-0.1007835865020752,
-0.005121735390275717,
-0.019067000597715378,
-0.0015639725606888533,
0.022190628573298454,
0.009034451097249985,
0.02983897551894188,
-0.08000699430704117,
-0.024273931980133057,
0.03518074005842209,
0.034377384930849075,
-0.05710313469171524,
0.08633606135845184,
0.01226592343300581,
-0.015991628170013428,
0.06910841912031174,
0.05460846424102783,
-0.0021276643965393305,
-0.007878616452217102,
-0.05146763101220131,
0.0003530617686919868,
0.09956002235412598,
-0.04062463343143463,
-0.052614472806453705,
-0.07069328427314758,
-0.031609050929546356,
-0.0025118994526565075,
-0.09826838970184326,
0.023896843194961548,
0.012756520882248878,
-0.012395119294524193,
-0.0044091688469052315,
-0.07954171299934387,
-0.029606174677610397,
0.019911136478185654,
0.023883307352662086,
0.01949950121343136,
-0.05292662978172302,
-0.015142582356929779,
0.058635491877794266,
0.012083594687283039,
0.014174457639455795,
-0.035856835544109344,
0.017628487199544907,
-0.007543625775724649,
-0.01262851431965828,
-0.02583000436425209,
0.001838879776187241,
-0.04324294999241829,
0.015076345764100552,
0.01061312761157751,
0.02973230928182602,
0.05600500851869583,
-0.0771271288394928,
-0.03889049217104912,
-0.05525818094611168,
-0.03163500875234604,
-0.0046957992017269135,
0.06852947175502777,
0.026479290798306465,
-0.10633386671543121,
0.025871125981211662,
-0.025709131732583046,
-0.008883113041520119,
0.04543638229370117,
-0.08454008400440216,
-0.05071490630507469,
0.047797590494155884,
0.010568870231509209,
0.034668147563934326,
-0.03807362541556358,
-0.0020988048054277897,
0.048907965421676636,
-0.009960982017219067,
-0.01246910821646452,
-0.030029773712158203,
0.043406955897808075,
-0.03133512660861015,
0.12180163711309433,
0.053403519093990326,
0.01425331924110651,
0.03149890527129173,
-0.04731050133705139,
0.0909198746085167,
-0.005382667761296034,
-0.03475620225071907,
-0.026096198707818985,
-0.0696144625544548,
0.020937975496053696,
0.027844050899147987,
0.07905370742082596,
0.010144208557903767,
0.01929388754069805,
-0.03499121963977814,
0.03984333202242851,
-0.04185548424720764,
0.028427401557564735,
-0.02189875766634941,
-0.006212266627699137,
0.02887297235429287,
0.11695116758346558,
0.1342773139476776,
-0.02513662911951542,
0.02997235395014286,
-0.02373400516808033,
-0.045688651502132416,
0.014455235563218594,
0.05828661099076271,
3.160485172156666e-33,
0.033081550151109695,
-0.08398277312517166,
0.01999465934932232,
0.038383204489946365,
0.025764724239706993,
-0.05375666916370392,
-0.10882581770420074,
-0.05804530158638954,
-0.04339241608977318,
-0.029966458678245544,
-0.03810802474617958,
0.08364934474229813,
-0.06498143821954727,
0.015361341647803783,
0.021431928500533104,
-0.032424259930849075,
0.045585259795188904,
0.07926490902900696,
0.07615823298692703,
0.017793303355574608,
0.09705397486686707,
-0.10403742641210556,
-0.1114724799990654,
0.09142212569713593,
0.09072469174861908,
-0.002877558581531048,
0.007878326810896397,
-0.01597435213625431,
-0.11178893595933914,
-0.005805466789752245,
0.09695475548505783,
-0.013902765698730946,
-0.012878467328846455,
-0.1000145673751831,
-0.07845283299684525,
-0.007599246688187122,
0.02434607967734337,
-0.004705642815679312,
-0.09216513484716415,
-0.031079111620783806,
-0.014832615852355957,
-0.01840662583708763,
-0.06566618382930756,
-0.0371062271296978,
-0.019252650439739227,
-0.029148763045668602,
0.003947194665670395,
-0.12412414699792862,
0.12790177762508392,
0.0703050047159195,
-0.011731930077075958,
-0.029895588755607605,
0.009450526908040047,
-0.02774759754538536,
0.012259624898433685,
0.0660124123096466,
0.07000831514596939,
-0.017600473016500473,
-0.05400831997394562,
-0.024918021634221077,
-0.026969172060489655,
-0.08108142018318176,
0.0041712019592523575,
0.01445812825113535,
0.012834511697292328,
0.06873470544815063,
0.046712446957826614,
0.03642294183373451,
0.032164085656404495,
0.0795542448759079,
-0.0868905633687973,
0.04970940202474594,
-0.01868004910647869,
0.01586921140551567,
0.028901759535074234,
-0.06774715334177017,
0.037925221025943756,
0.015469684265553951,
-0.07799045741558075,
0.07985345274209976,
0.06795748323202133,
-0.06315896660089493,
-0.11544302850961685,
0.0518915094435215,
0.021579990163445473,
-0.040417976677417755,
-0.006537543144077063,
0.027059314772486687,
-0.07184159010648727,
-0.01255546323955059,
0.0049020773731172085,
0.013314369134604931,
-0.0597095750272274,
0.010784957557916641,
-0.08799707144498825,
-5.610903430807529e-33,
0.046491898596286774,
0.033399224281311035,
0.041772760450839996,
-0.021945098415017128,
0.03799131140112877,
-0.03405892848968506,
-0.01658378727734089,
0.16571123898029327,
0.0162454005330801,
-0.03503260016441345,
0.01571124605834484,
-0.010990431532263756,
0.0040597980841994286,
0.04352153465151787,
-0.13543060421943665,
0.017631033435463905,
0.01858307607471943,
-0.07537318021059036,
0.002873725024983287,
0.017269093543291092,
-0.04599051550030708,
-0.030772384256124496,
0.028960134834051132,
0.02949693240225315,
-0.012109593488276005,
0.029039449989795685,
0.02391660585999489,
-0.03823450952768326,
-0.007836352102458477,
-0.030276525765657425,
0.03943213075399399,
-0.08689309656620026,
-0.04826357588171959,
0.05506148189306259,
-0.002694117370992899,
-0.07424088567495346,
-0.006124390754848719,
0.04300360009074211,
0.025843104347586632,
-0.03478975594043732,
0.04119214415550232,
0.05640504136681557,
-0.006680498365312815,
-0.02389988675713539,
-0.08687261492013931,
-0.008639160543680191,
0.11175508797168732,
-0.018886826932430267,
0.050560012459754944,
-0.09395422786474228,
0.0019915823359042406,
0.021294035017490387,
-0.0015278048813343048,
0.09332039207220078,
0.007343663834035397,
0.014090352691709995,
-0.02938259206712246,
0.06795251369476318,
-0.029106128960847855,
0.0370972603559494,
0.004421958699822426,
-0.05120741203427315,
0.04699203372001648,
0.020729834213852882,
-0.06228154897689819,
-0.0006353578646667302,
-0.058103833347558975,
-0.0025995655450969934,
-0.021062791347503662,
0.05856408551335335,
0.03071550652384758,
-0.000894868397153914,
-0.0737617239356041,
0.0060835364274680614,
-0.05588691681623459,
-0.02818012610077858,
-0.0030052419751882553,
-0.033636730164289474,
0.03942025452852249,
0.008997841738164425,
-0.06229367107152939,
0.0819052904844284,
-0.10042126476764679,
0.022147124633193016,
-0.01778070628643036,
-0.004874811042100191,
0.01395407598465681,
0.04370294511318207,
0.10938423126935959,
0.08681187778711319,
-0.026901395991444588,
0.010127995163202286,
-0.1580657809972763,
0.038350898772478104,
-0.09096157550811768,
-5.070169351029108e-8,
0.032013848423957825,
0.015622755512595177,
-0.03817012533545494,
-0.0022858057636767626,
0.1086963638663292,
-0.01677081547677517,
0.08519485592842102,
-0.03766801208257675,
0.006943136919289827,
-0.07118590921163559,
0.03971970081329346,
0.03941842541098595,
-0.08098115026950836,
0.014893372543156147,
0.07580908387899399,
0.008985227905213833,
-0.051710095256567,
0.0033572379034012556,
0.025639263913035393,
-0.03728127107024193,
-0.047606710344552994,
-0.02812034636735916,
0.06550310552120209,
-0.021539632230997086,
-0.012685536406934261,
0.01301996223628521,
0.027755072340369225,
0.07139824330806732,
-0.013353372924029827,
0.0149232754483819,
0.044443536549806595,
0.013207259587943554,
0.002281020861119032,
-0.021215777844190598,
0.00031392715754918754,
-0.018794318661093712,
-0.1531011164188385,
0.03823747858405113,
0.059827882796525955,
0.06838733702898026,
0.01729077287018299,
0.015919599682092667,
0.0032194042578339577,
0.033985964953899384,
0.0012877886183559895,
0.04538162425160408,
-0.016923680901527405,
0.02591480128467083,
-0.05330277606844902,
-0.08760811388492584,
-0.007368528749793768,
-0.07773739844560623,
-0.023269226774573326,
0.03126748278737068,
-0.04766696318984032,
0.05419940873980522,
0.05456678196787834,
-0.01017546746879816,
0.10370994359254837,
-0.021710462868213654,
0.02133609727025032,
-0.040344081819057465,
-0.014042521826922894,
0.012034446001052856
] | 0.144298
|
to the ReplicaSet selector, Pod template labels, and in any existing Pods that the ReplicaSet might have. ## Updating a Deployment {{< note >}} A Deployment's rollout is triggered if and only if the Deployment's Pod template (that is, `.spec.template`) is changed, for example if the labels or container images of the template are updated. Other updates, such as scaling the Deployment, do not trigger a rollout. {{< /note >}} Follow the steps given below to update your Deployment: 1. Let's update the nginx Pods to use the `nginx:1.16.1` image instead of the `nginx:1.14.2` image. ```shell kubectl set image deployment.v1.apps/nginx-deployment nginx=nginx:1.16.1 ``` or use the following command: ```shell kubectl set image deployment/nginx-deployment nginx=nginx:1.16.1 ``` where `deployment/nginx-deployment` indicates the Deployment, `nginx` indicates the Container the update will take place and `nginx:1.16.1` indicates the new image and its tag. The output is similar to: ``` deployment.apps/nginx-deployment image updated ``` Alternatively, you can `edit` the Deployment and change `.spec.template.spec.containers[0].image` from `nginx:1.14.2` to `nginx:1.16.1`: ```shell kubectl edit deployment/nginx-deployment ``` The output is similar to: ``` deployment.apps/nginx-deployment edited ``` 2. To see the rollout status, run: ```shell kubectl rollout status deployment/nginx-deployment ``` The output is similar to this: ``` Waiting for rollout to finish: 2 out of 3 new replicas have been updated... ``` or ``` deployment "nginx-deployment" successfully rolled out ``` Get more details on your updated Deployment: \* After the rollout succeeds, you can view the Deployment by running `kubectl get deployments`. The output is similar to this: ``` NAME READY UP-TO-DATE AVAILABLE AGE nginx-deployment 3/3 3 3 36s ``` \* Run `kubectl get rs` to see that the Deployment updated the Pods by creating a new ReplicaSet and scaling it up to 3 replicas, as well as scaling down the old ReplicaSet to 0 replicas. ```shell kubectl get rs ``` The output is similar to this: ``` NAME DESIRED CURRENT READY AGE nginx-deployment-1564180365 3 3 3 6s nginx-deployment-2035384211 0 0 0 36s ``` \* Running `get pods` should now show only the new Pods: ```shell kubectl get pods ``` The output is similar to this: ``` NAME READY STATUS RESTARTS AGE nginx-deployment-1564180365-khku8 1/1 Running 0 14s nginx-deployment-1564180365-nacti 1/1 Running 0 14s nginx-deployment-1564180365-z9gth 1/1 Running 0 14s ``` Next time you want to update these Pods, you only need to update the Deployment's Pod template again. Deployment ensures that only a certain number of Pods are down while they are being updated. By default, it ensures that at least 75% of the desired number of Pods are up (25% max unavailable). Deployment also ensures that only a certain number of Pods are created above the desired number of Pods. By default, it ensures that at most 125% of the desired number of Pods are up (25% max surge). For example, if you look at the above Deployment closely, you will see that it first creates a new Pod, then deletes an old Pod, and creates another new one. It does not kill old Pods until a sufficient number of new Pods have come up, and does not create new Pods until a sufficient number of old Pods have been killed. It makes sure that at least 3 Pods are available and that at max 4 Pods in total are available. In case of a Deployment with 4 replicas, the number of Pods would be between 3 and 5. \* Get details of your Deployment: ```shell kubectl describe deployments ``` The output is similar to this: ``` Name: nginx-deployment Namespace: default CreationTimestamp: Thu, 30 Nov 2017 10:56:25 +0000 Labels: app=nginx Annotations: deployment.kubernetes.io/revision=2 Selector: app=nginx Replicas: 3 desired | 3 updated | 3 total |
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/deployment.md
|
[
0.03546261787414551,
0.04836989566683769,
0.06651099771261215,
-0.0038526388816535473,
-0.013350342400372028,
-0.005036485381424427,
-0.050936561077833176,
-0.04574483633041382,
0.03630445525050163,
0.04942344129085541,
0.012697050347924232,
-0.0184091255068779,
-0.036774035543203354,
-0.0187342781573534,
0.056877389550209045,
-0.04116056486964226,
0.03398372232913971,
0.042458418756723404,
-0.01848815381526947,
0.021400142461061478,
-0.058224987238645554,
-0.0272353645414114,
0.05838385596871376,
0.051137592643499374,
-0.006871440913528204,
0.058608122169971466,
-0.07572876662015915,
-0.039869751781225204,
0.05441156402230263,
-0.022995922714471817,
-0.037363201379776,
0.045235525816679,
-0.01590564474463463,
-0.010721802711486816,
0.10053608566522598,
0.08016838133335114,
-0.005210771691054106,
-0.022423600777983665,
0.014195479452610016,
0.0006039130967110395,
0.12460862845182419,
-0.006562445312738419,
-0.09504185616970062,
-0.054420795291662216,
-0.020310087129473686,
-0.009052349254488945,
-0.003805569838732481,
-0.009262282401323318,
-0.02727772481739521,
-0.014125709421932697,
-0.01806516759097576,
-0.14848798513412476,
0.018080199137330055,
-0.003271629801020026,
0.023780712857842445,
0.01606522500514984,
0.05146606266498566,
0.06553807854652405,
0.13554513454437256,
0.049127813428640366,
0.03242774307727814,
-0.03388374298810959,
0.0383777879178524,
-0.019727664068341255,
-0.011024119332432747,
-0.007326951716095209,
0.01849021017551422,
-0.04983970522880554,
0.009470098651945591,
0.020618487149477005,
0.06549301743507385,
0.03891177847981453,
0.03187341243028641,
-0.057016026228666306,
-0.03288152441382408,
0.003652760060504079,
-0.050537798553705215,
0.025080973282456398,
0.04221445694565773,
-0.015677710995078087,
0.03438447415828705,
-0.04543156176805496,
0.030422339215874672,
0.0018316153436899185,
-0.04399007931351662,
-0.04998740553855896,
0.06839976459741592,
-0.038624972105026245,
-0.017009055241942406,
-0.013349730521440506,
0.018693653866648674,
-0.052532076835632324,
0.004030057229101658,
-0.07169844955205917,
-0.006941745523363352,
-0.017563017085194588,
-0.055547066032886505,
0.0799865797162056,
0.032272763550281525,
-0.018821673467755318,
0.044505730271339417,
-0.014957425184547901,
0.04175572842359543,
0.002059362595900893,
0.05376191437244415,
-0.0033338817302137613,
-0.050240758806467056,
-0.03693780303001404,
0.0394296832382679,
0.0349583700299263,
0.03845813870429993,
0.01997515559196472,
-0.012140321545302868,
0.061569944024086,
-0.07084257155656815,
-0.0019854495767503977,
-0.048794299364089966,
0.012464363127946854,
-0.05378521978855133,
0.09362250566482544,
0.05159506946802139,
-0.05619540438055992,
0.021606674417853355,
0.025637641549110413,
-0.06372421979904175,
-0.0000828208721941337,
0.007480185478925705,
3.177660613990118e-33,
0.03305593505501747,
-0.06675829738378525,
-0.040063370019197464,
0.011424900032579899,
0.11058821529150009,
-0.05850408598780632,
-0.07717378437519073,
-0.05456972122192383,
-0.04086152836680412,
-0.02403251640498638,
0.0073608760721981525,
0.040028151124715805,
-0.08215747773647308,
0.040433045476675034,
-0.0252749752253294,
-0.07942575216293335,
-0.06168515980243683,
0.03631347417831421,
0.08218912780284882,
0.005748693831264973,
0.048021476715803146,
-0.0813283771276474,
-0.08324116468429565,
0.0062950169667601585,
0.011095795780420303,
-0.005278357304632664,
-0.023006675764918327,
-0.05525108054280281,
-0.09083768725395203,
-0.0019240753026679158,
-0.00939217023551464,
-0.013826007954776287,
0.08575844019651413,
0.024784134700894356,
-0.1447456330060959,
-0.08734869956970215,
0.008736738935112953,
-0.013981475494801998,
-0.14149849116802216,
-0.0425107441842556,
0.04520954564213753,
0.027951186522841454,
-0.029961060732603073,
-0.03411388024687767,
0.03314419090747833,
0.009549323469400406,
0.009840918704867363,
-0.07422693073749542,
0.14630737900733948,
-0.03368306905031204,
0.02512298710644245,
-0.059273552149534225,
-0.012812643311917782,
-0.10006510466337204,
0.03359478712081909,
0.018547115847468376,
0.06631507724523544,
-0.03301214426755905,
-0.022945575416088104,
-0.046853069216012955,
-0.0022672386839985847,
-0.028579071164131165,
-0.007078155875205994,
0.028426991775631905,
0.07997000962495804,
0.10973038524389267,
0.006478297524154186,
0.008173465728759766,
-0.0010887370444834232,
0.03769240155816078,
-0.036792099475860596,
0.08592934161424637,
-0.06905736774206161,
0.015187937766313553,
-0.0008125005406327546,
-0.059823885560035706,
-0.012233749963343143,
0.06999505311250687,
-0.051767800003290176,
0.11093880981206894,
0.0045273988507688046,
0.014783812686800957,
-0.12576612830162048,
0.057111602276563644,
0.011931179091334343,
0.011573932133615017,
0.03817669302225113,
0.010875677689909935,
-0.03295152261853218,
0.0311447586864233,
0.0230808574706316,
0.006263358518481255,
-0.11920727044343948,
-0.018292147666215897,
-0.06737922132015228,
-4.7328826191402065e-33,
0.07341466844081879,
0.015410171821713448,
0.07029011845588684,
0.04040595889091492,
-0.03888373821973801,
0.006293770391494036,
0.017058106139302254,
0.14285436272621155,
0.03195956349372864,
-0.03842109441757202,
0.00613413704559207,
-0.059650007635354996,
-0.02988062985241413,
0.04296457767486572,
-0.1703229546546936,
0.00810778047889471,
-0.07829709351062775,
-0.08246301114559174,
0.01008736900985241,
-0.0025230017490684986,
-0.01580328866839409,
-0.04870685189962387,
0.06059279292821884,
0.10861004143953323,
0.007021770812571049,
-0.002410349901765585,
0.037005044519901276,
0.009415682405233383,
0.04117404296994209,
-0.060031481087207794,
-0.004266040865331888,
-0.03687048330903053,
-0.0007173839840106666,
-0.002206194680184126,
0.038988951593637466,
0.012359627522528172,
-0.02603415586054325,
0.05127593129873276,
-0.033755820244550705,
-0.03024953044950962,
0.020929398015141487,
0.007340481039136648,
-0.09743364155292511,
0.010177334770560265,
-0.04543326422572136,
-0.07047566026449203,
0.06516127288341522,
-0.008451160974800587,
0.03038313053548336,
-0.07215733081102371,
0.01656213402748108,
0.017794817686080933,
-0.049233485013246536,
0.07851503789424896,
-0.01800697296857834,
0.01242855004966259,
-0.04839982092380524,
0.07155460119247437,
-0.060115840286016464,
0.01906490884721279,
0.045853983610868454,
-0.024437282234430313,
0.050693292170763016,
-0.018649393692612648,
-0.01483379490673542,
0.04293227940797806,
-0.10236971825361252,
0.010790237225592136,
-0.023827973753213882,
0.08149226754903793,
0.05007948726415634,
-0.02381090261042118,
-0.018058041110634804,
-0.0027446963358670473,
-0.023739919066429138,
-0.03370032086968422,
-0.015418107621371746,
-0.05790739506483078,
0.08808133751153946,
-0.035866349935531616,
-0.007899279706180096,
0.11420547217130661,
-0.11218231171369553,
0.018600333482027054,
0.03460609167814255,
0.06549198180437088,
0.04553297162055969,
0.06559664756059647,
0.09190370887517929,
0.09859661012887955,
0.0037116846069693565,
-0.013589889742434025,
-0.04935530945658684,
0.0558936670422554,
-0.0660952627658844,
-4.9779838917629604e-8,
0.0077729360200464725,
0.07361491024494171,
-0.0055099413730204105,
0.045616455376148224,
0.044554371386766434,
-0.01578856259584427,
0.07638855278491974,
-0.05088381469249725,
-0.04200027137994766,
-0.041319288313388824,
-0.058474522083997726,
0.0615423358976841,
-0.04797714948654175,
0.07372166961431503,
0.02227824367582798,
-0.045797184109687805,
-0.04960339516401291,
0.048502836376428604,
0.053475867956876755,
-0.06152510270476341,
-0.12256862223148346,
-0.02812301740050316,
0.033484283834695816,
-0.03107134997844696,
-0.020060967653989792,
0.055883489549160004,
-0.013410620391368866,
-0.0058161127381026745,
-0.0005888218292966485,
-0.01728857308626175,
0.03979294374585152,
-0.0022621930111199617,
-0.0074075269512832165,
0.017109671607613564,
-0.0006444808095693588,
0.0003799264959525317,
-0.14482618868350983,
0.02727864310145378,
0.06591112911701202,
-0.025307415053248405,
-0.04932452365756035,
-0.04481569677591324,
-0.052671439945697784,
-0.0252070315182209,
-0.052409395575523376,
0.030098170042037964,
0.04071915149688721,
0.07132896035909653,
-0.031859755516052246,
0.021621286869049072,
0.06182378903031349,
-0.09072186052799225,
-0.02487100288271904,
0.004741674289107323,
-0.02074495702981949,
-0.007372941356152296,
0.0654987171292305,
-0.004206565674394369,
0.04981554299592972,
-0.00508700730279088,
0.01916384883224964,
-0.07921396195888519,
0.030994132161140442,
-0.053360097110271454
] | 0.063933
|
be between 3 and 5. \* Get details of your Deployment: ```shell kubectl describe deployments ``` The output is similar to this: ``` Name: nginx-deployment Namespace: default CreationTimestamp: Thu, 30 Nov 2017 10:56:25 +0000 Labels: app=nginx Annotations: deployment.kubernetes.io/revision=2 Selector: app=nginx Replicas: 3 desired | 3 updated | 3 total | 3 available | 0 unavailable StrategyType: RollingUpdate MinReadySeconds: 0 RollingUpdateStrategy: 25% max unavailable, 25% max surge Pod Template: Labels: app=nginx Containers: nginx: Image: nginx:1.16.1 Port: 80/TCP Environment: Mounts: Volumes: Conditions: Type Status Reason ---- ------ ------ Available True MinimumReplicasAvailable Progressing True NewReplicaSetAvailable OldReplicaSets: NewReplicaSet: nginx-deployment-1564180365 (3/3 replicas created) Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal ScalingReplicaSet 2m deployment-controller Scaled up replica set nginx-deployment-2035384211 to 3 Normal ScalingReplicaSet 24s deployment-controller Scaled up replica set nginx-deployment-1564180365 to 1 Normal ScalingReplicaSet 22s deployment-controller Scaled down replica set nginx-deployment-2035384211 to 2 Normal ScalingReplicaSet 22s deployment-controller Scaled up replica set nginx-deployment-1564180365 to 2 Normal ScalingReplicaSet 19s deployment-controller Scaled down replica set nginx-deployment-2035384211 to 1 Normal ScalingReplicaSet 19s deployment-controller Scaled up replica set nginx-deployment-1564180365 to 3 Normal ScalingReplicaSet 14s deployment-controller Scaled down replica set nginx-deployment-2035384211 to 0 ``` Here you see that when you first created the Deployment, it created a ReplicaSet (nginx-deployment-2035384211) and scaled it up to 3 replicas directly. When you updated the Deployment, it created a new ReplicaSet (nginx-deployment-1564180365) and scaled it up to 1 and waited for it to come up. Then it scaled down the old ReplicaSet to 2 and scaled up the new ReplicaSet to 2 so that at least 3 Pods were available and at most 4 Pods were created at all times. It then continued scaling up and down the new and the old ReplicaSet, with the same rolling update strategy. Finally, you'll have 3 available replicas in the new ReplicaSet, and the old ReplicaSet is scaled down to 0. {{< note >}} Kubernetes doesn't count terminating Pods when calculating the number of `availableReplicas`, which must be between `replicas - maxUnavailable` and `replicas + maxSurge`. As a result, you might notice that there are more Pods than expected during a rollout, and that the total resources consumed by the Deployment is more than `replicas + maxSurge` until the `terminationGracePeriodSeconds` of the terminating Pods expires. {{< /note >}} ### Rollover (aka multiple updates in-flight) Each time a new Deployment is observed by the Deployment controller, a ReplicaSet is created to bring up the desired Pods. If the Deployment is updated, the existing ReplicaSet that controls Pods whose labels match `.spec.selector` but whose template does not match `.spec.template` is scaled down. Eventually, the new ReplicaSet is scaled to `.spec.replicas` and all old ReplicaSets is scaled to 0. If you update a Deployment while an existing rollout is in progress, the Deployment creates a new ReplicaSet as per the update and start scaling that up, and rolls over the ReplicaSet that it was scaling up previously -- it will add it to its list of old ReplicaSets and start scaling it down. For example, suppose you create a Deployment to create 5 replicas of `nginx:1.14.2`, but then update the Deployment to create 5 replicas of `nginx:1.16.1`, when only 3 replicas of `nginx:1.14.2` had been created. In that case, the Deployment immediately starts killing the 3 `nginx:1.14.2` Pods that it had created, and starts creating `nginx:1.16.1` Pods. It does not wait for the 5 replicas of `nginx:1.14.2` to be created before changing course. ### Label selector updates It is generally discouraged to make label selector updates and it is suggested to plan your selectors up front. In any case, if you need to perform a label selector
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/deployment.md
|
[
0.01079177763313055,
0.027903271839022636,
0.03294099122285843,
-0.03567548468708992,
-0.02694237418472767,
-0.024474309757351875,
-0.07065124809741974,
-0.014679765328764915,
0.07304441928863525,
0.0513041652739048,
-0.02338959462940693,
-0.11164301633834839,
-0.020456189289689064,
-0.05051403120160103,
0.005574038717895746,
-0.030766857787966728,
0.013642225414514542,
-0.022887909784913063,
-0.08490665256977081,
-0.07056315243244171,
0.04501868784427643,
0.018357496708631516,
0.014232965186238289,
-0.017230503261089325,
-0.002215018030256033,
0.04451007768511772,
-0.09940307587385178,
-0.010577302426099777,
0.04818105697631836,
-0.04702430218458176,
-0.02531191147863865,
0.027687473222613335,
-0.021938661113381386,
-0.020597122609615326,
0.05362095683813095,
0.07873833179473877,
0.005001317709684372,
-0.05572452023625374,
0.0006583572831004858,
0.03247009590268135,
0.07464046031236649,
-0.03290100395679474,
-0.06232238560914993,
-0.08477174490690231,
-0.0036057736724615097,
-0.02706676721572876,
-0.09360162168741226,
-0.05996647849678993,
0.04071950912475586,
-0.033590495586395264,
-0.02101927436888218,
-0.10118701308965683,
-0.007454087492078543,
0.027878670021891594,
0.01817925274372101,
-0.0009248980204574764,
-0.0731719359755516,
0.046724386513233185,
0.09601866453886032,
-0.006814373657107353,
0.03631819039583206,
-0.0360628217458725,
0.03449802100658417,
-0.010543957352638245,
-0.0032868296839296818,
-0.026061853393912315,
-0.03423675149679184,
-0.05328686162829399,
-0.019036320969462395,
0.045399148017168045,
0.010155915282666683,
0.0405091792345047,
-0.06805144995450974,
-0.08847105503082275,
-0.007662210613489151,
-0.02418983168900013,
0.0037760359700769186,
0.030449092388153076,
-0.009562106803059578,
-0.0696345716714859,
0.02309957891702652,
0.017320003360509872,
0.00946171022951603,
0.03659266233444214,
-0.09285180270671844,
-0.025669995695352554,
0.048829562962055206,
0.016127942129969597,
-0.0405593179166317,
-0.037874486297369,
0.01072779018431902,
-0.0032767432276159525,
-0.011870628222823143,
-0.026803843677043915,
0.0650421679019928,
0.07738352566957474,
-0.07538796961307526,
0.04455314204096794,
0.04444001615047455,
0.003975537605583668,
0.015756214037537575,
-0.063689686357975,
0.06366832554340363,
0.012498466297984123,
0.020641639828681946,
-0.062322258949279785,
-0.05003102123737335,
-0.0007998741348274052,
-0.030731530860066414,
0.03190280497074127,
0.011759445071220398,
0.046480946242809296,
-0.053036879748106,
-0.030870044603943825,
0.0005138904671184719,
-0.0022692144848406315,
-0.03101380169391632,
-0.0058480254374444485,
0.05003644898533821,
0.11328545957803726,
0.12527590990066528,
-0.07401619106531143,
0.006388915702700615,
0.030396563932299614,
-0.038557570427656174,
0.05385091155767441,
0.08919690549373627,
1.1351168545555112e-32,
0.03572568669915199,
-0.07466794550418854,
-0.00573797756806016,
0.02132774516940117,
0.043048322200775146,
-0.049882497638463974,
-0.05850131809711456,
-0.05814561992883682,
-0.016422804445028305,
-0.008905035443603992,
-0.05186919495463371,
0.05550038069486618,
-0.07716493308544159,
-0.014407391659915447,
0.0008095275843515992,
-0.056612879037857056,
0.0046262419782578945,
0.03244708105921745,
0.057928383350372314,
-0.013660406693816185,
0.06769102066755295,
-0.11216192692518234,
-0.11768116056919098,
0.06316342949867249,
0.09084164351224899,
-0.036234647035598755,
0.030637895688414574,
-0.07454367727041245,
-0.11222907155752182,
-0.011240917257964611,
0.05581127852201462,
-0.005783953238278627,
0.02909548580646515,
-0.051388707011938095,
-0.07087065279483795,
-0.0016400526510551572,
-0.002286675851792097,
0.02105945162475109,
-0.09364323318004608,
-0.022538911551237106,
-0.0013843164779245853,
-0.030559221282601357,
-0.08076946437358856,
-0.011882083490490913,
0.03623229265213013,
-0.02430112101137638,
0.004538400564342737,
-0.14493688941001892,
0.08360638469457626,
0.006308910436928272,
-0.030844325199723244,
-0.0035850596614181995,
0.022715257480740547,
-0.02414318360388279,
0.06480266153812408,
0.04892891272902489,
0.06888443976640701,
-0.0035863679368048906,
-0.06869876384735107,
-0.011513668112456799,
-0.03608278930187225,
-0.03136903792619705,
0.029299870133399963,
-0.01762886345386505,
0.04577108100056648,
0.04129556939005852,
0.013970918022096157,
0.04624394327402115,
0.02035881020128727,
0.05442412570118904,
-0.05812711641192436,
0.015688864514231682,
0.0034989165142178535,
-0.005926920101046562,
0.042975928634405136,
-0.08263617753982544,
0.04073803871870041,
0.03564136475324631,
-0.03229467570781708,
0.04342573508620262,
-0.007736261002719402,
-0.03630666062235832,
-0.07568816840648651,
0.09044656902551651,
0.026440847665071487,
-0.03232672065496445,
0.026522375643253326,
0.07567818462848663,
-0.0582701712846756,
0.04480203613638878,
-0.04704965651035309,
0.015582993626594543,
-0.07239244878292084,
-0.03016345016658306,
-0.10018056631088257,
-1.2359384172783634e-32,
0.10400860756635666,
0.044993624091148376,
0.02766009047627449,
0.0024169806856662035,
0.004165755119174719,
-0.0097615672275424,
0.03815627470612526,
0.15820622444152832,
0.011651573702692986,
0.01711256615817547,
0.0059722065925598145,
0.011233460158109665,
0.018075497820973396,
0.041972432285547256,
-0.14249484241008759,
0.0281948484480381,
-0.07538280636072159,
-0.10071596503257751,
0.0062464396469295025,
0.02229982614517212,
-0.03872684761881828,
0.009944088757038116,
0.05284949019551277,
0.09205370396375656,
-0.019755074754357338,
0.03944585844874382,
0.058968957513570786,
-0.019780952483415604,
-0.05666813254356384,
-0.07106126844882965,
-0.015029758214950562,
-0.08844152837991714,
-0.04328223317861557,
0.0722254142165184,
-0.02539925090968609,
-0.06441476941108704,
0.018868463113904,
0.06018916890025139,
-0.01944132335484028,
-0.03338690847158432,
0.013825789093971252,
0.06725495308637619,
-0.0029108477756381035,
-0.008502577431499958,
-0.0854356661438942,
-0.0379042811691761,
0.13861018419265747,
-0.04346008971333504,
0.021116629242897034,
-0.07913632690906525,
-0.03371449187397957,
0.0030739298090338707,
-0.03570717200636864,
0.1291843205690384,
0.011990093626081944,
0.010703894309699535,
-0.0020556855015456676,
0.0006944449851289392,
-0.023500610142946243,
0.03837558627128601,
0.04917967692017555,
-0.029576478525996208,
0.06508205831050873,
0.022727293893694878,
0.024953559041023254,
-0.0003891899832524359,
-0.10371246188879013,
0.007000552490353584,
-0.0250317994505167,
0.07113207131624222,
-0.0024293847382068634,
-0.005679008550941944,
-0.02721257321536541,
0.016710445284843445,
-0.018517732620239258,
0.00425360631197691,
0.005229830276221037,
-0.02627921849489212,
0.09702326357364655,
-0.000956302450504154,
-0.07717327028512955,
0.08445631712675095,
-0.13119737803936005,
-0.003200734965503216,
-0.016231555491685867,
0.03540782630443573,
0.06221172958612442,
0.04200522229075432,
0.11384594440460205,
0.037339020520448685,
-0.03744339570403099,
0.013199123553931713,
-0.12053432315587997,
0.031004467979073524,
-0.058145444840192795,
-6.23241476205294e-8,
0.02121988870203495,
0.04529622942209244,
-0.002776703331619501,
0.012158381752669811,
0.07917772978544235,
-0.044525258243083954,
0.10890153795480728,
-0.04385918378829956,
-0.02020038291811943,
-0.04701995104551315,
0.019910207018256187,
0.025701774284243584,
-0.07533001899719238,
0.03431320562958717,
0.058305107057094574,
-0.05422746762633324,
-0.05346124619245529,
0.03641795739531517,
0.04150193929672241,
-0.09681767225265503,
-0.06971242278814316,
-0.016961190849542618,
0.02904278039932251,
-0.039608828723430634,
0.0334872305393219,
0.04789932817220688,
0.060738157480955124,
0.0474085696041584,
0.012953274883329868,
0.006850137375295162,
0.01145251840353012,
0.0031948236282914877,
-0.044380541890859604,
-0.01980847865343094,
-0.02986406907439232,
0.0302863959223032,
-0.1647186428308487,
0.0685223639011383,
0.024502098560333252,
0.039051130414009094,
-0.019902538508176804,
-0.022417457774281502,
0.006813661195337772,
0.013025679625570774,
-0.04348726198077202,
0.03909382224082947,
0.0054921796545386314,
0.03590049967169762,
0.01165428850799799,
-0.0630403533577919,
0.00936079677194357,
-0.09931065142154694,
-0.012928709387779236,
0.05298113822937012,
-0.04171731695532799,
0.04998134821653366,
0.060830891132354736,
-0.02520333230495453,
0.02604808285832405,
-0.026285681873559952,
0.026376117020845413,
-0.023781506344676018,
-0.03647497668862343,
0.027745502069592476
] | 0.092901
|
It does not wait for the 5 replicas of `nginx:1.14.2` to be created before changing course. ### Label selector updates It is generally discouraged to make label selector updates and it is suggested to plan your selectors up front. In any case, if you need to perform a label selector update, exercise great caution and make sure you have grasped all of the implications. {{< note >}} In API version `apps/v1`, a Deployment's label selector is immutable after it gets created. {{< /note >}} \* Selector additions require the Pod template labels in the Deployment spec to be updated with the new label too, otherwise a validation error is returned. This change is a non-overlapping one, meaning that the new selector does not select ReplicaSets and Pods created with the old selector, resulting in orphaning all old ReplicaSets and creating a new ReplicaSet. \* Selector updates changes the existing value in a selector key -- result in the same behavior as additions. \* Selector removals removes an existing key from the Deployment selector -- do not require any changes in the Pod template labels. Existing ReplicaSets are not orphaned, and a new ReplicaSet is not created, but note that the removed label still exists in any existing Pods and ReplicaSets. ## Rolling Back a Deployment Sometimes, you may want to rollback a Deployment; for example, when the Deployment is not stable, such as crash looping. By default, all of the Deployment's rollout history is kept in the system so that you can rollback anytime you want (you can change that by modifying revision history limit). {{< note >}} A Deployment's revision is created when a Deployment's rollout is triggered. This means that the new revision is created if and only if the Deployment's Pod template (`.spec.template`) is changed, for example if you update the labels or container images of the template. Other updates, such as scaling the Deployment, do not create a Deployment revision, so that you can facilitate simultaneous manual- or auto-scaling. This means that when you roll back to an earlier revision, only the Deployment's Pod template part is rolled back. {{< /note >}} \* Suppose that you made a typo while updating the Deployment, by putting the image name as `nginx:1.161` instead of `nginx:1.16.1`: ```shell kubectl set image deployment/nginx-deployment nginx=nginx:1.161 ``` The output is similar to this: ``` deployment.apps/nginx-deployment image updated ``` \* The rollout gets stuck. You can verify it by checking the rollout status: ```shell kubectl rollout status deployment/nginx-deployment ``` The output is similar to this: ``` Waiting for rollout to finish: 1 out of 3 new replicas have been updated... ``` \* Press Ctrl-C to stop the above rollout status watch. For more information on stuck rollouts, [read more here](#deployment-status). \* You see that the number of old replicas (adding the replica count from `nginx-deployment-1564180365` and `nginx-deployment-2035384211`) is 3, and the number of new replicas (from `nginx-deployment-3066724191`) is 1. ```shell kubectl get rs ``` The output is similar to this: ``` NAME DESIRED CURRENT READY AGE nginx-deployment-1564180365 3 3 3 25s nginx-deployment-2035384211 0 0 0 36s nginx-deployment-3066724191 1 1 0 6s ``` \* Looking at the Pods created, you see that 1 Pod created by new ReplicaSet is stuck in an image pull loop. ```shell kubectl get pods ``` The output is similar to this: ``` NAME READY STATUS RESTARTS AGE nginx-deployment-1564180365-70iae 1/1 Running 0 25s nginx-deployment-1564180365-jbqqo 1/1 Running 0 25s nginx-deployment-1564180365-hysrc 1/1 Running 0 25s nginx-deployment-3066724191-08mng 0/1 ImagePullBackOff 0 6s ``` {{< note >}} The Deployment controller stops the bad rollout automatically, and stops scaling up the new ReplicaSet. This depends on the
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/deployment.md
|
[
-0.0499732531607151,
0.011317032389342785,
0.05559639260172844,
-0.004511107690632343,
0.0785587951540947,
-0.0013300549471750855,
0.021968845278024673,
-0.10648223012685776,
0.03705145791172981,
0.04084146395325661,
0.057027678936719894,
-0.03205140680074692,
-0.04382448270916939,
-0.04592873528599739,
0.08357779681682587,
-0.00612101424485445,
0.06411848962306976,
-0.0208148006349802,
-0.0326976515352726,
-0.02976255677640438,
-0.0016264549922198057,
0.019105199724435806,
0.05588319152593613,
0.04798333719372749,
-0.038059379905462265,
0.04927938058972359,
-0.07353799790143967,
-0.00812462903559208,
0.082117460668087,
-0.03216440603137016,
-0.04403695836663246,
0.03841817006468773,
-0.005714842583984137,
0.012415898963809013,
0.022480245679616928,
0.05978444218635559,
0.010856213048100471,
-0.020796218886971474,
0.00745304673910141,
0.037374820560216904,
0.09544836729764938,
-0.043056290596723557,
-0.11632123589515686,
-0.024964595213532448,
-0.06863023340702057,
-0.0004935807664878666,
-0.01477485429495573,
-0.02256292849779129,
-0.07737725228071213,
0.029814420267939568,
0.00024515774566680193,
-0.15086886286735535,
-0.009525694884359837,
-0.04404834285378456,
0.009640734642744064,
0.04411016032099724,
0.013805124908685684,
0.043132178485393524,
0.05768413841724396,
0.045282572507858276,
0.05963519215583801,
-0.07851844280958176,
-0.0070615797303617,
-0.014179619960486889,
0.06275177747011185,
-0.04744137078523636,
-0.038972366601228714,
-0.07067792117595673,
0.028807535767555237,
0.02705683931708336,
0.05684792250394821,
0.04821477085351944,
0.053998470306396484,
-0.042917270213365555,
-0.0480668805539608,
0.00010854750871658325,
-0.060626350343227386,
0.07970409095287323,
0.04204583168029785,
-0.061445433646440506,
0.033385250717401505,
0.03937201946973801,
0.04020676016807556,
0.013016542419791222,
-0.012837793678045273,
-0.023863406851887703,
0.04499148949980736,
-0.0064875357784330845,
-0.0378066748380661,
-0.018053581938147545,
0.06693467497825623,
-0.07371585816144943,
0.040474988520145416,
0.0038352967239916325,
-0.028562435880303383,
0.055301230400800705,
-0.06495198607444763,
0.04570842534303665,
0.03971022740006447,
0.02202211506664753,
0.0012096855789422989,
-0.03492743521928787,
-0.02002301812171936,
-0.0002532694779802114,
0.0034540980122983456,
-0.06565839052200317,
-0.08520616590976715,
-0.0013358438154682517,
0.024876337498426437,
0.04602853208780289,
0.03272128850221634,
0.0062287249602377415,
-0.024324407801032066,
0.029064694419503212,
-0.10361576825380325,
0.06746646761894226,
-0.029710814356803894,
-0.012099670246243477,
0.005108056589961052,
0.12416147440671921,
0.0022283133585006,
-0.049113135784864426,
0.05256318673491478,
-0.018316984176635742,
-0.05275195091962814,
0.020379604771733284,
-0.006026612129062414,
4.2526498304751155e-33,
0.04499775171279907,
-0.007722103968262672,
-0.09278863668441772,
-0.026457449421286583,
0.013473176397383213,
-0.04292507469654083,
-0.014374415390193462,
0.007544153369963169,
-0.030394265428185463,
-0.02888161689043045,
0.04742445424199104,
0.0506727360188961,
-0.07038972526788712,
-0.008691624738276005,
0.022202521562576294,
-0.13481371104717255,
-0.018100555986166,
0.08349522948265076,
0.07950948923826218,
-0.0006633464945480227,
-0.00134786288253963,
-0.04441994056105614,
-0.05623506382107735,
-0.027301549911499023,
0.042108722031116486,
0.016041377559304237,
-0.06960760056972504,
-0.011692479252815247,
-0.0199370626360178,
-0.002062335377559066,
0.006730350200086832,
-0.019806263968348503,
0.018660446628928185,
0.013866528868675232,
-0.08335836976766586,
-0.017902474850416183,
0.015343117527663708,
-0.032276496291160583,
-0.05936452001333237,
-0.08998802304267883,
0.031464893370866776,
0.04738391563296318,
0.0048353704623878,
-0.0013875910080969334,
0.013860110193490982,
-0.021738622337579727,
-0.03853191062808037,
-0.061487894505262375,
0.1070990264415741,
-0.02967989817261696,
-0.008733571507036686,
-0.04232553020119667,
0.006312229670584202,
-0.10034351795911789,
-0.005331746768206358,
0.013795345090329647,
0.017798515036702156,
0.024653561413288116,
-0.014528289437294006,
-0.041763827204704285,
0.03912900760769844,
-0.02916966751217842,
0.002152014058083296,
0.07549670338630676,
0.05163140594959259,
0.159620001912117,
0.05907740443944931,
-0.0461452417075634,
0.09593240171670914,
-0.0051202853210270405,
-0.05200550705194473,
0.07404874265193939,
-0.10037703067064285,
0.017250197008252144,
0.04814179614186287,
-0.07147470116615295,
-0.03895886614918709,
0.021594660356640816,
-0.050476931035518646,
0.03698570281267166,
-0.009913326241075993,
0.02293017879128456,
-0.12182080000638962,
0.12100769579410553,
0.01938563771545887,
-0.012785357423126698,
0.04243047162890434,
-0.02205507643520832,
0.01573158986866474,
0.027222827076911926,
0.019229240715503693,
0.0023562868591398,
-0.12620432674884796,
-0.009970497339963913,
-0.03562215343117714,
-5.1058967313568735e-33,
0.07926582545042038,
-0.033086732029914856,
0.05193450674414635,
0.07476602494716644,
-0.04370415583252907,
-0.041220493614673615,
0.0029477428179234266,
0.15513065457344055,
0.03335041552782059,
-0.059257086366415024,
0.030588382855057716,
0.01623421348631382,
-0.019549956545233727,
0.038603417575359344,
-0.13712121546268463,
0.022388389334082603,
-0.13796529173851013,
-0.06352625787258148,
0.061485085636377335,
0.023521719500422478,
0.004324695561081171,
-0.011231228709220886,
0.028291761875152588,
0.053240176290273666,
-0.017483612522482872,
0.012579245492815971,
0.06474675983190536,
0.006440891418606043,
0.0854433923959732,
-0.05622231960296631,
-0.03248291835188866,
-0.04423137381672859,
-0.03228553384542465,
0.004217231646180153,
0.0007373763364739716,
-0.017399420961737633,
0.015168129466474056,
0.05889182910323143,
-0.028950560837984085,
0.01770196482539177,
0.020812978968024254,
0.02304719015955925,
-0.07735179364681244,
-0.028547784313559532,
-0.034563589841127396,
-0.0723864734172821,
0.08133300393819809,
0.06304652243852615,
-0.04208684340119362,
-0.09355366975069046,
0.025700997561216354,
-0.008626483380794525,
-0.07092637568712234,
0.05134689435362816,
0.01371795404702425,
-0.011143672280013561,
-0.01085698138922453,
0.04224950820207596,
-0.05152629315853119,
0.04475824534893036,
-0.006182269658893347,
0.06316101551055908,
0.05139535665512085,
-0.01130170002579689,
0.0028834629338234663,
0.033759765326976776,
-0.0783633440732956,
-0.016390981152653694,
0.05956799164414406,
0.04168058559298515,
0.07283361256122589,
-0.028700318187475204,
-0.04610686004161835,
-0.06928137689828873,
-0.07179282605648041,
-0.05124235153198242,
0.011753734201192856,
-0.02766961045563221,
0.04217248409986496,
-0.013743755407631397,
-0.04908526688814163,
0.11299754679203033,
-0.09332578629255295,
0.06891664117574692,
0.04271881654858589,
0.06273042410612106,
0.09373308718204498,
0.05353407561779022,
0.056658219546079636,
0.08592229336500168,
0.03265929967164993,
-0.006777220405638218,
-0.03280479088425636,
0.06459861993789673,
-0.1180359348654747,
-5.586291962345058e-8,
-0.017161855474114418,
0.052331846207380295,
-0.04123470187187195,
0.07485909014940262,
0.05011790990829468,
-0.004854063503444195,
0.05372915044426918,
-0.049342796206474304,
-0.023218197748064995,
-0.0005777892656624317,
-0.006920287851244211,
0.04828161001205444,
-0.01830291748046875,
0.03324868902564049,
-0.02644946053624153,
0.02838236838579178,
0.005962328985333443,
0.025430239737033844,
-0.0021043787710368633,
-0.040495093911886215,
-0.1012926995754242,
-0.00749961519613862,
0.08256636559963226,
-0.01808072067797184,
0.010973159223794937,
-0.006334241945296526,
0.021063538268208504,
-0.029304396361112595,
0.024139760062098503,
-0.009183095768094063,
0.01705458201467991,
0.012679746374487877,
0.02098502777516842,
0.056017644703388214,
0.00912514142692089,
-0.018532807007431984,
-0.17035025358200073,
-0.02823471836745739,
0.1356317400932312,
0.02843368612229824,
-0.045455869287252426,
-0.07752694934606552,
-0.06278292089700699,
-0.014285543002188206,
-0.04229087382555008,
-0.006220318842679262,
-0.0208908598870039,
-0.03401610255241394,
-0.020892344415187836,
-0.007408970035612583,
-0.030307702720165253,
-0.03240904584527016,
-0.060831159353256226,
-0.007603773847222328,
0.031437285244464874,
0.027242431417107582,
0.033388350158929825,
-0.02988836169242859,
0.05660581961274147,
-0.03765233978629112,
0.06149552762508392,
-0.07011003792285919,
0.03772846236824989,
-0.055454887449741364
] | 0.104307
|
this: ``` NAME READY STATUS RESTARTS AGE nginx-deployment-1564180365-70iae 1/1 Running 0 25s nginx-deployment-1564180365-jbqqo 1/1 Running 0 25s nginx-deployment-1564180365-hysrc 1/1 Running 0 25s nginx-deployment-3066724191-08mng 0/1 ImagePullBackOff 0 6s ``` {{< note >}} The Deployment controller stops the bad rollout automatically, and stops scaling up the new ReplicaSet. This depends on the rollingUpdate parameters (`maxUnavailable` specifically) that you have specified. Kubernetes by default sets the value to 25%. {{< /note >}} \* Get the description of the Deployment: ```shell kubectl describe deployment ``` The output is similar to this: ``` Name: nginx-deployment Namespace: default CreationTimestamp: Tue, 15 Mar 2016 14:48:04 -0700 Labels: app=nginx Selector: app=nginx Replicas: 3 desired | 1 updated | 4 total | 3 available | 1 unavailable StrategyType: RollingUpdate MinReadySeconds: 0 RollingUpdateStrategy: 25% max unavailable, 25% max surge Pod Template: Labels: app=nginx Containers: nginx: Image: nginx:1.161 Port: 80/TCP Host Port: 0/TCP Environment: Mounts: Volumes: Conditions: Type Status Reason ---- ------ ------ Available True MinimumReplicasAvailable Progressing True ReplicaSetUpdated OldReplicaSets: nginx-deployment-1564180365 (3/3 replicas created) NewReplicaSet: nginx-deployment-3066724191 (1/1 replicas created) Events: FirstSeen LastSeen Count From SubObjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 1m 1m 1 {deployment-controller } Normal ScalingReplicaSet Scaled up replica set nginx-deployment-2035384211 to 3 22s 22s 1 {deployment-controller } Normal ScalingReplicaSet Scaled up replica set nginx-deployment-1564180365 to 1 22s 22s 1 {deployment-controller } Normal ScalingReplicaSet Scaled down replica set nginx-deployment-2035384211 to 2 22s 22s 1 {deployment-controller } Normal ScalingReplicaSet Scaled up replica set nginx-deployment-1564180365 to 2 21s 21s 1 {deployment-controller } Normal ScalingReplicaSet Scaled down replica set nginx-deployment-2035384211 to 1 21s 21s 1 {deployment-controller } Normal ScalingReplicaSet Scaled up replica set nginx-deployment-1564180365 to 3 13s 13s 1 {deployment-controller } Normal ScalingReplicaSet Scaled down replica set nginx-deployment-2035384211 to 0 13s 13s 1 {deployment-controller } Normal ScalingReplicaSet Scaled up replica set nginx-deployment-3066724191 to 1 ``` To fix this, you need to rollback to a previous revision of Deployment that is stable. ### Checking Rollout History of a Deployment Follow the steps given below to check the rollout history: 1. First, check the revisions of this Deployment: ```shell kubectl rollout history deployment/nginx-deployment ``` The output is similar to this: ``` deployments "nginx-deployment" REVISION CHANGE-CAUSE 1 2 3 ``` `CHANGE-CAUSE` is copied from the Deployment annotation `kubernetes.io/change-cause` to its revisions upon creation. You can specify the`CHANGE-CAUSE` message by: \* Annotating the Deployment with `kubectl annotate deployment/nginx-deployment kubernetes.io/change-cause="image updated to 1.16.1"` \* Manually editing the manifest of the resource. \* Using tooling that sets the annotation automatically. {{< note >}} In older versions of Kubernetes, you could use the `--record` flag with kubectl commands to automatically populate the `CHANGE-CAUSE` field. This flag is deprecated and will be removed in a future release. {{< /note >}} 2. To see the details of each revision, run: ```shell kubectl rollout history deployment/nginx-deployment --revision=2 ``` The output is similar to this: ``` deployments "nginx-deployment" revision 2 Labels: app=nginx pod-template-hash=1159050644 Containers: nginx: Image: nginx:1.16.1 Port: 80/TCP QoS Tier: cpu: BestEffort memory: BestEffort Environment Variables: No volumes. ``` ### Rolling Back to a Previous Revision Follow the steps given below to rollback the Deployment from the current version to the previous version, which is version 2. 1. Now you've decided to undo the current rollout and rollback to the previous revision: ```shell kubectl rollout undo deployment/nginx-deployment ``` The output is similar to this: ``` deployment.apps/nginx-deployment rolled back ``` Alternatively, you can rollback to a specific revision by specifying it with `--to-revision`: ```shell kubectl rollout undo deployment/nginx-deployment --to-revision=2 ``` The output is similar to this: ``` deployment.apps/nginx-deployment rolled back ``` For more details about rollout related commands, read [`kubectl rollout`](/docs/reference/generated/kubectl/kubectl-commands#rollout). The Deployment is now rolled back to
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/deployment.md
|
[
0.01654023677110672,
-0.008502444252371788,
0.020521214231848717,
-0.030941428616642952,
-0.07813623547554016,
-0.02420809492468834,
-0.09635210037231445,
-0.013147410936653614,
0.023766329512000084,
0.0648624449968338,
0.02855474315583706,
-0.0010521782096475363,
0.01041200291365385,
-0.02134815976023674,
0.003438596148043871,
-0.001928840298205614,
-0.01440979540348053,
0.017713205888867378,
-0.13026680052280426,
-0.023652195930480957,
-0.033528219908475876,
-0.03395399823784828,
-0.008206193335354328,
0.00978431012481451,
-0.0067626722157001495,
0.020254945382475853,
-0.12749850749969482,
-0.05269978567957878,
0.05688024312257767,
-0.04134352505207062,
-0.044904496520757675,
0.03496764972805977,
-0.03535465896129608,
-0.04215727001428604,
0.06135537847876549,
0.10580079257488251,
-0.03202615678310394,
-0.042305536568164825,
-0.037453681230545044,
0.03342371806502342,
0.0873209685087204,
0.0138197410851717,
-0.10501264035701752,
-0.07987843453884125,
0.005642327945679426,
-0.004316280130296946,
-0.01990705356001854,
0.02170105092227459,
0.032024357467889786,
-0.020851457491517067,
0.009241389110684395,
-0.09121116995811462,
-0.002538211178034544,
0.045245252549648285,
0.01723897084593773,
-0.03296656534075737,
-0.018713388592004776,
0.06193649768829346,
0.12958694994449615,
0.02271522954106331,
0.014335296116769314,
0.037413761019706726,
0.04643123596906662,
-0.03790941834449768,
0.005879207979887724,
-0.05792279541492462,
0.02349216304719448,
-0.11259842664003372,
-0.012430895119905472,
0.04551061615347862,
0.05764669552445412,
0.021221892908215523,
-0.07047886401414871,
-0.009945430792868137,
0.03807985037565231,
-0.0014658747240900993,
-0.07400727272033691,
0.0003764568828046322,
0.04630503058433533,
-0.013730178587138653,
0.04181975498795509,
-0.05560801923274994,
0.0387888140976429,
0.021123504266142845,
-0.0984238013625145,
-0.08462661504745483,
0.05176670476794243,
-0.008765664882957935,
0.031365178525447845,
-0.031201299279928207,
0.020466212183237076,
0.045993369072675705,
-0.019738350063562393,
-0.012925921939313412,
0.04767373949289322,
0.0044020176865160465,
-0.047311920672655106,
0.08592063188552856,
0.006429002154618502,
-0.02178938500583172,
0.021444834768772125,
-0.00544974347576499,
0.06946104019880295,
0.04115511476993561,
0.037922874093055725,
-0.05753554403781891,
-0.0365501344203949,
-0.004176549147814512,
0.003831425914540887,
0.029897717759013176,
0.01994115673005581,
0.037795599550008774,
0.018506348133087158,
0.045552268624305725,
0.020081350579857826,
0.01365121640264988,
-0.024634145200252533,
0.024118700996041298,
-0.07660910487174988,
0.062749482691288,
0.09664861857891083,
-0.02197478711605072,
0.0019613238982856274,
0.01913239248096943,
-0.041136112064123154,
0.08782416582107544,
0.053381677716970444,
8.392934155955128e-33,
0.010011282749474049,
-0.07093140482902527,
0.04323311895132065,
0.03335465490818024,
0.05366318300366402,
-0.06443733721971512,
-0.09713435173034668,
-0.05317124351859093,
-0.01959862746298313,
-0.016898203641176224,
-0.0177609845995903,
0.03784331679344177,
-0.11331011354923248,
0.029799699783325195,
0.011724286712706089,
-0.07292007654905319,
0.005823385901749134,
0.004506878089159727,
0.08757273107767105,
0.01724284701049328,
0.08392909169197083,
-0.10249164700508118,
-0.07484108954668045,
0.05364253371953964,
0.04524094611406326,
-0.028559893369674683,
0.028137095272541046,
-0.013132450170814991,
-0.1355491429567337,
-0.016377083957195282,
-0.004439585842192173,
-0.0009384297300130129,
0.016442585736513138,
-0.0637417882680893,
-0.11511795222759247,
-0.04936670511960983,
-0.000034470405807951465,
0.02936244010925293,
-0.1241970807313919,
-0.020315470173954964,
-0.041515983641147614,
0.026850029826164246,
-0.09057743102312088,
-0.010961301624774933,
0.024249060079455376,
-0.04741367697715759,
0.0543038547039032,
-0.11898426711559296,
0.06980514526367188,
0.01701112650334835,
-0.021268537268042564,
-0.04846513271331787,
0.013188359327614307,
-0.035097669810056686,
0.018299290910363197,
0.044426675885915756,
0.14891333878040314,
-0.0493771955370903,
-0.08963185548782349,
-0.028779907152056694,
0.017583195120096207,
-0.06702116876840591,
0.014840411953628063,
0.03526674211025238,
0.08719972521066666,
0.021070223301649094,
0.033970315009355545,
0.028794823214411736,
-0.07270433008670807,
0.03862388804554939,
-0.035487305372953415,
0.04549223184585571,
-0.015359340235590935,
-0.05609901621937752,
0.046920452266931534,
-0.09262186288833618,
0.06327231228351593,
0.05797317624092102,
-0.03371214494109154,
0.05056150257587433,
0.05808005481958389,
-0.024082712829113007,
-0.055807702243328094,
-0.005472635850310326,
0.008203953504562378,
-0.06670297682285309,
0.008445451967418194,
0.030928991734981537,
-0.0640852227807045,
0.03898998349905014,
0.0013868664391338825,
-0.015696702525019646,
-0.022232627496123314,
0.03494659811258316,
-0.04687584191560745,
-8.054699615501431e-33,
0.045709237456321716,
0.005054195877164602,
0.026487452909350395,
0.03264502435922623,
0.011469378136098385,
0.017321819439530373,
0.00438321940600872,
0.1940128207206726,
-0.00430442625656724,
-0.05382586270570755,
0.03683467209339142,
-0.05322706326842308,
-0.029355626553297043,
0.06984886527061462,
-0.1372862011194229,
-0.03631608933210373,
-0.021593132987618446,
-0.024345245212316513,
-0.004680364392697811,
0.0145444106310606,
0.017647337168455124,
-0.029000042006373405,
0.03228354826569557,
0.08772079646587372,
0.04584232717752457,
0.0037972081918269396,
-0.0047591254115104675,
0.026228399947285652,
0.004269225988537073,
-0.04340468347072601,
0.017063606530427933,
-0.07266168296337128,
0.022199228405952454,
0.056263599544763565,
0.004907088354229927,
-0.03170681372284889,
-0.0363970547914505,
0.06606324762105942,
0.016335291787981987,
-0.060957130044698715,
0.042411670088768005,
0.02464822307229042,
-0.01829671487212181,
-0.01725289598107338,
-0.015727229416370392,
-0.05059933662414551,
0.060366660356521606,
-0.05024569481611252,
0.060607124119997025,
-0.06306923925876617,
-0.012226946651935577,
0.029109375551342964,
0.037995845079422,
0.12597812712192535,
0.022582774981856346,
0.03763094171881676,
0.0006016517290845513,
0.07462649792432785,
-0.051356520503759384,
0.005604234058409929,
0.022561369463801384,
-0.019046161323785782,
0.0674315020442009,
0.01232797559350729,
-0.0020401165820658207,
0.06686307489871979,
-0.059097371995449066,
0.04209721088409424,
-0.004605274181813002,
0.07465431839227676,
0.014391375705599785,
-0.003971650265157223,
-0.007385545875877142,
0.022589461877942085,
-0.03348973020911217,
-0.03762755170464516,
-0.024663081392645836,
-0.05536385253071785,
0.09398441016674042,
-0.04599718749523163,
-0.04181836545467377,
0.08020100742578506,
-0.1367609202861786,
-0.0007789249066263437,
0.017411569133400917,
0.02777290903031826,
0.015430834144353867,
0.04844624176621437,
0.11686103045940399,
0.12524442374706268,
-0.021807441487908363,
-0.04623127356171608,
-0.07492939382791519,
0.01752607338130474,
-0.08801685273647308,
-5.426995031143633e-8,
-0.035875577479600906,
0.046921614557504654,
-0.03195624053478241,
0.045096155256032944,
0.08619372546672821,
-0.06977353245019913,
0.09954895824193954,
-0.027739152312278748,
-0.0001769381487974897,
0.0006448245258070529,
0.0004613413766492158,
0.10613590478897095,
-0.020208600908517838,
0.02291257306933403,
0.02459447644650936,
-0.0593879297375679,
-0.03612508252263069,
0.012712881900370121,
0.07843822985887527,
-0.06833098083734512,
-0.07774029672145844,
-0.04246984422206879,
-0.0014339442132040858,
-0.0037745723966509104,
0.019768882542848587,
-0.00897307600826025,
0.048045095056295395,
0.07078830152750015,
-0.03114328347146511,
-0.027608439326286316,
0.0049605234526097775,
-0.02495034784078598,
-0.0019862705375999212,
0.028516747057437897,
-0.0476125031709671,
0.008509472012519836,
-0.15279421210289001,
0.05117486044764519,
0.02464360184967518,
-0.03470877930521965,
0.00021215745073277503,
0.026572877541184425,
-0.02268991619348526,
-0.025371994823217392,
-0.006703589111566544,
0.04536203294992447,
0.002172550419345498,
0.09674327075481415,
0.0006413260707631707,
-0.03138316050171852,
0.042005833238363266,
-0.05034838616847992,
0.001781537546776235,
0.0049435170367360115,
-0.039181899279356,
0.017533333972096443,
0.06178685650229454,
0.03473276644945145,
0.042828481644392014,
-0.006436919793486595,
-0.004863858222961426,
-0.0644187331199646,
-0.019265063107013702,
0.0029592132195830345
] | -0.00245
|
back ``` Alternatively, you can rollback to a specific revision by specifying it with `--to-revision`: ```shell kubectl rollout undo deployment/nginx-deployment --to-revision=2 ``` The output is similar to this: ``` deployment.apps/nginx-deployment rolled back ``` For more details about rollout related commands, read [`kubectl rollout`](/docs/reference/generated/kubectl/kubectl-commands#rollout). The Deployment is now rolled back to a previous stable revision. As you can see, a `DeploymentRollback` event for rolling back to revision 2 is generated from Deployment controller. 2. Check if the rollback was successful and the Deployment is running as expected, run: ```shell kubectl get deployment nginx-deployment ``` The output is similar to this: ``` NAME READY UP-TO-DATE AVAILABLE AGE nginx-deployment 3/3 3 3 30m ``` 3. Get the description of the Deployment: ```shell kubectl describe deployment nginx-deployment ``` The output is similar to this: ``` Name: nginx-deployment Namespace: default CreationTimestamp: Sun, 02 Sep 2018 18:17:55 -0500 Labels: app=nginx Annotations: deployment.kubernetes.io/revision=4 Selector: app=nginx Replicas: 3 desired | 3 updated | 3 total | 3 available | 0 unavailable StrategyType: RollingUpdate MinReadySeconds: 0 RollingUpdateStrategy: 25% max unavailable, 25% max surge Pod Template: Labels: app=nginx Containers: nginx: Image: nginx:1.16.1 Port: 80/TCP Host Port: 0/TCP Environment: Mounts: Volumes: Conditions: Type Status Reason ---- ------ ------ Available True MinimumReplicasAvailable Progressing True NewReplicaSetAvailable OldReplicaSets: NewReplicaSet: nginx-deployment-c4747d96c (3/3 replicas created) Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal ScalingReplicaSet 12m deployment-controller Scaled up replica set nginx-deployment-75675f5897 to 3 Normal ScalingReplicaSet 11m deployment-controller Scaled up replica set nginx-deployment-c4747d96c to 1 Normal ScalingReplicaSet 11m deployment-controller Scaled down replica set nginx-deployment-75675f5897 to 2 Normal ScalingReplicaSet 11m deployment-controller Scaled up replica set nginx-deployment-c4747d96c to 2 Normal ScalingReplicaSet 11m deployment-controller Scaled down replica set nginx-deployment-75675f5897 to 1 Normal ScalingReplicaSet 11m deployment-controller Scaled up replica set nginx-deployment-c4747d96c to 3 Normal ScalingReplicaSet 11m deployment-controller Scaled down replica set nginx-deployment-75675f5897 to 0 Normal ScalingReplicaSet 11m deployment-controller Scaled up replica set nginx-deployment-595696685f to 1 Normal DeploymentRollback 15s deployment-controller Rolled back deployment "nginx-deployment" to revision 2 Normal ScalingReplicaSet 15s deployment-controller Scaled down replica set nginx-deployment-595696685f to 0 ``` ## Scaling a Deployment You can scale a Deployment by using the following command: ```shell kubectl scale deployment/nginx-deployment --replicas=10 ``` The output is similar to this: ``` deployment.apps/nginx-deployment scaled ``` Assuming [horizontal Pod autoscaling](/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale/) is enabled in your cluster, you can set up an autoscaler for your Deployment and choose the minimum and maximum number of Pods you want to run based on the CPU utilization of your existing Pods. ```shell kubectl autoscale deployment/nginx-deployment --min=10 --max=15 --cpu-percent=80 ``` The output is similar to this: ``` deployment.apps/nginx-deployment scaled ``` ### Proportional scaling RollingUpdate Deployments support running multiple versions of an application at the same time. When you or an autoscaler scales a RollingUpdate Deployment that is in the middle of a rollout (either in progress or paused), the Deployment controller balances the additional replicas in the existing active ReplicaSets (ReplicaSets with Pods) in order to mitigate risk. This is called \*proportional scaling\*. For example, you are running a Deployment with 10 replicas, [maxSurge](#max-surge)=3, and [maxUnavailable](#max-unavailable)=2. \* Ensure that the 10 replicas in your Deployment are running. ```shell kubectl get deploy ``` The output is similar to this: ``` NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE nginx-deployment 10 10 10 10 50s ``` \* You update to a new image which happens to be unresolvable from inside the cluster. ```shell kubectl set image deployment/nginx-deployment nginx=nginx:sometag ``` The output is similar to this: ``` deployment.apps/nginx-deployment image updated ``` \* The image update starts a new rollout with ReplicaSet nginx-deployment-1989198191, but it's blocked due to the `maxUnavailable` requirement that you mentioned above. Check out the rollout status: ```shell kubectl get rs ``` The output
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/deployment.md
|
[
0.005352489184588194,
0.04299711436033249,
0.05643387511372566,
0.003839869750663638,
-0.05321458727121353,
-0.00517208082601428,
-0.09608915448188782,
-0.0982963889837265,
0.08576104044914246,
0.05495346337556839,
-0.00041222316212952137,
0.029555780813097954,
-0.03080853261053562,
-0.06475172936916351,
-0.012852601706981659,
-0.04852136969566345,
-0.05878497287631035,
0.12865732610225677,
-0.07231409847736359,
-0.02774200029671192,
-0.09369073808193207,
0.03628675267100334,
0.007913017645478249,
0.044556085020303726,
0.02654406987130642,
0.01907716877758503,
-0.046338848769664764,
0.039016302675008774,
0.022280948236584663,
-0.051513466984033585,
-0.04811074212193489,
0.024223139509558678,
-0.10992596298456192,
-0.03501364588737488,
-0.009912600740790367,
0.08452016860246658,
-0.05448548123240471,
0.034586936235427856,
0.012504282407462597,
0.02613544650375843,
0.05633148178458214,
0.05438311770558357,
-0.0712231993675232,
-0.14443644881248474,
-0.010422063060104847,
-0.036604687571525574,
-0.07661555707454681,
-0.0514543317258358,
0.024992799386382103,
-0.021199041977524757,
0.08203630149364471,
-0.09834841638803482,
-0.060213927179574966,
0.022829711437225342,
0.0033728121779859066,
0.02065024897456169,
-0.03638175129890442,
0.0734088197350502,
0.07466977089643478,
0.04886831343173981,
-0.014816581271588802,
0.01852654106914997,
0.013788636773824692,
-0.021411433815956116,
-0.029399367049336433,
-0.029129337519407272,
0.012235648930072784,
-0.10232900828123093,
0.017636816948652267,
0.046975187957286835,
0.03505363687872887,
-0.01757999323308468,
-0.0478222481906414,
-0.08217600733041763,
-0.007122342474758625,
0.020422274246811867,
-0.0022845931816846132,
0.08002471923828125,
-0.07881715893745422,
-0.018595632165670395,
0.07702695578336716,
-0.025742307305336,
0.024823730811476707,
0.05345200002193451,
-0.08733835071325302,
-0.09256838262081146,
0.06657763570547104,
-0.010167465545237064,
0.06452611088752747,
-0.011546348221600056,
-0.017126495018601418,
-0.014797983691096306,
0.10872345417737961,
-0.02646932564675808,
0.020741095766425133,
-0.01606661081314087,
0.0208517387509346,
0.1017053946852684,
0.05062396824359894,
0.027336448431015015,
0.028233589604496956,
-0.031903404742479324,
-0.0019031427800655365,
-0.03412313014268875,
0.036786261945962906,
-0.006176855880767107,
0.005963953677564859,
-0.06291823089122772,
0.03220571577548981,
0.028414251282811165,
0.0015298399375751615,
0.04032299295067787,
-0.023826442658901215,
0.013576597906649113,
-0.0014560127165168524,
0.029337480664253235,
-0.017696069553494453,
0.0254986509680748,
-0.023911569267511368,
0.0664539560675621,
0.058071646839380264,
-0.015547743998467922,
0.060412369668483734,
0.0009076993446797132,
-0.03673456609249115,
-0.02014612779021263,
0.109725221991539,
1.232960688049639e-33,
0.012474029324948788,
-0.062319252640008926,
-0.016730261966586113,
0.04819761961698532,
0.07375510782003403,
-0.019093312323093414,
-0.023889873176813126,
-0.07998213171958923,
0.0021114249248057604,
-0.0004923867527395487,
0.039170168340206146,
0.08682462573051453,
-0.10743843764066696,
0.002118628704920411,
0.01369232777506113,
-0.0014522196725010872,
-0.003621106268838048,
0.019969690591096878,
0.10192649811506271,
0.03611403703689575,
0.07483340054750443,
-0.03916618600487709,
-0.09517760574817657,
0.08127497881650925,
0.10711788386106491,
-0.009660250507295132,
0.033112816512584686,
-0.008227871730923653,
-0.13135512173175812,
-0.024331796914339066,
0.004112232010811567,
0.0027332548052072525,
0.024494044482707977,
-0.0520690456032753,
-0.10649994015693665,
-0.03508757799863815,
0.013219072483479977,
0.015643861144781113,
-0.06074730306863785,
0.018362486734986305,
0.039078883826732635,
0.00406336085870862,
-0.12207314372062683,
-0.05840093642473221,
0.045088618993759155,
-0.08938118815422058,
0.017845693975687027,
-0.09358441829681396,
0.14829076826572418,
-0.0453067421913147,
0.011229406110942364,
0.012396297417581081,
0.060011398047208786,
-0.012021237052977085,
0.032447244971990585,
0.050272136926651,
0.09078706055879593,
-0.05115535482764244,
-0.08291095495223999,
0.01629450172185898,
0.08859633654356003,
-0.0085458280518651,
-0.016520339995622635,
0.03197240084409714,
0.02532656118273735,
-0.02769986167550087,
-0.024756133556365967,
0.0432744100689888,
-0.05275069922208786,
-0.04434454068541527,
-0.08122552186250687,
0.010670028626918793,
-0.038450758904218674,
-0.040762729942798615,
0.02553120255470276,
-0.012155086733400822,
0.019857926294207573,
0.023943159729242325,
0.047975290566682816,
0.003261270932853222,
0.023820796981453896,
-0.08273223042488098,
-0.09792064130306244,
0.038625799119472504,
0.0465780645608902,
-0.02375807613134384,
-0.00439759436994791,
-0.02869962900876999,
-0.06663650274276733,
0.029799459502100945,
-0.04407564923167229,
-0.0013793240068480372,
-0.031847432255744934,
0.012268605642020702,
-0.011667639017105103,
-4.249427506585924e-33,
0.04197019711136818,
0.03403818607330322,
-0.026235373690724373,
0.037912704050540924,
-0.06075868010520935,
-0.03726527467370033,
-0.03637764975428581,
0.10324165970087051,
-0.06783552467823029,
-0.028857402503490448,
-0.02833074890077114,
-0.008346260525286198,
0.0455860011279583,
0.07648792862892151,
-0.09726754575967789,
0.015846526250243187,
-0.07071314752101898,
-0.007338806986808777,
-0.04174297675490379,
0.010904496535658836,
-0.01697707548737526,
-0.03176295384764671,
0.09944937378168106,
0.03548608347773552,
-0.02897825837135315,
0.002400618977844715,
0.03822462260723114,
0.05499343201518059,
-0.014918611384928226,
-0.021455498412251472,
0.02888340875506401,
-0.08642396330833435,
0.04088015481829643,
0.060353945940732956,
0.02248617634177208,
-0.07732460647821426,
-0.011836564168334007,
-0.012683456763625145,
-0.015669314190745354,
-0.04042007401585579,
0.014876370318233967,
0.0736725926399231,
0.021862154826521873,
-0.0007872609421610832,
-0.028409620746970177,
0.020055511966347694,
0.027797669172286987,
0.018435753881931305,
0.0976344645023346,
-0.08385296165943146,
-0.028178591281175613,
0.05481165647506714,
-0.010145342908799648,
0.07882581651210785,
-0.009217486716806889,
0.025329910218715668,
0.02872576005756855,
0.03407316654920578,
-0.07083680480718613,
0.05800081044435501,
-0.02526012621819973,
-0.03385830298066139,
0.13238073885440826,
0.018020175397396088,
-0.03997017443180084,
0.05820009484887123,
-0.07172571122646332,
0.02108481340110302,
-0.0375201590359211,
0.1080172210931778,
-0.006328013259917498,
0.03870406374335289,
-0.03295222297310829,
0.012015305459499359,
0.0547410286962986,
0.019849147647619247,
-0.0238037109375,
-0.030570678412914276,
0.07613611221313477,
-0.05970112234354019,
0.02337438426911831,
0.034048426896333694,
-0.12287726998329163,
-0.03745341673493385,
-0.028841476887464523,
-0.0019331556977704167,
0.004724940750747919,
0.015592796728014946,
0.08582419902086258,
0.016001570969820023,
0.0000542336238140706,
-0.041998159140348434,
-0.0833682268857956,
-0.034962985664606094,
-0.06411897391080856,
-4.413687193505211e-8,
-0.013833815231919289,
0.0470004603266716,
-0.016133250668644905,
0.057337116450071335,
0.08431464433670044,
-0.06653287261724472,
0.04544280841946602,
-0.018518229946494102,
-0.005332235246896744,
-0.10585667192935944,
-0.06377357244491577,
0.07031018286943436,
-0.006384438835084438,
0.051862359046936035,
-0.010664955712854862,
-0.008148557506501675,
-0.013742961920797825,
0.0022890507243573666,
0.09464812278747559,
-0.04547124728560448,
-0.13051049411296844,
-0.0395798422396183,
0.029011212289333344,
0.034293197095394135,
0.030454806983470917,
0.05014719069004059,
-0.001694779028184712,
0.055151402950286865,
-0.014050406403839588,
0.009775246493518353,
0.06701235473155975,
-0.019517578184604645,
-0.010963821783661842,
0.052384715527296066,
-0.034811098128557205,
-0.05500109866261482,
-0.10238098353147507,
0.013853727839887142,
0.09885744005441666,
0.009026127867400646,
0.004272453486919403,
0.014920483343303204,
-0.02273048460483551,
0.009928506799042225,
-0.04832795634865761,
-0.008636516518890858,
0.03557411581277847,
-0.00045366352424025536,
-0.050732385367155075,
-0.07229078561067581,
-0.026849141344428062,
-0.05127176269888878,
-0.032328810542821884,
0.016721509397029877,
-0.04254106059670448,
0.05336876958608627,
0.010301242582499981,
-0.0022445188369601965,
0.0007656574598513544,
-0.014230822212994099,
-0.02523970417678356,
-0.037564344704151154,
-0.009094729088246822,
-0.030764956027269363
] | -0.021827
|
image deployment/nginx-deployment nginx=nginx:sometag ``` The output is similar to this: ``` deployment.apps/nginx-deployment image updated ``` \* The image update starts a new rollout with ReplicaSet nginx-deployment-1989198191, but it's blocked due to the `maxUnavailable` requirement that you mentioned above. Check out the rollout status: ```shell kubectl get rs ``` The output is similar to this: ``` NAME DESIRED CURRENT READY AGE nginx-deployment-1989198191 5 5 0 9s nginx-deployment-618515232 8 8 8 1m ``` \* Then a new scaling request for the Deployment comes along. The autoscaler increments the Deployment replicas to 15. The Deployment controller needs to decide where to add these new 5 replicas. If you weren't using proportional scaling, all 5 of them would be added in the new ReplicaSet. With proportional scaling, you spread the additional replicas across all ReplicaSets. Bigger proportions go to the ReplicaSets with the most replicas and lower proportions go to ReplicaSets with less replicas. Any leftovers are added to the ReplicaSet with the most replicas. ReplicaSets with zero replicas are not scaled up. In our example above, 3 replicas are added to the old ReplicaSet and 2 replicas are added to the new ReplicaSet. The rollout process should eventually move all replicas to the new ReplicaSet, assuming the new replicas become healthy. To confirm this, run: ```shell kubectl get deploy ``` The output is similar to this: ``` NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE nginx-deployment 15 18 7 8 7m ``` The rollout status confirms how the replicas were added to each ReplicaSet. ```shell kubectl get rs ``` The output is similar to this: ``` NAME DESIRED CURRENT READY AGE nginx-deployment-1989198191 7 7 0 7m nginx-deployment-618515232 11 11 11 7m ``` ## Pausing and Resuming a rollout of a Deployment {#pausing-and-resuming-a-deployment} When you update a Deployment, or plan to, you can pause rollouts for that Deployment before you trigger one or more updates. When you're ready to apply those changes, you resume rollouts for the Deployment. This approach allows you to apply multiple fixes in between pausing and resuming without triggering unnecessary rollouts. \* For example, with a Deployment that was created: Get the Deployment details: ```shell kubectl get deploy ``` The output is similar to this: ``` NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE nginx 3 3 3 3 1m ``` Get the rollout status: ```shell kubectl get rs ``` The output is similar to this: ``` NAME DESIRED CURRENT READY AGE nginx-2142116321 3 3 3 1m ``` \* Pause by running the following command: ```shell kubectl rollout pause deployment/nginx-deployment ``` The output is similar to this: ``` deployment.apps/nginx-deployment paused ``` \* Then update the image of the Deployment: ```shell kubectl set image deployment/nginx-deployment nginx=nginx:1.16.1 ``` The output is similar to this: ``` deployment.apps/nginx-deployment image updated ``` \* Notice that no new rollout started: ```shell kubectl rollout history deployment/nginx-deployment ``` The output is similar to this: ``` deployments "nginx" REVISION CHANGE-CAUSE 1 ``` \* Get the rollout status to verify that the existing ReplicaSet has not changed: ```shell kubectl get rs ``` The output is similar to this: ``` NAME DESIRED CURRENT READY AGE nginx-2142116321 3 3 3 2m ``` \* You can make as many updates as you wish, for example, update the resources that will be used: ```shell kubectl set resources deployment/nginx-deployment -c=nginx --limits=cpu=200m,memory=512Mi ``` The output is similar to this: ``` deployment.apps/nginx-deployment resource requirements updated ``` The initial state of the Deployment prior to pausing its rollout will continue its function, but new updates to the Deployment will not have any effect as long as the Deployment rollout is paused. \* Eventually, resume the Deployment rollout and observe a new ReplicaSet
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/deployment.md
|
[
-0.007523454260081053,
0.018411923199892044,
0.02861206792294979,
-0.04886805638670921,
-0.008903325535356998,
-0.06343603134155273,
-0.06626361608505249,
-0.015217333100736141,
0.0066543505527079105,
0.05228164792060852,
0.04477850720286369,
-0.06528247892856598,
0.039027146995067596,
0.007410719059407711,
0.017186351120471954,
-0.017629418522119522,
-0.03751910477876663,
0.008174365386366844,
-0.11959832161664963,
-0.07536187767982483,
-0.01292891800403595,
-0.04967036843299866,
-0.002374841133132577,
0.010122096166014671,
0.017330314964056015,
0.03786369040608406,
-0.13828447461128235,
-0.046724602580070496,
0.08339928090572357,
-0.05932692438364029,
0.0010786432540044188,
0.04918188601732254,
-0.027801480144262314,
-0.010185522958636284,
0.041764941066503525,
0.09649403393268585,
-0.0658174380660057,
-0.023050611838698387,
-0.022677620872855186,
-0.0029606004245579243,
0.09680434316396713,
-0.01872568577528,
-0.09563782066106796,
-0.07021569460630417,
-0.014571883715689182,
-0.011892998591065407,
-0.05645746737718582,
0.00515342503786087,
0.003672930644825101,
-0.05439448729157448,
-0.05492835491895676,
-0.13215786218643188,
-0.03591373190283775,
0.08120717108249664,
0.03461495041847229,
-0.05888437479734421,
-0.03808995708823204,
-0.0023868444841355085,
0.11293244361877441,
-0.009602103382349014,
0.028441162779927254,
-0.003976544365286827,
0.004380849655717611,
-0.0030166783835738897,
-0.0025686966255307198,
-0.005810964852571487,
0.004275890998542309,
-0.09137088060379028,
-0.00899327453225851,
0.04394572600722313,
0.07328135520219803,
0.028211727738380432,
-0.04289254546165466,
-0.007903104647994041,
0.0052433917298913,
-0.028238480910658836,
-0.11835500597953796,
0.03192904219031334,
0.029057875275611877,
-0.059396564960479736,
0.030688589438796043,
-0.06667482107877731,
0.048746977001428604,
-0.020165739580988884,
-0.0670146718621254,
-0.036417677998542786,
0.03497049957513809,
-0.017598969861865044,
0.04432016983628273,
-0.01822994463145733,
0.00456278258934617,
0.03857467323541641,
-0.03969084471464157,
0.01349017582833767,
0.04241892322897911,
0.0069041443057358265,
-0.04145512357354164,
0.06738846004009247,
0.01917530596256256,
0.008048228919506073,
0.042246013879776,
-0.03260594606399536,
0.10082440078258514,
0.035153113305568695,
0.03463572636246681,
-0.05303429439663887,
-0.06588164716959,
0.021363267675042152,
0.006734834983944893,
0.012468329630792141,
-0.017052140086889267,
0.07516305893659592,
-0.0011162325972691178,
-0.016873953863978386,
-0.035759009420871735,
0.0070315576158463955,
0.011400127783417702,
-0.008873719722032547,
-0.028729325160384178,
0.08195659518241882,
0.09799274802207947,
-0.05385184288024902,
-0.012402926571667194,
-0.00008757457544561476,
-0.00976853258907795,
0.03415064886212349,
0.007165225688368082,
6.371734802537562e-33,
0.023043891414999962,
-0.058029405772686005,
0.008784684352576733,
0.01847860962152481,
0.06196578964591026,
-0.03802104666829109,
-0.09434705972671509,
-0.07981906831264496,
-0.061706189066171646,
-0.032216839492321014,
-0.03913206607103348,
0.05566573888063431,
-0.09821780025959015,
0.09577912837266922,
0.0297685619443655,
-0.10246045142412186,
0.01038808561861515,
0.08562235534191132,
0.07062190026044846,
0.009290157817304134,
0.06619150936603546,
-0.08137325942516327,
-0.10426732152700424,
0.03552694246172905,
0.018092546612024307,
-0.014212759211659431,
0.04565594345331192,
-0.018205463886260986,
-0.07615431398153305,
-0.0013799897860735655,
0.005433696322143078,
-0.007180183194577694,
0.0026740562170743942,
-0.00969246868044138,
-0.08694089949131012,
-0.05744936689734459,
0.034336451441049576,
-0.018362313508987427,
-0.1032930240035057,
-0.009051138535141945,
0.04583794251084328,
-0.00458352779969573,
-0.06818129122257233,
-0.003557899035513401,
0.0258919857442379,
0.010069753043353558,
0.011126701720058918,
-0.08153975009918213,
0.04610198363661766,
-0.0035876785404980183,
0.021474016830325127,
-0.022869303822517395,
0.015299562364816666,
-0.06255006790161133,
0.022250419482588768,
0.016472915187478065,
0.06989322602748871,
-0.038924865424633026,
-0.0361960269510746,
-0.004162706900388002,
0.012538081966340542,
-0.07901092618703842,
0.01498483307659626,
0.08178756386041641,
0.09847155213356018,
0.011828964576125145,
0.04229424521327019,
0.049357689917087555,
0.008370254188776016,
0.06554662436246872,
-0.023614821955561638,
0.08697381615638733,
-0.028113219887018204,
-0.030279703438282013,
0.042368847876787186,
-0.08950657397508621,
0.06394602358341217,
0.09576226025819778,
-0.050497543066740036,
0.056478794664144516,
-0.000507533026393503,
0.0007097529014572501,
-0.09196439385414124,
0.050969116389751434,
-0.010554533451795578,
-0.041028108447790146,
0.002186905825510621,
0.018803393468260765,
-0.07576598227024078,
-0.014223091304302216,
0.020524093881249428,
-0.037916399538517,
-0.04176352545619011,
-0.016457650810480118,
-0.05982568860054016,
-6.27702595737578e-33,
0.08682441711425781,
-0.0021706754341721535,
0.045365672558546066,
0.01409256923943758,
0.04758723825216293,
0.01728617586195469,
0.0017526239389553666,
0.14773274958133698,
0.010450998321175575,
-0.05007506161928177,
0.02122654765844345,
0.0018020713469013572,
-0.04409538209438324,
0.025302888825535774,
-0.1640295386314392,
-0.047061510384082794,
0.014198911376297474,
-0.03821919485926628,
0.013086160644888878,
-0.010934904217720032,
0.007267124485224485,
0.017002081498503685,
0.03827052563428879,
0.12444265931844711,
0.050974972546100616,
0.027099531143903732,
-0.0014447651337832212,
0.023200970143079758,
0.008095677010715008,
-0.0343003012239933,
-0.031086742877960205,
-0.05743110179901123,
-0.027124300599098206,
0.03670182451605797,
0.010903839021921158,
-0.03141820803284645,
0.01541872601956129,
0.09853864461183548,
-0.001301197218708694,
-0.045754626393318176,
0.031359050422906876,
-0.0031613365281373262,
-0.05088109150528908,
0.006873166188597679,
-0.022680899128317833,
-0.08200645446777344,
0.10175365209579468,
-0.048367295414209366,
0.07023763656616211,
-0.05647002533078194,
-0.0010842770570889115,
-0.00522112101316452,
0.01593998819589615,
0.09548836201429367,
0.011843113228678703,
0.006515934597700834,
-0.023878613486886024,
0.042423978447914124,
-0.0049263713881373405,
-0.015324252657592297,
0.05779563635587692,
-0.03443390130996704,
0.06463252753019333,
-0.03554673492908478,
-0.05166599527001381,
0.05417856201529503,
-0.09646032750606537,
-0.03182107210159302,
-0.06225361302495003,
0.11209183186292648,
0.01589495874941349,
-0.03408730775117874,
-0.007592547219246626,
0.032716862857341766,
-0.033795882016420364,
-0.05078941956162453,
0.042803093791007996,
-0.013584640808403492,
0.09351503849029541,
-0.03232056647539139,
-0.082355797290802,
0.06610418111085892,
-0.08978289365768433,
0.014630940742790699,
-0.0015290905721485615,
0.016491461545228958,
0.04331593960523605,
0.011551174335181713,
0.12273494154214859,
0.09655125439167023,
-0.054683372378349304,
-0.022986404597759247,
-0.07528669387102127,
0.03857149928808212,
-0.061452314257621765,
-5.1688115121351075e-8,
0.009982647374272346,
0.04655265808105469,
-0.08360902965068817,
0.030360201373696327,
0.1024373471736908,
-0.04587508365511894,
0.08925038576126099,
-0.007282603532075882,
0.011993478052318096,
-0.027100056409835815,
0.02593114972114563,
0.04859182611107826,
0.005121801979839802,
0.06908787041902542,
0.011224714107811451,
-0.02930370904505253,
-0.02483375184237957,
-0.00901100691407919,
0.020514430478215218,
-0.08171497285366058,
-0.1363314390182495,
0.0074269636534154415,
0.050361014902591705,
-0.0007290515932254493,
0.055041611194610596,
0.013323895633220673,
0.0038583504501730204,
0.052315786480903625,
-0.010312960483133793,
0.009582962840795517,
0.04477541148662567,
-0.012375224381685257,
-0.04164421558380127,
0.02134902961552143,
-0.031011860817670822,
0.01689906418323517,
-0.1572827845811844,
0.05344570428133011,
0.0058122179470956326,
-0.07989702373743057,
-0.016415657475590706,
-0.042222749441862106,
0.03121865727007389,
0.008367393165826797,
0.03408193960785866,
0.04161648079752922,
-0.017636194825172424,
0.053955283015966415,
0.006699238438159227,
-0.016318900510668755,
0.05519793555140495,
-0.07726895064115524,
0.011726364493370056,
0.03171659633517265,
-0.05040529742836952,
0.004407905507832766,
0.0753646120429039,
0.01636555790901184,
0.09142572432756424,
0.03526395559310913,
0.07150332629680634,
-0.06061704084277153,
0.008577344939112663,
0.026605840772390366
] | 0.068074
|
deployment.apps/nginx-deployment resource requirements updated ``` The initial state of the Deployment prior to pausing its rollout will continue its function, but new updates to the Deployment will not have any effect as long as the Deployment rollout is paused. \* Eventually, resume the Deployment rollout and observe a new ReplicaSet coming up with all the new updates: ```shell kubectl rollout resume deployment/nginx-deployment ``` The output is similar to this: ``` deployment.apps/nginx-deployment resumed ``` \* {{< glossary\_tooltip text="Watch" term\_id="watch" >}} the status of the rollout until it's done. ```shell kubectl get rs --watch ``` The output is similar to this: ``` NAME DESIRED CURRENT READY AGE nginx-2142116321 2 2 2 2m nginx-3926361531 2 2 0 6s nginx-3926361531 2 2 1 18s nginx-2142116321 1 2 2 2m nginx-2142116321 1 2 2 2m nginx-3926361531 3 2 1 18s nginx-3926361531 3 2 1 18s nginx-2142116321 1 1 1 2m nginx-3926361531 3 3 1 18s nginx-3926361531 3 3 2 19s nginx-2142116321 0 1 1 2m nginx-2142116321 0 1 1 2m nginx-2142116321 0 0 0 2m nginx-3926361531 3 3 3 20s ``` \* Get the status of the latest rollout: ```shell kubectl get rs ``` The output is similar to this: ``` NAME DESIRED CURRENT READY AGE nginx-2142116321 0 0 0 2m nginx-3926361531 3 3 3 28s ``` {{< note >}} You cannot rollback a paused Deployment until you resume it. {{< /note >}} ## Deployment status A Deployment enters various states during its lifecycle. It can be [progressing](#progressing-deployment) while rolling out a new ReplicaSet, it can be [complete](#complete-deployment), or it can [fail to progress](#failed-deployment). ### Progressing Deployment Kubernetes marks a Deployment as \_progressing\_ when one of the following tasks is performed: \* The Deployment creates a new ReplicaSet. \* The Deployment is scaling up its newest ReplicaSet. \* The Deployment is scaling down its older ReplicaSet(s). \* New Pods become ready or available (ready for at least [MinReadySeconds](#min-ready-seconds)). When the rollout becomes “progressing”, the Deployment controller adds a condition with the following attributes to the Deployment's `.status.conditions`: \* `type: Progressing` \* `status: "True"` \* `reason: NewReplicaSetCreated` | `reason: FoundNewReplicaSet` | `reason: ReplicaSetUpdated` You can monitor the progress for a Deployment by using `kubectl rollout status`. ### Complete Deployment Kubernetes marks a Deployment as \_complete\_ when it has the following characteristics: \* All of the replicas associated with the Deployment have been updated to the latest version you've specified, meaning any updates you've requested have been completed. \* All of the replicas associated with the Deployment are available. \* No old replicas for the Deployment are running. When the rollout becomes “complete”, the Deployment controller sets a condition with the following attributes to the Deployment's `.status.conditions`: \* `type: Progressing` \* `status: "True"` \* `reason: NewReplicaSetAvailable` This `Progressing` condition will retain a status value of `"True"` until a new rollout is initiated. The condition holds even when availability of replicas changes (which does instead affect the `Available` condition). You can check if a Deployment has completed by using `kubectl rollout status`. If the rollout completed successfully, `kubectl rollout status` returns a zero exit code. ```shell kubectl rollout status deployment/nginx-deployment ``` The output is similar to this: ``` Waiting for rollout to finish: 2 of 3 updated replicas are available... deployment "nginx-deployment" successfully rolled out ``` and the exit status from `kubectl rollout` is 0 (success): ```shell echo $? ``` ``` 0 ``` ### Failed Deployment Your Deployment may get stuck trying to deploy its newest ReplicaSet without ever completing. This can occur due to some of the following factors: \* Insufficient quota \* Readiness probe failures \* Image pull errors \* Insufficient permissions \* Limit ranges \*
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/deployment.md
|
[
-0.03106566146016121,
-0.03169054165482521,
0.02302495576441288,
-0.028776390478014946,
-0.008806188590824604,
-0.01882355846464634,
0.008160358294844627,
-0.11647798866033554,
0.0635155588388443,
0.03901444375514984,
0.0149576086550951,
0.0023486590944230556,
-0.008049572817981243,
-0.04049096256494522,
-0.011167949996888638,
0.010603292845189571,
0.040765244513750076,
-0.03474634513258934,
-0.05950993299484253,
-0.06755035370588303,
-0.024028168991208076,
0.048027992248535156,
0.0558316670358181,
0.045094091445207596,
-0.015182058326900005,
0.02442638948559761,
-0.08213774114847183,
-0.015556590631604195,
0.09110739082098007,
0.0011165037285536528,
-0.032338012009859085,
0.03665132448077202,
-0.0708116814494133,
0.002139038871973753,
0.06261339038610458,
0.11217880994081497,
-0.005680717062205076,
-0.007343886885792017,
-0.03773771971464157,
0.02931932546198368,
0.10009244084358215,
-0.010082538239657879,
-0.07510538399219513,
-0.06229381263256073,
-0.014848708175122738,
-0.024532927200198174,
-0.06025378033518791,
-0.0647224634885788,
0.0034344622399657965,
-0.05029353126883507,
-0.03578779846429825,
-0.11209405213594437,
-0.02055245451629162,
0.007253571413457394,
0.06799538433551788,
0.0023496418725699186,
-0.03257660195231438,
0.04079185426235199,
0.08792876452207565,
-0.028211405500769615,
-0.03842340409755707,
-0.01783772185444832,
-0.012776024639606476,
0.02499454654753208,
-0.03235679492354393,
0.04056483879685402,
-0.0349077470600605,
-0.07020408660173416,
0.009950247593224049,
-0.0007374249398708344,
-0.04313287511467934,
0.04922373965382576,
-0.03633980080485344,
-0.07043594866991043,
-0.04711243137717247,
0.025574155151844025,
0.000667663523927331,
0.012897471897304058,
-0.009230557829141617,
-0.1075020581483841,
0.015156982466578484,
-0.0590386763215065,
0.04351819306612015,
0.07109469920396805,
-0.05690309777855873,
-0.04004698619246483,
0.10774841159582138,
-0.042936332523822784,
0.032366394996643066,
0.010413624346256256,
0.03187335655093193,
-0.024007797241210938,
0.01894732005894184,
-0.02084704302251339,
-0.02197321318089962,
0.037923671305179596,
0.0023314415011554956,
0.10372790694236755,
-0.0410253070294857,
-0.02678483910858631,
0.041427403688430786,
-0.037168048322200775,
0.04054687172174454,
0.002199329901486635,
-0.043976955115795135,
-0.046927500516176224,
-0.06084226816892624,
-0.011867070570588112,
-0.007112336810678244,
0.053562458604574203,
0.025479672476649284,
0.057011865079402924,
-0.027140017598867416,
0.02647753804922104,
-0.07064826786518097,
0.0659375786781311,
-0.0714319571852684,
-0.0027736201882362366,
-0.011488336138427258,
0.14600245654582977,
0.18799377977848053,
-0.010621948167681694,
-0.030082644894719124,
-0.015564381144940853,
-0.0034391493536531925,
0.032000668346881866,
0.07368133962154388,
1.4229890844226545e-33,
0.04397273808717728,
-0.10391008853912354,
-0.05802240967750549,
0.04572067782282829,
0.02453908696770668,
-0.04525448754429817,
-0.10865161567926407,
-0.04430525749921799,
-0.016315635293722153,
0.0038741251919418573,
-0.042079366743564606,
0.06259319931268692,
-0.10449924319982529,
0.0011975362431257963,
0.03744252771139145,
-0.06482258439064026,
0.00846610777080059,
0.06907372176647186,
0.07353591918945312,
0.007497609592974186,
0.05891169235110283,
-0.07920382171869278,
-0.11956610530614853,
0.025321822613477707,
0.05959324538707733,
0.005622736643999815,
0.027721669524908066,
0.008367420174181461,
-0.08385446667671204,
0.017486488446593285,
-0.021564865484833717,
0.019222790375351906,
0.030255859717726707,
-0.00491492310538888,
-0.11304903775453568,
-0.0718621015548706,
-0.015086672268807888,
-0.015679722651839256,
-0.04678279906511307,
-0.05571339279413223,
0.030469398945569992,
0.02468515746295452,
-0.10353520512580872,
-0.031097814440727234,
0.02796006388962269,
-0.12743210792541504,
0.0027152763213962317,
-0.057486679404973984,
0.10433852672576904,
0.026852654293179512,
0.02284574694931507,
0.022305740043520927,
0.02778496965765953,
-0.05246163532137871,
0.0024880666751414537,
0.061100855469703674,
0.0687522441148758,
-0.044272176921367645,
-0.09442929178476334,
-0.00428140489384532,
-0.006303322501480579,
-0.03033100813627243,
0.0042991130612790585,
0.035247351974248886,
0.0947495549917221,
0.037315238267183304,
0.02055310271680355,
0.015881085768342018,
-0.037625670433044434,
0.0329587496817112,
-0.08338700979948044,
0.01780012995004654,
0.014020202681422234,
0.04450337588787079,
0.02893681451678276,
-0.036298882216215134,
-0.016969336196780205,
0.03010999597609043,
-0.011223348788917065,
0.013356675393879414,
0.09365840256214142,
-0.04922029376029968,
-0.11643069982528687,
0.025886528193950653,
0.07104343920946121,
-0.00866357609629631,
-0.0227083470672369,
-0.040054094046354294,
-0.10866842418909073,
0.019363226369023323,
-0.023924870416522026,
-0.014618024230003357,
-0.047975797206163406,
-0.025781944394111633,
-0.09675383567810059,
-5.950954477375231e-33,
0.10515066981315613,
-0.030887294560670853,
0.011545191518962383,
-0.0012603311333805323,
-0.003257317468523979,
-0.009745285846292973,
-0.01727450266480446,
0.11246587336063385,
0.009606263600289822,
-0.01357275526970625,
0.03093067742884159,
-0.00571717694401741,
-0.04629886522889137,
0.1173611432313919,
-0.09960184246301651,
0.012896277010440826,
-0.016749072819948196,
-0.003946478944271803,
-0.019769106060266495,
0.011434143409132957,
-0.013077213428914547,
-0.01833837479352951,
0.0447944812476635,
0.06155907362699509,
0.01826031506061554,
-0.0022434743586927652,
0.03138398379087448,
0.04919017478823662,
-0.025279412046074867,
-0.027596978470683098,
0.00849076360464096,
-0.052715495228767395,
-0.08391908556222916,
0.04294399544596672,
-0.024318980053067207,
-0.00797214638441801,
0.007286484818905592,
-0.027952563017606735,
-0.0010303948074579239,
0.004691280424594879,
0.07886525243520737,
0.03203543648123741,
-0.0031036774162203074,
-0.014083393849432468,
0.0009063688339665532,
-0.03081347979605198,
0.073777936398983,
0.011421053670346737,
-0.027815625071525574,
-0.12081828713417053,
-0.005368134938180447,
0.023750457912683487,
0.029203584417700768,
0.04383467137813568,
-0.022015633061528206,
0.03111521527171135,
0.0008652547840029001,
-0.016616683453321457,
-0.09845361858606339,
-0.034509848803281784,
0.08084554970264435,
-0.026936152949929237,
0.04140986502170563,
-0.011578000150620937,
-0.01263442449271679,
0.041655879467725754,
-0.013182423077523708,
-0.0020323186181485653,
-0.004308981820940971,
0.037281449884176254,
0.07156651467084885,
-0.031730879098176956,
-0.10365427285432816,
-0.03280310705304146,
-0.02671113796532154,
0.012645602226257324,
0.02347244881093502,
-0.1299104392528534,
0.007051178719848394,
-0.025099698454141617,
-0.04549827799201012,
0.05702697113156319,
-0.09994760155677795,
-0.015946047380566597,
-0.012691165320575237,
0.027171801775693893,
-0.029911182820796967,
0.06518322229385376,
0.12152813374996185,
0.04865838587284088,
-0.07112479954957962,
0.021684985607862473,
-0.10844186693429947,
0.06251803040504456,
-0.06115342676639557,
-4.8939050145691e-8,
-0.002887000096961856,
0.08091957122087479,
-0.08124013990163803,
0.05861781910061836,
0.08102556318044662,
-0.07901708781719208,
0.05088229477405548,
-0.07716535776853561,
-0.016757167875766754,
-0.09674010425806046,
-0.012275698594748974,
0.04812079668045044,
-0.016360413283109665,
0.07005279511213303,
0.014811458066105843,
-0.005290498491376638,
-0.0709233358502388,
0.0066403658129274845,
0.0321025513112545,
-0.08344905823469162,
-0.04236418381333351,
-0.0001229962072102353,
0.0456310510635376,
0.015355710871517658,
0.002445915015414357,
-0.007694356143474579,
0.034591760486364365,
0.025542002171278,
0.0069045014679431915,
0.017789296805858612,
0.0765734314918518,
0.004099486395716667,
-0.015829455107450485,
-0.004224563017487526,
-0.037060532718896866,
-0.03225153312087059,
-0.07138893008232117,
0.04178325831890106,
0.15022732317447662,
0.017602737993001938,
0.029374796897172928,
0.007304845377802849,
-0.008653075434267521,
0.060904618352651596,
-0.03437485173344612,
0.022397194057703018,
0.01280112937092781,
0.020194897428154945,
0.013925732113420963,
-0.08569778501987457,
-0.01300098281353712,
-0.04066269472241402,
-0.04625799506902695,
0.033865585923194885,
0.004258826840668917,
0.019699297845363617,
0.05870611593127251,
0.019319569692015648,
0.04837152734398842,
-0.0156741701066494,
0.021382462233304977,
-0.07770495116710663,
-0.015331102535128593,
0.005921714473515749
] | 0.097276
|
$? ``` ``` 0 ``` ### Failed Deployment Your Deployment may get stuck trying to deploy its newest ReplicaSet without ever completing. This can occur due to some of the following factors: \* Insufficient quota \* Readiness probe failures \* Image pull errors \* Insufficient permissions \* Limit ranges \* Application runtime misconfiguration One way you can detect this condition is to specify a deadline parameter in your Deployment spec: ([`.spec.progressDeadlineSeconds`](#progress-deadline-seconds)). `.spec.progressDeadlineSeconds` denotes the number of seconds the Deployment controller waits before indicating (in the Deployment status) that the Deployment progress has stalled. The following `kubectl` command sets the spec with `progressDeadlineSeconds` to make the controller report lack of progress of a rollout for a Deployment after 10 minutes: ```shell kubectl patch deployment/nginx-deployment -p '{"spec":{"progressDeadlineSeconds":600}}' ``` The output is similar to this: ``` deployment.apps/nginx-deployment patched ``` Once the deadline has been exceeded, the Deployment controller adds a DeploymentCondition with the following attributes to the Deployment's `.status.conditions`: \* `type: Progressing` \* `status: "False"` \* `reason: ProgressDeadlineExceeded` This condition can also fail early and is then set to status value of `"False"` due to reasons as `ReplicaSetCreateError`. Also, the deadline is not taken into account anymore once the Deployment rollout completes. See the [Kubernetes API conventions](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties) for more information on status conditions. {{< note >}} Kubernetes takes no action on a stalled Deployment other than to report a status condition with `reason: ProgressDeadlineExceeded`. Higher level orchestrators can take advantage of it and act accordingly, for example, rollback the Deployment to its previous version. {{< /note >}} {{< note >}} If you pause a Deployment rollout, Kubernetes does not check progress against your specified deadline. You can safely pause a Deployment rollout in the middle of a rollout and resume without triggering the condition for exceeding the deadline. {{< /note >}} You may experience transient errors with your Deployments, either due to a low timeout that you have set or due to any other kind of error that can be treated as transient. For example, let's suppose you have insufficient quota. If you describe the Deployment you will notice the following section: ```shell kubectl describe deployment nginx-deployment ``` The output is similar to this: ``` <...> Conditions: Type Status Reason ---- ------ ------ Available True MinimumReplicasAvailable Progressing True ReplicaSetUpdated ReplicaFailure True FailedCreate <...> ``` If you run `kubectl get deployment nginx-deployment -o yaml`, the Deployment status is similar to this: ``` status: availableReplicas: 2 conditions: - lastTransitionTime: 2016-10-04T12:25:39Z lastUpdateTime: 2016-10-04T12:25:39Z message: Replica set "nginx-deployment-4262182780" is progressing. reason: ReplicaSetUpdated status: "True" type: Progressing - lastTransitionTime: 2016-10-04T12:25:42Z lastUpdateTime: 2016-10-04T12:25:42Z message: Deployment has minimum availability. reason: MinimumReplicasAvailable status: "True" type: Available - lastTransitionTime: 2016-10-04T12:25:39Z lastUpdateTime: 2016-10-04T12:25:39Z message: 'Error creating: pods "nginx-deployment-4262182780-" is forbidden: exceeded quota: object-counts, requested: pods=1, used: pods=3, limited: pods=2' reason: FailedCreate status: "True" type: ReplicaFailure observedGeneration: 3 replicas: 2 unavailableReplicas: 2 ``` Eventually, once the Deployment progress deadline is exceeded, Kubernetes updates the status and the reason for the Progressing condition: ``` Conditions: Type Status Reason ---- ------ ------ Available True MinimumReplicasAvailable Progressing False ProgressDeadlineExceeded ReplicaFailure True FailedCreate ``` You can address an issue of insufficient quota by scaling down your Deployment, by scaling down other controllers you may be running, or by increasing quota in your namespace. If you satisfy the quota conditions and the Deployment controller then completes the Deployment rollout, you'll see the Deployment's status update with a successful condition (`status: "True"` and `reason: NewReplicaSetAvailable`). ``` Conditions: Type Status Reason ---- ------ ------ Available True MinimumReplicasAvailable Progressing True NewReplicaSetAvailable ``` `type: Available` with `status: "True"` means that your Deployment has minimum availability. Minimum availability is dictated by the parameters specified
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/deployment.md
|
[
-0.012033059261739254,
-0.002233155770227313,
-0.016398757696151733,
-0.01387851219624281,
-0.011612839996814728,
-0.045271892100572586,
-0.08183561265468597,
-0.045510951429605484,
0.027411913499236107,
0.07255920022726059,
0.032517120242118835,
-0.08186626434326172,
-0.025126779451966286,
-0.013378516770899296,
0.009120460599660873,
-0.0007059019990265369,
0.016146665439009666,
-0.05521078035235405,
-0.07511663436889648,
-0.03496750444173813,
-0.023936869576573372,
0.027276763692498207,
0.06548189371824265,
0.06538659334182739,
-0.017005428671836853,
0.006905408576130867,
-0.09541632980108261,
-0.027795210480690002,
0.024755025282502174,
-0.014903027564287186,
-0.04663260281085968,
-0.023451749235391617,
-0.05955583602190018,
-0.018526962026953697,
0.10196670144796371,
0.14152537286281586,
0.008772062137722969,
-0.028487585484981537,
-0.029536105692386627,
-0.03315599635243416,
0.09581232815980911,
-0.016018418595194817,
-0.07949953526258469,
-0.060700658708810806,
0.05914169177412987,
-0.011140412651002407,
-0.0411347970366478,
-0.034637127071619034,
0.01722724735736847,
-0.03082720935344696,
-0.02300448901951313,
-0.09148736298084259,
0.028200730681419373,
-0.015692340210080147,
0.024157151579856873,
0.00720067648217082,
0.003630787367001176,
0.07945460826158524,
0.10397998243570328,
0.032628338783979416,
0.01604791171848774,
-0.009141616523265839,
-0.019581733271479607,
-0.03842516988515854,
0.026997821405529976,
-0.0013005126966163516,
0.014334099367260933,
-0.06348291039466858,
-0.00303259352222085,
0.06407547742128372,
0.015563004650175571,
0.01342763751745224,
-0.08098087459802628,
-0.015382524579763412,
-0.022090528160333633,
0.006453282665461302,
-0.006978542078286409,
0.018396886065602303,
0.016043195500969887,
-0.07945185899734497,
-0.03607563674449921,
-0.10472484678030014,
0.010230572894215584,
0.024348177015781403,
-0.07079076021909714,
-0.03853662312030792,
0.058399032801389694,
0.04788326472043991,
0.04059428721666336,
-0.05490507930517197,
0.020545663312077522,
0.01564755104482174,
-0.02271891199052334,
0.018449338153004646,
0.017374632880091667,
0.06543102860450745,
-0.03578396514058113,
0.09066201001405716,
-0.06496927887201309,
0.010582905262708664,
0.026305586099624634,
-0.02409959025681019,
0.06428764015436172,
0.015535174869000912,
0.013184868730604649,
-0.0007298184791579843,
0.025555290281772614,
0.0027384625282138586,
-0.046850305050611496,
0.013059130869805813,
0.02045268937945366,
-0.00642114644870162,
-0.03137631714344025,
0.03276274353265762,
0.006524677854031324,
0.013697981834411621,
-0.031436774879693985,
0.010778142139315605,
-0.010589070618152618,
0.11124938726425171,
0.11406625062227249,
-0.02469337172806263,
0.009621170349419117,
-0.01729215867817402,
0.019772915169596672,
-0.0010204798309132457,
0.10363374650478363,
5.483975754857646e-33,
0.06513632833957672,
-0.04447099566459656,
-0.008520782925188541,
0.08670741319656372,
0.062273602932691574,
-0.007571387104690075,
-0.07239572703838348,
-0.052306778728961945,
-0.04875577613711357,
-0.016488563269376755,
-0.029199276119470596,
-0.03208114579319954,
-0.10234316438436508,
0.01454143412411213,
0.007837260141968727,
-0.05797349289059639,
0.05300260707736015,
0.014124387875199318,
0.05020831897854805,
0.017127519473433495,
0.09112239629030228,
-0.15233683586120605,
-0.08027105778455734,
0.04793762043118477,
0.07061894983053207,
-0.03803655877709389,
0.03329497575759888,
-0.018023109063506126,
-0.05220671370625496,
0.016138944774866104,
0.019248289987444878,
-0.0033187337685376406,
0.033286795020103455,
-0.04334099218249321,
-0.08206076174974442,
-0.06176011636853218,
0.03242077678442001,
-0.01286013238132,
-0.08087112009525299,
-0.009859382174909115,
-0.04158972203731537,
-0.03598389774560928,
-0.09993671625852585,
0.007310829591006041,
0.012136939913034439,
-0.08833985030651093,
0.029247639700770378,
-0.046216484159231186,
0.0692816972732544,
0.10674840211868286,
-0.06910990178585052,
0.023725146427750587,
0.016705669462680817,
-0.09387178719043732,
0.07059618085622787,
-0.0034091086126863956,
0.08904226124286652,
-0.02944708615541458,
-0.06381107866764069,
-0.049996938556432724,
0.0173525121062994,
-0.042161792516708374,
-0.04637793451547623,
0.026924725621938705,
0.03192014619708061,
0.018790235742926598,
-0.0505714938044548,
0.06049824133515358,
-0.01564788445830345,
0.026939865201711655,
-0.1071322113275528,
0.020154234021902084,
0.020482907071709633,
-0.006140732206404209,
0.039704829454422,
-0.09466074407100677,
0.016676221042871475,
0.029224371537566185,
-0.05550103262066841,
0.026684394106268883,
0.015114533714950085,
-0.023480689153075218,
-0.1420687586069107,
0.009670711122453213,
0.026544809341430664,
0.003968900069594383,
0.000856446276884526,
0.04530767723917961,
-0.08618633449077606,
-0.023220553994178772,
-0.023180633783340454,
0.03712444752454758,
-0.07490748167037964,
-0.007349918596446514,
-0.07571867853403091,
-8.039036887960694e-33,
0.08159371465444565,
-0.02702970802783966,
0.032014936208724976,
0.042003799229860306,
0.09317266196012497,
-0.027356861159205437,
0.004573879297822714,
0.13097788393497467,
0.020746326074004173,
-0.032664954662323,
0.021572979167103767,
-0.03508951514959335,
-0.06034222990274429,
0.01905471459031105,
-0.15601278841495514,
-0.009424989111721516,
-0.0576215423643589,
-0.06700319051742554,
0.08905099332332611,
0.024181632325053215,
0.026310183107852936,
-0.0298090111464262,
0.05856064334511757,
0.10063215345144272,
-0.043361179530620575,
0.015727009624242783,
0.0067640794441103935,
-0.031548094004392624,
-0.014209483750164509,
0.008027154952287674,
0.061918970197439194,
-0.0480891652405262,
-0.08538994193077087,
0.01859627291560173,
0.004387713503092527,
-0.027824299409985542,
-0.0022980119101703167,
0.04925872012972832,
-0.02638988569378853,
-0.005849974229931831,
0.07799549400806427,
0.028179170563817024,
0.0045339688658714294,
-0.04554988816380501,
-0.04087009280920029,
-0.06251007318496704,
0.10992953181266785,
-0.09295421093702316,
-0.012253407388925552,
-0.07054644823074341,
0.05010325461626053,
0.029937896877527237,
0.05506625398993492,
0.10780180245637894,
0.08057770878076553,
-0.012266005389392376,
-0.054556574672460556,
0.024453546851873398,
-0.05343744903802872,
0.007614504545927048,
-0.006120936945080757,
-0.008064440451562405,
0.09733232855796814,
-0.029887959361076355,
-0.0010661931009963155,
0.025633910670876503,
-0.046258047223091125,
0.05681447684764862,
0.060816824436187744,
0.10676325112581253,
0.06461814045906067,
0.004299631342291832,
-0.046175599098205566,
-0.00007984590774867684,
-0.03286347910761833,
0.01904444769024849,
-0.032856181263923645,
-0.053819045424461365,
0.06285978853702545,
0.04392838478088379,
0.011296083219349384,
0.04534544795751572,
-0.0828600600361824,
-0.029995128512382507,
-0.011158730834722519,
0.017295511439442635,
-0.016140835359692574,
0.08505453914403915,
0.09347399324178696,
0.05458209291100502,
0.014234590344130993,
-0.015638018026947975,
-0.05034641548991203,
0.05372747406363487,
-0.057192422449588776,
-5.789264179156817e-8,
-0.01710105687379837,
0.05378372222185135,
-0.06113337725400925,
-0.05576358735561371,
0.09802233427762985,
-0.029836708679795265,
0.06465794891119003,
-0.06624084711074829,
-0.015938444063067436,
-0.004585248418152332,
0.03584780544042587,
0.0514359213411808,
-0.06025894731283188,
0.08845797181129456,
-0.02466939203441143,
-0.04333614185452461,
-0.07452408224344254,
0.06543415039777756,
0.052396878600120544,
-0.09393832832574844,
-0.06346431374549866,
-0.04067770019173622,
-0.017840135842561722,
-0.07363598048686981,
-0.008030526340007782,
0.03784071281552315,
0.002817666158080101,
0.05708281695842743,
-0.03184729069471359,
-0.002890523988753557,
0.006377529818564653,
-0.03187369927763939,
-0.009381970390677452,
-0.01849854364991188,
-0.01983153261244297,
-0.02634226717054844,
-0.08255187422037125,
0.03257779777050018,
0.040680449455976486,
0.02634965442121029,
0.016078360378742218,
0.05285494029521942,
0.03611055016517639,
0.014612982049584389,
-0.0023569155018776655,
0.000016573590983171016,
-0.017779860645532608,
0.08567232638597488,
-0.049797654151916504,
-0.06055385619401932,
0.017430495470762253,
-0.08931649476289749,
-0.07207649201154709,
0.04409743472933769,
-0.06333716213703156,
0.04578971862792969,
0.08042199164628983,
-0.013410599902272224,
-0.0014031212776899338,
-0.004922452382743359,
0.07534268498420715,
-0.04611145704984665,
-0.050105202943086624,
-0.008534534834325314
] | 0.022717
|
you'll see the Deployment's status update with a successful condition (`status: "True"` and `reason: NewReplicaSetAvailable`). ``` Conditions: Type Status Reason ---- ------ ------ Available True MinimumReplicasAvailable Progressing True NewReplicaSetAvailable ``` `type: Available` with `status: "True"` means that your Deployment has minimum availability. Minimum availability is dictated by the parameters specified in the deployment strategy. `type: Progressing` with `status: "True"` means that your Deployment is either in the middle of a rollout and it is progressing or that it has successfully completed its progress and the minimum required new replicas are available (see the Reason of the condition for the particulars - in our case `reason: NewReplicaSetAvailable` means that the Deployment is complete). You can check if a Deployment has failed to progress by using `kubectl rollout status`. `kubectl rollout status` returns a non-zero exit code if the Deployment has exceeded the progression deadline. ```shell kubectl rollout status deployment/nginx-deployment ``` The output is similar to this: ``` Waiting for rollout to finish: 2 out of 3 new replicas have been updated... error: deployment "nginx" exceeded its progress deadline ``` and the exit status from `kubectl rollout` is 1 (indicating an error): ```shell echo $? ``` ``` 1 ``` ### Operating on a failed deployment All actions that apply to a complete Deployment also apply to a failed Deployment. You can scale it up/down, roll back to a previous revision, or even pause it if you need to apply multiple tweaks in the Deployment Pod template. ## Clean up Policy You can set `.spec.revisionHistoryLimit` field in a Deployment to specify how many old ReplicaSets for this Deployment you want to retain. The rest will be garbage-collected in the background. By default, it is 10. {{< note >}} Explicitly setting this field to 0, will result in cleaning up all the history of your Deployment thus that Deployment will not be able to roll back. {{< /note >}} The cleanup only starts \*\*after\*\* a Deployment reaches a [complete state](/docs/concepts/workloads/controllers/deployment/#complete-deployment). If you set `.spec.revisionHistoryLimit` to 0, any rollout nonetheless triggers creation of a new ReplicaSet before Kubernetes removes the old one. Even with a non-zero revision history limit, you can have more ReplicaSets than the limit you configure. For example, if pods are crash looping, and there are multiple rolling updates events triggered over time, you might end up with more ReplicaSets than the `.spec.revisionHistoryLimit` because the Deployment never reaches a complete state. ## Canary Deployment If you want to roll out releases to a subset of users or servers using the Deployment, you can create multiple Deployments, one for each release, following the canary pattern described in [managing resources](/docs/concepts/workloads/management/#canary-deployments). ## Writing a Deployment Spec As with all other Kubernetes configs, a Deployment needs `.apiVersion`, `.kind`, and `.metadata` fields. For general information about working with config files, see [deploying applications](/docs/tasks/run-application/run-stateless-application-deployment/), configuring containers, and [using kubectl to manage resources](/docs/concepts/overview/working-with-objects/object-management/) documents. When the control plane creates new Pods for a Deployment, the `.metadata.name` of the Deployment is part of the basis for naming those Pods. The name of a Deployment must be a valid [DNS subdomain](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names) value, but this can produce unexpected results for the Pod hostnames. For best compatibility, the name should follow the more restrictive rules for a [DNS label](/docs/concepts/overview/working-with-objects/names#dns-label-names). A Deployment also needs a [`.spec` section](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status). ### Pod Template The `.spec.template` and `.spec.selector` are the only required fields of the `.spec`. The `.spec.template` is a [Pod template](/docs/concepts/workloads/pods/#pod-templates). It has exactly the same schema as a {{< glossary\_tooltip text="Pod" term\_id="pod" >}}, except it is nested and does not have an `apiVersion` or `kind`. In addition to required fields for a Pod, a Pod template
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/deployment.md
|
[
0.03567208722233772,
-0.051983460783958435,
-0.008600975386798382,
-0.011010327376425266,
-0.024875381961464882,
-0.019143689423799515,
-0.055982258170843124,
-0.014851871877908707,
0.011099863797426224,
0.05146975442767143,
0.08323449641466141,
-0.07617606222629547,
0.021301966160535812,
-0.06793296337127686,
0.0248483307659626,
-0.04161933436989784,
0.056439850479364395,
-0.09048581123352051,
-0.10118500888347626,
-0.07495369017124176,
-0.03288505598902702,
-0.06015142425894737,
-0.03563665226101875,
0.01811276376247406,
-0.07444770634174347,
0.015428830869495869,
-0.06809274852275848,
-0.035726603120565414,
0.01952219568192959,
-0.05203627794981003,
-0.05351581424474716,
0.06174345687031746,
-0.06103549897670746,
-0.0001460232597310096,
0.11949767917394638,
0.12108144164085388,
0.023914914578199387,
-0.021919166669249535,
-0.05842432752251625,
-0.020529935136437416,
-0.011605294421315193,
-0.06635861098766327,
-0.085201695561409,
-0.025921737775206566,
0.039454586803913116,
-0.02048790641129017,
-0.057351674884557724,
-0.0273241326212883,
0.009132308885455132,
-0.060683246701955795,
0.021924084052443504,
-0.049264855682849884,
0.029666347429156303,
0.0508144274353981,
0.020875511690974236,
0.06212611123919487,
-0.008312199264764786,
0.02568839304149151,
0.03129511699080467,
-0.02388388104736805,
0.07442331314086914,
-0.02500748820602894,
-0.0051058377139270306,
-0.01159345917403698,
-0.01813528686761856,
-0.012708986178040504,
0.05610138550400734,
-0.10103140026330948,
0.004831763915717602,
0.0383339487016201,
-0.0004069402057211846,
0.022239144891500473,
-0.07914923876523972,
-0.021592356264591217,
-0.02879418060183525,
-0.05879807844758034,
0.07046466320753098,
0.06678985059261322,
0.030867835506796837,
-0.016667788848280907,
-0.031002214178442955,
-0.013704201206564903,
-0.03593871742486954,
0.0015565778594464064,
-0.07162297517061234,
-0.06043833866715431,
0.01915009319782257,
0.009240368381142616,
0.02833564393222332,
0.0440012663602829,
0.04584083706140518,
0.04561341181397438,
-0.005126456264406443,
-0.025016145780682564,
0.016535883769392967,
0.03270353749394417,
0.02549062669277191,
0.07142501324415207,
0.01912696473300457,
0.009660499170422554,
0.053357578814029694,
-0.03811245784163475,
0.054258622229099274,
-0.02362576499581337,
0.015356754884123802,
-0.022449959069490433,
-0.03792218863964081,
-0.050680093467235565,
0.004993780981749296,
0.036421261727809906,
-0.0022907189559191465,
-0.00783450622111559,
0.02877816930413246,
-0.025681158527731895,
-0.04178016632795334,
0.09699919819831848,
-0.042967166751623154,
0.003607708727940917,
-0.026498975232243538,
-0.012188665568828583,
0.08878487348556519,
-0.018362946808338165,
0.09403367340564728,
-0.09576021879911423,
-0.042243730276823044,
-0.012235239148139954,
0.06595774739980698,
2.5166467124021444e-33,
0.06365664303302765,
-0.09142782539129257,
0.005299004726111889,
0.036716002970933914,
0.022673487663269043,
-0.02872183918952942,
-0.05466447398066521,
-0.05929802358150482,
-0.020832177251577377,
-0.11101973801851273,
-0.01379154808819294,
0.031928643584251404,
-0.11103592813014984,
-0.02683030627667904,
0.0073831938207149506,
-0.04021374136209488,
0.04047866538167,
0.008545427583158016,
0.04115473851561546,
0.032330289483070374,
0.038108594715595245,
-0.11886842548847198,
-0.05072447285056114,
0.047486793249845505,
0.06936245411634445,
-0.007642775774002075,
0.07388550788164139,
0.005701460875570774,
-0.086066834628582,
0.03189653903245926,
-0.017830895259976387,
-0.005552207585424185,
0.00044459360651671886,
-0.05411417409777641,
-0.06911320239305496,
-0.021884197369217873,
-0.04554612189531326,
-0.02081615850329399,
-0.03129393234848976,
-0.03773532807826996,
-0.041822511702775955,
-0.012637527659535408,
-0.0501072034239769,
-0.011848577298223972,
0.11064782738685608,
-0.04643324390053749,
0.05866934731602669,
-0.024860361590981483,
0.03744082897901535,
0.05651448294520378,
-0.007685920689254999,
0.01983393356204033,
0.0028322746511548758,
-0.07961422950029373,
-0.002539329929277301,
0.08828103542327881,
0.057426244020462036,
-0.030401796102523804,
-0.0687413141131401,
0.0008358769700862467,
0.014076905325055122,
-0.0591876283288002,
-0.03693588823080063,
0.017158353701233864,
0.06984461098909378,
0.09066580981016159,
-0.0564349964261055,
0.016495337709784508,
-0.018399640917778015,
0.018831176683306694,
-0.03609877824783325,
-0.0000444816323579289,
0.026095841079950333,
0.015355231240391731,
0.06636334955692291,
-0.061614759266376495,
0.04366353899240494,
-0.007049113512039185,
-0.05373382940888405,
0.022144852206110954,
-0.025426823645830154,
0.011316630989313126,
-0.12819582223892212,
0.029772987589240074,
0.004302359186112881,
0.003432246157899499,
0.03694367781281471,
0.03025386855006218,
-0.09457913041114807,
0.0045502884313464165,
-0.005749707575887442,
0.039051808416843414,
-0.07178596407175064,
0.029884405434131622,
0.020448338240385056,
-4.6730396711077824e-33,
0.04233136773109436,
0.0074280560947954655,
0.01888352818787098,
-0.015683764591813087,
0.006204644683748484,
0.014183634892106056,
-0.018585391342639923,
0.10713951289653778,
-0.02003537490963936,
-0.0474463514983654,
-0.024383269250392914,
-0.0223664790391922,
-0.035624273121356964,
0.009167302399873734,
-0.18153762817382812,
0.010691242292523384,
-0.037254951894283295,
-0.036674726754426956,
0.026898067444562912,
0.0960136353969574,
0.016519440338015556,
-0.003308963030576706,
-0.0013332510134205222,
0.049820199608802795,
-0.009401052258908749,
0.014162547886371613,
-0.05443790927529335,
0.016448577865958214,
-0.006132888607680798,
-0.06885804980993271,
0.12083975225687027,
-0.07555073499679565,
-0.09411291033029556,
0.10050918161869049,
0.05510517954826355,
-0.05864136666059494,
-0.02537492662668228,
0.0015627742977812886,
-0.04582405835390091,
0.0509587824344635,
0.046257950365543365,
0.021423496305942535,
-0.026276372373104095,
-0.005174431949853897,
-0.04462604969739914,
0.019622664898633957,
0.09563170373439789,
-0.039938826113939285,
-0.0037085949443280697,
-0.08871004730463028,
0.04818831756711006,
-0.00243850564584136,
0.028477061539888382,
0.18563906848430634,
0.04657963663339615,
0.05498628690838814,
-0.08069116622209549,
0.03629069775342941,
-0.08520272374153137,
0.027374258264899254,
0.02192942425608635,
-0.04213979095220566,
0.05670337378978729,
0.04168090596795082,
-0.0023280095774680376,
-0.0204178337007761,
0.01666751131415367,
0.0364125594496727,
0.0010018838802352548,
0.05866497382521629,
0.04296070709824562,
-0.003539447207003832,
-0.021973272785544395,
-0.042107608169317245,
0.03469257429242134,
-0.007975329644978046,
-0.08513551205396652,
-0.06380418688058853,
0.010088975541293621,
0.03891458362340927,
-0.04944330453872681,
0.06379366666078568,
-0.09544938057661057,
0.00040907514630816877,
-0.003245045430958271,
-0.001141782384365797,
0.02918374538421631,
0.023680202662944794,
0.12961651384830475,
0.07242271304130554,
-0.00008142626757035032,
0.05869487300515175,
-0.11384758353233337,
0.051248662173748016,
-0.07536012679338455,
-5.26156931357491e-8,
0.003166927956044674,
-0.0006886844639666378,
-0.06071140989661217,
-0.04415268450975418,
0.12355928868055344,
-0.03837346285581589,
0.054066743701696396,
-0.0862533450126648,
-0.043224044144153595,
-0.017220566049218178,
-0.04026754945516586,
0.04080371558666229,
-0.09316138923168182,
0.03863774985074997,
0.033397190272808075,
0.022134479135274887,
-0.003986954689025879,
0.008527499623596668,
0.04691986367106438,
-0.07400023937225342,
-0.0767538994550705,
-0.06556855887174606,
0.025590049102902412,
0.029108405113220215,
-0.02596239000558853,
0.04971739277243614,
0.10083533823490143,
0.02907477505505085,
-0.0005254611023701727,
0.048431918025016785,
0.014706830494105816,
-0.0018061400623992085,
0.037600789219141006,
-0.016693230718374252,
-0.025120455771684647,
0.02995789796113968,
-0.07112029939889908,
0.04895320534706116,
0.03436019644141197,
0.0005236570141278207,
0.04903338849544525,
0.07463878393173218,
-0.004492687992751598,
0.06061893329024315,
-0.0010307906195521355,
0.021433720365166664,
-0.03368132933974266,
0.03905131295323372,
-0.06681443005800247,
-0.10016387701034546,
-0.022604824975132942,
-0.08442722260951996,
-0.009172680787742138,
0.0673704743385315,
-0.07980328798294067,
0.08304741978645325,
0.0684066191315651,
0.06217733025550842,
0.06708754599094391,
0.01496156770735979,
0.033972639590501785,
0.014145532622933388,
0.02477775514125824,
0.02653474733233452
] | 0.084676
|
are the only required fields of the `.spec`. The `.spec.template` is a [Pod template](/docs/concepts/workloads/pods/#pod-templates). It has exactly the same schema as a {{< glossary\_tooltip text="Pod" term\_id="pod" >}}, except it is nested and does not have an `apiVersion` or `kind`. In addition to required fields for a Pod, a Pod template in a Deployment must specify appropriate labels and an appropriate restart policy. For labels, make sure not to overlap with other controllers. See [selector](#selector). Only 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. ### Replicas `.spec.replicas` is an optional field that specifies the number of desired Pods. It defaults to 1. Should you manually scale a Deployment, example via `kubectl scale deployment deployment --replicas=X`, and then you update that Deployment based on a manifest (for example: by running `kubectl apply -f deployment.yaml`), then applying that manifest overwrites the manual scaling that you previously did. If a [HorizontalPodAutoscaler](/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale/) (or any similar API for horizontal scaling) is managing scaling for a Deployment, don't set `.spec.replicas`. Instead, allow the Kubernetes {{< glossary\_tooltip text="control plane" term\_id="control-plane" >}} to manage the `.spec.replicas` field automatically. ### Selector `.spec.selector` is a required field that specifies a [label selector](/docs/concepts/overview/working-with-objects/labels/) for the Pods targeted by this Deployment. `.spec.selector` must match `.spec.template.metadata.labels`, or it will be rejected by the API. In API version `apps/v1`, `.spec.selector` and `.metadata.labels` do not default to `.spec.template.metadata.labels` if not set. So they must be set explicitly. Also note that `.spec.selector` is immutable after creation of the Deployment in `apps/v1`. A Deployment may terminate Pods whose labels match the selector if their template is different from `.spec.template` or if the total number of such Pods exceeds `.spec.replicas`. It brings up new Pods with `.spec.template` if the number of Pods is less than the desired number. {{< note >}} You should not create other Pods whose labels match this selector, either directly, by creating another Deployment, or by creating another controller such as a ReplicaSet or a ReplicationController. If you do so, the first Deployment thinks that it created these other Pods. Kubernetes does not stop you from doing this. {{< /note >}} If you have multiple controllers that have overlapping selectors, the controllers will fight with each other and won't behave correctly. ### Strategy `.spec.strategy` specifies the strategy used to replace old Pods by new ones. `.spec.strategy.type` can be "Recreate" or "RollingUpdate". "RollingUpdate" is the default value. #### Recreate Deployment All existing Pods are killed before new ones are created when `.spec.strategy.type==Recreate`. {{< note >}} This will only guarantee Pod termination previous to creation for upgrades. If you upgrade a Deployment, all Pods of the old revision will be terminated immediately. Successful removal is awaited before any Pod of the new revision is created. If you manually delete a Pod, the lifecycle is controlled by the ReplicaSet and the replacement will be created immediately (even if the old Pod is still in a Terminating state). If you need an "at most" guarantee for your Pods, you should consider using a [StatefulSet](/docs/concepts/workloads/controllers/statefulset/). {{< /note >}} #### Rolling Update Deployment The Deployment updates Pods in a rolling update fashion (gradually scale down the old ReplicaSets and scale up the new one) when `.spec.strategy.type==RollingUpdate`. You can specify `maxUnavailable` and `maxSurge` to control the rolling update process. ##### Max Unavailable `.spec.strategy.rollingUpdate.maxUnavailable` is an optional field that specifies the maximum number of Pods that can be unavailable during the update process. The value can be an absolute number (for example, 5) or a percentage of desired Pods (for example, 10%). The absolute number is calculated from percentage by rounding down. The value cannot be 0
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/deployment.md
|
[
0.012531506828963757,
0.008956330828368664,
0.03974490612745285,
0.007459977641701698,
-0.02768118865787983,
0.020577866584062576,
-0.00206272816285491,
-0.0056988936848938465,
0.013405061326920986,
0.05397319793701172,
0.011434904299676418,
-0.061553630977869034,
-0.06049468740820885,
-0.00797385722398758,
0.050759367644786835,
0.017587769776582718,
0.050439268350601196,
-0.059033799916505814,
-0.018339287489652634,
0.006799742113798857,
0.07676822692155838,
0.044658858329057693,
0.07672121375799179,
0.054032206535339355,
-0.024212142452597618,
0.02832838147878647,
-0.09488776326179504,
0.0057233599945902824,
0.014595238491892815,
0.012073514983057976,
-0.021311398595571518,
0.06188318133354187,
-0.020935146138072014,
0.029849156737327576,
0.14634741842746735,
0.03352770209312439,
-0.008223449811339378,
-0.025530565530061722,
-0.03153898939490318,
0.0033487104810774326,
0.04255394637584686,
-0.06207633763551712,
-0.09999110549688339,
0.0025264122523367405,
-0.020731309428811073,
0.006466787774115801,
-0.01745535060763359,
-0.022042522206902504,
0.017936350777745247,
0.024797461926937103,
-0.014281685464084148,
-0.1328159123659134,
0.05761203542351723,
-0.0303631741553545,
0.07376208156347275,
0.01979287713766098,
0.013566210865974426,
-0.001323617878369987,
0.14971037209033966,
0.004131493158638477,
0.0180802084505558,
-0.014158831909298897,
-0.02010169066488743,
-0.015530348755419254,
0.06322887539863586,
-0.00951158907264471,
0.009905220940709114,
-0.004636391066014767,
0.006218352820724249,
0.010379018262028694,
0.05800517648458481,
-0.020078113302588463,
0.05337877199053764,
-0.01742546632885933,
-0.053176701068878174,
-0.004301249515265226,
-0.05745897442102432,
0.043958280235528946,
0.007676171604543924,
-0.10951437801122665,
0.01763630099594593,
0.027172479778528214,
0.031157031655311584,
0.03285912796854973,
-0.024845188483595848,
-0.0439441055059433,
0.0356905423104763,
-0.025691060349345207,
0.027513237670063972,
-0.0038344336207956076,
0.04731810465455055,
-0.08154036849737167,
0.04137451574206352,
-0.07023143768310547,
-0.005141718313097954,
-0.006467263679951429,
-0.026440788060426712,
-0.027018090710043907,
-0.020534878596663475,
0.02971656061708927,
0.03565102070569992,
-0.04815147444605827,
0.036276187747716904,
-0.0003044434415642172,
0.00393912335857749,
0.00799773633480072,
-0.07983596622943878,
0.03335122764110565,
0.012225816957652569,
0.08342593163251877,
0.05823381617665291,
0.029861385002732277,
-0.046747129410505295,
0.05381176993250847,
-0.006007669027894735,
-0.020871691405773163,
-0.06189211457967758,
0.01037199143320322,
-0.02583260089159012,
0.07949467748403549,
0.027738170698285103,
-0.047729041427373886,
0.03795415163040161,
-0.0041632275097072124,
-0.06491267681121826,
0.03369259089231491,
0.0031859693117439747,
2.764055120636123e-34,
0.07740944623947144,
-0.02647903375327587,
-0.07941300421953201,
0.037532199174165726,
0.016639260575175285,
-0.05829344317317009,
-0.05354937165975571,
0.034945059567689896,
-0.0700838714838028,
0.0017310595139861107,
-0.0029931250028312206,
0.10892302542924881,
-0.03737650811672211,
-0.016811810433864594,
0.007502966094762087,
-0.031110571697354317,
-0.06277034431695938,
0.10282667726278305,
0.04812019318342209,
-0.016027750447392464,
0.028042618185281754,
-0.053464580327272415,
-0.035554055124521255,
-0.011025489307940006,
0.005545003805309534,
0.010427236557006836,
-0.004621781874448061,
-0.07303166389465332,
-0.04270699620246887,
0.027476634830236435,
-0.011646921746432781,
-0.05111228674650192,
0.08506488800048828,
0.0020258519798517227,
-0.12033246457576752,
-0.03891114890575409,
0.027492769062519073,
-0.040195852518081665,
-0.06854972243309021,
-0.05743156373500824,
0.017069142311811447,
0.01774313673377037,
-0.018323879688978195,
-0.05471779778599739,
0.035405922681093216,
0.03055746667087078,
0.05780991166830063,
-0.04905000701546669,
0.09330223500728607,
-0.03274386376142502,
-0.0016872030682861805,
-0.07993274182081223,
0.027196625247597694,
-0.06072290614247322,
0.050051335245370865,
0.020212220028042793,
-0.0019288086332380772,
-0.03342903032898903,
0.0174346212297678,
-0.05612082779407501,
-0.030572740361094475,
-0.009841222316026688,
-0.06940650194883347,
-0.01627497375011444,
0.05908459052443504,
0.08740203827619553,
-0.05752689018845558,
0.046480659395456314,
0.03411471098661423,
0.04597010836005211,
-0.048926807940006256,
0.06387927383184433,
-0.0247042253613472,
0.014812488108873367,
0.030169004574418068,
-0.07006465643644333,
0.01901083067059517,
-0.009870493784546852,
-0.15168224275112152,
0.07885083556175232,
-0.04181749001145363,
0.004705565050244331,
-0.08490592241287231,
0.09529110789299011,
0.02416878566145897,
-0.027552131563425064,
0.04411262646317482,
0.037306904792785645,
-0.04902736842632294,
-0.0016588283469900489,
-0.017027655616402626,
-0.06250371038913727,
-0.11407510191202164,
-0.027483873069286346,
-0.09004499018192291,
-2.002650603574568e-33,
0.09386418759822845,
-0.01635121740400791,
0.027785465121269226,
0.04057830944657326,
0.023099657148122787,
-0.001370190759189427,
0.02160780131816864,
0.10589290410280228,
-0.00822271965444088,
-0.04972483590245247,
0.010465389117598534,
-0.0451899953186512,
-0.0013044759398326278,
0.007057730574160814,
-0.057404495775699615,
-0.014975270256400108,
-0.16994120180606842,
-0.04203350841999054,
0.044640909880399704,
0.020358502864837646,
0.003915942739695311,
-0.03463570028543472,
0.04908635467290878,
0.0764850303530693,
0.008250705897808075,
-0.005616327282041311,
-0.023166174069046974,
-0.01651795022189617,
0.02495126985013485,
-0.028646593913435936,
0.07738884538412094,
-0.04769240692257881,
-0.034306421875953674,
0.00724642863497138,
0.021185562014579773,
0.0027564018964767456,
-0.040821898728609085,
0.01705358549952507,
-0.04431619495153427,
0.061123333871364594,
0.067072793841362,
0.008992256596684456,
-0.07062900066375732,
-0.06693875044584274,
-0.04722629487514496,
-0.04156487062573433,
0.06760156154632568,
-0.0011398763163015246,
0.006222710013389587,
-0.16203926503658295,
0.06986209005117416,
-0.03409861773252487,
-0.08428386598825455,
0.000829893397167325,
-0.047365449368953705,
-0.004902748856693506,
0.030855219811201096,
-0.044753484427928925,
-0.09766530990600586,
0.003159081796184182,
0.06164848804473877,
-0.044778384268283844,
0.04158579930663109,
-0.007971424609422684,
-0.019728725776076317,
-0.05768425762653351,
-0.018663315102458,
0.02701594866812229,
0.002525640418753028,
0.0044279820285737514,
-0.042086370289325714,
-0.04680531844496727,
0.053217124193906784,
-0.03710203245282173,
0.01773095689713955,
-0.02476760558784008,
-0.014926428906619549,
-0.0611906424164772,
0.10158683359622955,
-0.036718860268592834,
0.0009845393942669034,
0.10192186385393143,
-0.01087593287229538,
0.08438894897699356,
0.083070769906044,
0.029380833730101585,
0.057070862501859665,
0.11528339982032776,
0.05013559013605118,
0.12587198615074158,
-0.0079629672691226,
0.007334482856094837,
0.03924969211220741,
0.14176328480243683,
-0.04481074959039688,
-4.7351846887977445e-8,
0.014279844239354134,
0.16494335234165192,
0.009525958448648453,
0.07366310060024261,
-0.002119797747582197,
-0.0033303946256637573,
0.05221026390790939,
-0.015414111316204071,
-0.02413460984826088,
-0.00791130866855383,
-0.02640741877257824,
0.06035325676202774,
-0.10034459084272385,
0.08389431983232498,
-0.005578840617090464,
-0.030183009803295135,
-0.045528773218393326,
0.06599285453557968,
-0.006052990909665823,
-0.08764274418354034,
-0.08796553313732147,
-0.015741463750600815,
0.01596960611641407,
-0.04093552380800247,
-0.025463180616497993,
0.06160207465291023,
0.022366560995578766,
-0.013891276903450489,
0.02690833993256092,
0.020480137318372726,
-0.01524098590016365,
-0.017702089622616768,
-0.07095994055271149,
0.06867891550064087,
-0.011962786316871643,
-0.02626161091029644,
-0.1335829198360443,
0.050744958221912384,
0.10069677233695984,
0.02539006806910038,
-0.019575735554099083,
-0.028435613960027695,
-0.08935339003801346,
-0.0024087894707918167,
0.003546162275597453,
0.03302518278360367,
-0.04441242665052414,
0.06787136197090149,
-0.04719891771674156,
0.03225085139274597,
-0.05980653688311577,
-0.058819085359573364,
-0.03430080786347389,
0.06333638727664948,
-0.03942699730396271,
-0.011315638199448586,
0.0006049767835065722,
0.0004987635766156018,
-0.0399153009057045,
-0.062081024050712585,
0.09728492796421051,
-0.0008885723073035479,
0.005594968795776367,
-0.019682973623275757
] | 0.070302
|
field that specifies the maximum number of Pods that can be unavailable during the update process. The value can be an absolute number (for example, 5) or a percentage of desired Pods (for example, 10%). The absolute number is calculated from percentage by rounding down. The value cannot be 0 if `.spec.strategy.rollingUpdate.maxSurge` is 0. The default value is 25%. For example, when this value is set to 30%, the old ReplicaSet can be scaled down to 70% of desired Pods immediately when the rolling update starts. Once new Pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of Pods available at all times during the update is at least 70% of the desired Pods. ##### Max Surge `.spec.strategy.rollingUpdate.maxSurge` is an optional field that specifies the maximum number of Pods that can be created over the desired number of Pods. The value can be an absolute number (for example, 5) or a percentage of desired Pods (for example, 10%). The value cannot be 0 if `maxUnavailable` is 0. The absolute number is calculated from the percentage by rounding up. The default value is 25%. For example, when this value is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new Pods does not exceed 130% of desired Pods. Once old Pods have been killed, the new ReplicaSet can be scaled up further, ensuring that the total number of Pods running at any time during the update is at most 130% of desired Pods. Here are some Rolling Update Deployment examples that use the `maxUnavailable` and `maxSurge`: {{< tabs name="tab\_with\_md" >}} {{% tab name="Max Unavailable" %}} ```yaml apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app: nginx spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.14.2 ports: - containerPort: 80 strategy: type: RollingUpdate rollingUpdate: maxUnavailable: 1 ``` {{% /tab %}} {{% tab name="Max Surge" %}} ```yaml apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app: nginx spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.14.2 ports: - containerPort: 80 strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 ``` {{% /tab %}} {{% tab name="Hybrid" %}} ```yaml apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app: nginx spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.14.2 ports: - containerPort: 80 strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 1 ``` {{% /tab %}} {{< /tabs >}} ### Progress Deadline Seconds `.spec.progressDeadlineSeconds` is an optional field that specifies the number of seconds you want to wait for your Deployment to progress before the system reports back that the Deployment has [failed progressing](#failed-deployment) - surfaced as a condition with `type: Progressing`, `status: "False"`. and `reason: ProgressDeadlineExceeded` in the status of the resource. The Deployment controller will keep retrying the Deployment. This defaults to 600. In the future, once automatic rollback will be implemented, the Deployment controller will roll back a Deployment as soon as it observes such a condition. If specified, this field needs to be greater than `.spec.minReadySeconds`. ### Min Ready Seconds `.spec.minReadySeconds` is an optional field that specifies the minimum number of seconds for which a newly created Pod should be ready without any of its containers crashing, for it to be considered available. This defaults to 0 (the Pod will be considered available as soon as it is ready). To learn more about when a Pod is
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/deployment.md
|
[
0.010112952440977097,
-0.023458033800125122,
-0.06336091458797455,
-0.01871648244559765,
-0.048292312771081924,
-0.05676895007491112,
-0.0559532567858696,
0.06293593347072601,
-0.01945333741605282,
0.061368025839328766,
0.020831799134612083,
-0.014680512249469757,
0.018575375899672508,
-0.03801850229501724,
-0.0067107598297297955,
0.0017826859839260578,
0.04554346948862076,
-0.030381182208657265,
-0.11775404214859009,
-0.01836688257753849,
0.009252435527741909,
-0.10219060629606247,
-0.0007359822047874331,
0.01215632725507021,
0.02370419166982174,
0.03281102329492569,
-0.07873818278312683,
-0.02521444857120514,
0.03124844655394554,
-0.025932634249329567,
-0.049938127398490906,
0.05001228675246239,
0.07572229951620102,
0.013367933221161366,
0.07247067987918854,
-0.04254922643303871,
-0.05124523118138313,
-0.01851506531238556,
0.022202936932444572,
0.029145868495106697,
-0.00441092811524868,
-0.05475151166319847,
-0.09605662524700165,
0.04682011157274246,
0.004809260368347168,
0.050744496285915375,
-0.11218325793743134,
0.006339887157082558,
0.021614182740449905,
0.04004300758242607,
0.015379691496491432,
-0.07009964436292648,
0.0375744104385376,
0.05484163761138916,
0.049461204558610916,
0.029716061428189278,
0.02440006099641323,
0.04689044877886772,
0.05866708233952522,
-0.015550496987998486,
0.09181198477745056,
-0.055588897317647934,
0.013054372742772102,
-0.04014679044485092,
-0.00728164566680789,
-0.0466773696243763,
0.00016675730876158923,
0.006870863493531942,
0.009086601436138153,
0.0326664000749588,
0.05173793435096741,
0.03306984528899193,
0.004019572865217924,
-0.06646785140037537,
0.01206956710666418,
0.04504382610321045,
0.020675089210271835,
0.03526630252599716,
0.027556147426366806,
-0.007200010120868683,
0.006315581034868956,
-0.04272526130080223,
-0.01998985931277275,
-0.08613201975822449,
-0.034779783338308334,
-0.03184850141406059,
0.02258220873773098,
0.03607423976063728,
0.07407599687576294,
0.03982752189040184,
-0.01612177863717079,
0.0734616070985794,
0.017237551510334015,
-0.045444555580616,
0.0027703512459993362,
0.0861533060669899,
-0.061221085488796234,
-0.029093096032738686,
0.0009822354186326265,
0.025057246908545494,
-0.00596946757286787,
-0.022612987086176872,
0.054791998118162155,
-0.006648929324001074,
0.06847890466451645,
-0.14219745993614197,
-0.05948001518845558,
0.02022383362054825,
0.025414088740944862,
0.05549364164471626,
0.03831472247838974,
0.02663297764956951,
0.01403087005019188,
0.029288223013281822,
0.002001718617975712,
0.0679863765835762,
-0.01663781702518463,
0.07451906055212021,
-0.07967159897089005,
0.005087863653898239,
0.09535760432481766,
-0.007716038264334202,
0.059983134269714355,
-0.022583484649658203,
-0.07943140715360641,
0.06524952501058578,
0.048952024430036545,
4.200326740210092e-33,
0.058137182146310806,
-0.07349000126123428,
-0.026589851826429367,
-0.021485667675733566,
0.04291422665119171,
-0.03517333045601845,
-0.027171261608600616,
0.05121934413909912,
-0.01263478584587574,
-0.056985873728990555,
-0.05550092086195946,
0.1253066211938858,
-0.042622536420822144,
-0.005304415710270405,
0.07600394636392593,
-0.14067420363426208,
-0.04711999371647835,
0.1095423474907875,
0.0580146387219429,
-0.07803254574537277,
0.035461150109767914,
-0.10739614069461823,
-0.051281239837408066,
-0.020514223724603653,
0.03862323611974716,
0.0336533822119236,
0.004717596340924501,
-0.04791318252682686,
-0.10501394420862198,
0.02010262943804264,
-0.017232051119208336,
0.022845109924674034,
-0.03890186920762062,
-0.013054042123258114,
-0.018567034974694252,
-0.02463170513510704,
-0.022206012159585953,
-0.04048731178045273,
-0.029360126703977585,
-0.027433771640062332,
-0.015518764033913612,
0.021378615871071815,
0.00001188955684483517,
-0.016235997900366783,
-0.02143537998199463,
-0.008605018258094788,
0.08318033069372177,
-0.03698280081152916,
0.005300638731569052,
0.019755207002162933,
0.007078175432980061,
-0.02107524499297142,
-0.014252584427595139,
-0.08843134343624115,
-0.03848770633339882,
-0.0132147166877985,
0.038295552134513855,
-0.02082527056336403,
0.03536402806639671,
-0.010097230784595013,
0.007536045741289854,
-0.0410967655479908,
-0.006011418532580137,
0.03130809962749481,
0.017876269295811653,
0.1370398998260498,
-0.036651335656642914,
-0.029842916876077652,
0.0403333455324173,
0.1084287166595459,
0.027980713173747063,
0.012410005554556847,
-0.06489323079586029,
-0.03857868164777756,
-0.036309245973825455,
-0.07260709255933762,
0.09921222180128098,
0.11315493285655975,
-0.12763874232769012,
0.0008267566445283592,
-0.0197578277438879,
0.027503129094839096,
-0.11654853075742722,
-0.015201262198388577,
0.012506050989031792,
0.07252168655395508,
0.000305728375678882,
0.07612118870019913,
-0.11000744253396988,
-0.02758433111011982,
0.010500669479370117,
-0.030849747359752655,
-0.023185504600405693,
-0.02055608294904232,
-0.035492975264787674,
-3.3670669167121595e-33,
0.018532250076532364,
-0.013668686151504517,
0.018174035474658012,
0.06947162747383118,
0.0075647858902812,
0.023081988096237183,
-0.009837797842919827,
0.08408618718385696,
0.004500299692153931,
-0.05726376548409462,
-0.062317416071891785,
0.02558428980410099,
0.03787406533956528,
-0.0055958121083676815,
-0.14038848876953125,
-0.03018319606781006,
-0.09108143299818039,
-0.06636575609445572,
0.005156641826033592,
0.016149239614605904,
-0.00921805202960968,
-0.01681908592581749,
-0.04515260085463524,
0.1272789090871811,
0.011487950570881367,
-0.002778454916551709,
-0.06876164674758911,
-0.026104295626282692,
0.024702468886971474,
-0.0732102170586586,
0.03322574123740196,
-0.11591589450836182,
-0.039304058998823166,
-0.016247523948550224,
0.017493125051259995,
-0.00993895623832941,
0.016011765226721764,
0.07004304230213165,
-0.007041126489639282,
0.10598749667406082,
0.06039305031299591,
-0.038038261234760284,
-0.07786259055137634,
0.02845795266330242,
0.03973746672272682,
-0.01187150925397873,
0.07340267300605774,
-0.02997596748173237,
0.008460888639092445,
-0.0864555835723877,
0.06596166640520096,
-0.013994944281876087,
-0.012068384326994419,
0.11887036263942719,
-0.01927010715007782,
0.020840642973780632,
-0.014643346890807152,
-0.0020433878526091576,
-0.012689514085650444,
-0.04985480010509491,
0.07201635837554932,
0.013386949896812439,
0.02432182990014553,
0.02002885937690735,
-0.010498559102416039,
0.05810684710741043,
-0.052537038922309875,
0.00021104770712554455,
-0.07547985017299652,
0.0525348074734211,
0.04941025376319885,
0.03371074050664902,
0.05961470305919647,
-0.004574193619191647,
-0.055772751569747925,
-0.07488131523132324,
-0.020409371703863144,
-0.06599277257919312,
0.10784202814102173,
0.02258325181901455,
-0.1006297618150711,
0.10674645751714706,
0.021027568727731705,
0.02269582264125347,
-0.030844228342175484,
0.0030155680142343044,
0.0835876390337944,
0.05985402688384056,
0.07000665366649628,
0.06265328824520111,
-0.05882074311375618,
0.010596181266009808,
-0.04738583788275719,
0.06865895539522171,
-0.07822622358798981,
-5.078619480514135e-8,
0.022874457761645317,
0.031831901520490646,
0.008112195879220963,
0.11717325448989868,
0.14278779923915863,
-0.01680978573858738,
0.03919713571667671,
0.0034980187192559242,
0.0030733251478523016,
-0.05110396817326546,
0.02602204494178295,
0.03414420783519745,
-0.07568773627281189,
0.05326643958687782,
0.03598375990986824,
-0.006939948070794344,
0.030157420784235,
0.056319985538721085,
-0.014909666031599045,
0.0032565647270530462,
-0.07830765843391418,
-0.012289888225495815,
0.05343828722834587,
-0.02902180515229702,
0.042911186814308167,
0.00017475872300565243,
0.06031561270356178,
0.06743808835744858,
0.025339564308524132,
-0.03232748806476593,
-0.008859256282448769,
-0.04600532725453377,
0.038993194699287415,
0.030791528522968292,
-0.05041493475437164,
0.08672398328781128,
-0.12208835780620575,
0.030896542593836784,
0.006400425918400288,
0.05173288285732269,
-0.03869990259408951,
-0.05190236493945122,
-0.04593123495578766,
0.017398390918970108,
-0.029076434671878815,
0.021240059286355972,
-0.07726731896400452,
-0.02865714579820633,
-0.025685276836156845,
-0.009937766939401627,
0.03504963591694832,
-0.04294976964592934,
0.00775755662471056,
0.06501275300979614,
-0.0679054856300354,
0.038474857807159424,
-0.016956055536866188,
-0.02001098357141018,
-0.01908111944794655,
0.01650545559823513,
0.015198063105344772,
0.002214923035353422,
-0.017551803961396217,
0.03313017264008522
] | 0.145422
|
the minimum number of seconds for which a newly created Pod should be ready without any of its containers crashing, for it to be considered available. This defaults to 0 (the Pod will be considered available as soon as it is ready). To learn more about when a Pod is considered ready, see [Container Probes](/docs/concepts/workloads/pods/pod-lifecycle/#container-probes). ### Terminating Pods {{< feature-state feature\_gate\_name="DeploymentReplicaSetTerminatingReplicas" >}} You can see the terminating pods only if the `DeploymentReplicaSetTerminatingReplicas` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) is enabled on the [API server](/docs/reference/command-line-tools-reference/kube-apiserver/) and on the [kube-controller-manager](/docs/reference/command-line-tools-reference/kube-controller-manager/) Pods that become terminating due to deletion or scale down may take a long time to terminate, and may consume additional resources during that period. As a result, the total number of all pods can temporarily exceed `.spec.replicas`. Terminating pods can be tracked using the `.status.terminatingReplicas` field of the Deployment. ### Revision History Limit A Deployment's revision history is stored in the ReplicaSets it controls. `.spec.revisionHistoryLimit` is an optional field that specifies the number of old ReplicaSets to retain to allow rollback. These old ReplicaSets consume resources in `etcd` and crowd the output of `kubectl get rs`. The configuration of each Deployment revision is stored in its ReplicaSets; therefore, once an old ReplicaSet is deleted, you lose the ability to rollback to that revision of Deployment. By default, 10 old ReplicaSets will be kept, however its ideal value depends on the frequency and stability of new Deployments. More specifically, setting this field to zero means that all old ReplicaSets with 0 replicas will be cleaned up. In this case, a new Deployment rollout cannot be undone, since its revision history is cleaned up. ### Paused `.spec.paused` is an optional boolean field for pausing and resuming a Deployment. The only difference between a paused Deployment and one that is not paused, is that any changes into the PodTemplateSpec of the paused Deployment will not trigger new rollouts as long as it is paused. A Deployment is not paused by default when it is created. ## {{% heading "whatsnext" %}} \* Learn more about [Pods](/docs/concepts/workloads/pods). \* [Run a stateless application using a Deployment](/docs/tasks/run-application/run-stateless-application-deployment/). \* Read the {{< api-reference page="workload-resources/deployment-v1" >}} to understand the Deployment API. \* Read about [PodDisruptionBudget](/docs/concepts/workloads/pods/disruptions/) and how you can use it to manage application availability during disruptions. \* Use kubectl to [create a Deployment](/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro/).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/deployment.md
|
[
0.08790715038776398,
-0.04756895825266838,
0.06684869527816772,
0.04417800530791283,
0.02677386999130249,
-0.04174509644508362,
-0.08448435366153717,
-0.022290978580713272,
0.04904229938983917,
0.07947929203510284,
0.005156420171260834,
-0.02793831191956997,
-0.05017469450831413,
-0.014332838356494904,
0.03215482831001282,
0.007447209674865007,
0.046427082270383835,
-0.010957438498735428,
-0.03460795059800148,
0.013511238619685173,
0.024990001693367958,
-0.013033724389970303,
-0.01081957295536995,
0.04589156433939934,
-0.08368358016014099,
0.01718667522072792,
-0.05847170576453209,
-0.08151419460773468,
0.0029474454931914806,
-0.0011422955431044102,
-0.10388559848070145,
0.016534285619854927,
0.033801887184381485,
0.009964711964130402,
0.09773042798042297,
0.09679947048425674,
0.016802510246634483,
-0.03397105261683464,
-0.0052354480139911175,
-0.04296952486038208,
-0.016506465151906013,
-0.07091730833053589,
-0.0996910110116005,
0.019160084426403046,
0.014721862971782684,
0.0058132647536695,
0.0058981445617973804,
-0.0702260434627533,
0.015733208507299423,
-0.034235868602991104,
-0.0183921679854393,
-0.039444904774427414,
0.08977117389440536,
0.025063563138246536,
0.10228989273309708,
0.025468632578849792,
-0.006663411855697632,
0.06612043082714081,
0.08846990764141083,
0.08339456468820572,
0.02128751203417778,
-0.03310225158929825,
-0.04070916399359703,
-0.04175259545445442,
0.075114905834198,
-0.02607758902013302,
0.055172886699438095,
-0.0735396072268486,
0.05648443102836609,
0.01650436408817768,
0.05920553579926491,
0.030420875176787376,
-0.022549234330654144,
0.006090969312936068,
-0.0225486159324646,
0.022001564502716064,
0.03748267889022827,
0.06837182492017746,
0.007107327226549387,
-0.03945915028452873,
-0.002857856685295701,
0.03168904036283493,
0.05739789828658104,
-0.0467294417321682,
-0.0897417888045311,
0.005787938833236694,
0.03006272204220295,
0.004947519861161709,
0.03333088755607605,
0.02518860436975956,
0.018253274261951447,
-0.029347319155931473,
0.016392571851611137,
-0.08872673660516739,
0.03983519226312637,
-0.006341854576021433,
0.0028246890287846327,
-0.018382826820015907,
-0.011307022534310818,
-0.013373963534832,
0.01618644967675209,
-0.010405836626887321,
-0.05921385809779167,
-0.011058519594371319,
0.09107565134763718,
-0.05231741443276405,
-0.04856748506426811,
-0.028447477146983147,
0.008345876820385456,
0.06887894868850708,
0.03458614647388458,
-0.03448088467121124,
-0.0010596413630992174,
0.07649528980255127,
-0.009433824568986893,
0.04611728712916374,
-0.06995981186628342,
-0.006192824337631464,
0.056194502860307693,
0.04701773077249527,
0.08641602098941803,
-0.06950375437736511,
0.01860899291932583,
-0.04077877849340439,
-0.06425741314888,
0.08264948427677155,
0.020855525508522987,
1.3570905037735724e-33,
0.018787167966365814,
-0.11872033029794693,
-0.008488805964589119,
0.03644908219575882,
0.03754890337586403,
-0.0812075063586235,
-0.02476629428565502,
0.039202868938446045,
0.01181581150740385,
-0.022518189623951912,
-0.07133235782384872,
-0.0003154276928398758,
-0.06185813248157501,
-0.04704983904957771,
0.006810881197452545,
-0.08604718744754791,
-0.052014436572790146,
0.03722282871603966,
0.0016624488634988666,
-0.01938517764210701,
0.05549786612391472,
-0.14456939697265625,
-0.07613208889961243,
0.018799640238285065,
0.07675068080425262,
-0.026554405689239502,
0.012740849517285824,
-0.09977280348539352,
-0.02647174522280693,
0.04446016624569893,
-0.07462678104639053,
0.011295338161289692,
0.009386639110744,
0.04832874611020088,
-0.13725146651268005,
-0.08293914794921875,
-0.016742421314120293,
0.012582939118146896,
-0.04805408790707588,
-0.05249409005045891,
-0.015150719322264194,
0.0008801004732958972,
-0.06280464679002762,
-0.020811595022678375,
0.048024751245975494,
-0.08487562835216522,
0.0704912394285202,
-0.05069964751601219,
0.0013480582274496555,
0.06294490396976471,
-0.015375754795968533,
-0.019595608115196228,
0.0171479731798172,
-0.03582893684506416,
0.027658315375447273,
0.03020665794610977,
0.08980554342269897,
-0.08839249610900879,
-0.08220040053129196,
-0.009096312336623669,
-0.035073187202215195,
0.016720352694392204,
0.01484520360827446,
-0.009721827693283558,
0.03210142254829407,
0.0633271262049675,
-0.006294058170169592,
0.06017446517944336,
-0.008320512250065804,
0.012600147165358067,
-0.047419074922800064,
0.008267330005764961,
-0.05153058469295502,
-0.06854305416345596,
0.01398013811558485,
-0.08525656908750534,
0.07454030960798264,
0.02070339396595955,
-0.09819688647985458,
0.04383229464292526,
0.08021955192089081,
0.005013573914766312,
-0.03982928767800331,
0.03767452761530876,
0.043889377266168594,
-0.042855724692344666,
0.006899270694702864,
0.003394895466044545,
-0.08300433307886124,
0.04131195321679115,
-0.008919420652091503,
0.014971311204135418,
-0.06150565296411514,
0.02862371876835823,
-0.05710039287805557,
-2.3376382082261032e-33,
0.09277620911598206,
-0.07859992980957031,
0.0036919715348631144,
0.04823040962219238,
-0.019481195136904716,
-0.039261989295482635,
-0.05235553905367851,
0.09276504069566727,
-0.03845346346497536,
-0.1137167438864708,
-0.030500594526529312,
-0.02506893128156662,
-0.002988843247294426,
0.041636526584625244,
-0.12238428741693497,
0.036428678780794144,
-0.04055185988545418,
-0.08954432606697083,
0.029208842664957047,
0.04474599286913872,
-0.010250871069729328,
-0.03150109574198723,
0.030237218365073204,
0.033726029098033905,
-0.06661570072174072,
-0.03141509369015694,
0.02366112358868122,
-0.00398891931399703,
-0.0028396397829055786,
-0.05572522431612015,
0.057269010692834854,
-0.08331402391195297,
-0.009230374358594418,
0.09499847888946533,
0.04874766245484352,
-0.029143450781702995,
-0.03890196233987808,
0.01911412738263607,
0.000941042962949723,
0.020992068573832512,
0.10906665772199631,
0.0017177179688587785,
-0.04798464849591255,
-0.026415567845106125,
-0.013186679221689701,
-0.02511376142501831,
0.05589448660612106,
0.014154348522424698,
0.03151925280690193,
-0.08085345476865768,
-0.03126952424645424,
0.00438924552872777,
-0.03525625541806221,
0.08135253190994263,
-0.030271228402853012,
-0.010054472833871841,
0.018339138478040695,
0.025407791137695312,
-0.025034954771399498,
0.021812986582517624,
0.028614889830350876,
-0.03054611012339592,
0.10414700210094452,
0.026458987966179848,
0.025514516979455948,
-0.0356949158012867,
0.045131709426641464,
0.11769042164087296,
0.007570568006485701,
0.03724038600921631,
0.06557150930166245,
0.010416227392852306,
-0.028914161026477814,
0.039660677313804626,
-0.0472121424973011,
-0.026113899424672127,
-0.04219769686460495,
-0.10450636595487595,
0.05153806880116463,
-0.02037729322910309,
-0.03367822989821434,
0.12671008706092834,
-0.07038822770118713,
0.017368696630001068,
0.02831161767244339,
0.07260023057460785,
0.046302679926157,
0.0852210745215416,
0.0974368005990982,
0.086405448615551,
0.05080264434218407,
0.006992522161453962,
-0.04389873519539833,
0.12581628561019897,
-0.029823841527104378,
-4.6719939916783915e-8,
0.0884774923324585,
0.022932836785912514,
-0.0040205721743404865,
0.027217041701078415,
0.10613250732421875,
0.005867240950465202,
0.04174450784921646,
0.06446251273155212,
-0.06992467492818832,
0.00847729854285717,
-0.002725459635257721,
0.0700564756989479,
-0.10646103322505951,
0.07245630025863647,
0.04837125912308693,
-0.06108944118022919,
0.005316090304404497,
0.025507595390081406,
0.020873144268989563,
-0.1177525520324707,
-0.07528697699308395,
-0.07982158660888672,
0.03382580727338791,
-0.049141354858875275,
-0.016810964792966843,
0.027089383453130722,
0.06938018649816513,
0.012360080145299435,
0.01115772221237421,
-0.04404159262776375,
-0.04983138665556908,
0.017509929835796356,
-0.07612784206867218,
0.04423856362700462,
0.005932310596108437,
0.03610381856560707,
-0.10181848704814911,
0.04694192484021187,
0.02406599558889866,
0.022676127031445503,
-0.0038812358397990465,
0.03956222906708717,
-0.035940591245889664,
-0.0019245344446972013,
-0.029575664550065994,
0.06283695995807648,
-0.02953089214861393,
0.08785473555326462,
-0.00626160204410553,
0.04178231582045555,
-0.0010157375363633037,
-0.05519178882241249,
0.006785058882087469,
0.05722557380795479,
-0.01804879866540432,
0.017776809632778168,
-0.023265382274985313,
-0.027834147214889526,
0.021585073322057724,
-0.0002512495266273618,
-0.002533714985474944,
0.01084764301776886,
-0.012556803412735462,
0.005552057176828384
] | 0.101028
|
StatefulSet is the workload API object used to manage stateful applications. {{< glossary\_definition term\_id="statefulset" length="all" >}} ## Using StatefulSets StatefulSets are valuable for applications that require one or more of the following: \* Stable, unique network identifiers. \* Stable, persistent storage. \* Ordered, graceful deployment and scaling. \* Ordered, automated rolling updates. In the above, stable is synonymous with persistence across Pod (re)scheduling. If an application doesn't require any stable identifiers or ordered deployment, deletion, or scaling, you should deploy your application using a workload object that provides a set of stateless replicas. [Deployment](/docs/concepts/workloads/controllers/deployment/) or [ReplicaSet](/docs/concepts/workloads/controllers/replicaset/) may be better suited to your stateless needs. ## Limitations \* The storage for a given Pod must either be provisioned by a [PersistentVolume Provisioner](/docs/concepts/storage/dynamic-provisioning/) based on the requested \_storage class\_, or pre-provisioned by an admin. \* Deleting and/or scaling a StatefulSet down will \_not\_ delete the volumes associated with the StatefulSet. This is done to ensure data safety, which is generally more valuable than an automatic purge of all related StatefulSet resources. \* StatefulSets currently require a [Headless Service](/docs/concepts/services-networking/service/#headless-services) to be responsible for the network identity of the Pods. You are responsible for creating this Service. \* StatefulSets do not provide any guarantees on the termination of pods when a StatefulSet is deleted. To achieve ordered and graceful termination of the pods in the StatefulSet, it is possible to scale the StatefulSet down to 0 prior to deletion. \* When using [Rolling Updates](#rolling-updates) with the default [Pod Management Policy](#pod-management-policies) (`OrderedReady`), it's possible to get into a broken state that requires [manual intervention to repair](#forced-rollback). ## Components The example below demonstrates the components of a StatefulSet. ```yaml apiVersion: v1 kind: Service metadata: name: nginx labels: app: nginx spec: ports: - port: 80 name: web clusterIP: None selector: app: nginx --- apiVersion: apps/v1 kind: StatefulSet metadata: name: web spec: selector: matchLabels: app: nginx # has to match .spec.template.metadata.labels serviceName: "nginx" replicas: 3 # by default is 1 minReadySeconds: 10 # by default is 0 template: metadata: labels: app: nginx # has to match .spec.selector.matchLabels spec: terminationGracePeriodSeconds: 10 containers: - name: nginx image: registry.k8s.io/nginx-slim:0.24 ports: - containerPort: 80 name: web volumeMounts: - name: www mountPath: /usr/share/nginx/html volumeClaimTemplates: - metadata: name: www spec: accessModes: [ "ReadWriteOnce" ] storageClassName: "my-storage-class" resources: requests: storage: 1Gi ``` {{< note >}} This example uses the `ReadWriteOnce` access mode, for simplicity. For production use, the Kubernetes project recommends using the `ReadWriteOncePod` access mode instead. {{< /note >}} In the above example: \* A Headless Service, named `nginx`, is used to control the network domain. \* The StatefulSet, named `web`, has a Spec that indicates that 3 replicas of the nginx container will be launched in unique Pods. \* The `volumeClaimTemplates` will provide stable storage using [PersistentVolumes](/docs/concepts/storage/persistent-volumes/) provisioned by a PersistentVolume Provisioner. The name of a StatefulSet object must be a valid [DNS label](/docs/concepts/overview/working-with-objects/names#dns-label-names). ### Pod Selector You must set the `.spec.selector` field of a StatefulSet to match the labels of its `.spec.template.metadata.labels`. Failing to specify a matching Pod Selector will result in a validation error during StatefulSet creation. ### Volume Claim Templates You can set the `.spec.volumeClaimTemplates` field to create a [PersistentVolumeClaim](/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims). This will provide stable storage to the StatefulSet if either: \* The StorageClass specified for the volume claim is set up to use [dynamic provisioning](/docs/concepts/storage/dynamic-provisioning/). \* The cluster already contains a PersistentVolume with the correct StorageClass and sufficient available storage space. ### Minimum ready seconds {{< feature-state for\_k8s\_version="v1.25" state="stable" >}} `.spec.minReadySeconds` is an optional field that specifies the minimum number of seconds for which a newly created Pod should be running and ready without any of its containers crashing, for
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/statefulset.md
|
[
-0.006021921522915363,
-0.0356716588139534,
-0.01688295230269432,
0.019070129841566086,
-0.061745189130306244,
-0.015393666923046112,
-0.040966324508190155,
0.0011013125767931342,
0.0014097071252763271,
0.0725516751408577,
-0.045228105038404465,
0.04807261750102043,
0.002696857787668705,
-0.017005309462547302,
-0.011139080859720707,
0.02246761880815029,
0.06976673752069473,
-0.03361804783344269,
-0.08413510769605637,
0.03451666235923767,
0.06502225250005722,
-0.0052412026561796665,
0.035032741725444794,
0.05245022475719452,
-0.029912076890468597,
0.025560971349477768,
-0.04988515004515648,
-0.07019650936126709,
0.049828678369522095,
0.01349063403904438,
-0.006994509603828192,
0.03069053590297699,
-0.03321418911218643,
0.006322837434709072,
0.07186272740364075,
0.09257114678621292,
-0.024458004161715508,
-0.10140786319971085,
-0.052168019115924835,
-0.0699944943189621,
0.04611559212207794,
-0.04557625576853752,
-0.08715181797742844,
0.033397555351257324,
-0.049900468438863754,
-0.005071484018117189,
0.004861707333475351,
0.004654944874346256,
0.010493430308997631,
-0.021695028990507126,
0.01973063312470913,
-0.05431210994720459,
0.04837195202708244,
0.12167507410049438,
0.051771242171525955,
0.05238455906510353,
0.0532907098531723,
0.06186825409531593,
0.014023183844983578,
0.018900875002145767,
0.08057118207216263,
-0.015386972576379776,
0.04314272850751877,
-0.02362438105046749,
0.033280644565820694,
0.021344050765037537,
0.043256521224975586,
0.00966944731771946,
0.03392358124256134,
-0.04341199994087219,
0.012099727988243103,
0.0660645067691803,
-0.01558169350028038,
-0.013517694547772408,
-0.048452794551849365,
-0.03325594589114189,
0.06338950991630554,
0.008057873696088791,
0.035938799381256104,
-0.04004998877644539,
0.009718689136207104,
0.022661281749606133,
0.025084855034947395,
0.014007105492055416,
-0.02462761104106903,
-0.08712051808834076,
0.009112583473324776,
-0.03572331741452217,
0.02274315617978573,
0.015838030725717545,
0.03705286607146263,
0.039335209876298904,
0.0902615338563919,
-0.11390034109354019,
0.03981442376971245,
-0.017039261758327484,
0.023543579503893852,
0.029948215931653976,
-0.04038204997777939,
-0.010770629160106182,
0.030115891247987747,
-0.024074522778391838,
0.06412169337272644,
0.044906821101903915,
0.032127562910318375,
-0.07258567959070206,
-0.058263085782527924,
-0.026625292375683784,
-0.008719200268387794,
0.05761980637907982,
-0.006270994432270527,
0.02556367591023445,
-0.010130730457603931,
0.06099153310060501,
-0.005407392047345638,
0.04701392725110054,
-0.10217443108558655,
0.020830228924751282,
0.011837378144264221,
0.08896247297525406,
-0.001449376461096108,
-0.10130084306001663,
0.06423694640398026,
-0.06554965674877167,
-0.014148938469588757,
0.04382636025547981,
0.04201935604214668,
5.103201175873644e-33,
-0.009583663195371628,
-0.0878828763961792,
-0.07705818116664886,
0.015688132494688034,
0.013050670735538006,
-0.044340286403894424,
0.025879710912704468,
0.01936977356672287,
-0.04887080937623978,
-0.09494645893573761,
-0.05730419233441353,
0.11483519524335861,
-0.057289861142635345,
0.030782874673604965,
0.037479039281606674,
-0.08568290621042252,
-0.031572211533784866,
0.08185723423957825,
0.1520545929670334,
-0.00746522843837738,
0.008876289241015911,
-0.029688280075788498,
-0.05296652391552925,
-0.050835154950618744,
0.05939628183841705,
-0.03687562048435211,
0.04984838142991066,
-0.045252107083797455,
-0.06915454566478729,
0.035572923719882965,
-0.01773097738623619,
0.023695481941103935,
0.01689212955534458,
-0.014688522554934025,
-0.04619580879807472,
-0.07685536891222,
-0.10328244417905807,
-0.014914390631020069,
-0.07637941092252731,
-0.09470490366220474,
0.04931219294667244,
0.0005703064962290227,
0.009676066227257252,
0.00017343163199257106,
0.03153632581233978,
-0.03467312827706337,
0.03194853290915489,
-0.04241376370191574,
-0.018961772322654724,
0.06578287482261658,
0.0434604175388813,
-0.034784939140081406,
-0.03556964173913002,
-0.06658928841352463,
-0.031768299639225006,
-0.03655619919300079,
0.025980420410633087,
-0.07992274314165115,
-0.004594303667545319,
-0.0352470837533474,
-0.08568072319030762,
-0.05064328387379646,
-0.02714063972234726,
0.03953063488006592,
0.07324501872062683,
0.07339458912611008,
-0.06982475519180298,
-0.003952935803681612,
0.01761486753821373,
0.028386471793055534,
0.01834898069500923,
0.012093780562281609,
0.01203170046210289,
-0.02329215407371521,
-0.03305686265230179,
-0.06210675090551376,
0.05200594291090965,
0.008983260951936245,
-0.18462736904621124,
0.04331476613879204,
0.017186861485242844,
0.01622128114104271,
-0.13119587302207947,
0.11727506667375565,
0.009196162223815918,
-0.027621809393167496,
0.01582421362400055,
-0.021255170926451683,
-0.07817531377077103,
0.05443762242794037,
0.043936293572187424,
-0.03525260463356972,
-0.010808865539729595,
-0.02595127932727337,
-0.07976379245519638,
-5.1109752342944104e-33,
0.09282340109348297,
-0.044377975165843964,
-0.026560796424746513,
0.07633088529109955,
0.03702740743756294,
0.00929801445454359,
-0.024444077163934708,
0.0966423749923706,
-0.02276056818664074,
-0.08342611789703369,
-0.07448526471853256,
-0.04045712575316429,
-0.01471618004143238,
-0.004210375249385834,
-0.10602681338787079,
-0.014508412219583988,
-0.08242176473140717,
-0.11625908315181732,
0.044531721621751785,
0.05821847543120384,
-0.004957173485308886,
-0.006713952869176865,
0.016144126653671265,
0.06422223150730133,
0.018803806975483894,
-0.03284000605344772,
-0.062129877507686615,
0.00648947199806571,
0.002666607266291976,
-0.054135385900735855,
0.011020642705261707,
-0.08972625434398651,
-0.05662265792489052,
-0.06595911085605621,
-0.02074430324137211,
-0.004289568867534399,
0.025942301377654076,
0.03413878381252289,
-0.029715528711676598,
0.009639207273721695,
0.07760792225599289,
-0.012401233427226543,
-0.08099561929702759,
-0.004605736583471298,
0.021001610904932022,
0.007217045407742262,
-0.047266874462366104,
0.04203784093260765,
-0.029903173446655273,
-0.020029261708259583,
0.0362904816865921,
-0.0020422579254955053,
-0.06769402325153351,
0.08722078055143356,
0.051729075610637665,
0.03383884206414223,
-0.0013003346975892782,
0.05053456500172615,
-0.05215192958712578,
0.032182447612285614,
0.02174968086183071,
-0.07465143501758575,
0.037979137152433395,
0.04880477115511894,
-0.04993101581931114,
-0.030390789732336998,
0.03038519062101841,
0.009740406647324562,
-0.04524209722876549,
0.05557560548186302,
0.004276161082088947,
-0.021390343084931374,
0.06927510350942612,
0.009139090776443481,
-0.014909445308148861,
-0.04107040911912918,
0.020283836871385574,
-0.07499855756759644,
0.0897536650300026,
0.036202799528837204,
-0.10323216766119003,
0.1552138477563858,
-0.058567699044942856,
0.010255241766571999,
0.028274130076169968,
0.010175219736993313,
0.05417454615235329,
0.08208999037742615,
0.07110811769962311,
0.11515321582555771,
-0.004100024700164795,
0.010867313481867313,
-0.08572415262460709,
0.04345374554395676,
-0.038553062826395035,
-5.6700542927501374e-8,
0.04837844520807266,
0.08938001841306686,
0.029442153871059418,
0.03082883358001709,
0.006582219619303942,
-0.04702463001012802,
0.10219970345497131,
0.012407390400767326,
0.04372388496994972,
0.02998330630362034,
0.03589038923382759,
0.03540505841374397,
-0.09178376197814941,
-0.016374383121728897,
-0.051739681512117386,
0.017984583973884583,
0.015162940137088299,
-0.009397333487868309,
-0.03868500143289566,
-0.05994699150323868,
-0.018040010705590248,
-0.05891574174165726,
0.026746366173028946,
0.0458645299077034,
0.04847267270088196,
0.00941283069550991,
0.11611510813236237,
0.0030137826688587666,
-0.00012248133134562522,
0.01658940315246582,
-0.03012464940547943,
0.031081415712833405,
0.02472972497344017,
0.031008098274469376,
-0.04446728900074959,
0.003667397890239954,
-0.12594105303287506,
0.04990645870566368,
0.06448587775230408,
0.007972673512995243,
-0.03330817446112633,
0.02221832424402237,
-0.0022972591686993837,
-0.002567622810602188,
0.06424827873706818,
0.015973012894392014,
-0.06392478197813034,
0.055577438324689865,
-0.015345918945968151,
0.060148753225803375,
-0.0606204979121685,
-0.05359505116939545,
-0.035423394292593,
0.09026505798101425,
0.006997354328632355,
0.025305723771452904,
0.04378141835331917,
-0.02905155159533024,
0.07633063197135925,
0.013776103965938091,
0.05156601965427399,
0.0052395593374967575,
-0.02207908034324646,
-0.010773735120892525
] | 0.141056
|
a PersistentVolume with the correct StorageClass and sufficient available storage space. ### Minimum ready seconds {{< feature-state for\_k8s\_version="v1.25" state="stable" >}} `.spec.minReadySeconds` is an optional field that specifies the minimum number of seconds for which a newly created Pod should be running and ready without any of its containers crashing, for it to be considered available. This is used to check progression of a rollout when using a [Rolling Update](#rolling-updates) strategy. This field defaults to 0 (the Pod will be considered available as soon as it is ready). To learn more about when a Pod is considered ready, see [Container Probes](/docs/concepts/workloads/pods/pod-lifecycle/#container-probes). ## Pod Identity StatefulSet Pods have a unique identity that consists of an ordinal, a stable network identity, and stable storage. The identity sticks to the Pod, regardless of which node it's (re)scheduled on. ### Ordinal Index For a StatefulSet with N [replicas](#replicas), each Pod in the StatefulSet will be assigned an integer ordinal, that is unique over the Set. By default, pods will be assigned ordinals from 0 up through N-1. The StatefulSet controller will also add a pod label with this index: `apps.kubernetes.io/pod-index`. ### Start ordinal {{< feature-state feature\_gate\_name="StatefulSetStartOrdinal" >}} `.spec.ordinals` is an optional field that allows you to configure the integer ordinals assigned to each Pod. It defaults to nil. Within the field, you can configure the following options: \* `.spec.ordinals.start`: If the `.spec.ordinals.start` field is set, Pods will be assigned ordinals from `.spec.ordinals.start` up through `.spec.ordinals.start + .spec.replicas - 1`. ### Stable Network ID Each Pod in a StatefulSet derives its hostname from the name of the StatefulSet and the ordinal of the Pod. The pattern for the constructed hostname is `$(statefulset name)-$(ordinal)`. The example above will create three Pods named `web-0,web-1,web-2`. A StatefulSet can use a [Headless Service](/docs/concepts/services-networking/service/#headless-services) to control the domain of its Pods. The domain managed by this Service takes the form: `$(service name).$(namespace).svc.cluster.local`, where "cluster.local" is the cluster domain. As each Pod is created, it gets a matching DNS subdomain, taking the form: `$(podname).$(governing service domain)`, where the governing service is defined by the `serviceName` field on the StatefulSet. Depending on how DNS is configured in your cluster, you may not be able to look up the DNS name for a newly-run Pod immediately. This behavior can occur when other clients in the cluster have already sent queries for the hostname of the Pod before it was created. Negative caching (normal in DNS) means that the results of previous failed lookups are remembered and reused, even after the Pod is running, for at least a few seconds. If you need to discover Pods promptly after they are created, you have a few options: \* Query the Kubernetes API directly (for example, using a watch) rather than relying on DNS lookups. \* Decrease the time of caching in your Kubernetes DNS provider (typically this means editing the config map for CoreDNS, which currently caches for 30 seconds). As mentioned in the [limitations](#limitations) section, you are responsible for creating the [Headless Service](/docs/concepts/services-networking/service/#headless-services) responsible for the network identity of the pods. Here are some examples of choices for Cluster Domain, Service name, StatefulSet name, and how that affects the DNS names for the StatefulSet's Pods. | Cluster Domain | Service (ns/name) | StatefulSet (ns/name) | StatefulSet Domain | Pod DNS | Pod Hostname | | -------------- | ----------------- | --------------------- | ------------------------------- | -------------------------------------------- | ------------ | | cluster.local | default/nginx | default/web | nginx.default.svc.cluster.local | web-{0..N-1}.nginx.default.svc.cluster.local | web-{0..N-1} | | cluster.local | foo/nginx | foo/web | nginx.foo.svc.cluster.local | web-{0..N-1}.nginx.foo.svc.cluster.local | web-{0..N-1} | | kube.local | foo/nginx | foo/web | nginx.foo.svc.kube.local | web-{0..N-1}.nginx.foo.svc.kube.local | web-{0..N-1}
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/statefulset.md
|
[
0.007563621271401644,
-0.019579678773880005,
0.022878235206007957,
0.06460247933864594,
0.005311621818691492,
-0.0038539133965969086,
-0.03078707866370678,
-0.02162006124854088,
0.05590884014964104,
0.030833924189209938,
0.0023245513439178467,
0.036990370601415634,
-0.024414079263806343,
-0.03490675240755081,
-0.04788894206285477,
-0.032014984637498856,
0.07230659574270248,
-0.01626182533800602,
-0.045721959322690964,
0.008273842744529247,
0.03088422492146492,
-0.05173663794994354,
0.0028581584338098764,
0.028079720214009285,
-0.0476086288690567,
0.02394714578986168,
-0.05081556737422943,
-0.043939363211393356,
0.055317919701337814,
-0.017368873581290245,
-0.04922109842300415,
-0.0036853221245110035,
0.019944308325648308,
0.01207598764449358,
0.05800816789269447,
0.07704681903123856,
0.024398230016231537,
-0.04412076994776726,
-0.04509684443473816,
-0.023948561400175095,
0.039981309324502945,
-0.10518376529216766,
-0.07566484808921814,
0.05524061620235443,
-0.03949679061770439,
0.02603871189057827,
-0.00615078816190362,
-0.028866514563560486,
-0.05303848162293434,
-0.01653381437063217,
-0.003408297896385193,
-0.06556132435798645,
0.06632260978221893,
0.08641371876001358,
0.078857421875,
0.12750473618507385,
0.02591782808303833,
0.03399951756000519,
0.06654544919729233,
0.042391225695610046,
0.04726403206586838,
-0.07039909809827805,
0.017569327726960182,
-0.00389745831489563,
0.06855844706296921,
0.027958771213889122,
0.05370434373617172,
0.011029629036784172,
0.08692894130945206,
0.018185367807745934,
0.0695965364575386,
0.07205425202846527,
-0.02945471741259098,
0.011961694806814194,
-0.013222450390458107,
0.03637862950563431,
0.04684414342045784,
0.003329960163682699,
-0.0022451418917626143,
-0.013179702684283257,
-0.02390309050679207,
0.002864659996703267,
0.00591966463252902,
-0.05237044021487236,
-0.05026326701045036,
-0.04464362561702728,
0.02814212441444397,
0.027037935331463814,
0.017273742705583572,
-0.017854612320661545,
-0.011059732176363468,
0.04907136410474777,
0.03327394649386406,
-0.08174953609704971,
0.026537301018834114,
0.032464537769556046,
0.015381662175059319,
0.01795671321451664,
0.00196908600628376,
-0.008018271066248417,
0.04851425066590309,
0.019778767600655556,
-0.02316598780453205,
0.029333094134926796,
0.07655829936265945,
-0.11257563531398773,
-0.04831215739250183,
-0.04458969831466675,
-0.00965871661901474,
0.0953243300318718,
0.039961837232112885,
-0.011247103102505207,
0.022382037714123726,
0.08331532031297684,
-0.01829242706298828,
0.0687250941991806,
-0.09394869953393936,
0.03435802832245827,
0.03509830683469772,
0.028626279905438423,
0.07614408433437347,
-0.053512535989284515,
0.047381166368722916,
-0.07211373001337051,
-0.03163011372089386,
0.0483568049967289,
0.04396406188607216,
3.169405337569484e-33,
0.006996620446443558,
-0.10318561643362045,
-0.05250515416264534,
-0.018495792523026466,
0.008660613559186459,
-0.08536003530025482,
-0.011226261965930462,
0.0066148643381893635,
-0.05277980864048004,
-0.05588933452963829,
-0.058482639491558075,
0.04895864427089691,
-0.07253856211900711,
-0.0247616246342659,
0.01542014628648758,
-0.12315631657838821,
-0.022265233099460602,
0.0532018281519413,
0.07269446551799774,
-0.01715007796883583,
0.04598791152238846,
-0.08624951541423798,
-0.058663614094257355,
-0.03804410994052887,
0.07458005845546722,
-0.01244629081338644,
0.02045763097703457,
-0.06429748237133026,
-0.016495803371071815,
0.047088149935007095,
-0.06693276017904282,
0.049606166779994965,
-0.024861246347427368,
0.014050782658159733,
-0.06990006566047668,
-0.04802732914686203,
-0.05221456289291382,
0.009850244969129562,
-0.05911608040332794,
-0.1278727948665619,
0.029418254271149635,
0.000058033227105624974,
-0.029047919437289238,
-0.01706838421523571,
0.017486141994595528,
-0.07954433560371399,
0.025794336572289467,
0.0039854892529547215,
-0.0051454720087349415,
0.07828008383512497,
0.013130211271345615,
-0.020145099610090256,
-0.05748813971877098,
-0.07877542078495026,
-0.022273974493145943,
-0.015373595990240574,
0.07400302588939667,
-0.06182548403739929,
-0.032822441309690475,
0.028495950624346733,
-0.008561098016798496,
-0.019598037004470825,
0.0027954201214015484,
-0.00519962003454566,
0.05904657766222954,
0.12851068377494812,
-0.03414924070239067,
-0.04818309098482132,
0.041051942855119705,
0.015868887305259705,
-0.023558178916573524,
0.020104076713323593,
-0.04106689989566803,
-0.03498551994562149,
-0.020683951675891876,
-0.057498011738061905,
0.05209475755691528,
0.012844712473452091,
-0.14058226346969604,
0.02782464772462845,
0.03356040269136429,
-0.03588173910975456,
-0.08451162278652191,
0.06546210497617722,
-0.013786176219582558,
-0.03791404142975807,
0.010230302810668945,
0.030192717909812927,
-0.1386081427335739,
0.0034792569931596518,
0.036006227135658264,
-0.0013215189101174474,
0.015043179504573345,
0.010221983306109905,
-0.07999332994222641,
-2.496634472092372e-33,
0.06352957338094711,
-0.06254998594522476,
0.006805823650211096,
0.12897652387619019,
0.023612184450030327,
-0.001035438384860754,
-0.055797748267650604,
0.05216923728585243,
-0.047430068254470825,
-0.060366831719875336,
-0.07379624247550964,
-0.04858405515551567,
0.004905825946480036,
0.019820116460323334,
-0.07628295570611954,
0.0027406204026192427,
-0.02122381143271923,
-0.12268651276826859,
0.054222311824560165,
0.06829321384429932,
0.022239098325371742,
-0.006823654752224684,
-0.024414245039224625,
0.061184488236904144,
0.022954296320676804,
0.01665852963924408,
0.029862146824598312,
-0.008159522898495197,
-0.06134016811847687,
-0.07989411801099777,
0.007251161150634289,
-0.12706556916236877,
-0.03143421560525894,
-0.007700803689658642,
0.04308747872710228,
-0.00025993085000663996,
0.007160994224250317,
-0.0054459464736282825,
-0.04669169709086418,
0.04505707696080208,
0.09765168279409409,
0.020983953028917313,
-0.09581594914197922,
0.02201492339372635,
-0.04000413045287132,
0.01569877378642559,
0.009493141435086727,
0.04360673204064369,
-0.02975628338754177,
-0.049522023648023605,
0.008515176363289356,
-0.017480140551924706,
-0.017647748813033104,
0.08029776066541672,
0.01665056310594082,
0.018902942538261414,
-0.007240469567477703,
0.06085478141903877,
-0.013358554802834988,
0.020834404975175858,
0.08737970888614655,
-0.06716558337211609,
0.030086323618888855,
0.014863896183669567,
-0.02649165876209736,
-0.02605835162103176,
0.022078165784478188,
0.02494610846042633,
-0.05776605382561684,
0.04964452609419823,
0.08623325824737549,
0.02201453223824501,
0.010844570584595203,
-0.0026668542996048927,
-0.007120288908481598,
-0.07420473545789719,
-0.01956157200038433,
-0.08496218919754028,
0.04604608565568924,
0.009144089184701443,
-0.1482275128364563,
0.15401706099510193,
-0.04613572359085083,
0.035942405462265015,
0.04062488302588463,
0.0450148768723011,
0.06508737057447433,
0.08688642829656601,
0.09044021368026733,
0.10266672074794769,
0.006205278914421797,
0.051891930401325226,
-0.12560324370861053,
0.0881732925772667,
-0.05484066531062126,
-5.000163483259712e-8,
0.03652774915099144,
0.029124893248081207,
0.027474790811538696,
0.07559052109718323,
0.10728241503238678,
-0.046278052031993866,
0.06291360408067703,
-0.02745114453136921,
-0.026392564177513123,
0.00971975363790989,
0.054753534495830536,
0.0084019610658288,
-0.053405147045850754,
-0.00989434402436018,
0.03166034072637558,
-0.01189446821808815,
0.01318660844117403,
0.0005739775369875133,
-0.05020616576075554,
-0.03847215324640274,
-0.028112364932894707,
-0.019147291779518127,
0.0541866309940815,
-0.019361872225999832,
-0.005189394112676382,
0.016142232343554497,
0.1485835164785385,
0.05468194931745529,
0.04554547742009163,
-0.0026180550921708345,
-0.03810138255357742,
-0.005591451656073332,
0.014216595329344273,
0.023018013685941696,
-0.07225401699542999,
0.07004701346158981,
-0.10967006534337997,
0.057661592960357666,
0.026982439681887627,
0.05438784509897232,
-0.02332313358783722,
-0.04485982283949852,
-0.05251185968518257,
0.01880444958806038,
-0.04952410236001015,
0.03226896747946739,
-0.06879761070013046,
0.026281001046299934,
-0.023624811321496964,
0.06405248492956161,
-0.0511111319065094,
-0.09041150659322739,
-0.0023070769384503365,
0.07866539806127548,
0.013538618572056293,
-0.01195047702640295,
0.03504795581102371,
-0.041782889515161514,
0.035564422607421875,
0.03836027532815933,
0.007672347128391266,
0.0330977663397789,
0.0009886121843010187,
0.007094691041857004
] | 0.190182
|
-------------- | ----------------- | --------------------- | ------------------------------- | -------------------------------------------- | ------------ | | cluster.local | default/nginx | default/web | nginx.default.svc.cluster.local | web-{0..N-1}.nginx.default.svc.cluster.local | web-{0..N-1} | | cluster.local | foo/nginx | foo/web | nginx.foo.svc.cluster.local | web-{0..N-1}.nginx.foo.svc.cluster.local | web-{0..N-1} | | kube.local | foo/nginx | foo/web | nginx.foo.svc.kube.local | web-{0..N-1}.nginx.foo.svc.kube.local | web-{0..N-1} | {{< note >}} Cluster Domain will be set to `cluster.local` unless [otherwise configured](/docs/concepts/services-networking/dns-pod-service/). {{< /note >}} ### Stable Storage For each VolumeClaimTemplate entry defined in a StatefulSet, each Pod receives one PersistentVolumeClaim. In the nginx example above, each Pod receives a single PersistentVolume with a StorageClass of `my-storage-class` and 1 GiB of provisioned storage. If no StorageClass is specified, then the default StorageClass will be used. When a Pod is (re)scheduled onto a node, its `volumeMounts` mount the PersistentVolumes associated with its PersistentVolume Claims. Note that, the PersistentVolumes associated with the Pods' PersistentVolume Claims are not deleted when the Pods, or StatefulSet are deleted. This must be done manually. ### Pod Name Label When the StatefulSet {{}} creates a Pod, it adds a label, `statefulset.kubernetes.io/pod-name`, that is set to the name of the Pod. This label allows you to attach a Service to a specific Pod in the StatefulSet. ### Pod index label {{< feature-state feature\_gate\_name="PodIndexLabel" >}} When the StatefulSet {{}} creates a Pod, the new Pod is labelled with `apps.kubernetes.io/pod-index`. The value of this label is the ordinal index of the Pod. This label allows you to route traffic to a particular pod index, filter logs/metrics using the pod index label, and more. Note the feature gate `PodIndexLabel` is enabled and locked by default for this feature, in order to disable it, users will have to use server emulated version v1.31. ## Deployment and Scaling Guarantees \* For a StatefulSet with N replicas, when Pods are being deployed, they are created sequentially, in order from {0..N-1}. \* When Pods are being deleted, they are terminated in reverse order, from {N-1..0}. \* Before a scaling operation is applied to a Pod, all of its predecessors must be Running and Ready. If [`.spec.minReadySeconds`](#minimum-ready-seconds) is set, predecessors must be available (Ready for at least `minReadySeconds`). \* Before a Pod is terminated, all of its successors must be completely shutdown. The StatefulSet should not specify a `pod.Spec.TerminationGracePeriodSeconds` of 0. This practice is unsafe and strongly discouraged. For further explanation, please refer to [force deleting StatefulSet Pods](/docs/tasks/run-application/force-delete-stateful-set-pod/). When the nginx example above is created, three Pods will be deployed in the order web-0, web-1, web-2. web-1 will not be deployed before web-0 is [Running and Ready](/docs/concepts/workloads/pods/pod-lifecycle/), and web-2 will not be deployed until web-1 is Running and Ready. If web-0 should fail, after web-1 is Running and Ready, but before web-2 is launched, web-2 will not be launched until web-0 is successfully relaunched and becomes Running and Ready. If a user were to scale the deployed example by patching the StatefulSet such that `replicas=1`, web-2 would be terminated first. web-1 would not be terminated until web-2 is fully shutdown and deleted. If web-0 were to fail after web-2 has been terminated and is completely shutdown, but prior to web-1's termination, web-1 would not be terminated until web-0 is Running and Ready. ### Pod Management Policies StatefulSet allows you to relax its ordering guarantees while preserving its uniqueness and identity guarantees via its `.spec.podManagementPolicy` field. #### OrderedReady Pod Management `OrderedReady` pod management is the default for StatefulSets. It implements the behavior described in [Deployment and Scaling Guarantees](#deployment-and-scaling-guarantees). #### Parallel Pod Management `Parallel` pod management tells the StatefulSet controller to launch or terminate all Pods in parallel, and to not wait for Pods to become
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/statefulset.md
|
[
0.0033405933063477278,
-0.006348114460706711,
-0.05005044490098953,
0.011122279800474644,
0.06733474880456924,
-0.005930569488555193,
-0.04256175085902214,
-0.056204408407211304,
0.011236928403377533,
-0.02364523336291313,
0.06323815882205963,
-0.047782763838768005,
-0.06102858483791351,
0.02556717023253441,
-0.00619489373639226,
-0.060513876378536224,
-0.10040690004825592,
0.06480848044157028,
0.012006937526166439,
-0.04443727433681488,
0.01558549515902996,
0.014304842799901962,
0.024175090715289116,
-0.01592976786196232,
-0.0009432315710000694,
0.03203921392560005,
-0.07834754884243011,
-0.02647508680820465,
0.11139926314353943,
0.015999749302864075,
-0.0029553782660514116,
0.06764719635248184,
-0.056703049689531326,
-0.004459306597709656,
0.039363909512758255,
0.0858602374792099,
0.09165030717849731,
-0.008658930659294128,
-0.040991559624671936,
0.011313646100461483,
0.15018218755722046,
0.051761019974946976,
0.021450474858283997,
-0.17651478946208954,
-0.07088547199964523,
-0.09611000120639801,
-0.0794096365571022,
0.01403258740901947,
-0.06731615215539932,
-0.03194247931241989,
-0.04065224155783653,
-0.09622859954833984,
-0.09702526777982712,
0.06226612627506256,
0.004808818455785513,
0.023600144311785698,
-0.033376675099134445,
0.006333526689559221,
0.09358035773038864,
0.015367519110441208,
-0.024439040571451187,
-0.0831076130270958,
0.02226315252482891,
-0.029106834903359413,
-0.05565226450562477,
-0.020725607872009277,
-0.040334735065698624,
-0.0016577283386141062,
0.002076609991490841,
0.03129833936691284,
-0.005585475824773312,
-0.011161675676703453,
-0.07097942382097244,
0.0028730735648423433,
-0.01232220884412527,
0.0024408965837210417,
-0.01403611060231924,
0.031923096626996994,
-0.06284543126821518,
-0.06666625291109085,
-0.03849145770072937,
-0.031726911664009094,
0.0735282152891159,
0.018273474648594856,
0.009602097794413567,
0.036300625652074814,
-0.03921221196651459,
-0.06397686898708344,
0.06078622117638588,
-0.11393119394779205,
-0.09910343587398529,
-0.03871111571788788,
-0.035194769501686096,
-0.014776448719203472,
0.01680695079267025,
0.025428257882595062,
-0.030364133417606354,
0.1007031500339508,
0.03270897641777992,
0.07909763604402542,
-0.031529501080513,
-0.08678986877202988,
0.039296705275774,
-0.02932555414736271,
-0.015108933672308922,
0.017333393916487694,
-0.07656373083591461,
0.05451471731066704,
0.024376243352890015,
0.04216790199279785,
-0.03912609443068504,
0.07163509726524353,
0.024207552894949913,
-0.03726987913250923,
-0.07412077486515045,
-0.046382732689380646,
0.05647512152791023,
-0.02313692308962345,
0.028838759288191795,
0.09772809594869614,
0.07274923473596573,
-0.07515135407447815,
0.02164561115205288,
0.0364493727684021,
0.060890018939971924,
-0.03234780207276344,
-0.017973339185118675,
-5.2463378168954124e-33,
0.04582745209336281,
-0.07876270264387131,
-0.0011907004518434405,
-0.00784424226731062,
0.03801955282688141,
-0.007186904549598694,
-0.009069143794476986,
-0.008905291557312012,
-0.012742346152663231,
0.05473988875746727,
0.010206582024693489,
0.04115593060851097,
-0.0591827929019928,
-0.03734656423330307,
0.036279432475566864,
-0.00965298991650343,
0.08889684826135635,
0.011242788285017014,
0.0028184971306473017,
0.022234797477722168,
0.05081673711538315,
0.030966833233833313,
-0.03468567878007889,
0.047922533005476,
0.022882994264364243,
-0.008497647941112518,
-0.008972256444394588,
-0.05766822025179863,
-0.04826195910573006,
-0.007665583398193121,
0.14092037081718445,
-0.011087949387729168,
0.0033029657788574696,
0.014349058270454407,
0.002323900582268834,
0.09459489583969116,
0.03731188923120499,
0.013458416797220707,
-0.12013956904411316,
-0.08991680294275284,
0.00156622554641217,
-0.007012823596596718,
-0.049220677465200424,
-0.042853932827711105,
0.018910054117441177,
-0.04751557484269142,
-0.023837773129343987,
-0.10952044278383255,
0.08737502247095108,
-0.08790460228919983,
-0.07250943034887314,
-0.0011338492622599006,
0.025480184704065323,
-0.010517151094973087,
0.04452177882194519,
0.03495341166853905,
-0.07214906811714172,
0.04966156557202339,
-0.009771320968866348,
0.032774925231933594,
-0.014988385140895844,
-0.0211254321038723,
-0.07811088860034943,
-0.021936334669589996,
0.015486818738281727,
0.0608074776828289,
0.08864451944828033,
0.05835886672139168,
0.004628227092325687,
-0.041842829436063766,
-0.023848967626690865,
0.0627933144569397,
-0.0239125806838274,
0.05581720173358917,
-0.047252438962459564,
-0.057294294238090515,
-0.001308328821323812,
0.01811721734702587,
0.012184035032987595,
-0.02666741982102394,
-0.013701234944164753,
-0.05429830029606819,
-0.13355416059494019,
0.0890212282538414,
-0.01631433516740799,
-0.005286600906401873,
-0.003975972533226013,
0.0006949452799744904,
0.022149154916405678,
-0.09561140090227127,
-0.05234310030937195,
0.0036845530848950148,
0.023771174252033234,
-0.1199737936258316,
-0.08141722530126572,
4.362971260996733e-34,
0.0433485209941864,
-0.0007079204660840333,
-0.020699484273791313,
0.01287838350981474,
-0.05344432219862938,
0.00490968395024538,
0.06310336291790009,
0.0688057690858841,
-0.047912243753671646,
0.05863256752490997,
0.05826816335320473,
-0.00846530869603157,
0.0615280345082283,
0.012023413553833961,
-0.0465572327375412,
0.07041192799806595,
0.019174691289663315,
-0.05281635746359825,
0.054588429629802704,
-0.03616773337125778,
-0.07026200741529465,
0.037083085626363754,
0.06035814806818962,
0.06503236293792725,
-0.05538703873753548,
0.01117363478988409,
0.03943765163421631,
0.01585528999567032,
-0.07891480624675751,
-0.015383336693048477,
-0.005228572990745306,
-0.02763471007347107,
-0.04642706364393234,
0.021190734580159187,
-0.020431753247976303,
-0.06423260271549225,
-0.10659810155630112,
0.11516067385673523,
0.03655583783984184,
-0.06147066131234169,
0.03584806248545647,
-0.0013126225676387548,
-0.02896200679242611,
0.03475741669535637,
-0.07553798705339432,
-0.06730534136295319,
0.11964328587055206,
0.0045197755098342896,
-0.100278340280056,
0.002761904615908861,
-0.028649961575865746,
-0.008915545418858528,
-0.03084624372422695,
0.037518393248319626,
-0.014802070334553719,
0.031162584200501442,
0.0781555250287056,
0.000998808885924518,
-0.05363626778125763,
-0.013523212634027004,
0.07865455001592636,
-0.09438501298427582,
-0.05646234750747681,
0.07050778716802597,
0.019006988033652306,
-0.007708300370723009,
-0.16612079739570618,
-0.044924717396497726,
0.0026428743731230497,
0.032271016389131546,
-0.057623255997896194,
0.06506370007991791,
0.03035092167556286,
0.039307788014411926,
0.04112591594457626,
0.006946508307009935,
0.05869806185364723,
0.03448124974966049,
0.08520646393299103,
-0.06601139158010483,
-0.09572242200374603,
-0.008727536536753178,
-0.06629297882318497,
-0.0381045937538147,
0.04081805795431137,
0.038581106811761856,
-0.04144452512264252,
0.0759166032075882,
0.010935882106423378,
0.046900853514671326,
-0.03956454619765282,
-0.02666880190372467,
0.028427032753825188,
-0.04431067034602165,
-0.004778302274644375,
-4.316516921676339e-8,
-0.04224066436290741,
0.01213353406637907,
-0.02873871475458145,
-0.0004557595821097493,
0.060204897075891495,
0.04494335874915123,
0.06584059447050095,
0.026393936946988106,
-0.04337706416845322,
0.006220952607691288,
-0.011227287352085114,
0.07552626729011536,
-0.02193956822156906,
-0.023910174146294594,
0.010142972692847252,
-0.027572698891162872,
0.03750799968838692,
0.023396223783493042,
-0.02713284268975258,
0.05184983089566231,
-0.08388502150774002,
-0.019486334174871445,
0.008616553619503975,
0.0580269917845726,
0.02673504687845707,
-0.039304401725530624,
0.018494682386517525,
0.04885106906294823,
-0.01745067909359932,
0.0021995920687913895,
-0.054308075457811356,
0.027956081554293633,
-0.026001838967204094,
-0.008764338679611683,
-0.08326111733913422,
-0.010348603129386902,
-0.11677905172109604,
0.07210648059844971,
-0.007638666313141584,
0.001386599731631577,
-0.009663878008723259,
-0.025489816442131996,
0.02099677175283432,
0.009032156318426132,
-0.005866267252713442,
0.02702007070183754,
0.030718255788087845,
0.0018073971150442958,
0.11650115251541138,
0.026605557650327682,
-0.040948301553726196,
-0.03296511992812157,
-0.010583057999610901,
-0.01430813129991293,
-0.021560929715633392,
-0.012404217384755611,
0.00416494719684124,
-0.042415518313646317,
-0.0002883884881157428,
0.01593278907239437,
0.03047688491642475,
-0.031108178198337555,
0.017404405400156975,
0.019400591030716896
] | 0.039459
|
field. #### OrderedReady Pod Management `OrderedReady` pod management is the default for StatefulSets. It implements the behavior described in [Deployment and Scaling Guarantees](#deployment-and-scaling-guarantees). #### Parallel Pod Management `Parallel` pod management tells the StatefulSet controller to launch or terminate all Pods in parallel, and to not wait for Pods to become Running and Ready or completely terminated prior to launching or terminating another Pod. For scaling operations, this means all Pods are created or terminated simultaneously. For rolling updates when [`.spec.updateStrategy.rollingUpdate.maxUnavailable`](#maximum-unavailable-pods) is greater than 1, the StatefulSet controller terminates and creates up to `maxUnavailable` Pods simultaneously (also known as "bursting"). This can speed up updates but may result in Pods becoming ready out of order, which might not be suitable for applications requiring strict ordering. ## Update strategies A StatefulSet's `.spec.updateStrategy` field allows you to configure and disable automated rolling updates for containers, labels, resource request/limits, and annotations for the Pods in a StatefulSet. There are two possible values: `OnDelete` : When a StatefulSet's `.spec.updateStrategy.type` is set to `OnDelete`, the StatefulSet controller will not automatically update the Pods in a StatefulSet. Users must manually delete Pods to cause the controller to create new Pods that reflect modifications made to a StatefulSet's `.spec.template`. `RollingUpdate` : The `RollingUpdate` update strategy implements automated, rolling updates for the Pods in a StatefulSet. This is the default update strategy. ## Rolling Updates When a StatefulSet's `.spec.updateStrategy.type` is set to `RollingUpdate`, the StatefulSet controller will delete and recreate each Pod in the StatefulSet. It will proceed in the same order as Pod termination (from the largest ordinal to the smallest), updating each Pod one at a time. The Kubernetes control plane waits until an updated Pod is Running and Ready prior to updating its predecessor. If you have set `.spec.minReadySeconds` (see [Minimum Ready Seconds](#minimum-ready-seconds)), the control plane additionally waits that amount of time after the Pod turns ready, before moving on. ### Partitioned rolling updates {#partitions} The `RollingUpdate` update strategy can be partitioned, by specifying a `.spec.updateStrategy.rollingUpdate.partition`. If a partition is specified, all Pods with an ordinal that is greater than or equal to the partition will be updated when the StatefulSet's `.spec.template` is updated. All Pods with an ordinal that is less than the partition will not be updated, and, even if they are deleted, they will be recreated at the previous version. If a StatefulSet's `.spec.updateStrategy.rollingUpdate.partition` is greater than its `.spec.replicas`, updates to its `.spec.template` will not be propagated to its Pods. In most cases you will not need to use a partition, but they are useful if you want to stage an update, roll out a canary, or perform a phased roll out. ### Maximum unavailable Pods {{< feature-state for\_k8s\_version="v1.35" state="beta" >}} You can control the maximum number of Pods that can be unavailable during an update by specifying the `.spec.updateStrategy.rollingUpdate.maxUnavailable` field. The value can be an absolute number (for example, `5`) or a percentage of desired Pods (for example, `10%`). Absolute number is calculated from the percentage value by rounding it up. This field cannot be 0. The default setting is 1. This field applies to all Pods in the range `0` to `replicas - 1`. If there is any unavailable Pod in the range `0` to `replicas - 1`, it will be counted towards `maxUnavailable`. {{< note >}} The `maxUnavailable` field is in Beta stage and it is enabled by default. {{< /note >}} ### Forced rollback When using [Rolling Updates](#rolling-updates) with the default [Pod Management Policy](#pod-management-policies) (`OrderedReady`), it's possible to get into a broken state that requires manual intervention to repair. If you update the Pod template to a configuration that
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/statefulset.md
|
[
-0.016558034345507622,
-0.04305212199687958,
-0.025398219004273415,
0.00975874811410904,
-0.04110203683376312,
-0.05170769244432449,
-0.06845302879810333,
-0.019048981368541718,
-0.01584445871412754,
0.1030406504869461,
0.04633055254817009,
0.06103294715285301,
-0.009362722747027874,
-0.09683941304683685,
0.018585477024316788,
0.012323739938437939,
0.03461839258670807,
-0.007162641268223524,
-0.09382651746273041,
-0.004428689368069172,
0.0072459024377167225,
-0.048407722264528275,
-0.028132008388638496,
0.07114588469266891,
-0.04775124788284302,
0.08757266402244568,
-0.11553774774074554,
-0.054516274482011795,
0.015241825953125954,
-0.02159672975540161,
-0.06647900491952896,
-0.017716102302074432,
0.027304040268063545,
0.01429713424295187,
0.03617492690682411,
0.037189602851867676,
-0.029658427461981773,
-0.0737442597746849,
-0.02169240638613701,
-0.016820186749100685,
0.026774218305945396,
-0.05566714331507683,
-0.05829117074608803,
0.021858006715774536,
-0.010442646220326424,
0.02220592461526394,
-0.08828472346067429,
-0.05835574120283127,
-0.02382119745016098,
-0.05233480781316757,
-0.007436959072947502,
-0.067446269094944,
0.03813544288277626,
0.11380063742399216,
0.06995727121829987,
0.03741428256034851,
0.07971692085266113,
0.08390356600284576,
0.030092734843492508,
0.010397877544164658,
0.014524766243994236,
-0.04145149141550064,
-0.0003525017818901688,
-0.0024376718793064356,
0.06392572820186615,
-0.05124127119779587,
0.06278549879789352,
-0.03018464893102646,
0.03050106018781662,
-0.008912905119359493,
0.05058414489030838,
0.018768073990941048,
0.03625265136361122,
-0.02246765047311783,
-0.024355143308639526,
-0.007862797938287258,
0.049585990607738495,
0.03619017079472542,
0.005228634458035231,
-0.03940092772245407,
-0.022887535393238068,
-0.025593340396881104,
0.032259758561849594,
-0.0678255558013916,
-0.02971678413450718,
-0.07425562292337418,
-0.018061436712741852,
-0.027155140414834023,
0.03279029577970505,
0.02872317284345627,
0.03280346095561981,
0.01787380501627922,
0.0936114564538002,
-0.04536958038806915,
-0.009986456483602524,
0.06856819987297058,
0.0035216454416513443,
0.013067537918686867,
-0.06380470842123032,
0.011223980225622654,
0.05382753536105156,
0.0055327024310827255,
0.04257528483867645,
0.013036172837018967,
0.09829546511173248,
-0.08964352309703827,
-0.06107388436794281,
-0.0368000753223896,
-0.022267036139965057,
0.005107547622174025,
0.04915937781333923,
0.021826934069395065,
0.061923183500766754,
0.024231618270277977,
-0.045475080609321594,
0.07367628067731857,
-0.04424521327018738,
0.05306817963719368,
-0.023378849029541016,
0.03917080909013748,
0.07912317663431168,
-0.07336170971393585,
0.07098262757062912,
-0.033213309943675995,
-0.022832011803984642,
0.05767184868454933,
0.07386736571788788,
4.550351489002537e-33,
0.021312516182661057,
-0.1034100353717804,
-0.01131974533200264,
-0.03765664994716644,
0.022542227059602737,
-0.0038576980587095022,
-0.031213304027915,
-0.016170356422662735,
-0.03904540836811066,
-0.032801926136016846,
-0.023336241021752357,
0.11670923978090286,
-0.06091153994202614,
0.05088598281145096,
0.025590023025870323,
-0.18072310090065002,
-0.027188453823328018,
0.08970460295677185,
0.1059449315071106,
0.013463211245834827,
0.06447845697402954,
-0.12645839154720306,
-0.07902033627033234,
-0.04886404797434807,
0.05407528579235077,
0.019289789721369743,
0.007848127745091915,
-0.006665380671620369,
-0.04205947741866112,
0.051842205226421356,
-0.020348062738776207,
0.036425549536943436,
-0.06587008386850357,
0.025797056034207344,
-0.07138203084468842,
-0.0800924003124237,
-0.07714908570051193,
-0.04130140691995621,
-0.049730196595191956,
-0.081339530646801,
-0.003023486351594329,
-0.02417759783565998,
-0.061003126204013824,
-0.021754486486315727,
0.024300994351506233,
-0.024569939821958542,
-0.007420036476105452,
-0.021678129211068153,
-0.0012110514799132943,
0.029796238988637924,
0.01722457818686962,
-0.00797666609287262,
-0.03195395693182945,
-0.09270912408828735,
-0.00012408716429490596,
0.0011436381610110402,
0.07732748985290527,
-0.02585955709218979,
-0.0018385732546448708,
0.06577062606811523,
-0.026502681896090508,
-0.03415638953447342,
-0.038053128868341446,
0.023998912423849106,
0.03425844386219978,
0.08364558219909668,
-0.037901267409324646,
-0.003951243590563536,
0.03908826410770416,
0.054992493242025375,
-0.009955449029803276,
0.05091756582260132,
-0.02376999706029892,
0.030210886150598526,
0.01556785125285387,
-0.07539490610361099,
0.049826640635728836,
0.05152951180934906,
-0.13467460870742798,
-0.04827214777469635,
-0.005237706005573273,
0.040555208921432495,
-0.07569094002246857,
0.06825784593820572,
-0.014139865525066853,
0.017830541357398033,
-0.04715893790125847,
0.08138971775770187,
-0.10579731315374374,
0.02282325178384781,
0.00996097456663847,
0.028770703822374344,
0.017920121550559998,
0.002648182213306427,
-0.05117906630039215,
-3.916848930669605e-33,
0.07256746292114258,
-0.08282428979873657,
-0.057624589651823044,
0.0791841447353363,
0.020051082596182823,
-0.007606696803122759,
-0.06950213015079498,
0.06275225430727005,
-0.005443845875561237,
-0.07515346258878708,
-0.034863609820604324,
-0.004530053585767746,
-0.03021817095577717,
-0.0014871119055896997,
-0.06367659568786621,
-0.018596883863210678,
-0.03751290217041969,
-0.10824145376682281,
0.03073246031999588,
0.02601969614624977,
-0.0005058359238319099,
-0.004748904146254063,
-0.029347790405154228,
0.10797292739152908,
-0.013028987683355808,
-0.017300382256507874,
-0.05543820559978485,
0.006950397975742817,
0.0008850767044350505,
-0.04474407434463501,
0.031749214977025986,
-0.13188773393630981,
-0.04093615710735321,
0.02996833808720112,
0.006412698421627283,
0.01908695697784424,
-0.002141630509868264,
0.01564369536936283,
-0.07194740325212479,
0.10685396194458008,
0.09107107669115067,
-0.005275312345474958,
-0.08230283111333847,
0.0033115532714873552,
0.009077027440071106,
0.005292168352752924,
-0.03329325094819069,
0.005613388027995825,
-0.06866340339183807,
-0.05017765611410141,
-0.005796903744339943,
-0.016504373401403427,
-0.03600407764315605,
0.12182272225618362,
0.02555760182440281,
-0.034766919910907745,
0.003933941945433617,
0.031755365431308746,
-0.043699197471141815,
-0.010763009078800678,
0.07114065438508987,
-0.019824035465717316,
0.040353816002607346,
0.006465504877269268,
0.005612104199826717,
0.041601795703172684,
0.006589759141206741,
-0.03898950293660164,
0.02127605490386486,
0.05832839012145996,
0.07505779713392258,
-0.021799715235829353,
0.03708718717098236,
-0.0025815661065280437,
-0.01129186525940895,
-0.07075922191143036,
-0.00635062251240015,
-0.1224411278963089,
0.09296954423189163,
-0.03715518116950989,
-0.07470294088125229,
0.10693291574716568,
0.05569121614098549,
0.06711696088314056,
-0.03448110073804855,
0.047055434435606,
0.06615906953811646,
0.07356742769479752,
0.09001564979553223,
0.026229238137602806,
0.012023099698126316,
0.0205275509506464,
-0.08046399801969528,
0.0846218541264534,
-0.06386891007423401,
-4.8066095104104534e-8,
0.045092277228832245,
0.006136985495686531,
-0.027551885694265366,
0.09506471455097198,
0.12801307439804077,
-0.043797437101602554,
0.060811541974544525,
0.019312163814902306,
-0.031797099858522415,
-0.0035394844599068165,
0.026850927621126175,
0.05744174122810364,
-0.03379035368561745,
0.04276958853006363,
0.08276961743831635,
0.017684895545244217,
0.036929503083229065,
0.03260066732764244,
-0.0304136723279953,
-0.0524824857711792,
-0.049998994916677475,
0.009125534445047379,
0.02536615915596485,
-0.00789965782314539,
0.036614708602428436,
0.02333567850291729,
0.10910484939813614,
0.07060012966394424,
0.0704079195857048,
-0.028565285727381706,
-0.030252711847424507,
-0.0276526790112257,
-0.008002870716154575,
0.051744744181632996,
-0.026624316349625587,
0.065304234623909,
-0.08082782477140427,
0.04985170438885689,
0.08189503848552704,
0.036302611231803894,
-0.033595334738492966,
-0.0354558564722538,
-0.026582827791571617,
0.024421818554401398,
0.0050913798622787,
0.033821310847997665,
-0.07519972324371338,
0.005947271827608347,
-0.01797325164079666,
0.013846422545611858,
-0.02773510478436947,
-0.03882356733083725,
0.04088844731450081,
0.08028338849544525,
-0.03845299407839775,
0.00875673908740282,
0.009846564382314682,
-0.04462588205933571,
0.012842840515077114,
0.03819987177848816,
-0.004251499194651842,
-0.05104691535234451,
0.004649401642382145,
0.030099844560027122
] | 0.198553
|
in Beta stage and it is enabled by default. {{< /note >}} ### Forced rollback When using [Rolling Updates](#rolling-updates) with the default [Pod Management Policy](#pod-management-policies) (`OrderedReady`), it's possible to get into a broken state that requires manual intervention to repair. If you update the Pod template to a configuration that never becomes Running and Ready (for example, due to a bad binary or application-level configuration error), StatefulSet will stop the rollout and wait. In this state, it's not enough to revert the Pod template to a good configuration. Due to a [known issue](https://github.com/kubernetes/kubernetes/issues/67250), StatefulSet will continue to wait for the broken Pod to become Ready (which never happens) before it will attempt to revert it back to the working configuration. After reverting the template, you must also delete any Pods that StatefulSet had already attempted to run with the bad configuration. StatefulSet will then begin to recreate the Pods using the reverted template. ## Revision history ControllerRevision is a Kubernetes API resource used by controllers, such as the StatefulSet controller, to track historical configuration changes. StatefulSets use ControllerRevisions to maintain a revision history, enabling rollbacks and version tracking. ### How StatefulSets track changes using ControllerRevisions When you update a StatefulSet's Pod template (`spec.template`), the StatefulSet controller: 1. Prepares a new ControllerRevision object 2. Stores a snapshot of the Pod template and metadata 3. Assigns an incremental revision number #### Key Properties See [ControllerRevision](/docs/reference/kubernetes-api/workload-resources/controller-revision-v1/) to learn more about key properties and other details. --- ### Managing Revision History Control retained revisions with `.spec.revisionHistoryLimit`: ```yaml apiVersion: apps/v1 kind: StatefulSet metadata: name: webapp spec: revisionHistoryLimit: 5 # Keep last 5 revisions # ... other spec fields ... ``` \* \*\*Default\*\*: 10 revisions retained if unspecified \* \*\*Cleanup\*\*: Oldest revisions are garbage-collected when exceeding the limit #### Performing Rollbacks You can revert to a previous configuration using: ```bash # View revision history kubectl rollout history statefulset/webapp # Rollback to a specific revision kubectl rollout undo statefulset/webapp --to-revision=3 ``` This will: \* Apply the Pod template from revision 3 \* Create a new ControllerRevision with an updated revision number #### Inspecting ControllerRevisions To view associated ControllerRevisions: ```bash # List all revisions for the StatefulSet kubectl get controllerrevisions -l app.kubernetes.io/name=webapp # View detailed configuration of a specific revision kubectl get controllerrevision/webapp-3 -o yaml ``` #### Best Practices ##### Retention Policy - Set `revisionHistoryLimit` between \*\*5–10\*\* for most workloads. - Increase only if \*\*deep rollback history\*\* is required. ##### Monitoring \* Regularly check revisions with: ```bash kubectl get controllerrevisions ``` - Alert on \*\*rapid revision count growth\*\*. ##### Avoid \* Manual edits to ControllerRevision objects. \* Using revisions as a backup mechanism (use actual backup tools). \* Setting `revisionHistoryLimit: 0` (disables rollback capability). ## PersistentVolumeClaim retention {{< feature-state feature\_gate\_name="StatefulSetAutoDeletePVC" >}} The optional `.spec.persistentVolumeClaimRetentionPolicy` field controls if and how PVCs are deleted during the lifecycle of a StatefulSet. You must enable the `StatefulSetAutoDeletePVC` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) on the API server and the controller manager to use this field. Once enabled, there are two policies you can configure for each StatefulSet: `whenDeleted` : Configures the volume retention behavior that applies when the StatefulSet is deleted. `whenScaled` : Configures the volume retention behavior that applies when the replica count of the StatefulSet is reduced; for example, when scaling down the set. For each policy that you can configure, you can set the value to either `Delete` or `Retain`. `Delete` : The PVCs created from the StatefulSet `volumeClaimTemplate` are deleted for each Pod affected by the policy. With the `whenDeleted` policy all PVCs from the `volumeClaimTemplate` are deleted after their Pods have been deleted. With the `whenScaled` policy, only PVCs corresponding to
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/statefulset.md
|
[
0.010750528424978256,
0.0004470532003324479,
0.1019306555390358,
0.018331056460738182,
-0.0182005874812603,
0.004194984212517738,
-0.07544346898794174,
-0.08115651458501816,
-0.004370014648884535,
0.08546211570501328,
-0.01289656013250351,
0.12155284732580185,
-0.03344694897532463,
-0.03863513469696045,
0.017932996153831482,
-0.0278012715280056,
0.022485017776489258,
-0.006719654425978661,
-0.049856849014759064,
0.07104707509279251,
-0.04240965098142624,
-0.006583865731954575,
-0.010520811192691326,
0.05159641429781914,
-0.042060986161231995,
0.08740203827619553,
-0.08246048539876938,
-0.03291567414999008,
0.03688502311706543,
-0.04408372566103935,
-0.06349435448646545,
0.004812777042388916,
0.0051552834920585155,
0.007125255651772022,
0.03619705140590668,
0.026545627042651176,
-0.02650349773466587,
-0.09149831533432007,
-0.0789337158203125,
-0.006737693212926388,
0.06925816833972931,
-0.0002800232614390552,
-0.1001267209649086,
-0.007248604670166969,
0.011283107101917267,
0.0127554377540946,
-0.016241008415818214,
-0.07975959032773972,
-0.0018464787863194942,
-0.03610573336482048,
0.002562683541327715,
-0.0456509105861187,
0.10570181906223297,
0.09704452008008957,
0.09317027032375336,
0.08891762048006058,
0.08971446007490158,
0.09783535450696945,
0.04868331924080849,
0.017539169639348984,
0.045947086066007614,
-0.043659526854753494,
-0.014631622470915318,
-0.026888081803917885,
0.03564903512597084,
0.007230775896459818,
0.06883765757083893,
0.003458277555182576,
0.03150957450270653,
0.01544463261961937,
0.029383396729826927,
0.015053391456604004,
0.022908633574843407,
-0.020787574350833893,
-0.015611828304827213,
0.014032161794602871,
0.010052675381302834,
-0.018266085535287857,
0.002664748812094331,
-0.0389593280851841,
-0.013028698042035103,
0.0012222237419337034,
0.06076335161924362,
-0.04005638137459755,
-0.021304123103618622,
-0.053810592740774155,
-0.019416790455579758,
-0.07126246392726898,
0.05250128358602524,
0.060443341732025146,
0.01983628049492836,
-0.02560311183333397,
0.08988680690526962,
-0.11283158510923386,
0.03947474807500839,
0.007880088873207569,
0.06101783737540245,
0.01505188923329115,
-0.04290098696947098,
0.010961852967739105,
0.04952753707766533,
0.017275512218475342,
0.020904142409563065,
0.012870969250798225,
0.06434161961078644,
-0.06639871746301651,
-0.04514983296394348,
-0.008066303096711636,
0.0029051010496914387,
0.035106360912323,
0.03275563195347786,
0.018595831468701363,
0.10521941632032394,
0.033552445471286774,
-0.036461155861616135,
0.03147357702255249,
-0.06714577227830887,
0.05451621115207672,
0.0051514869555830956,
0.06639591604471207,
0.035653162747621536,
-0.09784570336341858,
0.039024561643600464,
-0.006670428905636072,
-0.07607664167881012,
0.08793298155069351,
0.0050129275768995285,
4.883098583054306e-34,
0.02899484895169735,
-0.08120939135551453,
-0.03582516685128212,
-0.015711436048150063,
0.032600801438093185,
-0.042647264897823334,
-0.005218673963099718,
-0.026234600692987442,
-0.025585154071450233,
-0.05815677344799042,
0.03151211142539978,
0.06455130875110626,
-0.052502717822790146,
0.016227498650550842,
0.0021005431190133095,
-0.08878123015165329,
-0.07708409428596497,
0.09300491213798523,
0.0697684958577156,
0.03920814394950867,
0.05011604353785515,
-0.07135460525751114,
-0.02011892944574356,
-0.10089503228664398,
0.007071214262396097,
0.054978445172309875,
0.027052272111177444,
0.012189247645437717,
-0.039042096585035324,
0.043137893080711365,
-0.03327659144997597,
0.037552688270807266,
0.005883894395083189,
0.062419235706329346,
-0.12363693863153458,
-0.09310983866453171,
-0.054888371378183365,
-0.027630392462015152,
-0.0846339538693428,
-0.05904386565089226,
0.018720556050539017,
-0.02070714719593525,
-0.04470320791006088,
0.024636588990688324,
0.07064909487962723,
-0.03905568644404411,
0.07771056145429611,
-0.056089647114276886,
0.052882831543684006,
-0.01218425016850233,
-0.004148468375205994,
-0.022741084918379784,
-0.021367304027080536,
-0.11265605688095093,
-0.018890712410211563,
0.007566708605736494,
0.07958823442459106,
-0.09039811044931412,
-0.07148689031600952,
-0.006586404982954264,
0.00023789807164575905,
0.000017513280909042805,
-0.010878746397793293,
-0.040019478648900986,
0.03526325896382332,
0.05265812948346138,
-0.04203047230839729,
0.032853126525878906,
-0.027443207800388336,
-0.058470528572797775,
-0.038054902106523514,
0.042145270854234695,
-0.06327890604734421,
0.05408117175102234,
-0.029005030170083046,
-0.06502343714237213,
0.06910841166973114,
0.02088613063097,
-0.08260951936244965,
-0.008111845701932907,
0.03131064027547836,
-0.0009845475433394313,
-0.06601498275995255,
0.07929974794387817,
0.03587094694375992,
0.005674366373568773,
0.009311185218393803,
0.014542272314429283,
-0.05864964425563812,
0.029722217470407486,
0.0195673406124115,
-0.04420528933405876,
-0.009582174941897392,
0.04223576560616493,
-0.06911347806453705,
-1.500848136420361e-33,
0.08521175384521484,
-0.05834651365876198,
-0.05270543321967125,
0.037329986691474915,
-0.006104998290538788,
-0.017516810446977615,
-0.07185505330562592,
0.09139243513345718,
0.02913670614361763,
-0.08438210189342499,
0.0013844011118635535,
-0.04820972681045532,
0.01849866472184658,
0.026097925379872322,
-0.07199282944202423,
-0.022511404007673264,
-0.07029658555984497,
-0.0971139445900917,
-0.02196751907467842,
-0.0026529596652835608,
0.05504719167947769,
-0.060273800045251846,
-0.01329841185361147,
0.12760643661022186,
-0.07591745257377625,
0.004956403747200966,
-0.02307869866490364,
0.04027571156620979,
0.02600187063217163,
-0.043915439397096634,
0.07925164699554443,
-0.12304522842168808,
-0.014244289137423038,
0.07808762043714523,
0.021974723786115646,
0.015944913029670715,
-0.06333467364311218,
0.02342117391526699,
-0.06950794160366058,
0.030361410230398178,
0.07205211371183395,
0.04709804430603981,
-0.09384971857070923,
0.03406375274062157,
0.013262631371617317,
0.01200633030384779,
0.002029870869591832,
-0.024130377918481827,
0.0035510160960257053,
-0.09748126566410065,
-0.019376276060938835,
0.026561938226222992,
-0.04106403887271881,
0.10948030650615692,
-0.050585538148880005,
0.021037107333540916,
-0.01823297329246998,
0.09820356220006943,
-0.065152108669281,
0.03209657967090607,
0.021670116111636162,
-0.030919883400201797,
0.06114491820335388,
-0.004150767344981432,
0.03537642955780029,
0.033662255853414536,
0.021749434992671013,
0.010620147921144962,
0.02927108108997345,
0.041823845356702805,
0.01618807576596737,
-0.0112310741096735,
0.02628205716609955,
-0.005162254441529512,
0.06340625882148743,
-0.010172716341912746,
-0.05763641372323036,
-0.08878122270107269,
0.0533076748251915,
-0.043164804577827454,
-0.08835378289222717,
0.0845574140548706,
-0.08035556226968765,
0.028576551005244255,
0.062430489808321,
0.06287046521902084,
0.05071099475026131,
0.08178258687257767,
0.05231453478336334,
0.05792265012860298,
0.02440103143453598,
-0.008466357365250587,
-0.058442987501621246,
0.11497174203395844,
-0.02398323453962803,
-5.2029584196588985e-8,
0.05884295329451561,
0.01565801165997982,
-0.007148826029151678,
0.06925638020038605,
0.10854485630989075,
-0.04258935526013374,
0.08469395339488983,
0.016304412856698036,
-0.07755032926797867,
-0.028242619708180428,
-0.09964965283870697,
0.07912489026784897,
-0.05506250262260437,
0.0023482770193368196,
0.05252285674214363,
-0.04473626986145973,
-0.03142792358994484,
0.06323440372943878,
-0.024076193571090698,
-0.08181639015674591,
-0.05627059191465378,
-0.0547674223780632,
0.01871507428586483,
0.02088514342904091,
-0.022362692281603813,
0.05539980158209801,
0.08191687613725662,
0.015345466323196888,
0.035210106521844864,
0.01013159565627575,
-0.0327313132584095,
0.0012205659877508879,
-0.019018447026610374,
0.044292956590652466,
-0.06672769039869308,
0.05909251794219017,
-0.060334108769893646,
-0.0016786715714260936,
0.06370309740304947,
-0.025865856558084488,
-0.02800062857568264,
0.0068266442976891994,
-0.04084831476211548,
0.021213266998529434,
-0.023074183613061905,
0.031142499297857285,
0.004285458475351334,
0.06617867201566696,
-0.014741877093911171,
-0.06332456320524216,
-0.027002662420272827,
-0.01457935106009245,
-0.05052174627780914,
0.05304732918739319,
-0.03600405156612396,
-0.007671467028558254,
0.018222840502858162,
-0.038012731820344925,
-0.0020062976982444525,
0.03883645683526993,
0.01785101182758808,
-0.06421060860157013,
0.03401770070195198,
-0.03178305923938751
] | 0.133498
|
the value to either `Delete` or `Retain`. `Delete` : The PVCs created from the StatefulSet `volumeClaimTemplate` are deleted for each Pod affected by the policy. With the `whenDeleted` policy all PVCs from the `volumeClaimTemplate` are deleted after their Pods have been deleted. With the `whenScaled` policy, only PVCs corresponding to Pod replicas being scaled down are deleted, after their Pods have been deleted. `Retain` (default) : PVCs from the `volumeClaimTemplate` are not affected when their Pod is deleted. This is the behavior before this new feature. Bear in mind that these policies \*\*only\*\* apply when Pods are being removed due to the StatefulSet being deleted or scaled down. For example, if a Pod associated with a StatefulSet fails due to node failure, and the control plane creates a replacement Pod, the StatefulSet retains the existing PVC. The existing volume is unaffected, and the cluster will attach it to the node where the new Pod is about to launch. The default for policies is `Retain`, matching the StatefulSet behavior before this new feature. Here is an example policy: ```yaml apiVersion: apps/v1 kind: StatefulSet ... spec: persistentVolumeClaimRetentionPolicy: whenDeleted: Retain whenScaled: Delete ... ``` The StatefulSet {{}} adds [owner references](/docs/concepts/overview/working-with-objects/owners-dependents/#owner-references-in-object-specifications) to its PVCs, which are then deleted by the {{}} after the Pod is terminated. This enables the Pod to cleanly unmount all volumes before the PVCs are deleted (and before the backing PV and volume are deleted, depending on the retain policy). When you set the `whenDeleted` policy to `Delete`, an owner reference to the StatefulSet instance is placed on all PVCs associated with that StatefulSet. The `whenScaled` policy must delete PVCs only when a Pod is scaled down, and not when a Pod is deleted for another reason. When reconciling, the StatefulSet controller compares its desired replica count to the actual Pods present on the cluster. Any StatefulSet Pod whose id greater than the replica count is condemned and marked for deletion. If the `whenScaled` policy is `Delete`, the condemned Pods are first set as owners to the associated StatefulSet template PVCs, before the Pod is deleted. This causes the PVCs to be garbage collected after only the condemned Pods have terminated. This means that if the controller crashes and restarts, no Pod will be deleted before its owner reference has been updated appropriate to the policy. If a condemned Pod is force-deleted while the controller is down, the owner reference may or may not have been set up, depending on when the controller crashed. It may take several reconcile loops to update the owner references, so some condemned Pods may have set up owner references and others may not. For this reason we recommend waiting for the controller to come back up, which will verify owner references before terminating Pods. If that is not possible, the operator should verify the owner references on PVCs to ensure the expected objects are deleted when Pods are force-deleted. ### Replicas `.spec.replicas` is an optional field that specifies the number of desired Pods. It defaults to 1. Should you manually scale a StatefulSet, via `kubectl scale statefulset statefulset --replicas=X`, and then you update that StatefulSet based on a manifest (for example: by running `kubectl apply -f statefulset.yaml`), then applying that manifest overwrites the manual scaling that you previously did. If a [HorizontalPodAutoscaler](/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale/) (or any similar API for horizontal scaling) is managing scaling for a Statefulset, don't set `.spec.replicas`. Instead, allow the Kubernetes {{}} to manage the `.spec.replicas` field automatically. ## {{% heading "whatsnext" %}} \* Learn about [Pods](/docs/concepts/workloads/pods). \* Find out how to use StatefulSets \* Follow an example of [deploying a stateful application](/docs/tutorials/stateful-application/basic-stateful-set/).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/statefulset.md
|
[
-0.0653388574719429,
-0.004910527728497982,
0.04460317641496658,
0.022889768704771996,
0.062305767089128494,
0.07087746262550354,
0.047388408333063126,
-0.044890280812978745,
0.06196685507893562,
0.05189863219857216,
0.049485333263874054,
0.027973709627985954,
0.02653343789279461,
-0.0132789621129632,
-0.007387826219201088,
-0.013506699353456497,
0.0026586318854242563,
-0.00289925467222929,
-0.08338441699743271,
0.03863660991191864,
0.0778457447886467,
-0.014801965095102787,
-0.021918945014476776,
0.06936065107584,
0.05605172738432884,
0.044956304132938385,
-0.034584566950798035,
-0.025815492495894432,
0.09220131486654282,
-0.024173516780138016,
-0.03278236463665962,
0.04570490121841431,
0.02662345953285694,
-0.0211242213845253,
0.044632136821746826,
0.057296037673950195,
-0.05888727679848671,
-0.10390961915254593,
-0.10238058120012283,
-0.05194532871246338,
0.04676255211234093,
-0.02120882272720337,
-0.12315666675567627,
-0.0007361400057561696,
-0.054999012500047684,
0.05281103402376175,
-0.04433993622660637,
-0.021728407591581345,
-0.08766086399555206,
0.012136144563555717,
0.07728994637727737,
-0.06723540276288986,
0.06745880097150803,
0.055227503180503845,
0.020918816328048706,
0.06582306325435638,
0.06294629722833633,
0.06014186143875122,
0.017479456961154938,
-0.004344485700130463,
0.03328084573149681,
-0.03721936047077179,
-0.07066954672336578,
-0.012180001474916935,
0.06549907475709915,
-0.009247406385838985,
0.045799870043992996,
-0.011418437585234642,
0.018896253779530525,
-0.004298063926398754,
0.022252991795539856,
0.05256793275475502,
-0.013112090528011322,
-0.015852440148591995,
0.0005276234005577862,
0.034057896584272385,
-0.006388041656464338,
-0.03211548551917076,
-0.011967316269874573,
-0.05634910985827446,
-0.010027999058365822,
0.017675939947366714,
0.0025275505613535643,
-0.05118456482887268,
-0.039957787841558456,
-0.051979534327983856,
-0.07398262619972229,
-0.05552815645933151,
0.04092417284846306,
0.03619347885251045,
0.03980457782745361,
0.010571221821010113,
0.022020088508725166,
-0.04943198710680008,
0.026717528700828552,
-0.09592435508966446,
-0.022546015679836273,
0.0015025922330096364,
0.03085726499557495,
0.006187649443745613,
0.039099402725696564,
0.03712742403149605,
-0.03025534749031067,
0.033708613365888596,
0.04748513549566269,
-0.08139428496360779,
-0.05040065199136734,
0.001338370842859149,
0.04738914966583252,
0.11239414662122726,
0.016917509958148003,
0.044230762869119644,
0.04243561998009682,
0.05878496915102005,
-0.02250497043132782,
0.059444937855005264,
-0.02055404521524906,
0.03620261326432228,
-0.04098758473992348,
-0.007608861196786165,
-0.04090190678834915,
-0.13102425634860992,
0.040426939725875854,
-0.010219969786703587,
-0.0723176896572113,
0.043748319149017334,
-0.06179023161530495,
5.34011241955478e-34,
0.004854814615100622,
-0.10583629459142685,
-0.0645207092165947,
-0.02315417490899563,
0.05237564444541931,
0.01611238345503807,
0.009736021049320698,
-0.023073062300682068,
-0.005482817068696022,
-0.09620455652475357,
-0.02561895363032818,
0.08692872524261475,
-0.03968680649995804,
0.043983716517686844,
-0.019325129687786102,
-0.09830556064844131,
-0.025260349735617638,
0.12963412702083588,
0.03221653401851654,
-0.029331421479582787,
0.021583033725619316,
0.09334134310483932,
0.015689853578805923,
-0.00984591618180275,
0.0367579348385334,
-0.059072691947221756,
0.001883482444100082,
-0.05116046220064163,
-0.07525288313627243,
0.04642219468951225,
-0.048802103847265244,
0.03278135880827904,
0.016292758285999298,
0.01939542219042778,
-0.02271067164838314,
0.07259300351142883,
-0.020111406221985817,
-0.050848010927438736,
-0.06805965304374695,
-0.11257850378751755,
0.010871347039937973,
-0.006913874763995409,
0.017293274402618408,
-0.02447839081287384,
-0.03863506764173508,
-0.15096764266490936,
0.0808873251080513,
-0.02887464128434658,
-0.0032351722475141287,
-0.0012792599154636264,
0.08461504429578781,
0.004536711610853672,
-0.02036704309284687,
-0.11087775975465775,
-0.008402264676988125,
-0.044338542968034744,
-0.023928357288241386,
-0.025674602016806602,
-0.004683050327003002,
0.02606833539903164,
0.05962437763810158,
0.03551787883043289,
0.037387873977422714,
0.021605733782052994,
0.01035808864980936,
0.15540996193885803,
-0.010613750666379929,
-0.018407028168439865,
-0.006219270173460245,
-0.036133479326963425,
-0.005392948165535927,
0.029183000326156616,
-0.035470638424158096,
0.0044744014739990234,
-0.04009615629911423,
-0.06708639860153198,
0.04194469004869461,
-0.023504657670855522,
-0.04965420067310333,
-0.02942846715450287,
-0.04522865265607834,
0.03009658493101597,
-0.07155707478523254,
0.05459513142704964,
-0.012258773669600487,
-0.07519771158695221,
0.06428293883800507,
-0.07570073753595352,
-0.06999258697032928,
-0.056147340685129166,
0.03726920112967491,
-0.08844105154275894,
0.018406210467219353,
0.03831573948264122,
-0.009571783244609833,
-2.6608232985824058e-33,
0.04513740539550781,
0.013193224556744099,
-0.00907229259610176,
-0.013497160747647285,
-0.05022722855210304,
-0.0173350740224123,
-0.04077882692217827,
0.08737150579690933,
-0.02898780256509781,
-0.11464963853359222,
-0.026586707681417465,
-0.00702384440228343,
-0.04434677213430405,
0.038092996925115585,
-0.042837563902139664,
-0.025765297934412956,
-0.02775280550122261,
-0.11693109571933746,
-0.05819510295987129,
0.02220005914568901,
0.08233591169118881,
-0.041610829532146454,
-0.007120482623577118,
0.13081492483615875,
-0.036455608904361725,
-0.06530194729566574,
-0.06635347753763199,
-0.0069040292873978615,
0.04106903448700905,
-0.06659990549087524,
0.010838323272764683,
-0.09694146364927292,
-0.09895561635494232,
0.008171181194484234,
0.02869994379580021,
-0.07657871395349503,
-0.03696482256054878,
0.0588960163295269,
-0.05221965163946152,
-0.013036675751209259,
0.01771732047200203,
-0.025353165343403816,
-0.07539943605661392,
0.04924106225371361,
0.021905727684497833,
-0.008855966851115227,
0.07523667067289352,
0.0038552400656044483,
0.044520385563373566,
-0.030256684869527817,
0.009781054221093655,
-0.0647551417350769,
-0.012475970201194286,
0.13093040883541107,
-0.05182584375143051,
0.0470120944082737,
0.00514088524505496,
0.07526542246341705,
-0.05663040652871132,
-0.05552305653691292,
0.07524645328521729,
0.01803765818476677,
-0.04457254707813263,
0.056441083550453186,
-0.018892517313361168,
-0.013955813832581043,
0.08567456901073456,
0.014590485021471977,
0.008612188510596752,
-0.009053689427673817,
0.05672777444124222,
0.035583123564720154,
-0.0002731329295784235,
-0.03799287974834442,
-0.008401927538216114,
-0.04942735284566879,
-0.045390307903289795,
-0.07426119595766068,
-0.009568145498633385,
0.011032210662961006,
-0.08254338800907135,
0.07333718985319138,
-0.041310518980026245,
0.009898127056658268,
0.05394095182418823,
-0.007586244493722916,
0.022559430450201035,
0.0474250353872776,
0.04320293292403221,
0.14301730692386627,
-0.05094313248991966,
0.010821855627000332,
-0.037996042519807816,
0.05887158215045929,
-0.07964998483657837,
-4.3113256964488755e-8,
0.010618993081152439,
0.07162874191999435,
-0.006400124169886112,
0.05509871244430542,
0.0024096204433590174,
-0.09591031074523926,
0.03157434239983559,
0.0341918058693409,
-0.044385794550180435,
0.005045953206717968,
0.058320362120866776,
0.02548796311020851,
-0.08094432204961777,
-0.09660938382148743,
0.04063262417912483,
-0.03442760184407234,
0.029543915763497353,
0.018315576016902924,
-0.0064957281574606895,
-0.03199999779462814,
-0.03521846979856491,
-0.040936339646577835,
0.016679808497428894,
0.034212589263916016,
-0.022232918068766594,
0.042552053928375244,
0.07346820831298828,
0.07362377643585205,
0.039805058389902115,
0.053461331874132156,
0.03651801124215126,
0.02181144617497921,
0.07223416119813919,
0.05757411941885948,
0.0013630939647555351,
0.0709356740117073,
-0.027194274589419365,
0.04932085797190666,
0.06257688999176025,
0.043502695858478546,
-0.031238922849297523,
0.01595451310276985,
-0.003101952373981476,
0.041267432272434235,
0.00007582976104458794,
0.058373551815748215,
0.000574786274228245,
0.04656000807881355,
-0.005860291421413422,
0.017212482169270515,
-0.029279334470629692,
-0.008973175659775734,
-0.10715170204639435,
0.10826565325260162,
0.04185963049530983,
-0.020197277888655663,
-0.022252654656767845,
0.022801503539085388,
0.05134778097271919,
0.02853769063949585,
0.07352988421916962,
0.0022338922135531902,
0.016011351719498634,
-0.06963653862476349
] | 0.12207
|
similar API for horizontal scaling) is managing scaling for a Statefulset, don't set `.spec.replicas`. Instead, allow the Kubernetes {{}} to manage the `.spec.replicas` field automatically. ## {{% heading "whatsnext" %}} \* Learn about [Pods](/docs/concepts/workloads/pods). \* Find out how to use StatefulSets \* Follow an example of [deploying a stateful application](/docs/tutorials/stateful-application/basic-stateful-set/). \* Follow an example of [deploying Cassandra with Stateful Sets](/docs/tutorials/stateful-application/cassandra/). \* Follow an example of [running a replicated stateful application](/docs/tasks/run-application/run-replicated-stateful-application/). \* Learn how to [scale a StatefulSet](/docs/tasks/run-application/scale-stateful-set/). \* Learn what's involved when you [delete a StatefulSet](/docs/tasks/run-application/delete-stateful-set/). \* Learn how to [configure a Pod to use a volume for storage](/docs/tasks/configure-pod-container/configure-volume-storage/). \* Learn how to [configure a Pod to use a PersistentVolume for storage](/docs/tasks/configure-pod-container/configure-persistent-volume-storage/). \* `StatefulSet` is a top-level resource in the Kubernetes REST API. Read the {{< api-reference page="workload-resources/stateful-set-v1" >}} object definition to understand the API for stateful sets. \* Read about [PodDisruptionBudget](/docs/concepts/workloads/pods/disruptions/) and how you can use it to manage application availability during disruptions.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/statefulset.md
|
[
0.019421366974711418,
0.03127868101000786,
0.005351583007723093,
0.041110292077064514,
-0.09352212399244308,
-0.03440432995557785,
-0.07732247561216354,
0.0146726593375206,
-0.011946498416364193,
0.06317714601755142,
-0.044027164578437805,
-0.055776454508304596,
0.03640415146946907,
-0.036263491958379745,
0.009876730851829052,
-0.03237088769674301,
0.04146290197968483,
-0.009591878391802311,
-0.0682503804564476,
-0.010284824296832085,
0.013485781848430634,
-0.03408569470047951,
0.005615316331386566,
0.06802850216627121,
-0.011605829931795597,
0.02368772216141224,
-0.06636369973421097,
-0.039081066846847534,
0.033854834735393524,
-0.034275252372026443,
-0.045432429760694504,
0.05143370479345322,
-0.03397899866104126,
0.030917515978217125,
0.046200647950172424,
0.05925842747092247,
0.00807818304747343,
-0.09499283134937286,
-0.08141274750232697,
-0.03771207854151726,
0.07989999651908875,
-0.0527510829269886,
-0.13156086206436157,
0.03847850486636162,
0.006137801334261894,
-0.02028956636786461,
-0.06797467172145844,
-0.01714307628571987,
-0.01141501683741808,
-0.04569647088646889,
-0.01664128713309765,
-0.02738231047987938,
0.06184348836541176,
0.02263575792312622,
0.0680965706706047,
0.06817738711833954,
0.04835577309131622,
0.07412856817245483,
0.0991637334227562,
-0.04165741056203842,
0.07331578433513641,
-0.05042767897248268,
0.036376308649778366,
-0.008619770407676697,
0.03221355751156807,
-0.004703422077000141,
0.0633816123008728,
-0.020466027781367302,
0.009988940320909023,
-0.025277314707636833,
0.052256591618061066,
-0.023388953879475594,
0.03116641193628311,
-0.01727643609046936,
0.028696522116661072,
-0.015003097243607044,
-0.06994905322790146,
-0.001632804749533534,
-0.02530566044151783,
-0.013270811177790165,
-0.02674807235598564,
-0.0065255677327513695,
-0.0016491408459842205,
0.02823028154671192,
-0.0763607993721962,
-0.01381240226328373,
-0.012751909904181957,
-0.11334861069917679,
0.022912276908755302,
-0.0188943762332201,
0.028690610080957413,
-0.0304244551807642,
0.02023293823003769,
-0.1027081087231636,
-0.005504556931555271,
-0.007484938949346542,
-0.05694001168012619,
0.004858965054154396,
0.03863951563835144,
-0.006725297309458256,
0.042409200221300125,
-0.0010493149748072028,
0.05252659320831299,
0.08922634273767471,
0.04344601184129715,
-0.061507027596235275,
-0.04462846368551254,
0.00018939774599857628,
-0.015998318791389465,
0.04537035524845123,
0.06463772803544998,
0.07742039859294891,
-0.020723309367895126,
0.056224774569272995,
0.027304930612444878,
0.023969903588294983,
0.005809834226965904,
-0.012043958529829979,
-0.016318386420607567,
0.09212306886911392,
0.06824808567762375,
-0.09704296290874481,
-0.027099523693323135,
0.017769603058695793,
-0.00028270258917473257,
0.07377241551876068,
0.038468796759843826,
2.833787190401328e-33,
0.04485755413770676,
-0.0828985646367073,
0.061006657779216766,
-0.01785258762538433,
0.04447796568274498,
-0.036349888890981674,
-0.029749970883131027,
-0.039334848523139954,
-0.12083861231803894,
-0.09341686964035034,
-0.018474634736776352,
0.12326522916555405,
-0.027250487357378006,
0.02023909240961075,
-0.004299558699131012,
-0.06597623229026794,
-0.060866959393024445,
0.07667364180088043,
0.0483403243124485,
-0.04815223067998886,
0.07741791009902954,
-0.055970944464206696,
-0.05385148525238037,
-0.020190048962831497,
0.004166049882769585,
-0.02646823599934578,
0.007944349199533463,
-0.03394944965839386,
-0.08812888711690903,
0.02333277091383934,
-0.06408370286226273,
0.0025934013538062572,
0.023637624457478523,
0.04969732463359833,
-0.06557302922010422,
-0.03837515413761139,
0.01282846461981535,
0.019656065851449966,
-0.08460024744272232,
-0.09300989657640457,
-0.008158983662724495,
0.03805653005838394,
-0.002071504248306155,
-0.06541790068149567,
0.015212683007121086,
-0.007507591508328915,
0.0622798353433609,
-0.029500175267457962,
-0.01999489963054657,
-0.023429926484823227,
0.0569973923265934,
-0.0111397048458457,
0.03565206006169319,
-0.08376987278461456,
0.07457464188337326,
-0.007180716376751661,
0.13903933763504028,
-0.03702448680996895,
0.0049359858967363834,
0.01652660220861435,
-0.050791677087545395,
-0.07693777978420258,
-0.07973761111497879,
0.04663851857185364,
0.03988159820437431,
0.08483126014471054,
-0.0901295468211174,
0.05755568668246269,
-0.026523854583501816,
0.02138490602374077,
0.02726913057267666,
0.09560022503137589,
0.022639967501163483,
0.010260619223117828,
-0.01621289551258087,
-0.08911903202533722,
0.004435069393366575,
0.015768535435199738,
-0.17334352433681488,
0.033633388578891754,
0.023478219285607338,
-0.01379189733415842,
-0.11878388375043869,
0.056797124445438385,
0.017427923157811165,
-0.049370069056749344,
-0.00011784613889176399,
-0.012635772116482258,
-0.05423743277788162,
0.01546821091324091,
0.0581151507794857,
-0.05006912350654602,
0.021514784544706345,
-0.015063060447573662,
-0.07947447150945663,
-3.108086409442809e-33,
0.08047639578580856,
-0.014950506389141083,
0.009349653497338295,
0.04713156074285507,
0.044516246765851974,
-0.030873853713274002,
-0.030838102102279663,
0.11815588176250458,
-0.02276659943163395,
-0.0649031326174736,
-0.049010250717401505,
-0.045537952333688736,
-0.02593994140625,
-0.021213889122009277,
-0.08387142419815063,
0.030613023787736893,
-0.001552702859044075,
-0.05496469885110855,
0.004139230586588383,
0.020265420898795128,
-0.0007701131980866194,
-0.011638212017714977,
-0.03879242390394211,
0.08496838063001633,
0.03909339755773544,
-0.06268315762281418,
-0.06846597045660019,
0.030156463384628296,
-0.03642306849360466,
-0.05399073660373688,
-0.024233313277363777,
-0.11115114390850067,
-0.018919652327895164,
0.00261458707973361,
0.026141347363591194,
-0.018299655988812447,
-0.01473623514175415,
0.07810631394386292,
0.003198143094778061,
0.014420237392187119,
-0.0044783614575862885,
-0.003813188523054123,
-0.07962007820606232,
-0.028985392302274704,
0.03306236118078232,
0.035231444984674454,
0.038504380732774734,
0.03763212263584137,
-0.022981300950050354,
-0.08968774229288101,
0.04281312972307205,
0.015996921807527542,
0.003918305970728397,
0.12947656214237213,
-0.02052953466773033,
0.03575747087597847,
0.00539134768769145,
0.10042830556631088,
-0.02162010595202446,
-0.03982461988925934,
0.02908484637737274,
-0.0982179269194603,
0.014036227017641068,
0.03388582915067673,
0.001981283538043499,
-0.026999330148100853,
0.01229275856167078,
0.0010712852235883474,
-0.012682355009019375,
0.051723118871450424,
-0.016239473596215248,
-0.03488955646753311,
0.03018583171069622,
0.01814844273030758,
0.022004220634698868,
-0.06695219874382019,
-0.018854252994060516,
-0.039109449833631516,
0.06182476133108139,
0.04873666539788246,
-0.06951035559177399,
0.05108446627855301,
0.003331243060529232,
0.02130373939871788,
0.0698036402463913,
0.0858260989189148,
0.050163839012384415,
0.10676320642232895,
0.018326211720705032,
0.16854228079319,
-0.0667271688580513,
0.01400000974535942,
-0.08409186452627182,
0.04475724324584007,
-0.018529174849390984,
-5.015855464307606e-8,
0.004652055446058512,
-0.01433524675667286,
-0.04701770842075348,
0.10524899512529373,
0.039606571197509766,
-0.00857535656541586,
0.053736504167318344,
0.02130938321352005,
0.012305381707847118,
0.025072697550058365,
-0.03437664732336998,
0.03892257809638977,
-0.06341243535280228,
0.007502045948058367,
0.037752553820610046,
-0.07412432879209518,
0.05826188996434212,
0.050976045429706573,
-0.02215476706624031,
-0.025139272212982178,
-0.0555075965821743,
0.010489167645573616,
-0.01484942901879549,
0.014966676011681557,
0.017566101625561714,
0.0695737823843956,
0.019274834543466568,
0.05055764317512512,
0.07294820249080658,
-0.02679566666483879,
-0.03343480825424194,
-0.005184422247111797,
0.008829807862639427,
0.04339155927300453,
-0.023701874539256096,
0.010975807905197144,
-0.07212290912866592,
0.13454203307628632,
0.055243611335754395,
0.012198872864246368,
-0.031797103583812714,
0.03419565036892891,
-0.09003181755542755,
0.03211509808897972,
0.04614252597093582,
0.061965420842170715,
-0.07606649398803711,
0.09219810366630554,
0.045912932604551315,
0.0013403109041973948,
0.00664590485394001,
-0.10463903844356537,
-0.022034455090761185,
0.06175683066248894,
-0.02698124758899212,
0.02475603297352791,
0.029205119237303734,
-0.01484190858900547,
0.05730737745761871,
0.015212819911539555,
0.06288455426692963,
-0.02612137980759144,
-0.06332172453403473,
0.021166393533349037
] | 0.143001
|
A ReplicaSet's purpose is to maintain a stable set of replica Pods running at any given time. As such, it is often used to guarantee the availability of a specified number of identical Pods. ## How a ReplicaSet works A ReplicaSet is defined with fields, including a selector that specifies how to identify Pods it can acquire, a number of replicas indicating how many Pods it should be maintaining, and a pod template specifying the data of new Pods it should create to meet the number of replicas criteria. A ReplicaSet then fulfills its purpose by creating and deleting Pods as needed to reach the desired number. When a ReplicaSet needs to create new Pods, it uses its Pod template. A ReplicaSet is linked to its Pods via the Pods' [metadata.ownerReferences](/docs/concepts/architecture/garbage-collection/#owners-dependents) field, which specifies what resource the current object is owned by. All Pods acquired by a ReplicaSet have their owning ReplicaSet's identifying information within their ownerReferences field. It's through this link that the ReplicaSet knows of the state of the Pods it is maintaining and plans accordingly. A ReplicaSet identifies new Pods to acquire by using its selector. If there is a Pod that has no OwnerReference or the OwnerReference is not a {{< glossary\_tooltip term\_id="controller" >}} and it matches a ReplicaSet's selector, it will be immediately acquired by said ReplicaSet. ## When to use a ReplicaSet A ReplicaSet ensures that a specified number of pod replicas are running at any given time. However, a Deployment is a higher-level concept that manages ReplicaSets and provides declarative updates to Pods along with a lot of other useful features. Therefore, we recommend using Deployments instead of directly using ReplicaSets, unless you require custom update orchestration or don't require updates at all. This actually means that you may never need to manipulate ReplicaSet objects: use a Deployment instead, and define your application in the spec section. ## Example {{% code\_sample file="controllers/frontend.yaml" %}} Saving this manifest into `frontend.yaml` and submitting it to a Kubernetes cluster will create the defined ReplicaSet and the Pods that it manages. ```shell kubectl apply -f https://kubernetes.io/examples/controllers/frontend.yaml ``` You can then get the current ReplicaSets deployed: ```shell kubectl get rs ``` And see the frontend one you created: ``` NAME DESIRED CURRENT READY AGE frontend 3 3 3 6s ``` You can also check on the state of the ReplicaSet: ```shell kubectl describe rs/frontend ``` And you will see output similar to: ``` Name: frontend Namespace: default Selector: tier=frontend Labels: app=guestbook tier=frontend Annotations: Replicas: 3 current / 3 desired Pods Status: 3 Running / 0 Waiting / 0 Succeeded / 0 Failed Pod Template: Labels: tier=frontend Containers: php-redis: Image: us-docker.pkg.dev/google-samples/containers/gke/gb-frontend:v5 Port: Host Port: Environment: Mounts: Volumes: Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal SuccessfulCreate 13s replicaset-controller Created pod: frontend-gbgfx Normal SuccessfulCreate 13s replicaset-controller Created pod: frontend-rwz57 Normal SuccessfulCreate 13s replicaset-controller Created pod: frontend-wkl7w ``` And lastly you can check for the Pods brought up: ```shell kubectl get pods ``` You should see Pod information similar to: ``` NAME READY STATUS RESTARTS AGE frontend-gbgfx 1/1 Running 0 10m frontend-rwz57 1/1 Running 0 10m frontend-wkl7w 1/1 Running 0 10m ``` You can also verify that the owner reference of these pods is set to the frontend ReplicaSet. To do this, get the yaml of one of the Pods running: ```shell kubectl get pods frontend-gbgfx -o yaml ``` The output will look similar to this, with the frontend ReplicaSet's info set in the metadata's ownerReferences field: ```yaml apiVersion: v1 kind: Pod metadata: creationTimestamp: "2024-02-28T22:30:44Z" generateName: frontend- labels: tier: frontend name: frontend-gbgfx namespace: default ownerReferences: - apiVersion: apps/v1
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/replicaset.md
|
[
-0.020438574254512787,
-0.00177835114300251,
0.026208890601992607,
0.0011802701046690345,
0.02982032671570778,
-0.0033121241722255945,
0.029650337994098663,
-0.0437772199511528,
0.11775081604719162,
0.023077024146914482,
-0.005686653312295675,
-0.007580601144582033,
0.024579793214797974,
-0.07154771685600281,
-0.03594391420483589,
-0.034056972712278366,
0.0620807483792305,
-0.02233448252081871,
-0.06751701980829239,
0.03144198656082153,
0.0844016894698143,
-0.11016452312469482,
0.004533348139375448,
0.05324004963040352,
-0.02583029679954052,
0.03604372218251228,
-0.028134770691394806,
-0.04744723439216614,
0.026095399633049965,
-0.002644530264660716,
-0.012491053901612759,
0.034116480499506,
0.05135275423526764,
0.025032859295606613,
0.03296554461121559,
0.04242610186338425,
-0.0031041374895721674,
-0.05327746644616127,
-0.05195201560854912,
-0.0333903431892395,
0.014717080630362034,
-0.01538957841694355,
-0.10356072336435318,
0.06432952731847763,
-0.024790523573756218,
0.11086548864841461,
-0.02732902020215988,
0.037092071026563644,
-0.018698040395975113,
-0.01603071577847004,
0.0032218494452536106,
-0.04064490646123886,
0.045469604432582855,
0.04685510694980621,
0.07169017940759659,
0.07782728970050812,
0.012957177124917507,
0.026942366734147072,
0.022238969802856445,
0.027932535856962204,
0.10501047223806381,
-0.07372590899467468,
-0.036904044449329376,
-0.032903753221035004,
0.0950690507888794,
-0.06214173883199692,
0.011832215823233128,
0.02549837902188301,
0.06517978012561798,
-0.04789194092154503,
0.04408981651067734,
0.0435238853096962,
0.05137068033218384,
0.0038907560519874096,
-0.032854124903678894,
-0.006025305483490229,
-0.019646523520350456,
0.03077322244644165,
0.0481683574616909,
-0.04028499498963356,
-0.027629638090729713,
0.030321011319756508,
0.03520013391971588,
-0.05359833315014839,
-0.05180859565734863,
-0.057486072182655334,
0.04381156340241432,
-0.007581002078950405,
0.013065105304121971,
0.08195079118013382,
0.005802772473543882,
0.02561035193502903,
0.07198195159435272,
-0.09264874458312988,
-0.005231160670518875,
0.038372475653886795,
0.010637461207807064,
0.07637980580329895,
0.040947962552309036,
-0.0034361383877694607,
0.03469238802790642,
0.047166336327791214,
0.028378963470458984,
-0.009830200113356113,
0.019451048225164413,
-0.05999857932329178,
-0.1196991428732872,
-0.00889967754483223,
0.08104891330003738,
0.0601060651242733,
0.017291901633143425,
0.00306052528321743,
-0.01563059724867344,
0.11215633153915405,
-0.00287717767059803,
0.044835660606622696,
-0.07738260924816132,
0.04152374714612961,
-0.016876282170414925,
0.036431826651096344,
-0.004684003069996834,
-0.0595133937895298,
0.06375610828399658,
-0.05457085743546486,
-0.0930614024400711,
-0.0005166651681065559,
-0.06718610972166061,
3.2139708998030494e-33,
0.06972426921129227,
-0.02603216841816902,
-0.05579962953925133,
0.008431757800281048,
0.044782854616642,
-0.034598760306835175,
-0.04138852283358574,
0.07526366412639618,
-0.049276337027549744,
-0.03953350707888603,
-0.010005123913288116,
0.0381271168589592,
-0.03290129825472832,
0.07066554576158524,
-0.0030749435536563396,
-0.053600750863552094,
-0.11012168228626251,
0.08864191919565201,
0.028488166630268097,
-0.007107961922883987,
0.020084675401449203,
0.012801457196474075,
-0.023031027987599373,
-0.004693611059337854,
0.029221344739198685,
-0.01752016879618168,
-0.04572746157646179,
-0.03968290984630585,
-0.0887630507349968,
0.028985757380723953,
-0.04042831063270569,
0.02021331712603569,
-0.02490341290831566,
0.025919834151864052,
-0.015680786222219467,
-0.061473965644836426,
0.02387034334242344,
-0.0924258828163147,
-0.07270245254039764,
-0.07574158906936646,
0.042929407209157944,
0.004833044484257698,
0.02078143134713173,
-0.0008256398723460734,
-0.014397827908396721,
-0.057491276413202286,
0.03758852183818817,
-0.029844509437680244,
0.04770646244287491,
0.06540542840957642,
0.03641795367002487,
-0.06180979683995247,
0.024942265823483467,
-0.09830646961927414,
-0.007487638853490353,
-0.015624710358679295,
0.011607580818235874,
-0.06361450254917145,
0.016421208158135414,
-0.02304428443312645,
-0.0011009799782186747,
-0.014158635400235653,
-0.005154856946319342,
0.10252353549003601,
0.07161378115415573,
0.13998349010944366,
-0.012231677770614624,
-0.041483234614133835,
0.07017596811056137,
0.07732763141393661,
0.018527258187532425,
0.013552986085414886,
-0.09894882887601852,
-0.015314324758946896,
-0.059918489307165146,
-0.04791267216205597,
0.010081203654408455,
0.03580307960510254,
-0.14410966634750366,
0.11224772781133652,
-0.01314054150134325,
0.0612078495323658,
-0.1296474039554596,
0.0048454524949193,
-0.12548044323921204,
0.032140977680683136,
0.04237877577543259,
-0.05409974977374077,
0.006825834978371859,
-0.042405109852552414,
0.07225347310304642,
-0.03969345986843109,
-0.09443172067403793,
0.0023764970246702433,
-0.04362330958247185,
-4.254170626291492e-33,
0.049029640853405,
-0.015194385312497616,
0.06991537660360336,
-0.0029530914034694433,
-0.023067595437169075,
-0.01890069991350174,
-0.05663606524467468,
0.014833121560513973,
-0.027244150638580322,
-0.07427941262722015,
-0.06278683245182037,
-0.06442544609308243,
0.00000224992595576623,
0.039636898785829544,
-0.11898390203714371,
-0.016918828710913658,
-0.01115884818136692,
-0.13971588015556335,
-0.01568262279033661,
-0.030842971056699753,
-0.012219998054206371,
-0.03519958257675171,
0.037593018263578415,
0.07115350663661957,
0.030026882886886597,
-0.025647111237049103,
-0.029073650017380714,
-0.02552451193332672,
0.08752657473087311,
-0.08983554691076279,
0.043663572520017624,
-0.07230793684720993,
-0.011651241220533848,
-0.04171217978000641,
0.03671170771121979,
0.0149741992354393,
-0.005001189652830362,
0.0987773984670639,
0.0062356931157410145,
-0.031615111976861954,
0.022457586601376534,
-0.009197215549647808,
-0.04068528860807419,
0.012827551923692226,
-0.009291591122746468,
-0.03628859668970108,
0.02399478107690811,
0.04626406729221344,
0.04008547589182854,
-0.07389775663614273,
0.10275156050920486,
-0.052561499178409576,
-0.03530735522508621,
0.07441709190607071,
-0.021324463188648224,
-0.020060891285538673,
-0.00591209577396512,
0.09143926203250885,
0.013379971496760845,
-0.01837841421365738,
0.05949227511882782,
-0.010947336442768574,
-0.04110049828886986,
0.09344655275344849,
-0.053000349551439285,
-0.026934126392006874,
-0.0208392646163702,
-0.017899734899401665,
-0.04152633994817734,
-0.004266379866749048,
0.02541194297373295,
-0.058232273906469345,
0.012036303989589214,
-0.05138011649250984,
-0.03630397841334343,
-0.05644558370113373,
-0.04162868112325668,
-0.07225337624549866,
-0.007786077447235584,
0.029103687033057213,
-0.09805719554424286,
0.08470480144023895,
0.0020499462261795998,
0.04153716564178467,
0.03350400924682617,
-0.007806102279573679,
0.0838564783334732,
0.07214033603668213,
0.00951974093914032,
0.12893301248550415,
0.008330999873578548,
0.024717802181839943,
-0.10317113995552063,
0.09847618639469147,
-0.08526970446109772,
-5.30498880380037e-8,
0.029292577877640724,
0.01567555032670498,
0.01093013770878315,
0.06171947717666626,
0.03759423643350601,
0.0024420844856649637,
0.06868579983711243,
0.038148973137140274,
-0.003890619846060872,
0.0025592895690351725,
0.004003973677754402,
0.0004528823192231357,
-0.09046677500009537,
0.022187840193510056,
0.09044094383716583,
0.0057213217951357365,
0.025332175195217133,
-0.008510611020028591,
-0.019802482798695564,
-0.018374664708971977,
-0.04193820431828499,
-0.08544472604990005,
0.01089266687631607,
0.00012803042773157358,
-0.017021890729665756,
0.05060821399092674,
0.04132077470421791,
0.04291928932070732,
-0.012193534523248672,
0.04834464192390442,
0.004811453633010387,
0.025500934571027756,
0.011966139078140259,
-0.010881992988288403,
-0.01428466197103262,
0.044947437942028046,
-0.11990554630756378,
-0.025029737502336502,
-0.008067302405834198,
-0.046403732150793076,
-0.016982581466436386,
-0.006667697336524725,
-0.04834112897515297,
0.054606132209300995,
0.022802356630563736,
-0.002946721389889717,
-0.004134311806410551,
-0.009437819942831993,
-0.044313665479421616,
0.018033558502793312,
0.0032521167304366827,
-0.06862352788448334,
0.003930537961423397,
0.03446771204471588,
-0.09779750555753708,
0.009469117969274521,
0.03793663531541824,
-0.004643924999982119,
0.12232505530118942,
-0.008160087279975414,
0.07900652289390564,
0.06404316425323486,
0.0761803388595581,
-0.051251690834760666
] | 0.210414
|
the Pods running: ```shell kubectl get pods frontend-gbgfx -o yaml ``` The output will look similar to this, with the frontend ReplicaSet's info set in the metadata's ownerReferences field: ```yaml apiVersion: v1 kind: Pod metadata: creationTimestamp: "2024-02-28T22:30:44Z" generateName: frontend- labels: tier: frontend name: frontend-gbgfx namespace: default ownerReferences: - apiVersion: apps/v1 blockOwnerDeletion: true controller: true kind: ReplicaSet name: frontend uid: e129deca-f864-481b-bb16-b27abfd92292 ... ``` ## Non-Template Pod acquisitions While you can create bare Pods with no problems, it is strongly recommended to make sure that the bare Pods do not have labels which match the selector of one of your ReplicaSets. The reason for this is because a ReplicaSet is not limited to owning Pods specified by its template-- it can acquire other Pods in the manner specified in the previous sections. Take the previous frontend ReplicaSet example, and the Pods specified in the following manifest: {{% code\_sample file="pods/pod-rs.yaml" %}} As those Pods do not have a Controller (or any object) as their owner reference and match the selector of the frontend ReplicaSet, they will immediately be acquired by it. Suppose you create the Pods after the frontend ReplicaSet has been deployed and has set up its initial Pod replicas to fulfill its replica count requirement: ```shell kubectl apply -f https://kubernetes.io/examples/pods/pod-rs.yaml ``` The new Pods will be acquired by the ReplicaSet, and then immediately terminated as the ReplicaSet would be over its desired count. Fetching the Pods: ```shell kubectl get pods ``` The output shows that the new Pods are either already terminated, or in the process of being terminated: ``` NAME READY STATUS RESTARTS AGE frontend-b2zdv 1/1 Running 0 10m frontend-vcmts 1/1 Running 0 10m frontend-wtsmm 1/1 Running 0 10m pod1 0/1 Terminating 0 1s pod2 0/1 Terminating 0 1s ``` If you create the Pods first: ```shell kubectl apply -f https://kubernetes.io/examples/pods/pod-rs.yaml ``` And then create the ReplicaSet however: ```shell kubectl apply -f https://kubernetes.io/examples/controllers/frontend.yaml ``` You shall see that the ReplicaSet has acquired the Pods and has only created new ones according to its spec until the number of its new Pods and the original matches its desired count. As fetching the Pods: ```shell kubectl get pods ``` Will reveal in its output: ``` NAME READY STATUS RESTARTS AGE frontend-hmmj2 1/1 Running 0 9s pod1 1/1 Running 0 36s pod2 1/1 Running 0 36s ``` In this manner, a ReplicaSet can own a non-homogeneous set of Pods ## Writing a ReplicaSet manifest As with all other Kubernetes API objects, a ReplicaSet needs the `apiVersion`, `kind`, and `metadata` fields. For ReplicaSets, the `kind` is always a ReplicaSet. When the control plane creates new Pods for a ReplicaSet, the `.metadata.name` of the ReplicaSet is part of the basis for naming those Pods. The name of a ReplicaSet must be a valid [DNS subdomain](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names) value, but this can produce unexpected results for the Pod hostnames. For best compatibility, the name should follow the more restrictive rules for a [DNS label](/docs/concepts/overview/working-with-objects/names#dns-label-names). A ReplicaSet also needs a [`.spec` section](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status). ### Pod Template The `.spec.template` is a [pod template](/docs/concepts/workloads/pods/#pod-templates) which is also required to have labels in place. In our `frontend.yaml` example we had one label: `tier: frontend`. Be careful not to overlap with the selectors of other controllers, lest they try to adopt this Pod. For the template's [restart policy](/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy) field, `.spec.template.spec.restartPolicy`, the only allowed value is `Always`, which is the default. ### Pod Selector The `.spec.selector` field is a [label selector](/docs/concepts/overview/working-with-objects/labels/). As discussed [earlier](#how-a-replicaset-works) these are the labels used to identify potential Pods to acquire. In our `frontend.yaml` example, the selector was: ```yaml matchLabels: tier: frontend ``` In the ReplicaSet, `.spec.template.metadata.labels` must match `spec.selector`, or
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/replicaset.md
|
[
0.021828962489962578,
0.004231722559779882,
0.043960485607385635,
-0.008131253533065319,
0.024828998371958733,
0.0011057958472520113,
-0.02183784916996956,
-0.03546230494976044,
0.08628660440444946,
0.036069244146347046,
0.03853403776884079,
-0.0814724862575531,
-0.014047833159565926,
-0.0802832618355751,
0.044884733855724335,
-0.012527436017990112,
0.09045017510652542,
-0.02823318913578987,
-0.008116306737065315,
0.00506961066275835,
0.01590309478342533,
-0.00008484029967803508,
0.03538402542471886,
0.03736261650919914,
-0.01698794588446617,
-0.0001656731910770759,
-0.06754916161298752,
0.008432992734014988,
0.04382636770606041,
-0.05650383234024048,
-0.018125437200069427,
0.04529600217938423,
0.06181076169013977,
0.015935178846120834,
0.1359688937664032,
0.05566800758242607,
0.031208857893943787,
-0.08611349761486053,
-0.041496288031339645,
-0.07101452350616455,
0.06063457578420639,
-0.025401923805475235,
-0.09061767160892487,
0.047686271369457245,
-0.03267626464366913,
0.04933929815888405,
-0.016778547316789627,
-0.03877776488661766,
-0.03454124554991722,
-0.012446635402739048,
0.01761283539235592,
-0.08447149395942688,
0.07555907219648361,
0.005801678169518709,
0.08622688800096512,
0.04482828080654144,
-0.05616935342550278,
0.05763653293251991,
0.10104486346244812,
0.062244679778814316,
0.06362207978963852,
-0.04432991147041321,
-0.018895607441663742,
-0.09357152134180069,
0.027676578611135483,
-0.05132122337818146,
0.019366061314940453,
0.005511336028575897,
0.029381776228547096,
-0.013985889963805676,
0.12476793676614761,
0.021070703864097595,
0.02618779055774212,
0.0066162957809865475,
-0.04836034029722214,
0.03664413094520569,
-0.03242418169975281,
0.0710911825299263,
0.01687788777053356,
-0.0560438372194767,
-0.062132544815540314,
0.03625505790114403,
0.029354115948081017,
0.002221072092652321,
-0.10253959149122238,
-0.007375187706202269,
0.008251807652413845,
0.019435519352555275,
-0.017542866989970207,
0.040674686431884766,
-0.00898062251508236,
-0.01390843652188778,
0.056194648146629333,
-0.11791599541902542,
0.022315416485071182,
-0.029302088543772697,
0.021414460614323616,
0.05520745739340782,
0.03067796677350998,
0.010405347682535648,
0.006282350979745388,
0.03217790648341179,
0.045944567769765854,
0.0485973097383976,
0.06677407771348953,
-0.03363121300935745,
-0.09308823943138123,
-0.04535864293575287,
0.001993285957723856,
0.046299707144498825,
0.007810763083398342,
0.02478976733982563,
-0.013166846707463264,
0.08257467299699783,
-0.01129578985273838,
-0.012942887842655182,
-0.039889972656965256,
-0.012449773959815502,
0.0021210697013884783,
-0.02206132933497429,
0.008689751848578453,
-0.09116002917289734,
0.049698688089847565,
0.01120314933359623,
-0.08823441714048386,
0.013616623356938362,
-0.02785177156329155,
7.826176166861886e-33,
0.09858686476945877,
-0.0007204210851341486,
-0.009825387969613075,
-0.017076093703508377,
0.049561019986867905,
-0.035027846693992615,
-0.022918229922652245,
0.018196048215031624,
-0.010251864790916443,
0.017076538875699043,
-0.06373213231563568,
0.040239933878183365,
-0.05398081988096237,
-0.023785438388586044,
0.005961352493613958,
-0.007100606802850962,
-0.08501292765140533,
0.053765781223773956,
0.016509342938661575,
-0.0114457281306386,
0.0305012259632349,
-0.006691501010209322,
-0.059765126556158066,
-0.010557510890066624,
-0.01953762210905552,
-0.030139479786157608,
-0.013049724511802197,
-0.12668122351169586,
-0.041918158531188965,
0.03693364933133125,
-0.042325105518102646,
-0.0295190941542387,
0.06684724241495132,
0.020216716453433037,
-0.08614886552095413,
-0.04776065796613693,
0.0079427445307374,
-0.033456675708293915,
-0.11237219721078873,
-0.01592910662293434,
0.029898907989263535,
0.002169958082959056,
-0.009280167520046234,
-0.06761442869901657,
-0.0026934705674648285,
-0.03795613721013069,
0.05187756568193436,
-0.09769560396671295,
0.050694916397333145,
0.0606875941157341,
-0.02107030712068081,
-0.023152029141783714,
0.02730773203074932,
-0.10883654654026031,
-0.008443165570497513,
-0.05240360274910927,
0.0656365379691124,
-0.012490786612033844,
-0.02807478792965412,
-0.006523907650262117,
-0.02220124751329422,
0.013307888060808182,
0.010400297120213509,
0.056520942598581314,
-0.006825367920100689,
0.09309148043394089,
0.01632070541381836,
-0.044101081788539886,
0.03703935071825981,
0.04673159122467041,
-0.02279575541615486,
0.042140040546655655,
-0.06832575798034668,
-0.033498380333185196,
0.02985360287129879,
-0.1137000173330307,
0.030194904655218124,
0.032601334154605865,
-0.07579309493303299,
0.06555959582328796,
0.006776189897209406,
0.05802536383271217,
-0.10079027712345123,
0.0537831075489521,
-0.061444781720638275,
0.0077497996389865875,
0.052750010043382645,
0.004569680895656347,
-0.04059773311018944,
0.036851439625024796,
0.012060473673045635,
-0.06223762780427933,
-0.09425372630357742,
-0.01036502979695797,
-0.09109680354595184,
-7.783059768757694e-33,
0.06405890733003616,
-0.04159218817949295,
0.07910419255495071,
-0.04748282581567764,
-0.038712482899427414,
0.0009260177030228078,
0.02066727541387081,
0.10993121564388275,
0.01136025134474039,
-0.07682380825281143,
0.02336808294057846,
-0.05007712543010712,
-0.0016256796661764383,
0.05822756886482239,
-0.0724232867360115,
0.014860137365758419,
-0.08786427974700928,
-0.12506023049354553,
-0.01886499486863613,
0.00533283781260252,
-0.026832809671759605,
0.020991383120417595,
0.06694529950618744,
0.08724942803382874,
0.03234032168984413,
-0.02126571349799633,
0.022180428728461266,
0.05161258950829506,
0.020864153280854225,
-0.08103050291538239,
0.02280617319047451,
-0.05841131880879402,
-0.04696159437298775,
-0.023919524624943733,
-0.012256634421646595,
-0.03451629728078842,
-0.040612660348415375,
0.12612566351890564,
-0.005731232929974794,
-0.028511418029665947,
-0.0440048910677433,
0.006734954658895731,
-0.11958406120538712,
0.023772716522216797,
-0.07929450273513794,
-0.032096728682518005,
0.045712605118751526,
-0.005053420085459948,
0.07078294456005096,
-0.060664672404527664,
0.06729581207036972,
0.012481040321290493,
-0.08309918642044067,
0.07393442839384079,
-0.051191333681344986,
-0.04989836364984512,
0.010419688187539577,
0.052508529275655746,
-0.04558296874165535,
0.0026288367807865143,
0.03707350790500641,
-0.02931523509323597,
0.007022582460194826,
0.01776992157101631,
0.025548385456204414,
-0.030614107847213745,
0.009579367004334927,
0.05402632802724838,
0.014965490438044071,
0.0007172293844632804,
0.055971790105104446,
-0.05940788611769676,
0.00042997344280593097,
-0.014075813814997673,
0.016957851126790047,
-0.01639227196574211,
-0.04379938542842865,
-0.04622756689786911,
0.05991086736321449,
0.017356326803565025,
-0.07392776012420654,
0.12479223310947418,
-0.006270871963351965,
0.0770912766456604,
0.07734274119138718,
0.025202646851539612,
0.05631197988986969,
0.08699247241020203,
0.04118883237242699,
0.12339581549167633,
0.002416071016341448,
-0.0038442385848611593,
-0.053619544953107834,
0.16025446355342865,
-0.049432527273893356,
-5.7295750366392895e-8,
0.029844185337424278,
0.005638139322400093,
-0.011785347945988178,
0.08432332426309586,
0.04014267399907112,
-0.0024063135497272015,
0.021971413865685463,
0.004026918206363916,
-0.04036245867609978,
0.0013632726622745395,
-0.03503643721342087,
0.025730818510055542,
-0.1529829353094101,
-0.002585130278021097,
0.03626833111047745,
-0.05338845029473305,
-0.014965657144784927,
0.07370482385158539,
-0.020138312131166458,
-0.0842280387878418,
-0.10107975453138351,
-0.029934775084257126,
0.03154904395341873,
-0.042215291410684586,
-0.022503094747662544,
0.06751517206430435,
-0.007078470662236214,
-0.04001994431018829,
0.05914066731929779,
0.03654739633202553,
0.03237224370241165,
0.010991720482707024,
-0.024307651445269585,
0.03038005158305168,
-0.004383070860058069,
0.03338799998164177,
-0.11284090578556061,
0.055912259966135025,
-0.032028451561927795,
-0.033914513885974884,
-0.0414348803460598,
-0.049443140625953674,
-0.06637590378522873,
0.023883795365691185,
-0.037686750292778015,
0.0493151918053627,
-0.004314899910241365,
0.009257729165256023,
-0.0051067727617919445,
0.012448582798242569,
-0.005277134478092194,
-0.09978888183832169,
0.0012219026684761047,
0.06318269670009613,
-0.09171339869499207,
0.012739348225295544,
0.04562130197882652,
-0.0007566355634480715,
0.0762828141450882,
0.00858756061643362,
0.08528634160757065,
-0.0039528533816337585,
0.058783356100320816,
0.011178887449204922
] | 0.082158
|
is `Always`, which is the default. ### Pod Selector The `.spec.selector` field is a [label selector](/docs/concepts/overview/working-with-objects/labels/). As discussed [earlier](#how-a-replicaset-works) these are the labels used to identify potential Pods to acquire. In our `frontend.yaml` example, the selector was: ```yaml matchLabels: tier: frontend ``` In the ReplicaSet, `.spec.template.metadata.labels` must match `spec.selector`, or it will be rejected by the API. {{< note >}} For 2 ReplicaSets specifying the same `.spec.selector` but different `.spec.template.metadata.labels` and `.spec.template.spec` fields, each ReplicaSet ignores the Pods created by the other ReplicaSet. {{< /note >}} ### Replicas You can specify how many Pods should run concurrently by setting `.spec.replicas`. The ReplicaSet will create/delete its Pods to match this number. If you do not specify `.spec.replicas`, then it defaults to 1. ## Working with ReplicaSets ### Deleting a ReplicaSet and its Pods To delete a ReplicaSet and all of its Pods, use [`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete). The [Garbage collector](/docs/concepts/architecture/garbage-collection/) automatically deletes all of the dependent Pods by default. When using the REST API or the `client-go` library, you must set `propagationPolicy` to `Background` or `Foreground` in the `-d` option. For example: ```shell kubectl proxy --port=8080 curl -X DELETE 'localhost:8080/apis/apps/v1/namespaces/default/replicasets/frontend' \ -d '{"kind":"DeleteOptions","apiVersion":"v1","propagationPolicy":"Foreground"}' \ -H "Content-Type: application/json" ``` ### Deleting just a ReplicaSet You can delete a ReplicaSet without affecting any of its Pods using [`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete) with the `--cascade=orphan` option. When using the REST API or the `client-go` library, you must set `propagationPolicy` to `Orphan`. For example: ```shell kubectl proxy --port=8080 curl -X DELETE 'localhost:8080/apis/apps/v1/namespaces/default/replicasets/frontend' \ -d '{"kind":"DeleteOptions","apiVersion":"v1","propagationPolicy":"Orphan"}' \ -H "Content-Type: application/json" ``` Once the original is deleted, you can create a new ReplicaSet to replace it. As long as the old and new `.spec.selector` are the same, then the new one will adopt the old Pods. However, it will not make any effort to make existing Pods match a new, different pod template. To update Pods to a new spec in a controlled way, use a [Deployment](/docs/concepts/workloads/controllers/deployment/#creating-a-deployment), as ReplicaSets do not support a rolling update directly. ### Terminating Pods {{< feature-state feature\_gate\_name="DeploymentReplicaSetTerminatingReplicas" >}} You can enable this feature by setting the `DeploymentReplicaSetTerminatingReplicas` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) on the [API server](/docs/reference/command-line-tools-reference/kube-apiserver/) and on the [kube-controller-manager](/docs/reference/command-line-tools-reference/kube-controller-manager/) Pods that become terminating due to deletion or scale down may take a long time to terminate, and may consume additional resources during that period. As a result, the total number of all pods can temporarily exceed `.spec.replicas`. Terminating pods can be tracked using the `.status.terminatingReplicas` field of the ReplicaSet. ### Isolating Pods from a ReplicaSet You can remove Pods from a ReplicaSet by changing their labels. This technique may be used to remove Pods from service for debugging, data recovery, etc. Pods that are removed in this way will be replaced automatically ( assuming that the number of replicas is not also changed). ### Scaling a ReplicaSet A ReplicaSet can be easily scaled up or down by simply updating the `.spec.replicas` field. The ReplicaSet controller ensures that a desired number of Pods with a matching label selector are available and operational. When scaling down, the ReplicaSet controller chooses which pods to delete by sorting the available pods to prioritize scaling down pods based on the following general algorithm: 1. Pending (and unschedulable) pods are scaled down first 1. If `controller.kubernetes.io/pod-deletion-cost` annotation is set, then the pod with the lower value will come first. 1. Pods on nodes with more replicas come before pods on nodes with fewer replicas. 1. If the pods' creation times differ, the pod that was created more recently comes before the older pod (the creation times are bucketed on an integer log scale). If all of the above match, then selection is random. ###
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/replicaset.md
|
[
-0.02048579975962639,
0.014567411504685879,
0.01461494155228138,
0.025716464966535568,
0.04554247856140137,
-0.023017054423689842,
-0.00017506552103441209,
-0.030703507363796234,
0.060690876096487045,
-0.016641095280647278,
0.0062631880864501,
-0.057744305580854416,
-0.016102638095617294,
-0.041493721306324005,
0.10483013838529587,
-0.0032778538297861814,
0.07565311342477798,
-0.03890981152653694,
0.00006249072612263262,
-0.0029731288086622953,
0.08319517970085144,
-0.01446213573217392,
0.07380246371030807,
0.03831590712070465,
-0.04991404712200165,
0.02134518511593342,
-0.05610806867480278,
0.0023014529142528772,
0.024793894961476326,
-0.04007185250520706,
0.015262543223798275,
0.068264901638031,
-0.021685007959604263,
0.055639564990997314,
0.08205278217792511,
0.03442870453000069,
-0.00974353775382042,
-0.07870110124349594,
-0.0016806019702926278,
-0.033164262771606445,
0.07396751642227173,
0.0017293819691985846,
-0.09202611446380615,
0.008089123293757439,
-0.052079811692237854,
0.0027807331643998623,
-0.06209929659962654,
-0.015792034566402435,
-0.05095634609460831,
0.026868188753724098,
-0.02594357542693615,
-0.13462695479393005,
0.01945982500910759,
0.010650554671883583,
0.04941393807530403,
0.062493257224559784,
-0.010825124569237232,
0.018841149285435677,
0.04352211207151413,
0.05764295905828476,
0.06412318348884583,
-0.06077411025762558,
-0.03135283663868904,
-0.03938921168446541,
0.06856488436460495,
-0.017861004918813705,
-0.0017614139942452312,
0.00891533400863409,
0.035510092973709106,
0.008963997475802898,
0.06161023676395416,
0.0006233900785446167,
0.08005262911319733,
-0.020399656146764755,
-0.012085308320820332,
0.0007955520413815975,
-0.024810610339045525,
0.03164095804095268,
0.027243202552199364,
-0.11685041338205338,
-0.06814130395650864,
-0.00415728148072958,
0.023235924541950226,
-0.009131966158747673,
-0.01110808551311493,
-0.019358964636921883,
0.017074258998036385,
-0.005510459188371897,
-0.027903422713279724,
0.02949737012386322,
0.0022638675291091204,
-0.055475156754255295,
0.06612251698970795,
-0.05361262708902359,
-0.0026998610701411963,
0.053049296140670776,
-0.025527935475111008,
0.03765415772795677,
0.05342833325266838,
0.022497056052088737,
0.036734532564878464,
-0.01851486973464489,
0.053720805794000626,
0.0332031287252903,
0.0285324826836586,
-0.03255462646484375,
-0.12852518260478973,
-0.013465221971273422,
0.045705780386924744,
0.03814258798956871,
0.02722027897834778,
0.04715966060757637,
-0.002252556849271059,
0.08740566670894623,
-0.04712015017867088,
0.057799436151981354,
-0.00047964268014766276,
0.02253362536430359,
-0.00658997381106019,
0.07320590317249298,
-0.01415455061942339,
-0.018255649134516716,
0.06956084817647934,
-0.03965654596686363,
-0.04982824996113777,
0.015420041047036648,
-0.049191154539585114,
-5.700278378516959e-34,
0.10530642420053482,
-0.05915815755724907,
-0.056038159877061844,
-0.024148965254426003,
0.0508442260324955,
-0.00981807429343462,
-0.04218674451112747,
0.05475931614637375,
-0.05914710462093353,
0.00772154051810503,
-0.00534480158239603,
0.08311565965414047,
-0.04459863156080246,
-0.006690632086247206,
-0.002539676846936345,
-0.061543069779872894,
-0.04287417605519295,
0.10474023222923279,
0.016613028943538666,
-0.019331812858581543,
0.0032427506521344185,
-0.026523152366280556,
-0.029225092381238937,
-0.01091803889721632,
-0.019501477479934692,
0.012894241139292717,
-0.06387345492839813,
-0.03925196826457977,
-0.04305259883403778,
0.03117060475051403,
-0.005682553164660931,
-0.023573806509375572,
0.055819183588027954,
0.05396011099219322,
-0.054035209119319916,
-0.03171619772911072,
0.04694463312625885,
-0.029247788712382317,
-0.11392942816019058,
-0.10175354778766632,
0.013987486250698566,
0.058683764189481735,
0.014084668830037117,
-0.049433112144470215,
-0.023583026602864265,
-0.03399455547332764,
-0.004402843303978443,
-0.05567648634314537,
0.09174973517656326,
0.031758032739162445,
-0.014196926727890968,
-0.07693181931972504,
0.028913147747516632,
-0.10192780196666718,
0.03484053537249565,
-0.02106102742254734,
-0.0006193898734636605,
0.026345061138272285,
0.04179780185222626,
-0.006229463033378124,
0.015555604360997677,
-0.010816272348165512,
-0.04962626099586487,
0.027605216950178146,
0.0244511179625988,
0.18737547099590302,
-0.018266446888446808,
-0.00781738106161356,
0.051037829369306564,
0.08722621202468872,
-0.03451250493526459,
0.08299630135297775,
-0.08902615308761597,
-0.014699863269925117,
0.003086886601522565,
-0.11938315629959106,
-0.003769476432353258,
0.01020569633692503,
-0.09905562549829483,
0.0914415642619133,
-0.06112929433584213,
0.08760745078325272,
-0.13140100240707397,
0.07104817777872086,
-0.06474338471889496,
0.05039914324879646,
0.027926109731197357,
-0.007017573341727257,
0.016305912286043167,
-0.0047027976252138615,
0.004254283383488655,
-0.024997690692543983,
-0.09191425889730453,
-0.06177190691232681,
-0.05699807032942772,
-7.438457079493913e-34,
0.05023844912648201,
-0.017337897792458534,
0.054586030542850494,
0.03920022398233414,
-0.00034276131191290915,
-0.027254140004515648,
0.031288135796785355,
0.09655500948429108,
-0.01073157787322998,
-0.06495771557092667,
0.03973337635397911,
-0.050017453730106354,
0.002877744846045971,
-0.022669436410069466,
-0.08763492852449417,
0.0003336887457408011,
-0.09379395842552185,
-0.0998048186302185,
0.07376531511545181,
0.010335879400372505,
-0.012156940065324306,
-0.03153245151042938,
0.03913718834519386,
0.07133102416992188,
0.01743769645690918,
-0.01793583109974861,
-0.008975896053016186,
-0.05286309868097305,
0.06457670778036118,
-0.09227405488491058,
0.043445706367492676,
-0.0436738021671772,
-0.0346035473048687,
-0.03225114941596985,
-0.0003147633688058704,
0.0010611655889078975,
-0.05654790997505188,
0.1383417248725891,
-0.03556003049015999,
0.010704396292567253,
0.003973072394728661,
-0.02064276486635208,
-0.12005315721035004,
0.011460489593446255,
-0.08079516887664795,
-0.04077563062310219,
0.04976572468876839,
0.03536107763648033,
-0.006923001725226641,
-0.10772646963596344,
0.059175245463848114,
-0.05196347087621689,
-0.09224250167608261,
0.041083067655563354,
-0.04165932908654213,
-0.049654677510261536,
-0.022985760122537613,
0.060952942818403244,
-0.045476388186216354,
-0.0001874457811936736,
0.06686495989561081,
-0.009959334507584572,
-0.02733936347067356,
0.01738855428993702,
0.011378428898751736,
-0.03885771334171295,
-0.05413307994604111,
-0.02917449362576008,
0.037221793085336685,
0.026234684512019157,
0.05026334896683693,
0.0018026428297162056,
0.0177253820002079,
-0.038575317710638046,
-0.012789090164005756,
-0.06338680535554886,
-0.08233224600553513,
-0.047319866716861725,
0.04692043736577034,
0.040873933583498,
-0.03598656877875328,
0.1448153257369995,
-0.028214184567332268,
0.0708468034863472,
0.04832550138235092,
0.0256974995136261,
0.04567848518490791,
0.12908624112606049,
0.018939785659313202,
0.11020816117525101,
0.0419057160615921,
0.02199728600680828,
-0.03256908431649208,
0.11756581813097,
-0.06431901454925537,
-4.5568469886347884e-8,
0.01542180310934782,
0.05252038687467575,
-0.018572164699435234,
0.04094388708472252,
-0.028461916372179985,
0.01641499064862728,
0.05125318840146065,
0.010875510983169079,
-0.008033783175051212,
0.03010207787156105,
-0.012297729961574078,
0.0534261055290699,
-0.08448606729507446,
0.03592650964856148,
-0.0005376786575652659,
-0.033724572509527206,
0.01768193021416664,
0.09183391183614731,
-0.03301343694329262,
-0.016385842114686966,
-0.08657221496105194,
-0.03375301510095596,
0.008714600466191769,
-0.024680856615304947,
0.0029239917639642954,
0.06928876787424088,
0.0030700769275426865,
-0.018686477094888687,
0.031024940311908722,
0.031037477776408195,
-0.024663103744387627,
-0.005740001332014799,
-0.021244682371616364,
-0.001828878535889089,
0.013958560302853584,
0.011583845131099224,
-0.13694918155670166,
0.015922652557492256,
0.05075642466545105,
0.040622059255838394,
-0.009314575232565403,
-0.08196334540843964,
-0.10475602000951767,
0.035107534378767014,
0.031412653625011444,
0.01033786404877901,
0.001913062995299697,
0.008601095527410507,
-0.02451077476143837,
0.02907590940594673,
-0.002793471794575453,
-0.07336315512657166,
-0.010363813489675522,
0.04324726760387421,
-0.07751844078302383,
-0.00263225962407887,
0.04364943131804466,
-0.05130019411444664,
0.014189979061484337,
-0.04135157912969589,
0.12639974057674408,
-0.021729709580540657,
0.05902571976184845,
-0.027865024283528328
] | 0.138743
|
more replicas come before pods on nodes with fewer replicas. 1. If the pods' creation times differ, the pod that was created more recently comes before the older pod (the creation times are bucketed on an integer log scale). If all of the above match, then selection is random. ### Pod deletion cost {{< feature-state for\_k8s\_version="v1.22" state="beta" >}} Using the [`controller.kubernetes.io/pod-deletion-cost`](/docs/reference/labels-annotations-taints/#pod-deletion-cost) annotation, users can set a preference regarding which pods to remove first when downscaling a ReplicaSet. The annotation should be set on the pod, the range is [-2147483648, 2147483647]. It represents the cost of deleting a pod compared to other pods belonging to the same ReplicaSet. Pods with lower deletion cost are preferred to be deleted before pods with higher deletion cost. The implicit value for this annotation for pods that don't set it is 0; negative values are permitted. Invalid values will be rejected by the API server. This feature is beta and enabled by default. You can disable it using the [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) `PodDeletionCost` in both kube-apiserver and kube-controller-manager. {{< note >}} - This is honored on a best-effort basis, so it does not offer any guarantees on pod deletion order. - Users should avoid updating the annotation frequently, such as updating it based on a metric value, because doing so will generate a significant number of pod updates on the apiserver. {{< /note >}} #### Example Use Case The different pods of an application could have different utilization levels. On scale down, the application may prefer to remove the pods with lower utilization. To avoid frequently updating the pods, the application should update `controller.kubernetes.io/pod-deletion-cost` once before issuing a scale down (setting the annotation to a value proportional to pod utilization level). This works if the application itself controls the down scaling; for example, the driver pod of a Spark deployment. ### ReplicaSet as a Horizontal Pod Autoscaler Target A ReplicaSet can also be a target for [Horizontal Pod Autoscalers (HPA)](/docs/tasks/run-application/horizontal-pod-autoscale/). That is, a ReplicaSet can be auto-scaled by an HPA. Here is an example HPA targeting the ReplicaSet we created in the previous example. {{% code\_sample file="controllers/hpa-rs.yaml" %}} Saving this manifest into `hpa-rs.yaml` and submitting it to a Kubernetes cluster should create the defined HPA that autoscales the target ReplicaSet depending on the CPU usage of the replicated Pods. ```shell kubectl apply -f https://k8s.io/examples/controllers/hpa-rs.yaml ``` Alternatively, you can use the `kubectl autoscale` command to accomplish the same (and it's easier!) ```shell kubectl autoscale rs frontend --max=10 --min=3 --cpu=50% ``` ## Alternatives to ReplicaSet ### Deployment (recommended) [`Deployment`](/docs/concepts/workloads/controllers/deployment/) is an object which can own ReplicaSets and update them and their Pods via declarative, server-side rolling updates. While ReplicaSets can be used independently, today they're mainly used by Deployments as a mechanism to orchestrate Pod creation, deletion and updates. When you use Deployments you don't have to worry about managing the ReplicaSets that they create. Deployments own and manage their ReplicaSets. As such, it is recommended to use Deployments when you want ReplicaSets. ### Bare Pods Unlike the case where a user directly created Pods, a ReplicaSet 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 ReplicaSet 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 ReplicaSet delegates local container restarts to some agent on the node such as Kubelet. ### Job Use a [`Job`](/docs/concepts/workloads/controllers/job/) instead
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/replicaset.md
|
[
-0.0006049923831596971,
0.01734665222465992,
0.08261767774820328,
0.023625634610652924,
0.0922279879450798,
0.007499142549932003,
0.07501841336488724,
-0.035308126360177994,
0.15765073895454407,
0.05375995486974716,
0.02155448868870735,
-0.02380187436938286,
-0.00023244571639224887,
-0.03618370369076729,
0.004160445183515549,
-0.040469344705343246,
0.045990459620952606,
-0.049701541662216187,
-0.06838862597942352,
-0.015711965039372444,
0.04007106274366379,
-0.08306551724672318,
0.005557357333600521,
0.08220628648996353,
0.06364377588033676,
-0.05670468509197235,
0.010523440316319466,
-0.014517872594296932,
0.04318198561668396,
-0.01215425319969654,
-0.06831169873476028,
0.07100392878055573,
0.04568690061569214,
-0.028805751353502274,
0.06895110011100769,
-0.03859845921397209,
-0.08587372303009033,
-0.059292539954185486,
-0.06282589584589005,
0.014368467964231968,
0.027185916900634766,
-0.03478473797440529,
-0.13208800554275513,
0.02514703944325447,
-0.03447269648313522,
0.07612764090299606,
-0.10948426276445389,
0.0006012720405124128,
-0.004103931598365307,
0.019258933141827583,
0.02795599214732647,
-0.07102100551128387,
0.018885686993598938,
-0.01841631531715393,
0.04698498919606209,
-0.011311542242765427,
0.002067761030048132,
-0.009816110134124756,
0.03592574596405029,
0.05488860234618187,
0.10832267999649048,
-0.08810039609670639,
-0.041919074952602386,
-0.04131906107068062,
0.10416673123836517,
-0.0399596244096756,
0.05876016989350319,
-0.02707509510219097,
0.05451098829507828,
-0.014412186108529568,
0.06986356526613235,
0.04200664907693863,
0.022700149565935135,
0.023975741118192673,
0.0008777492330409586,
0.018560221418738365,
0.023730313405394554,
0.08510531485080719,
0.005340155214071274,
-0.01577489636838436,
-0.05266276374459267,
0.004280146677047014,
0.04255002364516258,
-0.03871278837323189,
-0.06519918143749237,
-0.0626770555973053,
0.01494479738175869,
-0.03936322033405304,
0.045703157782554626,
0.024650493636727333,
0.007076969835907221,
0.04368651658296585,
0.02789478935301304,
-0.08484027534723282,
0.0034444385673850775,
0.022299055010080338,
-0.02734966017305851,
0.03286878764629364,
0.04436122626066208,
0.014732896350324154,
0.03473737835884094,
0.016270451247692108,
0.027295656502246857,
0.0241808220744133,
0.09441018849611282,
-0.044535327702760696,
-0.06978040188550949,
-0.046711329370737076,
0.050810638815164566,
0.08833383023738861,
-0.008588921278715134,
-0.007882828824222088,
0.008902477100491524,
0.12323689460754395,
-0.019746560603380203,
0.05731679126620293,
0.023990465328097343,
0.035546716302633286,
0.012732299976050854,
0.07175441831350327,
-0.024204347282648087,
-0.11197799444198608,
-0.01684374362230301,
-0.00629644887521863,
-0.12761357426643372,
0.06626415997743607,
-0.03215993568301201,
3.288273897718526e-33,
0.08627794682979584,
-0.07323862612247467,
-0.04711955040693283,
-0.07480210810899734,
0.042397353798151016,
-0.044792380183935165,
-0.05400495603680611,
0.02705528773367405,
-0.03126620873808861,
-0.05872723460197449,
-0.08567237108945847,
0.03237799182534218,
-0.021444689482450485,
-0.023323403671383858,
0.022694064304232597,
-0.08027108013629913,
-0.07142951339483261,
0.08139985799789429,
0.0161906611174345,
-0.034717313945293427,
0.04296273738145828,
-0.036166127771139145,
-0.027052462100982666,
-0.05464433878660202,
0.06061258539557457,
-0.03636912629008293,
-0.033672988414764404,
-0.10817526280879974,
-0.06981469690799713,
0.01613394170999527,
-0.05099111795425415,
0.006917024962604046,
0.0506039559841156,
0.013423721306025982,
-0.08440425992012024,
-0.03542468324303627,
0.0064569939859211445,
-0.02518402598798275,
-0.10131627321243286,
-0.05258743837475777,
0.023911472409963608,
0.034257084131240845,
-0.007966200821101665,
-0.05909959226846695,
0.053578343242406845,
-0.009422864764928818,
0.07363033294677734,
-0.028619250282645226,
0.0015111807733774185,
-0.0036072900984436274,
0.02414030395448208,
-0.010325944982469082,
0.0031898124143481255,
-0.08120966702699661,
-0.0010082842782139778,
-0.024984458461403847,
0.10572044551372528,
-0.05444156378507614,
-0.014913360588252544,
0.023770922794938087,
-0.05889081954956055,
0.005595769267529249,
0.03918062895536423,
0.007587012834846973,
0.03450549393892288,
0.12108432501554489,
0.0010729751083999872,
0.003450617892667651,
0.040445610880851746,
0.024481652304530144,
0.0006133197457529604,
0.07145728170871735,
-0.03911522030830383,
-0.03228479251265526,
-0.033470574766397476,
-0.06424304842948914,
0.05629836767911911,
0.011183115653693676,
-0.029825950041413307,
0.026120591908693314,
-0.02290361188352108,
0.012731182388961315,
-0.10098748654127121,
0.04019435867667198,
-0.037396445870399475,
-0.04752286151051521,
0.05393579974770546,
-0.02550421841442585,
-0.033716894686222076,
-0.016507524996995926,
0.06849383562803268,
0.018888045102357864,
-0.07133457064628601,
-0.009035281836986542,
-0.03959028050303459,
-3.919248408513221e-33,
0.010892926715314388,
0.00653456524014473,
0.05235763639211655,
0.016837218776345253,
0.0290121678262949,
-0.035757120698690414,
-0.009231546893715858,
0.07165807485580444,
0.01402121689170599,
-0.076966792345047,
-0.06205553933978081,
-0.01758749969303608,
0.009879207238554955,
0.031676970422267914,
-0.06169253960251808,
0.0007987429271452129,
-0.03005262464284897,
-0.08104345202445984,
-0.01586526818573475,
0.008091678842902184,
-0.01497536338865757,
0.041692402213811874,
0.0027196407318115234,
0.035769760608673096,
-0.0011254908749833703,
-0.039174631237983704,
0.002087613334879279,
-0.013414870947599411,
0.049910228699445724,
-0.09713610261678696,
-0.027179250493645668,
-0.05220139026641846,
-0.007014622911810875,
-0.031343746930360794,
0.04244527593255043,
-0.029406294226646423,
0.006393395364284515,
0.07069402933120728,
0.026244210079312325,
0.025338705629110336,
-0.005531264469027519,
-0.006143685895949602,
-0.09203509986400604,
-0.019440822303295135,
0.010847656987607479,
-0.030460510402917862,
0.028359608724713326,
-0.004133618902415037,
0.10013235360383987,
-0.07077604532241821,
0.04415160045027733,
-0.044564228504896164,
-0.09970241039991379,
0.1127362921833992,
-0.1285497099161148,
-0.031069714576005936,
-0.025163210928440094,
0.0823884829878807,
-0.013010803610086441,
0.0430181659758091,
0.01601645164191723,
-0.009779292158782482,
0.02135167457163334,
0.054193057119846344,
-0.01872357726097107,
-0.031006211414933205,
0.02920917235314846,
0.04860716313123703,
-0.016858089715242386,
-0.022860117256641388,
0.01092088595032692,
0.0346563458442688,
0.039167627692222595,
0.0001623649732209742,
-0.021963907405734062,
-0.054607320576906204,
0.025208689272403717,
-0.02460804395377636,
0.0912737250328064,
0.004144096747040749,
-0.08552489429712296,
0.1253737360239029,
-0.0471077635884285,
0.029642369598150253,
-0.022260967642068863,
0.04663800075650215,
0.04272972419857979,
0.05453042313456535,
0.024019723758101463,
0.12578576803207397,
0.00406309450045228,
0.0003095038409810513,
-0.02802291139960289,
0.08666115999221802,
-0.05455121397972107,
-4.891068172696578e-8,
0.0959920883178711,
0.012494826689362526,
-0.0036691660061478615,
0.13391639292240143,
0.05676379054784775,
-0.012639611959457397,
0.033154480159282684,
0.10420966148376465,
-0.04496276006102562,
-0.010577838867902756,
0.028617756441235542,
0.07191717624664307,
-0.14574411511421204,
0.009156479500234127,
0.061559293419122696,
-0.05088372156023979,
-0.03239496052265167,
0.03237717226147652,
-0.005765864159911871,
-0.024529386311769485,
-0.05855206027626991,
0.0015924152685329318,
0.0168259646743536,
-0.03958507999777794,
-0.043559107929468155,
0.030046740546822548,
0.06352736800909042,
0.10669047385454178,
0.031626928597688675,
-0.006318187341094017,
-0.015212970785796642,
0.014514883048832417,
-0.021711010485887527,
0.011891523376107216,
0.02524147927761078,
0.03341413661837578,
-0.16745898127555847,
0.03895847126841545,
0.010038156062364578,
0.02760482206940651,
-0.03595415875315666,
-0.02022053301334381,
-0.08059661835432053,
-0.005551675800234079,
0.014863421209156513,
-0.0026603296864777803,
-0.024638701230287552,
-0.024188604205846786,
0.005388947203755379,
-0.018935170024633408,
0.0048419577069580555,
-0.08881887048482895,
-0.020841341465711594,
0.037029851227998734,
-0.017597608268260956,
0.008251910097897053,
-0.027819456532597542,
0.000679691438563168,
0.04084712266921997,
-0.001026671496219933,
0.11939769983291626,
-0.046190984547138214,
-0.014725898392498493,
-0.0342634879052639
] | 0.139872
|
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 ReplicaSet delegates local container restarts to some agent on the node such as Kubelet. ### Job Use a [`Job`](/docs/concepts/workloads/controllers/job/) instead of a ReplicaSet for Pods that are expected to terminate on their own (that is, batch jobs). ### DaemonSet Use a [`DaemonSet`](/docs/concepts/workloads/controllers/daemonset/) instead of a ReplicaSet for Pods that provide a machine-level function, such as machine monitoring or machine logging. These Pods have a lifetime that is tied to a machine lifetime: the Pod needs to be running on the machine before other Pods start, and are safe to terminate when the machine is otherwise ready to be rebooted/shutdown. ### ReplicationController ReplicaSets are the successors to [ReplicationControllers](/docs/concepts/workloads/controllers/replicationcontroller/). The two serve the same purpose, and behave similarly, except that a ReplicationController does not support set-based selector requirements as described in the [labels user guide](/docs/concepts/overview/working-with-objects/labels/#label-selectors). As such, ReplicaSets are preferred over ReplicationControllers ## {{% heading "whatsnext" %}} \* Learn about [Pods](/docs/concepts/workloads/pods). \* Learn about [Deployments](/docs/concepts/workloads/controllers/deployment/). \* [Run a Stateless Application Using a Deployment](/docs/tasks/run-application/run-stateless-application-deployment/), which relies on ReplicaSets to work. \* `ReplicaSet` is a top-level resource in the Kubernetes REST API. Read the {{< api-reference page="workload-resources/replica-set-v1" >}} object definition to understand the API for replica sets. \* Read about [PodDisruptionBudget](/docs/concepts/workloads/pods/disruptions/) and how you can use it to manage application availability during disruptions.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/replicaset.md
|
[
-0.03634198009967804,
-0.03990801051259041,
0.005726237315684557,
0.0003170934214722365,
0.028715146705508232,
0.010407442227005959,
-0.027401152998209,
-0.0291921254247427,
0.06648941338062286,
0.05240171402692795,
-0.03590918332338333,
0.026120690628886223,
-0.019029775634407997,
-0.029126977548003197,
0.00818721204996109,
-0.032081276178359985,
0.10675818473100662,
0.014605886302888393,
-0.02236093394458294,
-0.03130573779344559,
0.03303946554660797,
-0.05205517262220383,
0.0344124510884285,
0.0616023950278759,
-0.11882121115922928,
0.0037560362834483385,
-0.07549738883972168,
-0.10721495002508163,
-0.006968628149479628,
0.0010448674438521266,
-0.05902356654405594,
0.013805571012198925,
0.009668033570051193,
0.02790108323097229,
0.05020921677350998,
0.0926436334848404,
0.03452549874782562,
-0.055943284183740616,
-0.07383578270673752,
-0.012214365415275097,
0.03420211002230644,
-0.03948597609996796,
-0.12401064485311508,
0.02252354845404625,
-0.026678184047341347,
0.030278783291578293,
-0.05280483514070511,
-0.02011626400053501,
-0.008130432106554508,
-0.03658391535282135,
-0.003062955802306533,
-0.06449907273054123,
0.10831154882907867,
0.06525711715221405,
0.05749041587114334,
0.0476214773952961,
0.040934380143880844,
-0.0006428660708479583,
0.10820614546537399,
0.049681518226861954,
0.04412108659744263,
-0.04181750491261482,
-0.03788454830646515,
-0.02596372738480568,
0.08808858692646027,
-0.08660438656806946,
-0.0007111726445145905,
0.012962833978235722,
0.059631552547216415,
-0.039967507123947144,
0.049430374056100845,
-0.035763129591941833,
0.010040546767413616,
-0.0018283245153725147,
-0.059990063309669495,
-0.07089383155107498,
-0.00029681797605007887,
-0.009172254242002964,
0.00824648141860962,
-0.021659674122929573,
-0.06262688338756561,
0.0027493848465383053,
0.09330931305885315,
-0.05367070063948631,
-0.08705990016460419,
-0.009387602098286152,
-0.01589057967066765,
-0.03074040077626705,
0.06658058613538742,
0.024509280920028687,
0.018967600539326668,
0.015128287486732006,
0.03619479387998581,
-0.10146229714155197,
0.0037740147672593594,
-0.050088442862033844,
0.0014960189582780004,
0.07390076667070389,
0.04855191335082054,
-0.020967544987797737,
0.030100230127573013,
0.007283137645572424,
0.025143560022115707,
-0.002158354502171278,
0.030871866270899773,
-0.07043523341417313,
-0.11964460462331772,
-0.025383898988366127,
0.07662572711706161,
0.02034260705113411,
0.023179562762379646,
-0.0002419891970930621,
0.005708727519959211,
0.10130432993173599,
0.020157115533947945,
0.028947968035936356,
-0.04056337848305702,
0.01825985498726368,
-0.010912157595157623,
0.06070023030042648,
-0.0075734881684184074,
-0.07250463217496872,
0.028539789840579033,
0.006045535206794739,
-0.04616187885403633,
-0.010534830391407013,
-0.0010560390073806047,
2.0863101691806055e-33,
0.06408127397298813,
-0.08351265639066696,
0.0021601023618131876,
-0.026912542060017586,
0.07917963713407516,
-0.027799619361758232,
-0.0483161062002182,
0.014068642631173134,
-0.018476204946637154,
-0.05225854367017746,
-0.03591382876038551,
0.02616521716117859,
-0.02275867387652397,
0.057977911084890366,
-0.01783650740981102,
-0.06626459956169128,
-0.06475988030433655,
0.03414986655116081,
0.07010141760110855,
-0.008771817199885845,
0.054005783051252365,
0.0150292394682765,
-0.061417106539011,
0.043998051434755325,
0.029403330758213997,
-0.03651038929820061,
0.024320129305124283,
-0.06486354768276215,
-0.007987226359546185,
0.050255075097084045,
-0.058878783136606216,
0.04470439627766609,
-0.023546671494841576,
0.057811085134744644,
-0.13147567212581635,
-0.02673795446753502,
-0.021100005134940147,
-0.053992316126823425,
-0.07666230946779251,
-0.10791655629873276,
-0.03711743280291557,
0.032888468354940414,
0.01891407184302807,
-0.07637079805135727,
0.021662864834070206,
-0.046576306223869324,
0.05555327236652374,
-0.04473750665783882,
0.05698179081082344,
0.046586234122514725,
0.02081364206969738,
-0.0709618404507637,
0.07326313853263855,
-0.08322446793317795,
0.03897707164287567,
0.03382682427763939,
0.0786009207367897,
-0.05182056874036789,
0.008113468065857887,
0.017105041071772575,
-0.036772117018699646,
-0.05694925785064697,
-0.024769023060798645,
0.06126055866479874,
0.07532579451799393,
0.09982151538133621,
-0.0020773708820343018,
0.01038510724902153,
0.05956903472542763,
0.08724549412727356,
-0.052703022956848145,
0.06540786474943161,
-0.017457669600844383,
-0.016775276511907578,
0.0029777351301163435,
-0.037916332483291626,
0.024481026455760002,
0.012467758730053902,
-0.19020803272724152,
0.09502440690994263,
-0.0049813287332654,
0.012052088975906372,
-0.12034741044044495,
0.0397028923034668,
-0.002312291879206896,
-0.014555349014699459,
0.01106711383908987,
0.028473466634750366,
-0.0013669667532667518,
0.006570926867425442,
0.01629769615828991,
-0.03851320967078209,
-0.053366079926490784,
0.03575563803315163,
-0.09342235326766968,
-4.101087466351844e-33,
0.0693197101354599,
-0.03449838235974312,
-0.003324830671772361,
0.016498517245054245,
0.019807668402791023,
0.01146827731281519,
-0.04262225702404976,
-0.016049502417445183,
-0.0364004448056221,
-0.06820990890264511,
-0.07338190078735352,
-0.09924951940774918,
-0.0009886869229376316,
0.06799474358558655,
-0.1259656548500061,
-0.031642843037843704,
-0.03735573589801788,
-0.07940155267715454,
-0.03862594813108444,
-0.02057422138750553,
-0.023339705541729927,
-0.042850203812122345,
0.034888699650764465,
0.06440629810094833,
0.03707827255129814,
-0.02150728739798069,
-0.06761212646961212,
0.006788409780710936,
0.01266738586127758,
-0.04747437685728073,
0.02485421486198902,
-0.10779809951782227,
0.021277951076626778,
0.011969128623604774,
0.03715351223945618,
-0.004186735022813082,
-0.026561254635453224,
0.11353115737438202,
0.013896292075514793,
-0.04741820693016052,
0.07376043498516083,
-0.005772035103291273,
-0.02922549657523632,
0.007852702401578426,
-0.02192727103829384,
-0.007449967321008444,
0.0019787850324064493,
0.04813337326049805,
-0.022979510948061943,
-0.07642070204019547,
-0.024850493296980858,
-0.02722211740911007,
-0.06803672015666962,
0.06874275952577591,
-0.03540755808353424,
-0.07607602328062057,
0.015041525475680828,
0.08306266367435455,
-0.035152144730091095,
-0.002110626082867384,
0.11027499288320541,
-0.052065327763557434,
0.02816157042980194,
0.07615187764167786,
-0.01716211624443531,
-0.0394468754529953,
0.04270737245678902,
0.06329569965600967,
0.019044632092118263,
0.012105410918593407,
0.07108843326568604,
0.014755110256373882,
0.04300440102815628,
0.033767521381378174,
-0.03890319541096687,
-0.026539627462625504,
-0.049032773822546005,
-0.12128995358943939,
0.01922724023461342,
0.04383787512779236,
-0.09179772436618805,
0.05526198074221611,
-0.023433079943060875,
0.05718989297747612,
0.055666640400886536,
0.04243030026555061,
0.10573311150074005,
0.08052390813827515,
0.07523363083600998,
0.04985266178846359,
0.027577750384807587,
-0.003825135761871934,
-0.033243436366319656,
0.11092787981033325,
-0.06137373670935631,
-5.027636618137876e-8,
0.06735396385192871,
-0.010242060758173466,
0.047645773738622665,
0.019445450976490974,
0.020824478939175606,
-0.0311132799834013,
0.08229951560497284,
0.01751568354666233,
-0.03593911603093147,
0.06313179433345795,
0.029147349298000336,
0.007412261795252562,
-0.05950813740491867,
-0.0027889430057257414,
0.09716925024986267,
-0.02658904157578945,
0.04412362724542618,
0.010168176144361496,
0.006925509311258793,
-0.025475936010479927,
-0.0611896775662899,
-0.08255568891763687,
-0.014845090918242931,
0.021229038015007973,
-0.07532470673322678,
0.09158265590667725,
0.04425840452313423,
0.018081897869706154,
-0.003917267546057701,
-0.0031735398806631565,
-0.01688285730779171,
0.021466795355081558,
-0.013453741557896137,
0.022691918537020683,
-0.03877558931708336,
0.027844464406371117,
-0.11447571218013763,
-0.03337734192609787,
0.006187585182487965,
-0.023315997794270515,
-0.03946482762694359,
-0.03756405785679817,
-0.03920332342386246,
0.03476841747760773,
0.029264509677886963,
0.047751810401678085,
-0.016959628090262413,
-0.0016312332591041923,
-0.025637401267886162,
0.03781123459339142,
-0.0046455590054392815,
-0.03785453736782074,
0.033689673990011215,
0.05985273793339729,
-0.028889348730444908,
0.0016179068479686975,
0.018374914303421974,
-0.09369862824678421,
0.05399864539504051,
0.020099783316254616,
0.08055728673934937,
0.024720996618270874,
0.09156429767608643,
-0.0225093774497509
] | 0.246395
|
A Job creates one or more Pods and will continue to retry execution of the Pods until a specified number of them successfully terminate. As pods successfully complete, the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. Deleting a Job will clean up the Pods it created. Suspending a Job will delete its active Pods until the Job is resumed again. A simple case is to create one Job object in order to reliably run one Pod to completion. The Job object will start a new Pod if the first Pod fails or is deleted (for example due to a node hardware failure or a node reboot). You can also use a Job to run multiple Pods in parallel. If you want to run a Job (either a single task, or several in parallel) on a schedule, see [CronJob](/docs/concepts/workloads/controllers/cron-jobs/). ## Running an example Job Here is an example Job config. It computes π to 2000 places and prints it out. It takes around 10s to complete. {{% code\_sample file="controllers/job.yaml" %}} You can run the example with this command: ```shell kubectl apply -f https://kubernetes.io/examples/controllers/job.yaml ``` The output is similar to this: ``` job.batch/pi created ``` Check on the status of the Job with `kubectl`: {{< tabs name="Check status of Job" >}} {{< tab name="kubectl describe job pi" codelang="bash" >}} Name: pi Namespace: default Selector: batch.kubernetes.io/controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c Labels: batch.kubernetes.io/controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c batch.kubernetes.io/job-name=pi ... Annotations: batch.kubernetes.io/job-tracking: "" Parallelism: 1 Completions: 1 Start Time: Mon, 02 Dec 2019 15:20:11 +0200 Completed At: Mon, 02 Dec 2019 15:21:16 +0200 Duration: 65s Pods Statuses: 0 Running / 1 Succeeded / 0 Failed Pod Template: Labels: batch.kubernetes.io/controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c batch.kubernetes.io/job-name=pi Containers: pi: Image: perl:5.34.0 Port: Host Port: Command: perl -Mbignum=bpi -wle print bpi(2000) Environment: Mounts: Volumes: Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal SuccessfulCreate 21s job-controller Created pod: pi-xf9p4 Normal Completed 18s job-controller Job completed {{< /tab >}} {{< tab name="kubectl get job pi -o yaml" codelang="bash" >}} apiVersion: batch/v1 kind: Job metadata: annotations: batch.kubernetes.io/job-tracking: "" ... creationTimestamp: "2022-11-10T17:53:53Z" generation: 1 labels: batch.kubernetes.io/controller-uid: 863452e6-270d-420e-9b94-53a54146c223 batch.kubernetes.io/job-name: pi name: pi namespace: default resourceVersion: "4751" uid: 204fb678-040b-497f-9266-35ffa8716d14 spec: backoffLimit: 4 completionMode: NonIndexed completions: 1 parallelism: 1 selector: matchLabels: batch.kubernetes.io/controller-uid: 863452e6-270d-420e-9b94-53a54146c223 suspend: false template: metadata: creationTimestamp: null labels: batch.kubernetes.io/controller-uid: 863452e6-270d-420e-9b94-53a54146c223 batch.kubernetes.io/job-name: pi spec: containers: - command: - perl - -Mbignum=bpi - -wle - print bpi(2000) image: perl:5.34.0 imagePullPolicy: IfNotPresent name: pi resources: {} terminationMessagePath: /dev/termination-log terminationMessagePolicy: File dnsPolicy: ClusterFirst restartPolicy: Never schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 status: active: 1 ready: 0 startTime: "2022-11-10T17:53:57Z" uncountedTerminatedPods: {} {{< /tab >}} {{< /tabs >}} To view completed Pods of a Job, use `kubectl get pods`. To list all the Pods that belong to a Job in a machine readable form, you can use a command like this: ```shell pods=$(kubectl get pods --selector=batch.kubernetes.io/job-name=pi --output=jsonpath='{.items[\*].metadata.name}') echo $pods ``` The output is similar to this: ``` pi-5rwd7 ``` Here, the selector is the same as the selector for the Job. The `--output=jsonpath` option specifies an expression with the name from each Pod in the returned list. View the standard output of one of the pods: ```shell kubectl logs $pods ``` Another way to view the logs of a Job: ```shell kubectl logs jobs/pi ``` The output is similar to this: ``` 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632788659361533818279682303019520353018529689957736225994138912497217752834791315155748572424541506959508295331168617278558890750983817546374649393192550604009277016711390098488240128583616035637076601047101819429555961989467678374494482553797747268471040475346462080466842590694912933136770289891521047521620569660240580381501935112533824300355876402474964732639141992726042699227967823547816360093417216412199245863150302861829745557067498385054945885869269956909272107975093029553211653449872027559602364806654991198818347977535663698074265425278625518184175746728909777727938000816470600161452491921732172147723501414419735685481613611573525521334757418494684385233239073941433345477624168625189835694855620992192221842725502542568876717904946016534668049886272327917860857843838279679766814541009538837863609506800642251252051173929848960841284886269456042419652850222106611863067442786220391949450471237137869609563643719172874677646575739624138908658326459958133904780275901 ``` ## Writing a Job spec As with all other Kubernetes config, a Job needs `apiVersion`, `kind`, and `metadata` fields. When the control plane creates new Pods for a Job, the `.metadata.name` of the Job is part of the basis for naming those Pods. The name of a Job must be a
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/job.md
|
[
-0.04721604287624359,
-0.023575467988848686,
0.011756082065403461,
0.06397971510887146,
0.0030678610783070326,
-0.04076340049505234,
-0.04546281322836876,
-0.05230122059583664,
0.021000783890485764,
0.04583517089486122,
-0.010986591689288616,
0.03892342001199722,
-0.013258432038128376,
-0.04089730605483055,
-0.02927420847117901,
-0.05239366739988327,
-0.019490566104650497,
0.037494249641895294,
-0.013232081197202206,
-0.06489518284797668,
0.07448556274175644,
-0.011753693222999573,
0.034785039722919464,
0.07158958911895752,
-0.07375707477331161,
0.019237428903579712,
-0.025695446878671646,
-0.046806853264570236,
-0.010880657471716404,
0.03160705044865608,
-0.05263912305235863,
-0.06481686234474182,
0.027342885732650757,
0.05672468990087509,
0.05987987294793129,
0.1107097938656807,
-0.023498715832829475,
-0.03620048984885216,
-0.03516555577516556,
0.006996446289122105,
0.01743641309440136,
-0.028335582464933395,
-0.13093805313110352,
-0.026775015518069267,
0.003825722262263298,
-0.038888659328222275,
-0.08796142786741257,
-0.03490341082215309,
0.06105389446020126,
-0.03863358125090599,
0.010815050452947617,
-0.10461113601922989,
0.04016287624835968,
0.10949128121137619,
0.08349084109067917,
0.06770718842744827,
0.013585636392235756,
0.002211082261055708,
0.08069902658462524,
0.010146462358534336,
0.025715673342347145,
-0.06751947849988937,
-0.032104458659887314,
-0.04976150020956993,
0.11727134883403778,
-0.03517845645546913,
-0.06691253185272217,
-0.03638526797294617,
0.026822756975889206,
-0.0188608318567276,
0.05890421196818352,
-0.019289817661046982,
-0.017707448452711105,
-0.026274647563695908,
-0.05031662434339523,
0.005372492130845785,
0.05328154191374779,
-0.002086860593408346,
-0.06965891271829605,
0.02147863432765007,
-0.02629932388663292,
-0.029264144599437714,
0.03373856842517853,
-0.055454570800065994,
-0.07744260877370834,
0.010382793843746185,
0.040050067007541656,
-0.013122589327394962,
0.05486775189638138,
-0.009520615451037884,
0.03912157937884331,
0.0277422908693552,
0.047231920063495636,
-0.11398191004991531,
-0.014637138694524765,
-0.017232879996299744,
0.024266211315989494,
0.08342292159795761,
0.025999566540122032,
-0.006057152058929205,
0.057475458830595016,
0.0021985159255564213,
0.011711816303431988,
-0.03337545320391655,
0.09732474386692047,
-0.016939258202910423,
-0.04608069732785225,
-0.0318634957075119,
-0.015283928252756596,
-0.004490891471505165,
0.0033213449642062187,
0.022372158244252205,
-0.000414836045820266,
0.10006072372198105,
0.01774785853922367,
0.11071012169122696,
-0.05164443701505661,
0.03980978578329086,
0.019301854074001312,
0.08338785171508789,
0.07845751196146011,
-0.03029920719563961,
0.054478734731674194,
-0.09161879122257233,
-0.021543964743614197,
-0.03137844055891037,
0.04772435128688812,
3.0941061081916854e-33,
-0.004632693249732256,
-0.07111579924821854,
-0.05589735507965088,
-0.011082489043474197,
0.08789133280515671,
-0.08057813346385956,
-0.05087148770689964,
0.10817128419876099,
0.0029865512624382973,
-0.016897408291697502,
-0.055145468562841415,
0.052092086523771286,
-0.02306845597922802,
0.029181774705648422,
-0.04073415324091911,
-0.08957483619451523,
-0.008770882152020931,
0.039992786943912506,
0.03504360094666481,
-0.0034065505024045706,
0.0108419731259346,
-0.0603865422308445,
-0.07768162339925766,
0.09134264290332794,
0.03783334791660309,
-0.05406336858868599,
0.0451483353972435,
-0.08006828278303146,
-0.06116914749145508,
0.04732072725892067,
-0.013315546326339245,
0.10455625504255295,
-0.06238735839724541,
0.05892179533839226,
-0.12934282422065735,
0.013261937536299229,
-0.021340886130928993,
0.004116824362426996,
-0.026380332186818123,
-0.027397815138101578,
-0.01241555716842413,
0.01847936026751995,
-0.020102577283978462,
-0.05900721251964569,
0.030638782307505608,
-0.10404488444328308,
0.0610644705593586,
-0.06922310590744019,
0.007626035250723362,
0.07830125838518143,
0.044668715447187424,
0.029880549758672714,
0.05679292604327202,
-0.02684691920876503,
0.005502394866198301,
0.03787962347269058,
0.0615653470158577,
-0.0412084124982357,
0.0374293215572834,
0.0326666384935379,
-0.01466253399848938,
-0.03963606804609299,
-0.051419697701931,
0.04530716314911842,
0.023892343044281006,
0.06294193118810654,
0.006678943056613207,
0.018190719187259674,
0.08420553058385849,
0.0669180154800415,
-0.027458911761641502,
0.02782265655696392,
-0.0043088593520224094,
-0.07145990431308746,
-0.0031058010645210743,
-0.02502264268696308,
0.06060325726866722,
-0.027621814981102943,
-0.18436506390571594,
0.03876844048500061,
0.04947540536522865,
0.0028138465713709593,
-0.03056907095015049,
-0.04848645627498627,
0.06152525916695595,
0.027931945398449898,
0.020127413794398308,
0.01213890127837658,
-0.033119816333055496,
-0.004939545411616564,
-0.014931528829038143,
-0.008939912542700768,
-0.02406226471066475,
-0.005469605792313814,
-0.04931850731372833,
-2.7227863608791333e-33,
0.07591833919286728,
-0.05119001865386963,
-0.05422648787498474,
0.04133959859609604,
0.007635993883013725,
0.008092685602605343,
-0.014803258702158928,
-0.012152466922998428,
-0.06043756380677223,
-0.07009390741586685,
-0.10857553035020828,
-0.06230379268527031,
0.043779607862234116,
0.08117569237947464,
-0.05580233037471771,
-0.00557702174410224,
0.0030686939135193825,
-0.045967601239681244,
-0.07951218634843826,
0.07610229402780533,
-0.02984321303665638,
-0.020155295729637146,
0.042234472930431366,
0.009140110574662685,
-0.0118088498711586,
0.02107306569814682,
-0.05212026089429855,
-0.013976751826703548,
-0.011747597716748714,
-0.008546551689505577,
0.0021814184729009867,
-0.136156365275383,
0.05657254159450531,
0.08261092752218246,
0.05455553159117699,
-0.07610321789979935,
-0.03976969048380852,
0.0693768858909607,
0.042186491191387177,
0.009573102928698063,
0.1718069165945053,
-0.026588279753923416,
-0.03853467479348183,
-0.032201170921325684,
-0.026255419477820396,
-0.01305750198662281,
-0.05116904899477959,
0.045068252831697464,
-0.08484100550413132,
-0.05935841053724289,
-0.029674194753170013,
0.00448669632896781,
-0.1257539689540863,
0.09246926754713058,
0.02185959182679653,
-0.09451981633901596,
0.022900648415088654,
-0.011465370655059814,
-0.06196032091975212,
0.041955266147851944,
0.021737636998295784,
-0.06327590346336365,
0.09511397033929825,
0.07587185502052307,
0.06782431155443192,
-0.05024539306759834,
0.01750929094851017,
-0.011908600106835365,
0.0015270182630047202,
0.008301149122416973,
0.05802405625581741,
0.09771227836608887,
0.046039897948503494,
0.06620293855667114,
-0.044661082327365875,
-0.00903257168829441,
-0.04978647455573082,
-0.08184115588665009,
0.007204262539744377,
0.07862377911806107,
-0.029622068628668785,
0.03373173251748085,
-0.003669539000838995,
0.07371751964092255,
-0.057308442890644073,
0.07492931187152863,
0.06383536756038666,
0.05256853625178337,
0.0574524849653244,
0.01899220608174801,
0.04682762175798416,
0.01488605234771967,
0.012378727085888386,
0.07100529968738556,
0.01714884489774704,
-4.857133717450779e-8,
0.08978370577096939,
0.002464121673256159,
0.05936373770236969,
0.04838231950998306,
0.057399384677410126,
-0.08650340139865875,
0.009448776952922344,
0.015102455392479897,
-0.01916177198290825,
0.022390592843294144,
0.003552377922460437,
-0.0303020179271698,
-0.006862665992230177,
0.05483722686767578,
0.056324928998947144,
-0.004634067416191101,
0.083285391330719,
0.042156368494033813,
0.0017759210895746946,
-0.02947090193629265,
-0.038528911769390106,
-0.006907457020133734,
0.05456063896417618,
0.04050838202238083,
-0.026300078257918358,
0.08006427437067032,
0.04360367730259895,
0.024990037083625793,
-0.014992829412221909,
-0.0646238848567009,
-0.06456045061349869,
-0.04609726369380951,
-0.0404781699180603,
0.03499066084623337,
-0.004908460192382336,
-0.006369634997099638,
-0.02457040548324585,
-0.02941035106778145,
0.002648707013577223,
-0.004932960961014032,
0.02223118394613266,
-0.0023630817886441946,
-0.03397379070520401,
-0.01261772308498621,
0.03899500519037247,
0.0030867434106767178,
-0.03713683411478996,
-0.004058866295963526,
-0.019985133782029152,
0.04188981652259827,
-0.03870842233300209,
-0.045374512672424316,
0.04877372831106186,
0.05394010990858078,
-0.008292627520859241,
-0.05429256707429886,
-0.00035603292053565383,
-0.11402271687984467,
-0.015226760879158974,
0.037613242864608765,
0.0301786120980978,
-0.010398785583674908,
-0.00964452512562275,
-0.033874887973070145
] | 0.196307
|
Writing a Job spec As with all other Kubernetes config, a Job needs `apiVersion`, `kind`, and `metadata` fields. When the control plane creates new Pods for a Job, the `.metadata.name` of the Job is part of the basis for naming those Pods. The name of a Job must be a valid [DNS subdomain](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names) value, but this can produce unexpected results for the Pod hostnames. For best compatibility, the name should follow the more restrictive rules for a [DNS label](/docs/concepts/overview/working-with-objects/names#dns-label-names). Even when the name is a DNS subdomain, the name must be no longer than 63 characters. A Job also needs a [`.spec` section](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status). ### Job Labels Job labels will have `batch.kubernetes.io/` prefix for `job-name` and `controller-uid`. ### Pod Template The `.spec.template` is the only required field of the `.spec`. The `.spec.template` is a [pod template](/docs/concepts/workloads/pods/#pod-templates). It has exactly the same schema as a {{< glossary\_tooltip text="Pod" term\_id="pod" >}}, except it is nested and does not have an `apiVersion` or `kind`. In addition to required fields for a Pod, a pod template in a Job must specify appropriate labels (see [pod selector](#pod-selector)) and an appropriate restart policy. Only a [`RestartPolicy`](/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy) equal to `Never` or `OnFailure` is allowed. ### Pod selector The `.spec.selector` field is optional. In almost all cases you should not specify it. See section [specifying your own pod selector](#specifying-your-own-pod-selector). ### Parallel execution for Jobs {#parallel-jobs} There are three main types of task suitable to run as a Job: 1. Non-parallel Jobs - normally, only one Pod is started, unless the Pod fails. - the Job is complete as soon as its Pod terminates successfully. 1. Parallel Jobs with a \*fixed completion count\*: - specify a non-zero positive value for `.spec.completions`. - the Job represents the overall task, and is complete when there are `.spec.completions` successful Pods. - when using `.spec.completionMode="Indexed"`, each Pod gets a different index in the range 0 to `.spec.completions-1`. 1. Parallel Jobs with a \*work queue\*: - do not specify `.spec.completions`, default to `.spec.parallelism`. - the Pods must coordinate amongst themselves or an external service to determine what each should work on. For example, a Pod might fetch a batch of up to N items from the work queue. - each Pod is independently capable of determining whether or not all its peers are done, and thus that the entire Job is done. - when \_any\_ Pod from the Job terminates with success, no new Pods are created. - once at least one Pod has terminated with success and all Pods are terminated, then the Job is completed with success. - once any Pod has exited with success, no other Pod should still be doing any work for this task or writing any output. They should all be in the process of exiting. For a \_non-parallel\_ Job, you can leave both `.spec.completions` and `.spec.parallelism` unset. When both are unset, both are defaulted to 1. For a \_fixed completion count\_ Job, you should set `.spec.completions` to the number of completions needed. You can set `.spec.parallelism`, or leave it unset and it will default to 1. For a \_work queue\_ Job, you must leave `.spec.completions` unset, and set `.spec.parallelism` to a non-negative integer. For more information about how to make use of the different types of job, see the [job patterns](#job-patterns) section. #### Controlling parallelism The requested parallelism (`.spec.parallelism`) can be set to any non-negative value. If it is unspecified, it defaults to 1. If it is specified as 0, then the Job is effectively paused until it is increased. Actual parallelism (number of pods running at any instant) may be more or less than requested parallelism, for
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/job.md
|
[
-0.06502047181129456,
-0.012073139660060406,
0.023211942985653877,
-0.01614469662308693,
-0.08843913674354553,
-0.06255214661359787,
-0.02128208614885807,
-0.044451404362916946,
0.02756296657025814,
0.00028693670174106956,
-0.08206561952829361,
-0.05679332837462425,
-0.05029766634106636,
0.0326433926820755,
0.010659830644726753,
0.018664591014385223,
0.051139045506715775,
-0.0415395051240921,
-0.0021719771903008223,
-0.04125836864113808,
0.10641460120677948,
0.07830037921667099,
0.05963072180747986,
-0.009872891008853912,
-0.060885973274707794,
-0.010455877520143986,
-0.05794242396950722,
0.046116143465042114,
0.019301753491163254,
-0.0009064231417141855,
0.0142992427572608,
0.08631139248609543,
-0.02572198212146759,
0.06703288108110428,
0.1611952930688858,
0.05851363390684128,
-0.018994159996509552,
0.024520179256796837,
-0.009279542602598667,
0.03828389197587967,
0.11214159429073334,
-0.061264801770448685,
0.0060751475393772125,
0.013610070571303368,
-0.046896934509277344,
0.020569730550050735,
0.023412900045514107,
-0.07565072923898697,
0.02014615200459957,
0.02786225453019142,
0.017073431983590126,
-0.13331907987594604,
0.09080562740564346,
0.038487136363983154,
0.08428192138671875,
0.033700186759233475,
-0.04071435704827309,
0.023640159517526627,
0.03094242326915264,
-0.0008977889665402472,
-0.010792993009090424,
-0.02203543856739998,
0.018489647656679153,
-0.06982728838920593,
0.011330773122608662,
-0.018904268741607666,
-0.015950826928019524,
0.012494116090238094,
-0.025641340762376785,
-0.00278879189863801,
0.019768832251429558,
0.02258250117301941,
-0.06113030016422272,
-0.0005651984247379005,
-0.025901801884174347,
0.04501364752650261,
-0.03596187382936478,
0.01102401502430439,
-0.008596395142376423,
-0.15720908343791962,
0.04116007685661316,
0.060381945222616196,
-0.008790181949734688,
-0.01880984753370285,
-0.06294584274291992,
-0.02512107416987419,
0.03892737627029419,
-0.08511462807655334,
0.036654870957136154,
-0.009612305089831352,
-0.015639016404747963,
-0.17323973774909973,
0.03287119045853615,
-0.10014113038778305,
0.021705567836761475,
0.031396642327308655,
-0.004651266150176525,
0.02576920948922634,
0.009862839244306087,
0.0016493570292368531,
0.021723905578255653,
0.01616629771888256,
0.008192723616957664,
0.028409318998456,
0.04586394131183624,
0.008430860936641693,
0.0005998789565637708,
0.03375239297747612,
0.003967491444200277,
0.09260185062885284,
0.007813298143446445,
0.10319134593009949,
0.0207525622099638,
0.022409863770008087,
0.022944847121834755,
-0.043567948043346405,
-0.03353643789887428,
0.0291949063539505,
0.037288494408130646,
-0.011467298492789268,
-0.01338728703558445,
-0.06826914101839066,
-0.006834329571574926,
0.020863914862275124,
-0.08657047897577286,
0.059271782636642456,
-0.042227018624544144,
1.1353851978752848e-33,
0.06682323664426804,
0.0011220239102840424,
-0.006238000933080912,
0.003191764699295163,
0.05013328045606613,
-0.08980147540569305,
-0.012398233637213707,
0.03440083935856819,
-0.03554651513695717,
0.04761989042162895,
-0.1200251653790474,
0.00037629142752848566,
0.03520748391747475,
-0.09256643056869507,
0.01132065337151289,
0.058454327285289764,
-0.016786454245448112,
0.057746000587940216,
0.033400848507881165,
0.0349428616464138,
0.02789854258298874,
0.008933225646615028,
-0.04752122983336449,
0.016275595873594284,
0.014005796052515507,
-0.037882156670093536,
-0.007119901943951845,
-0.07518566399812698,
-0.02983134053647518,
0.012814504094421864,
-0.048858050256967545,
-0.024875923991203308,
0.13057103753089905,
0.04496947303414345,
-0.040188465267419815,
-0.0032917195931077003,
0.019395951181650162,
0.006900205742567778,
-0.05830734223127365,
-0.03852470964193344,
0.015773359686136246,
0.032248690724372864,
-0.05432423576712608,
0.013826177455484867,
0.05253336578607559,
-0.01479717344045639,
0.04193911701440811,
-0.05164046585559845,
0.08982442319393158,
0.08532112091779709,
0.017739184200763702,
-0.052468303591012955,
0.0586073137819767,
-0.09369176626205444,
0.034506842494010925,
0.013842926360666752,
0.0914251059293747,
-0.004328459966927767,
-0.019434185698628426,
-0.021949855610728264,
-0.08453662693500519,
-0.011047432199120522,
-0.07124367356300354,
0.04400724917650223,
0.03854694217443466,
0.014688821509480476,
0.024698885157704353,
0.093013696372509,
-0.02855348028242588,
0.00517992815002799,
-0.033353932201862335,
0.07114921510219574,
-0.07788416743278503,
0.04520970582962036,
-0.003149674041196704,
-0.07013236731290817,
0.014814012683928013,
0.007364095188677311,
-0.14451245963573456,
0.03665212169289589,
0.015448994934558868,
0.05441383644938469,
-0.08494072407484055,
0.05997679755091667,
-0.01444518007338047,
0.0385964959859848,
0.05360051617026329,
0.007176903076469898,
-0.019014203920960426,
-0.047926563769578934,
0.028799671679735184,
-0.04212399572134018,
-0.09239571541547775,
-0.0007817037985660136,
-0.058629028499126434,
-1.3941030556256238e-33,
0.08206048607826233,
-0.03647826984524727,
-0.08144915848970413,
0.028883906081318855,
-0.058235783129930496,
-0.011083802208304405,
0.06867305189371109,
0.06297607719898224,
-0.04446278512477875,
-0.0772268995642662,
-0.007258437108248472,
-0.05223763361573219,
-0.0323103591799736,
-0.057208992540836334,
-0.009287537075579166,
0.0056333537213504314,
-0.14695347845554352,
-0.05971711128950119,
-0.0196974016726017,
0.05404704064130783,
0.027447184547781944,
0.019587278366088867,
-0.09421908855438232,
0.0924426019191742,
-0.0005321874050423503,
0.019597522914409637,
-0.044256389141082764,
0.019625790417194366,
-0.03299625217914581,
0.004852587357163429,
-0.026812585070729256,
-0.03236204385757446,
-0.015099839307367802,
0.034567199647426605,
-0.01202095951884985,
-0.0633692815899849,
-0.017140310257673264,
0.0006537603912875056,
0.03119826503098011,
0.004829916171729565,
0.0008070575422607362,
0.024510513991117477,
-0.054766230285167694,
0.015742847695946693,
-0.0720873549580574,
-0.02406354993581772,
0.05004216358065605,
0.01147734746336937,
-0.0013630192261189222,
-0.10934074968099594,
-0.0015099276788532734,
-0.061273276805877686,
-0.1157570481300354,
0.031814876943826675,
0.0013266062596812844,
-0.0006216060719452798,
-0.0041371784172952175,
0.04213561862707138,
-0.025144062936306,
0.017444560304284096,
0.06914990395307541,
-0.038118232041597366,
0.07418573647737503,
0.09772757440805435,
-0.014884636737406254,
-0.01778663881123066,
-0.03817804157733917,
0.03584712743759155,
0.03905067965388298,
-0.019525116309523582,
-0.00993372406810522,
-0.05102470517158508,
0.009291565045714378,
0.03450753912329674,
-0.02909628488123417,
-0.05741376802325249,
0.062223199754953384,
0.03138304874300957,
0.004773840308189392,
0.10483962297439575,
-0.06236959621310234,
0.08082892745733261,
-0.041041433811187744,
0.042112573981285095,
0.08435450494289398,
0.10442842543125153,
0.08407685160636902,
0.11669422686100006,
-0.05233689397573471,
0.035530220717191696,
0.04415857791900635,
-0.0017878999933600426,
0.008678385987877846,
0.08021873235702515,
-0.056867845356464386,
-5.1227136310671995e-8,
0.03063768707215786,
0.067569300532341,
-0.05610588192939758,
0.04329956695437431,
-0.023795854300260544,
-0.0010976513149216771,
-0.0026198350824415684,
-0.03135266155004501,
0.012161537073552608,
0.06305848062038422,
-0.02870774082839489,
0.0034860128071159124,
-0.1275901049375534,
0.049698419868946075,
0.009703352116048336,
-0.045162759721279144,
0.0480194054543972,
0.13098526000976562,
-0.02925017848610878,
-0.015318908728659153,
-0.09867669641971588,
0.0193887148052454,
-0.04747344180941582,
-0.113097183406353,
-0.009768215008080006,
0.06953202933073044,
0.024135295301675797,
0.0061620548367500305,
0.0682220607995987,
0.04601510241627693,
0.017609821632504463,
0.03280142694711685,
-0.06512024253606796,
0.05872247740626335,
0.01873892918229103,
0.022606847807765007,
-0.03009641170501709,
0.010268116369843483,
0.05960965156555176,
0.044383011758327484,
-0.03624207526445389,
0.012164613232016563,
-0.07589272409677505,
-0.011713924817740917,
0.024839187040925026,
0.06610053777694702,
0.015627717599272728,
0.0630049929022789,
-0.007193350233137608,
-0.0075523750856518745,
-0.04032248631119728,
-0.030767276883125305,
0.008509020321071148,
0.06142374873161316,
-0.033123210072517395,
-0.010463942773640156,
-0.04440346360206604,
-0.04673862084746361,
-0.025412581861019135,
-0.025921905413269997,
0.05508250370621681,
0.001899328432045877,
-0.005301645025610924,
0.03832346946001053
] | 0.112498
|
(`.spec.parallelism`) can be set to any non-negative value. If it is unspecified, it defaults to 1. If it is specified as 0, then the Job is effectively paused until it is increased. Actual parallelism (number of pods running at any instant) may be more or less than requested parallelism, for a variety of reasons: - For \_fixed completion count\_ Jobs, the actual number of pods running in parallel will not exceed the number of remaining completions. Higher values of `.spec.parallelism` are effectively ignored. - For \_work queue\_ Jobs, no new Pods are started after any Pod has succeeded -- remaining Pods are allowed to complete, however. - If the Job {{< glossary\_tooltip term\_id="controller" >}} has not had time to react. - If the Job controller failed to create Pods for any reason (lack of `ResourceQuota`, lack of permission, etc.), then there may be fewer pods than requested. - The Job controller may throttle new Pod creation due to excessive previous pod failures in the same Job. - When a Pod is gracefully shut down, it takes time to stop. ### Completion mode {{< feature-state for\_k8s\_version="v1.24" state="stable" >}} Jobs with \_fixed completion count\_ - that is, jobs that have non null `.spec.completions` - can have a completion mode that is specified in `.spec.completionMode`: - `NonIndexed` (default): the Job is considered complete when there have been `.spec.completions` successfully completed Pods. In other words, each Pod completion is homologous to each other. Note that Jobs that have null `.spec.completions` are implicitly `NonIndexed`. - `Indexed`: the Pods of a Job get an associated completion index from 0 to `.spec.completions-1`. The index is available through four mechanisms: - The Pod annotation `batch.kubernetes.io/job-completion-index`. - The Pod label `batch.kubernetes.io/job-completion-index` (for v1.28 and later). Note the feature gate `PodIndexLabel` must be enabled to use this label, and it is enabled by default. - As part of the Pod hostname, following the pattern `$(job-name)-$(index)`. When you use an Indexed Job in combination with a {{< glossary\_tooltip term\_id="Service" >}}, Pods within the Job can use the deterministic hostnames to address each other via DNS. For more information about how to configure this, see [Job with Pod-to-Pod Communication](/docs/tasks/job/job-with-pod-to-pod-communication/). - From the containerized task, in the environment variable `JOB\_COMPLETION\_INDEX`. The Job is considered complete when there is one successfully completed Pod for each index. For more information about how to use this mode, see [Indexed Job for Parallel Processing with Static Work Assignment](/docs/tasks/job/indexed-parallel-processing-static/). {{< note >}} Although rare, more than one Pod could be started for the same index (due to various reasons such as node failures, kubelet restarts, or Pod evictions). In this case, only the first Pod that completes successfully will count towards the completion count and update the status of the Job. The other Pods that are running or completed for the same index will be deleted by the Job controller once they are detected. {{< /note >}} ## Handling Pod and container failures A container in a Pod may fail for a number of reasons, such as because the process in it exited with a non-zero exit code, or the container was killed for exceeding a memory limit, etc. If this happens, and the `.spec.template.spec.restartPolicy = "OnFailure"`, then the Pod stays on the node, but the container is re-run. Therefore, your program needs to handle the case when it is restarted locally, or else specify `.spec.template.spec.restartPolicy = "Never"`. See [pod lifecycle](/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy) for more information on `restartPolicy`. An entire Pod can also fail, for a number of reasons, such as when the pod is kicked off the node (node is upgraded, rebooted, deleted, etc.), or if a container of
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/job.md
|
[
-0.07413549721240997,
-0.059612881392240524,
-0.01408139057457447,
0.029257992282509804,
-0.016509532928466797,
-0.034854453057050705,
-0.02424883469939232,
-0.055185701698064804,
0.051108334213495255,
0.082151859998703,
0.07509064674377441,
-0.035287145525217056,
-0.038059432059526443,
-0.06329280883073807,
0.02225225605070591,
-0.038716934621334076,
0.08512238413095474,
-0.07487714290618896,
-0.08102603256702423,
-0.05334552377462387,
0.08212531358003616,
0.011448069475591183,
-0.0021282241214066744,
0.08202988654375076,
-0.06339246779680252,
0.01694098673760891,
-0.11117982864379883,
-0.03122023120522499,
0.01960444636642933,
0.0021721930243074894,
-0.07302030920982361,
-0.008012520149350166,
-0.02642238512635231,
0.05168353021144867,
0.0993097573518753,
0.03366762772202492,
0.019840750843286514,
-0.023970117792487144,
-0.01911698654294014,
0.041067611426115036,
0.002079976722598076,
-0.0733005478978157,
-0.1382133513689041,
0.006780901458114386,
-0.001106991432607174,
0.008453072980046272,
-0.0197368822991848,
-0.10877092182636261,
0.007601299323141575,
-0.03352856636047363,
-0.04448796436190605,
-0.08320298045873642,
0.04717838391661644,
0.0006969167152419686,
0.09198373556137085,
-0.0024036297108978033,
-0.0031115147285163403,
-0.014183826744556427,
0.03700610250234604,
0.03824253007769585,
-0.00666319252923131,
-0.08222329616546631,
-0.0753684937953949,
-0.0035186915192753077,
0.11471570283174515,
-0.06698156893253326,
-0.05155126750469208,
-0.04707982763648033,
0.03523876518011093,
-0.0027324967086315155,
0.04947657138109207,
-0.03828812763094902,
-0.0023536526132375,
0.019339468330144882,
-0.004336920101195574,
0.004603263456374407,
0.03477533161640167,
0.05932310223579407,
-0.0404147244989872,
-0.15318307280540466,
0.039931222796440125,
-0.015991508960723877,
0.03424060717225075,
0.013967664912343025,
-0.050415363162755966,
-0.06985298544168472,
0.002537856809794903,
0.005814159754663706,
0.022986434400081635,
-0.035725198686122894,
0.073655866086483,
-0.01369986031204462,
0.03455382585525513,
-0.01276394259184599,
0.040051691234111786,
0.024493662640452385,
-0.010358244180679321,
0.013894856907427311,
0.00443623960018158,
0.023290976881980896,
0.04057280346751213,
0.005696599371731281,
0.06713028252124786,
-0.005683785770088434,
0.013803656212985516,
-0.013008766807615757,
-0.05918440967798233,
-0.018463682383298874,
-0.030201319605112076,
0.019952062517404556,
0.06400175392627716,
0.0409192331135273,
0.025907810777425766,
0.09058666229248047,
0.0029141432605683804,
-0.006439258344471455,
-0.03249708190560341,
-0.006968841888010502,
0.004607612267136574,
0.11890744417905807,
0.035012830048799515,
0.007951298728585243,
0.07233012467622757,
-0.030387328937649727,
-0.03620877116918564,
0.058230094611644745,
-0.0026387914549559355,
2.7214391341504955e-33,
0.054181165993213654,
-0.05089033022522926,
-0.024884453043341637,
-0.052221301943063736,
0.014003884047269821,
-0.053533248603343964,
-0.05850853770971298,
0.059880293905735016,
-0.01808566227555275,
0.03803987056016922,
-0.0514967143535614,
0.03307368606328964,
-0.045267391949892044,
0.0680466741323471,
-0.05350038409233093,
-0.06223820894956589,
0.027826158329844475,
0.04711676016449928,
0.017503438517451286,
0.02334834262728691,
0.05066623538732529,
-0.07690535485744476,
-0.09856430441141129,
0.06700034439563751,
0.08954828232526779,
-0.016414644196629524,
0.011750277131795883,
-0.12279869616031647,
-0.05037014186382294,
0.07057110220193863,
-0.06010675057768822,
0.013315889053046703,
0.0023067223373800516,
0.04437028989195824,
-0.08748197555541992,
0.050324805080890656,
-0.017459481954574585,
-0.040940143167972565,
0.023830056190490723,
-0.07093087583780289,
-0.08515538275241852,
0.005915367975831032,
-0.04223586991429329,
-0.04252642020583153,
-0.00394038250669837,
-0.06597958505153656,
0.028568502515554428,
-0.06769250333309174,
0.00992682296782732,
0.09069018065929413,
0.004117676988244057,
0.006005244795233011,
0.03621473163366318,
0.01891825720667839,
0.029754657298326492,
0.032728422433137894,
0.016533933579921722,
0.015934990718960762,
0.038344625383615494,
0.06628886610269547,
-0.07145285606384277,
0.004096624907106161,
-0.11363809555768967,
-0.007821549661457539,
-0.0033563056495040655,
0.05868638679385185,
-0.032475460320711136,
0.04562339559197426,
0.07501166313886642,
0.06636165827512741,
-0.08341943472623825,
0.0012088664807379246,
-0.011058499105274677,
-0.006258146371692419,
0.033712971955537796,
-0.021625004708766937,
0.011424597352743149,
-0.018776072189211845,
-0.15117524564266205,
0.008413556031882763,
-0.061959054321050644,
0.05369715765118599,
-0.06387416273355484,
-0.0493408627808094,
0.011342096142470837,
0.0005124217132106423,
0.06703637540340424,
0.020577382296323776,
-0.059497635811567307,
-0.015589259564876556,
-0.021893976256251335,
0.0026406573597341776,
-0.06967971473932266,
0.04915279895067215,
-0.05951660871505737,
-4.9820433404763756e-33,
0.04998936504125595,
-0.08629585802555084,
-0.08522644639015198,
0.08322668075561523,
0.01442638784646988,
-0.028965555131435394,
-0.01633303239941597,
0.003239924553781748,
-0.07377487421035767,
-0.09548579901456833,
-0.003910636063665152,
0.01674538478255272,
-0.003600211115553975,
0.07133781164884567,
-0.0439387746155262,
-0.031740348786115646,
-0.026773950085043907,
-0.023879025131464005,
0.0372019037604332,
0.04014478996396065,
0.009743154048919678,
-0.05369012430310249,
-0.0016871995758265257,
0.020693853497505188,
-0.026078013703227043,
0.003685152158141136,
-0.055875733494758606,
-0.1031816229224205,
-0.002936465200036764,
-0.019831081852316856,
0.029477208852767944,
-0.06403926759958267,
-0.041195038706064224,
0.03707657754421234,
0.0637575015425682,
-0.024982789531350136,
-0.11417745053768158,
0.013379953801631927,
0.002660595579072833,
0.06248302385210991,
0.11616504937410355,
-0.012813723646104336,
-0.002196404617279768,
-0.0521048828959465,
-0.05277848616242409,
-0.02497199922800064,
-0.004156050737947226,
-0.042364612221717834,
-0.017018122598528862,
-0.076764315366745,
0.02427537739276886,
0.01870727725327015,
-0.0018943309551104903,
0.12727051973342896,
0.020209023728966713,
-0.07829559594392776,
0.04558555781841278,
-0.04650043323636055,
-0.09162408858537674,
0.022892553359270096,
0.039080578833818436,
-0.02776944451034069,
0.033777523785829544,
-0.005433086771517992,
0.07946359366178513,
-0.009443840011954308,
0.04051423817873001,
-0.012705842033028603,
0.1132337898015976,
-0.004169905558228493,
0.05001034960150719,
0.031626734882593155,
0.020618924871087074,
0.021546797826886177,
-0.048559073358774185,
-0.008195407688617706,
-0.03156442567706108,
-0.0832505151629448,
0.02050100825726986,
0.01893901638686657,
-0.01741374284029007,
0.09179612994194031,
0.034987956285476685,
0.03555373102426529,
-0.036560554057359695,
0.057294756174087524,
0.04164945334196091,
0.10060447454452515,
0.02118031308054924,
0.01761367917060852,
0.02355778031051159,
0.021054718643426895,
-0.029186271131038666,
0.11563056707382202,
-0.029661066830158234,
-5.742449360468527e-8,
0.06839728355407715,
0.07016226649284363,
0.002990665612742305,
0.07541737705469131,
0.09387220442295074,
-0.06810542941093445,
-0.018884915858507156,
-0.0016510419081896544,
-0.04241934046149254,
0.06420090794563293,
0.082832470536232,
-0.01440533995628357,
-0.0420815572142601,
0.06212949752807617,
0.04405030608177185,
0.0025217339862138033,
0.039067335426807404,
0.03287842869758606,
-0.004189223982393742,
-0.09208984673023224,
-0.04695415869355202,
0.04241858050227165,
-0.060916900634765625,
-0.002333357697352767,
-0.07632854580879211,
0.059955596923828125,
0.05957014486193657,
0.022122755646705627,
-0.0013161682290956378,
-0.02001168578863144,
-0.02523142099380493,
-0.0012534069828689098,
-0.10480660200119019,
0.01665472239255905,
0.013345322571694851,
-0.019323786720633507,
-0.08821246027946472,
0.008243378251791,
0.08322932571172714,
-0.003955126274377108,
0.006608179770410061,
-0.026161395013332367,
0.011094832792878151,
0.00839835125952959,
0.09026828408241272,
0.02778220735490322,
-0.03676861524581909,
0.049817439168691635,
-0.04927287995815277,
-0.031922392547130585,
-0.0639256089925766,
0.0010275469394400716,
0.05629770830273628,
0.1367378532886505,
-0.03256801515817642,
-0.03093559294939041,
-0.008787826634943485,
-0.052687179297208786,
-0.024165615439414978,
0.009688987396657467,
0.04867428541183472,
-0.08234372735023499,
-0.029902921989560127,
0.022114252671599388
] | 0.108269
|
it is restarted locally, or else specify `.spec.template.spec.restartPolicy = "Never"`. See [pod lifecycle](/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy) for more information on `restartPolicy`. An entire Pod can also fail, for a number of reasons, such as when the pod is kicked off the node (node is upgraded, rebooted, deleted, etc.), or if a container of the Pod fails and the `.spec.template.spec.restartPolicy = "Never"`. When a Pod fails, then the Job controller starts a new Pod. This means that your application needs to handle the case when it is restarted in a new pod. In particular, it needs to handle temporary files, locks, incomplete output and the like caused by previous runs. By default, each pod failure is counted towards the `.spec.backoffLimit` limit, see [pod backoff failure policy](#pod-backoff-failure-policy). However, you can customize handling of pod failures by setting the Job's [pod failure policy](#pod-failure-policy). Additionally, you can choose to count the pod failures independently for each index of an [Indexed](#completion-mode) Job by setting the `.spec.backoffLimitPerIndex` field (for more information, see [backoff limit per index](#backoff-limit-per-index)). Note that even if you specify `.spec.parallelism = 1` and `.spec.completions = 1` and `.spec.template.spec.restartPolicy = "Never"`, the same program may sometimes be started twice. If you do specify `.spec.parallelism` and `.spec.completions` both greater than 1, then there may be multiple pods running at once. Therefore, your pods must also be tolerant of concurrency. If you specify the `.spec.podFailurePolicy` field, the Job controller does not consider a terminating Pod (a pod that has a `.metadata.deletionTimestamp` field set) as a failure until that Pod is terminal (its `.status.phase` is `Failed` or `Succeeded`). However, the Job controller creates a replacement Pod as soon as the termination becomes apparent. Once the pod terminates, the Job controller evaluates `.backoffLimit` and `.podFailurePolicy` for the relevant Job, taking this now-terminated Pod into consideration. If either of these requirements is not satisfied, the Job controller counts a terminating Pod as an immediate failure, even if that Pod later terminates with `phase: "Succeeded"`. ### Pod backoff failure policy There are situations where you want to fail a Job after some amount of retries due to a logical error in configuration etc. To do so, set `.spec.backoffLimit` to specify the number of retries before considering a Job as failed. The `.spec.backoffLimit` is set by default to 6, unless the [backoff limit per index](#backoff-limit-per-index) (only Indexed Job) is specified. When `.spec.backoffLimitPerIndex` is specified, then `.spec.backoffLimit` defaults to 2147483647 (MaxInt32). Failed Pods associated with the Job are recreated by the Job controller with an exponential back-off delay (10s, 20s, 40s ...) capped at six minutes. The number of retries is calculated in two ways: - The number of Pods with `.status.phase = "Failed"`. - When using `restartPolicy = "OnFailure"`, the number of retries in all the containers of Pods with `.status.phase` equal to `Pending` or `Running`. If either of the calculations reaches the `.spec.backoffLimit`, the Job is considered failed. {{< note >}} If your Job has `restartPolicy = "OnFailure"`, keep in mind that your Pod running the job will be terminated once the job backoff limit has been reached. This can make debugging the Job's executable more difficult. We suggest setting `restartPolicy = "Never"` when debugging the Job or using a logging system to ensure output from failed Jobs is not lost inadvertently. {{< /note >}} ### Backoff limit per index {#backoff-limit-per-index} {{< feature-state feature\_gate\_name="JobBackoffLimitPerIndex" >}} When you run an [indexed](#completion-mode) Job, you can choose to handle retries for pod failures independently for each index. To do so, set the `.spec.backoffLimitPerIndex` to specify the maximal number of pod failures per index. When the per-index backoff limit is exceeded for an index, Kubernetes considers the
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/job.md
|
[
0.01284304540604353,
-0.03156931698322296,
0.01127098873257637,
0.05540113151073456,
0.03614749386906624,
-0.005347770638763905,
-0.04817609116435051,
0.025984710082411766,
0.0020766856614500284,
0.02566693350672722,
-0.009193122386932373,
0.09042446315288544,
-0.043101970106363297,
-0.04696294292807579,
-0.024757370352745056,
0.0002140565775334835,
0.054752275347709656,
-0.013946153223514557,
-0.007035227492451668,
0.0026987078599631786,
0.08512568473815918,
0.04313584789633751,
0.03771980106830597,
0.04830274358391762,
-0.07859986275434494,
0.023125410079956055,
-0.062211405485868454,
-0.022569186985492706,
0.00821489654481411,
0.0031249672174453735,
-0.06496019661426544,
0.025437384843826294,
0.00006608427065657452,
0.008679835125803947,
0.09049929678440094,
0.12900111079216003,
-0.017742041498422623,
-0.06375911831855774,
-0.07151459902524948,
0.023420479148626328,
0.014747455716133118,
-0.08937029540538788,
-0.11112333089113235,
0.02326473593711853,
0.012422144412994385,
-0.020227044820785522,
-0.00042974777170456946,
-0.03863327577710152,
0.017455345019698143,
0.011660329066216946,
0.0324481762945652,
-0.07172331213951111,
0.11006557196378708,
0.013437710702419281,
0.10734838992357254,
0.04274751618504524,
0.06558336317539215,
-0.016052035614848137,
0.07506609708070755,
-0.0004026972164865583,
0.039803266525268555,
-0.05606772378087044,
-0.04005381464958191,
-0.022667856886982918,
0.10937375575304031,
-0.01567605882883072,
-0.023984253406524658,
-0.042283277958631516,
0.04511621594429016,
-0.02636565826833248,
0.07112850993871689,
-0.0004471998254302889,
0.001295584486797452,
-0.0078116352669894695,
-0.08124170452356339,
-0.011225329712033272,
0.0177113376557827,
-0.015681268647313118,
-0.026457885280251503,
-0.025117473676800728,
0.038060106337070465,
-0.022732019424438477,
0.03408082202076912,
-0.059488650411367416,
-0.03984135761857033,
-0.009243160486221313,
0.02696552872657776,
-0.04170847311615944,
0.0938345342874527,
0.027057547122240067,
0.04193247854709625,
0.008714152500033379,
0.03159856051206589,
-0.05072915926575661,
-0.017648771405220032,
-0.02125653810799122,
-0.0053166490979492664,
0.02021617442369461,
0.038174647837877274,
0.018483314663171768,
0.06804166734218597,
-0.03295179083943367,
0.017353978008031845,
0.01974877528846264,
0.07089177519083023,
-0.07037177681922913,
-0.04033884406089783,
-0.01220520306378603,
-0.004489953629672527,
0.036819327622652054,
0.04845104366540909,
-0.028332212939858437,
0.033283401280641556,
0.06847447901964188,
0.007726448588073254,
0.02849845588207245,
-0.07334640622138977,
0.06759995967149734,
-0.046284452080726624,
0.05311769247055054,
0.07325296849012375,
-0.001966666430234909,
0.10315998643636703,
-0.030627598986029625,
-0.056283820420503616,
0.010573004372417927,
-0.011956478469073772,
-3.3399931695963106e-34,
0.03705992177128792,
-0.08366034179925919,
-0.030087321996688843,
0.0037807070184499025,
0.05125145614147186,
-0.07724276185035706,
-0.029981190338730812,
0.04033305495977402,
0.03949827328324318,
0.0143209183588624,
-0.017354721203446388,
0.06916164606809616,
-0.011074746027588844,
-0.024828283116221428,
-0.005039118230342865,
-0.03753078728914261,
-0.0869693011045456,
0.05526148900389671,
0.042092010378837585,
0.007892039604485035,
0.05473266914486885,
-0.039826180785894394,
-0.08497250080108643,
0.07268711179494858,
-0.007651954423636198,
0.04338481277227402,
0.049693796783685684,
-0.07236908376216888,
-0.015465715900063515,
0.0502929612994194,
0.013574499636888504,
0.03871530666947365,
0.006884860340505838,
0.003775635501369834,
-0.10991516709327698,
0.010001584887504578,
-0.01632031239569187,
-0.0007483057561330497,
-0.06283821165561676,
-0.05802730843424797,
-0.017371486872434616,
-0.012670672498643398,
-0.0221156794577837,
-0.03062620386481285,
0.019007567316293716,
-0.15735572576522827,
0.03988080471754074,
-0.02048228122293949,
0.02442134916782379,
0.019332069903612137,
0.009313718415796757,
-0.0360763818025589,
0.0644218698143959,
-0.021344173699617386,
-0.015977762639522552,
-0.0022796564735472202,
-0.009716390632092953,
-0.03754666820168495,
-0.017161298543214798,
0.007016028743237257,
0.0362749919295311,
-0.03418111801147461,
-0.02459987998008728,
-0.032045263797044754,
-0.00019039928156416863,
0.1029755249619484,
0.0015626228414475918,
-0.010156694799661636,
0.006935494486242533,
0.08011898398399353,
-0.05853065848350525,
0.01893189549446106,
-0.008452799171209335,
-0.025253387168049812,
-0.029481075704097748,
-0.045200373977422714,
0.05407964438199997,
0.0024302005767822266,
-0.19004401564598083,
0.008262977935373783,
-0.013301515951752663,
-0.008592289872467518,
-0.06880225241184235,
0.020734691992402077,
0.042739544063806534,
0.009284161031246185,
0.012097878381609917,
0.03638211265206337,
-0.06659948825836182,
-0.01226910948753357,
0.005720167420804501,
-0.05282801017165184,
-0.005395635962486267,
0.028979631140828133,
-0.032159462571144104,
-9.459149776479176e-34,
0.07030481845140457,
-0.02969207800924778,
-0.03873826190829277,
0.010100125335156918,
-0.006011588964611292,
-0.06335023790597916,
-0.03845246881246567,
0.09766378998756409,
-0.07163389772176743,
-0.06456808745861053,
-0.037322480231523514,
-0.09838564693927765,
0.038673628121614456,
0.06015241518616676,
-0.06441093236207962,
-0.03337086737155914,
-0.14447736740112305,
-0.06306199729442596,
-0.03620103374123573,
0.054996877908706665,
-0.009818880818784237,
-0.09233112633228302,
0.035726599395275116,
0.08016660809516907,
-0.031179459765553474,
0.019388647750020027,
-0.024219905957579613,
-0.03798208385705948,
-0.012061269953846931,
-0.0542333722114563,
0.0721604973077774,
-0.12176793068647385,
-0.028116412460803986,
0.13162478804588318,
0.031097110360860825,
-0.026519615203142166,
-0.1127132996916771,
-0.007266271859407425,
0.03519757091999054,
0.05620400980114937,
0.16165924072265625,
0.022899972274899483,
-0.032527606934309006,
0.012418796308338642,
-0.04335130378603935,
-0.030781658366322517,
0.004649664741009474,
-0.010990542359650135,
0.033945050090551376,
-0.1779334992170334,
0.00920962356030941,
-0.019218986853957176,
-0.05474569648504257,
0.08045613020658493,
-0.005753050092607737,
-0.020134832710027695,
0.06235004961490631,
0.019734248518943787,
-0.07731153815984726,
0.016150297597050667,
0.07635562121868134,
-0.05490342900156975,
0.05365889146924019,
0.050914399325847626,
-0.02998298406600952,
-0.05515064299106598,
0.0027531757950782776,
0.010762108489871025,
0.02174614742398262,
0.032239917665719986,
0.026787156239151955,
0.057318639010190964,
0.022976549342274666,
0.011405781842768192,
-0.019181501120328903,
0.012441989965736866,
-0.09274814277887344,
-0.12209014594554901,
0.01673043705523014,
0.0024304105900228024,
-0.0779564157128334,
0.05158158764243126,
-0.061838265508413315,
0.09011321514844894,
0.056873619556427,
0.04541764780879021,
0.030704667791724205,
0.12650896608829498,
0.07119831442832947,
0.052345503121614456,
0.0004959499929100275,
0.027496634051203728,
-0.03487798199057579,
0.08887112885713577,
-0.0711526945233345,
-4.662843622327273e-8,
0.023268450051546097,
0.03612068295478821,
0.050700943917036057,
0.04229237511754036,
0.08520103991031647,
-0.014172524213790894,
0.08184034377336502,
-0.009201702661812305,
-0.04635585844516754,
0.0053366078063845634,
-0.009225676767528057,
0.020765677094459534,
-0.07835239917039871,
-0.003762489650398493,
0.07180442661046982,
-0.0018252000445500016,
0.04202847182750702,
0.08491973578929901,
0.006818914320319891,
-0.08209995180368423,
-0.08199074119329453,
-0.034745119512081146,
0.023552611470222473,
0.04612307995557785,
-0.04962873458862305,
0.09135231375694275,
0.09858206659555435,
0.02762775309383869,
0.00548080587759614,
-0.02882070094347,
-0.01807837188243866,
-0.013020424172282219,
-0.020742500200867653,
0.04241960123181343,
-0.062378060072660446,
0.07776797562837601,
-0.06038805469870567,
-0.014500792138278484,
0.03820212930440903,
0.011282477527856827,
0.0059328447096049786,
-0.03647943213582039,
-0.039251524955034256,
-0.010311215184628963,
-0.015034603886306286,
-0.0017259159358218312,
-0.03276052325963974,
0.06112316623330116,
-0.02499997243285179,
0.030705928802490234,
-0.08773022890090942,
-0.046323053538799286,
-0.038629200309515,
0.05358957499265671,
0.008795469999313354,
-0.012184997089207172,
-0.014483005739748478,
-0.06165773794054985,
-0.036952387541532516,
0.011064115911722183,
0.05487990751862526,
-0.020183170214295387,
0.01788848266005516,
-0.033950045704841614
] | 0.167652
|
feature\_gate\_name="JobBackoffLimitPerIndex" >}} When you run an [indexed](#completion-mode) Job, you can choose to handle retries for pod failures independently for each index. To do so, set the `.spec.backoffLimitPerIndex` to specify the maximal number of pod failures per index. When the per-index backoff limit is exceeded for an index, Kubernetes considers the index as failed and adds it to the `.status.failedIndexes` field. The succeeded indexes, those with a successfully executed pods, are recorded in the `.status.completedIndexes` field, regardless of whether you set the `backoffLimitPerIndex` field. Note that a failing index does not interrupt execution of other indexes. Once all indexes finish for a Job where you specified a backoff limit per index, if at least one of those indexes did fail, the Job controller marks the overall Job as failed, by setting the Failed condition in the status. The Job gets marked as failed even if some, potentially nearly all, of the indexes were processed successfully. You can additionally limit the maximal number of indexes marked failed by setting the `.spec.maxFailedIndexes` field. When the number of failed indexes exceeds the `maxFailedIndexes` field, the Job controller triggers termination of all remaining running Pods for that Job. Once all pods are terminated, the entire Job is marked failed by the Job controller, by setting the Failed condition in the Job status. Here is an example manifest for a Job that defines a `backoffLimitPerIndex`: {{< code\_sample file="/controllers/job-backoff-limit-per-index-example.yaml" >}} In the example above, the Job controller allows for one restart for each of the indexes. When the total number of failed indexes exceeds 5, then the entire Job is terminated. Once the job is finished, the Job status looks as follows: ```sh kubectl get -o yaml job job-backoff-limit-per-index-example ``` ```yaml status: completedIndexes: 1,3,5,7,9 failedIndexes: 0,2,4,6,8 succeeded: 5 # 1 succeeded pod for each of 5 succeeded indexes failed: 10 # 2 failed pods (1 retry) for each of 5 failed indexes conditions: - message: Job has failed indexes reason: FailedIndexes status: "True" type: FailureTarget - message: Job has failed indexes reason: FailedIndexes status: "True" type: Failed ``` The Job controller adds the `FailureTarget` Job condition to trigger [Job termination and cleanup](#job-termination-and-cleanup). When all of the Job Pods are terminated, the Job controller adds the `Failed` condition with the same values for `reason` and `message` as the `FailureTarget` Job condition. For details, see [Termination of Job Pods](#termination-of-job-pods). Additionally, you may want to use the per-index backoff along with a [pod failure policy](#pod-failure-policy). When using per-index backoff, there is a new `FailIndex` action available which allows you to avoid unnecessary retries within an index. ### Pod failure policy {#pod-failure-policy} {{< feature-state feature\_gate\_name="JobPodFailurePolicy" >}} A Pod failure policy, defined with the `.spec.podFailurePolicy` field, enables your cluster to handle Pod failures based on the container exit codes and the Pod conditions. In some situations, you may want to have a better control when handling Pod failures than the control provided by the [Pod backoff failure policy](#pod-backoff-failure-policy), which is based on the Job's `.spec.backoffLimit`. These are some examples of use cases: \* To optimize costs of running workloads by avoiding unnecessary Pod restarts, you can terminate a Job as soon as one of its Pods fails with an exit code indicating a software bug. \* To guarantee that your Job finishes even if there are disruptions, you can ignore Pod failures caused by disruptions (such as {{< glossary\_tooltip text="preemption" term\_id="preemption" >}}, {{< glossary\_tooltip text="API-initiated eviction" term\_id="api-eviction" >}} or {{< glossary\_tooltip text="taint" term\_id="taint" >}}-based eviction) so that they don't count towards the `.spec.backoffLimit` limit of retries. You can configure a Pod failure policy, in the `.spec.podFailurePolicy` field, to meet the above use
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/job.md
|
[
0.02539285644888878,
-0.0007524692337028682,
0.06262179464101791,
0.07966060936450958,
0.00039580988232046366,
-0.018008971586823463,
0.006727381143718958,
-0.05658724531531334,
0.01950085535645485,
0.0019456316949799657,
-0.058330584317445755,
0.024007966741919518,
-0.024563580751419067,
-0.07324936985969543,
-0.07946313917636871,
-0.03087555058300495,
0.013585466891527176,
0.018230514600872993,
-0.019250717014074326,
-0.0757846012711525,
0.07120826095342636,
0.07591859996318817,
-0.0032478843349963427,
0.037400100380182266,
-0.10659733414649963,
0.020521225407719612,
-0.0875995084643364,
-0.014958490617573261,
0.01668623462319374,
-0.009687656536698341,
-0.12434452027082443,
-0.01883845403790474,
0.0006635382887907326,
0.03836040943861008,
0.045235712081193924,
0.08574923127889633,
-0.0702146366238594,
-0.08809853345155716,
-0.04530378431081772,
-0.01608438417315483,
0.04731158912181854,
-0.027073925361037254,
-0.10606426745653152,
0.005100948270410299,
0.012801273725926876,
-0.0415530726313591,
-0.027013415470719337,
-0.08211266994476318,
0.023492084816098213,
-0.02513468824326992,
0.03845489025115967,
-0.00018463749438524246,
0.11812236905097961,
0.03953944891691208,
0.09811466932296753,
0.054727859795093536,
-0.052420612424612045,
-0.019609542563557625,
0.048692505806684494,
0.020901398733258247,
0.08110780268907547,
-0.036043182015419006,
-0.016417646780610085,
-0.061832964420318604,
0.04802132397890091,
-0.03753240033984184,
0.031516388058662415,
-0.07972722500562668,
0.02334967441856861,
-0.0008892662590369582,
0.08999175578355789,
-0.0102583272382617,
-0.06145908311009407,
0.0006693009054288268,
-0.013945545069873333,
0.04872191324830055,
-0.05526955798268318,
0.012029680423438549,
-0.006867751479148865,
-0.056141678243875504,
-0.019697532057762146,
-0.0490604005753994,
0.11538402736186981,
-0.04006271809339523,
-0.061538852751255035,
-0.06167316809296608,
-0.02284649945795536,
-0.06403779983520508,
0.07659368216991425,
-0.01774565689265728,
0.031869858503341675,
-0.06802911311388016,
0.02447066456079483,
-0.03174322471022606,
0.07062781602144241,
0.025326726958155632,
-0.024849876761436462,
0.0485902763903141,
0.014996076934039593,
-0.04122725501656532,
0.005983264185488224,
-0.03457578271627426,
-0.004901590291410685,
0.013820790685713291,
0.07475052028894424,
-0.05275588482618332,
-0.008759384043514729,
-0.05365827679634094,
0.010902035981416702,
0.004369466565549374,
0.011442150920629501,
0.08926480263471603,
0.08694003522396088,
0.053120292723178864,
0.07336335629224777,
0.06422865390777588,
-0.01998024806380272,
0.038562074303627014,
0.038849860429763794,
0.06691758334636688,
0.04390910640358925,
-0.003299711039289832,
0.04042183607816696,
-0.005814487114548683,
-0.017528744414448738,
0.043994735926389694,
0.01024881936609745,
3.0259481906661244e-33,
0.060398902744054794,
-0.059981610625982285,
-0.012400548905134201,
-0.07309590280056,
0.04025273397564888,
-0.038457419723272324,
0.0042610568925738335,
-0.019335458055138588,
-0.00006493966793641448,
0.02572772093117237,
-0.10463370382785797,
0.04499512165784836,
-0.02039332501590252,
-0.054950106889009476,
0.014077269472181797,
-0.05583544820547104,
-0.004810637328773737,
0.08664686232805252,
0.050359394401311874,
-0.019677238538861275,
0.07961980253458023,
-0.09166637808084488,
-0.056072335690259933,
0.03868483006954193,
0.020040340721607208,
-0.010171331465244293,
0.004572745878249407,
-0.08746515959501266,
-0.02583247236907482,
0.04929868504405022,
-0.0292267594486475,
0.011360733769834042,
0.018013417720794678,
-0.04098150506615639,
-0.09956685453653336,
0.02541828714311123,
-0.051523298025131226,
0.0439005084335804,
-0.009704825468361378,
-0.04939742386341095,
-0.042145684361457825,
-0.0006481565651483834,
-0.0688740536570549,
-0.05361001566052437,
-0.020740313455462456,
-0.07185553759336472,
0.015675384551286697,
-0.029880069196224213,
0.008926188573241234,
0.08294450491666794,
-0.016097156330943108,
-0.010258921422064304,
0.04765193164348602,
-0.05921337381005287,
0.043976303189992905,
0.011392845772206783,
0.09766892343759537,
0.009366367012262344,
-0.0355474017560482,
0.09155885875225067,
-0.038568343967199326,
-0.03712253272533417,
-0.05776166170835495,
0.024266697466373444,
0.011781505309045315,
0.042609233409166336,
0.023958848789334297,
0.06373907625675201,
-0.05323335528373718,
0.027271399274468422,
-0.04385697841644287,
0.005560344085097313,
-0.03352098539471626,
-0.06588251143693924,
0.009524986147880554,
-0.08105570822954178,
0.05138111114501953,
0.02329803630709648,
-0.11230039596557617,
-0.04001009464263916,
-0.03363825008273125,
-0.022262917831540108,
-0.01850685104727745,
-0.02151244506239891,
0.07147935777902603,
0.06992953270673752,
0.011654144152998924,
0.004294907208532095,
-0.03747555613517761,
-0.03281901031732559,
0.01940431073307991,
-0.025761347264051437,
0.007115818094462156,
-0.03161942586302757,
-0.09583514928817749,
-3.373151202003619e-33,
0.03662194684147835,
-0.033861905336380005,
0.00027048110496252775,
-0.02279365248978138,
-0.01298022922128439,
0.0009505057823844254,
0.017281459644436836,
0.04034612700343132,
-0.06943465024232864,
-0.07154883444309235,
-0.01803978532552719,
-0.04037322476506233,
-0.010494322516024113,
0.03415815159678459,
-0.12092038989067078,
-0.0165980476886034,
-0.06799878925085068,
-0.044545285403728485,
-0.015634141862392426,
0.039473336189985275,
-0.00782819464802742,
-0.03864471614360809,
0.01692616008222103,
0.09136761724948883,
-0.06490758061408997,
-0.0021483823657035828,
0.028448008000850677,
0.03385525196790695,
-0.025446299463510513,
-0.09449154883623123,
0.0704207569360733,
-0.10988885164260864,
-0.007292208261787891,
0.10844016820192337,
0.04279410094022751,
-0.05903494358062744,
-0.05761558189988136,
0.01517109852284193,
-0.00398709811270237,
0.0941539779305458,
0.135965958237648,
0.03256694972515106,
-0.0399789959192276,
0.02392147108912468,
-0.04666193574666977,
-0.006981533020734787,
-0.008019101805984974,
-0.04138685762882233,
0.010949578136205673,
-0.12239385396242142,
-0.03097989782691002,
-0.029692428186535835,
-0.004590118303894997,
0.14545686542987823,
-0.060432158410549164,
-0.01813778094947338,
0.04032272472977638,
0.02410729043185711,
-0.08252324908971786,
0.04756922274827957,
0.0013518270570784807,
-0.04454055055975914,
0.12579503655433655,
0.06843864917755127,
0.05392325296998024,
-0.0345468632876873,
0.030152980238199234,
0.011508156545460224,
0.04662071540951729,
-0.010314158163964748,
0.030692894011735916,
-0.025668000802397728,
0.05454546958208084,
0.0590452142059803,
-0.003783194115385413,
0.02135186456143856,
-0.05206962302327156,
-0.06560761481523514,
0.021655617281794548,
0.039796650409698486,
-0.03467373177409172,
0.05085284635424614,
-0.036579474806785583,
0.03372839465737343,
0.06816456466913223,
0.09449784457683563,
0.016325538977980614,
0.14530399441719055,
0.02698333002626896,
0.09693864732980728,
0.018071435391902924,
-0.02454095520079136,
-0.017832739278674126,
0.06272092461585999,
0.005147102754563093,
-4.6748635185167586e-8,
0.004943526815623045,
0.04311428591609001,
-0.017069168388843536,
0.01744825765490532,
0.06078360602259636,
-0.049915727227926254,
0.015150720253586769,
0.004298678133636713,
-0.09873472154140472,
-0.07286932319402695,
0.036258626729249954,
-0.0049560293555259705,
-0.05526994541287422,
0.0668923556804657,
0.07044084370136261,
-0.05329081043601036,
0.05731052905321121,
0.07112278044223785,
0.02760140225291252,
-0.01494521088898182,
-0.08288838714361191,
-0.0012518143048509955,
0.028638064861297607,
0.009564711712300777,
0.010893553495407104,
0.08774042129516602,
0.05035588890314102,
0.02189873345196247,
0.04169107973575592,
0.01989341713488102,
-0.007956712506711483,
-0.03083667904138565,
-0.003816682379692793,
0.09697473049163818,
-0.02518218569457531,
0.052125461399555206,
-0.0502774640917778,
-0.03690545633435249,
-0.019619587808847427,
0.06548450887203217,
0.0005360179929994047,
-0.0036288707051426172,
0.0007139273220673203,
0.00605253828689456,
0.027233349159359932,
0.05777238309383392,
-0.05488797277212143,
0.08670879900455475,
0.06286095082759857,
-0.0699484646320343,
-0.05754290893673897,
-0.09451203793287277,
0.021059881895780563,
0.09852991253137589,
-0.00977164227515459,
-0.012189413420855999,
-0.019844699651002884,
-0.03662916645407677,
-0.013492637313902378,
0.024916818365454674,
0.04697436839342117,
-0.06824681907892227,
-0.06219718977808952,
0.017166391015052795
] | 0.116699
|
caused by disruptions (such as {{< glossary\_tooltip text="preemption" term\_id="preemption" >}}, {{< glossary\_tooltip text="API-initiated eviction" term\_id="api-eviction" >}} or {{< glossary\_tooltip text="taint" term\_id="taint" >}}-based eviction) so that they don't count towards the `.spec.backoffLimit` limit of retries. You can configure a Pod failure policy, in the `.spec.podFailurePolicy` field, to meet the above use cases. This policy can handle Pod failures based on the container exit codes and the Pod conditions. Here is a manifest for a Job that defines a `podFailurePolicy`: {{% code\_sample file="/controllers/job-pod-failure-policy-example.yaml" %}} In the example above, the first rule of the Pod failure policy specifies that the Job should be marked failed if the `main` container fails with the 42 exit code. The following are the rules for the `main` container specifically: - an exit code of 0 means that the container succeeded - an exit code of 42 means that the \*\*entire Job\*\* failed - any other exit code represents that the container failed, and hence the entire Pod. The Pod will be re-created if the total number of restarts is below `backoffLimit`. If the `backoffLimit` is reached the \*\*entire Job\*\* failed. {{< note >}} Because the Pod template specifies a `restartPolicy: Never`, the kubelet does not restart the `main` container in that particular Pod. {{< /note >}} The second rule of the Pod failure policy, specifying the `Ignore` action for failed Pods with condition `DisruptionTarget` excludes Pod disruptions from being counted towards the `.spec.backoffLimit` limit of retries. {{< note >}} If the Job failed, either by the Pod failure policy or Pod backoff failure policy, and the Job is running multiple Pods, Kubernetes terminates all the Pods in that Job that are still Pending or Running. {{< /note >}} These are some requirements and semantics of the API: - if you want to use a `.spec.podFailurePolicy` field for a Job, you must also define that Job's pod template with `.spec.restartPolicy` set to `Never`. - the Pod failure policy rules you specify under `spec.podFailurePolicy.rules` are evaluated in order. Once a rule matches a Pod failure, the remaining rules are ignored. When no rule matches the Pod failure, the default handling applies. - you may want to restrict a rule to a specific container by specifying its name in`spec.podFailurePolicy.rules[\*].onExitCodes.containerName`. When not specified the rule applies to all containers. When specified, it should match one the container or `initContainer` names in the Pod template. - you may specify the action taken when a Pod failure policy is matched by `spec.podFailurePolicy.rules[\*].action`. Possible values are: - `FailJob`: use to indicate that the Pod's job should be marked as Failed and all running Pods should be terminated. - `Ignore`: use to indicate that the counter towards the `.spec.backoffLimit` should not be incremented and a replacement Pod should be created. - `Count`: use to indicate that the Pod should be handled in the default way. The counter towards the `.spec.backoffLimit` should be incremented. - `FailIndex`: use this action along with [backoff limit per index](#backoff-limit-per-index) to avoid unnecessary retries within the index of a failed pod. {{< note >}} When you use a `podFailurePolicy`, the job controller only matches Pods in the `Failed` phase. Pods with a deletion timestamp that are not in a terminal phase (`Failed` or `Succeeded`) are considered still terminating. This implies that terminating pods retain a [tracking finalizer](#job-tracking-with-finalizers) until they reach a terminal phase. Since Kubernetes 1.27, Kubelet transitions deleted pods to a terminal phase (see: [Pod Phase](/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase)). This ensures that deleted pods have their finalizers removed by the Job controller. {{< /note >}} {{< note >}} Starting with Kubernetes v1.28, when Pod failure policy is used, the Job controller recreates terminating
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/job.md
|
[
-0.05926914140582085,
0.021708156913518906,
0.08044680953025818,
0.026240352541208267,
-0.005331705790013075,
-0.03500289469957352,
0.021534351631999016,
-0.05140848457813263,
-0.0045450590550899506,
0.02179620787501335,
0.027016043663024902,
-0.029399044811725616,
-0.007711475715041161,
-0.03226800262928009,
0.01737125590443611,
0.020683711394667625,
0.039553478360176086,
-0.011379160918295383,
-0.05968702957034111,
-0.021215712651610374,
0.09637648612260818,
0.1040463000535965,
0.019537782296538353,
0.0722387284040451,
-0.026438018307089806,
0.005078545305877924,
-0.07631230354309082,
0.003256102791056037,
0.059539794921875,
0.01012157928198576,
-0.046300750225782394,
0.03265728801488876,
-0.09911645948886871,
0.034048955887556076,
0.13308200240135193,
0.12293253093957901,
-0.08493667095899582,
-0.030752509832382202,
-0.014978094026446342,
0.003835968440398574,
0.023864367976784706,
-0.02853114902973175,
-0.1258162558078766,
-0.012706105597317219,
-0.016988661140203476,
-0.04275323078036308,
0.04273100569844246,
-0.011676420457661152,
0.011131109669804573,
0.04009909927845001,
0.0337984636425972,
-0.047630783170461655,
0.07540012896060944,
0.009331807494163513,
0.05889188125729561,
-0.019164303317666054,
0.01433692965656519,
0.011271758005023003,
0.016105957329273224,
0.0025885875802487135,
0.04609912633895874,
-0.033628351986408234,
-0.053774651139974594,
-0.04975730925798416,
0.06204630061984062,
0.026039816439151764,
0.00759855518117547,
-0.03686857968568802,
-0.005498925223946571,
0.024144520983099937,
0.05288418009877205,
-0.07174346596002579,
-0.001637822249904275,
-0.00794176384806633,
-0.0011803521774709225,
0.07886990159749985,
-0.06493403762578964,
0.02562224678695202,
-0.01468039769679308,
-0.11789945513010025,
0.03462010994553566,
-0.0028460873290896416,
0.08785933256149292,
0.07048038393259048,
-0.02287537045776844,
-0.06400436162948608,
0.01892227493226528,
-0.00266716699115932,
0.06626436114311218,
-0.002820027992129326,
0.07276468724012375,
-0.07301276922225952,
0.10864046216011047,
-0.019482135772705078,
0.10610432922840118,
0.008628027513623238,
0.0003835670941043645,
-0.0824652686715126,
0.010187352076172829,
0.01783369481563568,
0.007337936200201511,
-0.024760451167821884,
0.012781199999153614,
0.02439936436712742,
0.061849042773246765,
-0.0054831490851938725,
-0.06979372352361679,
-0.08251363039016724,
-0.016637982800602913,
0.05010628700256348,
0.021702764555811882,
0.06301689147949219,
0.04610330983996391,
0.05786925181746483,
-0.03218720853328705,
-0.00678036455065012,
-0.06093451380729675,
0.04126688838005066,
0.014059432782232761,
0.023442832753062248,
0.02998049184679985,
0.0036469227634370327,
0.030016493052244186,
-0.021505163982510567,
-0.018549634143710136,
0.026941346004605293,
0.029724331572651863,
3.266251378397855e-33,
0.03376011177897453,
-0.08526159822940826,
-0.07808732986450195,
-0.026167485862970352,
0.014814629219472408,
-0.037823427468538284,
-0.019484566524624825,
0.029004309326410294,
0.0001948780845850706,
0.024074919521808624,
-0.01637127436697483,
0.0679275244474411,
-0.009061777964234352,
-0.07383406162261963,
0.0005987882032059133,
0.0020492856856435537,
-0.024929264560341835,
0.10140013694763184,
0.03153761476278305,
-0.0021759970113635063,
0.023498473688960075,
-0.06682153046131134,
-0.03562484681606293,
-0.012353526428341866,
0.009580698795616627,
0.06404240429401398,
0.0017898085061460733,
-0.09349019825458527,
-0.027985284104943275,
0.058278992772102356,
-0.0009413346997462213,
0.0020228370558470488,
0.061065372079610825,
-0.026159489527344704,
-0.10972275584936142,
-0.002055245451629162,
-0.06141621991991997,
-0.04286500811576843,
-0.014477702789008617,
-0.09529244899749756,
0.003100988222286105,
0.0020332192070782185,
-0.05053692311048508,
-0.017319774255156517,
0.03852805867791176,
-0.056091438978910446,
0.046733953058719635,
-0.07323896884918213,
0.017210718244314194,
0.023314226418733597,
0.011245734989643097,
0.00457298569381237,
-0.017122840508818626,
-0.05246904864907265,
-0.010367698967456818,
-0.03467456251382828,
0.00731894513592124,
-0.023994503542780876,
0.013208208605647087,
0.0419178269803524,
-0.0702785775065422,
0.03960596024990082,
-0.032413892447948456,
-0.027951594442129135,
0.03990499675273895,
0.03433217108249664,
-0.06185520440340042,
0.035005006939172745,
-0.020458530634641647,
0.015712184831500053,
-0.03354134038090706,
0.028792308643460274,
-0.013728572055697441,
0.04393742233514786,
-0.03224397078156471,
-0.0994839295744896,
0.06545504182577133,
0.015586556866765022,
-0.06889314949512482,
-0.08482921123504639,
-0.022190093994140625,
-0.028601940721273422,
-0.007637378294020891,
0.027822835370898247,
0.01716361753642559,
0.010923705995082855,
0.014473537914454937,
-0.030358167365193367,
-0.08973854035139084,
0.02584579586982727,
-0.027484936639666557,
-0.043372128158807755,
-0.08425434678792953,
-0.01737923175096512,
-0.07269329577684402,
-4.227144174456164e-33,
0.07102670520544052,
-0.049023572355508804,
-0.045473746955394745,
0.05894501879811287,
-0.013058716431260109,
-0.03237954527139664,
0.04335588589310646,
0.10042066127061844,
-0.0006600404740311205,
-0.018088603392243385,
-0.04891567677259445,
-0.003630418796092272,
0.03823283314704895,
0.08267038315534592,
-0.04569384828209877,
0.009693616069853306,
-0.1344950646162033,
-0.028513308614492416,
-0.0029124575667083263,
0.057007674127817154,
0.04949890449643135,
-0.03650263696908951,
-0.003849088679999113,
0.10852129757404327,
-0.048380542546510696,
-0.023338735103607178,
0.016366545110940933,
-0.025409964844584465,
0.0059903934597969055,
-0.0549086257815361,
0.049272239208221436,
-0.029648451134562492,
-0.034931741654872894,
0.021922573447227478,
0.02148362062871456,
-0.07056351751089096,
-0.05483893305063248,
0.0030589806847274303,
-0.06286634504795074,
0.06738892942667007,
0.14693866670131683,
0.0003773430362343788,
-0.07099071890115738,
-0.10157133638858795,
-0.0003121269110124558,
-0.021072443574666977,
0.0004763784818351269,
-0.037786852568387985,
0.01680673286318779,
-0.1255553960800171,
0.06819728016853333,
-0.012491079978644848,
0.026957575231790543,
0.0708114355802536,
-0.06137022003531456,
-0.015105213969945908,
0.0901995450258255,
-0.06589929759502411,
-0.12937404215335846,
0.031680621206760406,
0.04257190227508545,
-0.013303081505000591,
0.11772649735212326,
0.03351821377873421,
0.058898720890283585,
-0.07243962585926056,
-0.0125951636582613,
0.011099329218268394,
0.05017193406820297,
-0.031022468581795692,
0.058949653059244156,
-0.014360181987285614,
0.0650753304362297,
-0.029161904007196426,
0.06044210493564606,
0.06188024580478668,
-0.027302846312522888,
-0.13432982563972473,
0.04514069855213165,
-0.05891096591949463,
-0.012210364453494549,
0.08766205608844757,
0.019305160269141197,
0.11695538461208344,
0.03578359633684158,
0.07132323086261749,
-0.01629224792122841,
0.14834752678871155,
0.036992743611335754,
0.09807759523391724,
-0.01663876697421074,
-0.0416337326169014,
-0.001881268573924899,
0.10110509395599365,
0.013861560262739658,
-5.105109224246007e-8,
-0.018760308623313904,
0.18610242009162903,
0.017405962571501732,
0.05257706716656685,
0.04515831917524338,
-0.02098124660551548,
0.03449922427535057,
0.011879381723701954,
-0.016786113381385803,
-0.055654074996709824,
-0.018560584634542465,
0.0009073519031517208,
-0.054330889135599136,
0.060033176094293594,
-0.03143204748630524,
0.007817081175744534,
-0.04700419679284096,
0.022798847407102585,
-0.028717966750264168,
-0.07168395072221756,
-0.08595561981201172,
-0.007305465172976255,
0.017862366512417793,
-0.009235520847141743,
-0.03975113853812218,
0.031990863382816315,
0.05581400915980339,
0.04156985133886337,
0.01859884522855282,
-0.014750289730727673,
-0.025010114535689354,
-0.04479517415165901,
-0.05891573801636696,
0.04426044225692749,
-0.05737945809960365,
0.02159527875483036,
-0.04143672063946724,
-0.019901303574442863,
0.067477285861969,
0.027888819575309753,
-0.029604502022266388,
-0.01857096701860428,
-0.05442209541797638,
-0.028693033382296562,
0.031760524958372116,
0.04688883572816849,
-0.030520809814333916,
0.06581583619117737,
-0.023050114512443542,
0.03624904900789261,
-0.06583656370639801,
-0.059644609689712524,
-0.04859743267297745,
0.11179425567388535,
0.0023400757927447557,
-0.06375232338905334,
-0.012789618223905563,
-0.011756029911339283,
-0.0176351647824049,
-0.027280284091830254,
0.06496166437864304,
-0.0513380765914917,
-0.008817935362458229,
0.027250388637185097
] | 0.035674
|
terminal phase. Since Kubernetes 1.27, Kubelet transitions deleted pods to a terminal phase (see: [Pod Phase](/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase)). This ensures that deleted pods have their finalizers removed by the Job controller. {{< /note >}} {{< note >}} Starting with Kubernetes v1.28, when Pod failure policy is used, the Job controller recreates terminating Pods only once these Pods reach the terminal `Failed` phase. This behavior is similar to `podReplacementPolicy: Failed`. For more information, see [Pod replacement policy](#pod-replacement-policy). {{< /note >}} When you use the `podFailurePolicy`, and the Job fails due to the pod matching the rule with the `FailJob` action, then the Job controller triggers the Job termination process by adding the `FailureTarget` condition. For more details, see [Job termination and cleanup](#job-termination-and-cleanup). ## Success policy {#success-policy} When creating an Indexed Job, you can define when a Job can be declared as succeeded using a `.spec.successPolicy`, based on the pods that succeeded. By default, a Job succeeds when the number of succeeded Pods equals `.spec.completions`. These are some situations where you might want additional control for declaring a Job succeeded: \* When running simulations with different parameters, you might not need all the simulations to succeed for the overall Job to be successful. \* When following a leader-worker pattern, only the success of the leader determines the success or failure of a Job. Examples of this are frameworks like MPI and PyTorch etc. You can configure a success policy, in the `.spec.successPolicy` field, to meet the above use cases. This policy can handle Job success based on the succeeded pods. After the Job meets the success policy, the job controller terminates the lingering Pods. A success policy is defined by rules. Each rule can take one of the following forms: \* When you specify the `succeededIndexes` only, once all indexes specified in the `succeededIndexes` succeed, the job controller marks the Job as succeeded. The `succeededIndexes` must be a list of intervals between 0 and `.spec.completions-1`. \* When you specify the `succeededCount` only, once the number of succeeded indexes reaches the `succeededCount`, the job controller marks the Job as succeeded. \* When you specify both `succeededIndexes` and `succeededCount`, once the number of succeeded indexes from the subset of indexes specified in the `succeededIndexes` reaches the `succeededCount`, the job controller marks the Job as succeeded. Note that when you specify multiple rules in the `.spec.successPolicy.rules`, the job controller evaluates the rules in order. Once the Job meets a rule, the job controller ignores remaining rules. Here is a manifest for a Job with `successPolicy`: {{% code\_sample file="/controllers/job-success-policy.yaml" %}} In the example above, both `succeededIndexes` and `succeededCount` have been specified. Therefore, the job controller will mark the Job as succeeded and terminate the lingering Pods when either of the specified indexes, 0, 2, or 3, succeed. The Job that meets the success policy gets the `SuccessCriteriaMet` condition with a `SuccessPolicy` reason. After the removal of the lingering Pods is issued, the Job gets the `Complete` condition. Note that the `succeededIndexes` is represented as intervals separated by a hyphen. The number are listed in represented by the first and last element of the series, separated by a hyphen. {{< note >}} When you specify both a success policy and some terminating policies such as `.spec.backoffLimit` and `.spec.podFailurePolicy`, once the Job meets either policy, the job controller respects the terminating policy and ignores the success policy. {{< /note >}} ## Job termination and cleanup When a Job completes, no more Pods are created, but the Pods are [usually](#pod-backoff-failure-policy) not deleted either. Keeping them around allows you to still view the logs of completed pods to check for errors, warnings,
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/job.md
|
[
0.015072546899318695,
-0.0023724273778498173,
0.09962522983551025,
0.009662057273089886,
0.03858242556452751,
0.005214728880673647,
-0.03466876968741417,
-0.045717887580394745,
0.08863552659749985,
0.042061302810907364,
0.005322601180523634,
0.03392089158296585,
-0.004860298242419958,
-0.038293976336717606,
0.04865725710988045,
-0.02614351361989975,
-0.024265708401799202,
0.01034889742732048,
-0.0340697206556797,
-0.02867608703672886,
0.04937858134508133,
0.016050489619374275,
-0.007436794228851795,
0.020464282482862473,
-0.054858721792697906,
-0.01075469795614481,
-0.0736011415719986,
-0.052345938980579376,
0.004819083027541637,
-0.05603877082467079,
-0.08535744249820709,
0.027194438502192497,
-0.042398665100336075,
0.012507481500506401,
0.08839888125658035,
0.10583258420228958,
0.007205316796898842,
-0.038642313331365585,
-0.019322987645864487,
-0.012563344091176987,
0.05984513461589813,
-0.03609029948711395,
-0.12744328379631042,
0.001554904505610466,
-0.010891187936067581,
0.018548082560300827,
-0.04852251708507538,
-0.0934247225522995,
0.004609772935509682,
-0.037847019731998444,
0.035749856382608414,
-0.058812759816646576,
0.13544964790344238,
0.09134692698717117,
0.08059002459049225,
0.05286074057221413,
0.009813574142754078,
0.02765635773539543,
0.10754857212305069,
0.034129004925489426,
0.035996563732624054,
-0.009338497184216976,
-0.05022354796528816,
-0.05764724314212799,
0.061575792729854584,
-0.03525689244270325,
0.017849966883659363,
-0.03204701095819473,
0.03659975156188011,
0.045309752225875854,
0.058187708258628845,
-0.0565110445022583,
-0.030526915565133095,
0.025029361248016357,
-0.00955963134765625,
0.020546235144138336,
0.02168501727283001,
0.011452105827629566,
-0.03589104115962982,
-0.011580402962863445,
-0.017371227964758873,
-0.051311392337083817,
0.0624992772936821,
-0.029525231570005417,
-0.07784255594015121,
-0.041570987552404404,
-0.0642809048295021,
-0.0637698844075203,
0.07247147709131241,
-0.00033517630072310567,
-0.04842034727334976,
-0.011969756335020065,
0.06814339756965637,
-0.07031270861625671,
0.055600687861442566,
-0.028625763952732086,
0.019917134195566177,
0.0280984528362751,
0.049104537814855576,
0.017857015132904053,
0.040920548141002655,
-0.008479001000523567,
0.015635058283805847,
-0.0005415873602032661,
0.06505311280488968,
-0.07999928295612335,
-0.055455390363931656,
-0.0034236148931086063,
0.045710910111665726,
0.013151176273822784,
-0.00222068396396935,
-0.03910088911652565,
0.06013471260666847,
0.06359614431858063,
0.033922094851732254,
0.059930138289928436,
-0.04835183918476105,
0.06182640418410301,
-0.0013795617269352078,
0.020276879891753197,
0.04640279710292816,
-0.05708073079586029,
0.02158249542117119,
0.03554573655128479,
-0.06044258922338486,
0.02284996025264263,
0.03596083074808121,
1.777231929389132e-33,
0.04237748682498932,
-0.1300874799489975,
-0.025017334148287773,
-0.032110851258039474,
0.07177962362766266,
-0.07029048353433609,
-0.04034372419118881,
-0.0085939085111022,
0.010868825018405914,
-0.050158388912677765,
-0.0776486024260521,
0.0022778224665671587,
-0.06561871618032455,
-0.015179473906755447,
-0.004349881783127785,
-0.049660228192806244,
-0.054631397128105164,
0.04838041216135025,
0.04662289470434189,
0.0193713940680027,
0.06909315288066864,
-0.004778658971190453,
-0.04385704919695854,
0.03797820955514908,
0.021134505048394203,
0.010686838999390602,
0.031637292355298996,
-0.07682007551193237,
-0.0032154663931578398,
0.0490291528403759,
-0.037487126886844635,
0.052481818944215775,
0.024784542620182037,
0.03599023073911667,
-0.16771596670150757,
-0.024137388914823532,
-0.0005622050375677645,
0.005708066280931234,
-0.028028149157762527,
-0.04448843374848366,
-0.01272529736161232,
0.002049781382083893,
-0.020183861255645752,
-0.02011938765645027,
0.07003545761108398,
-0.11532002687454224,
0.10759096592664719,
-0.011156751774251461,
0.034998442977666855,
0.0669124573469162,
0.00887361541390419,
-0.010212126187980175,
0.06965088099241257,
-0.03693399205803871,
-0.0010350182419642806,
0.025497620925307274,
0.06736651062965393,
-0.03506096452474594,
-0.05570467934012413,
0.008643945679068565,
0.023098856210708618,
0.025086570531129837,
-0.00514434278011322,
-0.0026680107694119215,
0.06037617102265358,
0.09005469083786011,
-0.04630269855260849,
0.030459564179182053,
-0.0053228032775223255,
0.0037153621669858694,
-0.09061985462903976,
0.011274614371359348,
-0.015917809680104256,
0.014907745644450188,
0.017698880285024643,
-0.08618339896202087,
0.03017416037619114,
0.0036171069368720055,
-0.1324290782213211,
0.010135249234735966,
0.046305250376462936,
-0.029253263026475906,
-0.07971698045730591,
0.037699900567531586,
0.045928359031677246,
0.012240811251103878,
0.07517670840024948,
-0.04607264697551727,
-0.08791226148605347,
0.009373501874506474,
0.02259542979300022,
-0.02872302755713463,
-0.05426308512687683,
0.10952090471982956,
-0.014640375040471554,
-3.143546298561317e-33,
0.09968492388725281,
-0.01631332002580166,
-0.02209656499326229,
0.00029894118779338896,
-0.019666291773319244,
-0.020926928147673607,
-0.030925802886486053,
0.022706562653183937,
-0.012522227130830288,
-0.0859927237033844,
-0.0423894040286541,
-0.054289575666189194,
0.03650307655334473,
0.08136308193206787,
-0.16565075516700745,
-0.0069865514524281025,
-0.052042074501514435,
-0.05283999815583229,
-0.05104317143559456,
0.011033676564693451,
0.04043108969926834,
-0.022075233981013298,
-0.023681072518229485,
0.08427814394235611,
-0.023616105318069458,
-0.021287333220243454,
0.01883663795888424,
0.0020496631041169167,
-0.021383879706263542,
-0.026699688285589218,
0.0485282801091671,
-0.11545564979314804,
0.025273054838180542,
0.08071257919073105,
0.05324370786547661,
-0.03707670792937279,
-0.09347459673881531,
0.027456726878881454,
-0.006240434944629669,
-0.025956645607948303,
0.09451083838939667,
0.0013138775248080492,
-0.006731873378157616,
-0.007923237979412079,
-0.007258710917085409,
0.0028603519313037395,
0.046490445733070374,
-0.008991120383143425,
0.015816200524568558,
-0.11255566775798798,
-0.01371685042977333,
-0.004645880311727524,
-0.07032803446054459,
0.057534314692020416,
-0.053476061671972275,
-0.033354613929986954,
0.06336388736963272,
0.07804399728775024,
-0.08245145529508591,
-0.01524265669286251,
0.023821411654353142,
-0.021822093054652214,
0.09729256480932236,
0.01577964797616005,
0.02855277992784977,
-0.07403521984815598,
0.04511580243706703,
0.07557574659585953,
0.057923298329114914,
-0.015825971961021423,
0.08377533406019211,
0.08903530240058899,
0.03229789435863495,
0.05574704334139824,
0.02012617699801922,
0.013506319373846054,
-0.06963483989238739,
-0.0756106972694397,
0.015100156888365746,
0.015642574056982994,
-0.0644553005695343,
0.030632546171545982,
-0.05405418574810028,
0.03661487624049187,
0.04624152556061745,
0.10198772698640823,
0.02643432281911373,
0.10998331755399704,
0.04650357365608215,
0.030399836599826813,
0.03962427377700806,
-0.022774113342165947,
0.01169553305953741,
0.1180969700217247,
-0.037747569382190704,
-4.7875523989659996e-8,
0.07853646576404572,
0.04263782128691673,
-0.03636002168059349,
0.02516518533229828,
0.05804462358355522,
-0.07361241430044174,
0.039031729102134705,
0.0005363927921280265,
-0.05783000588417053,
-0.03197736665606499,
-0.056266143918037415,
0.07806207239627838,
-0.0647367537021637,
0.011690550483763218,
0.06562427431344986,
-0.03958652913570404,
0.06564497947692871,
0.0570828802883625,
0.029378335922956467,
-0.0587126649916172,
-0.13216961920261383,
-0.09254814684391022,
-0.012150606140494347,
-0.004387092310935259,
-0.05090592801570892,
0.09095613658428192,
0.04074446111917496,
0.022578753530979156,
0.02337058261036873,
-0.0036528443451970816,
-0.02432042546570301,
-0.018019840121269226,
-0.07754325121641159,
0.06397178769111633,
-0.04636566713452339,
0.07472553849220276,
-0.08741592615842819,
0.003832897637039423,
-0.003144278423860669,
-0.000550339522305876,
0.016766952350735664,
0.005372016690671444,
-0.06847088783979416,
-0.0011766726383939385,
-0.01598357781767845,
0.0408649705350399,
0.00019498399342410266,
0.07149182260036469,
-0.02652902901172638,
-0.001359110465273261,
-0.005513652693480253,
-0.05136625096201897,
-0.07620421051979065,
0.05022183805704117,
-0.037709180265665054,
-0.03750815615057945,
-0.035601675510406494,
-0.039740532636642456,
-0.025613976642489433,
0.012480956502258778,
0.037906400859355927,
0.007834340445697308,
0.013842189684510231,
-0.031211191788315773
] | 0.121603
|
terminating policy and ignores the success policy. {{< /note >}} ## Job termination and cleanup When a Job completes, no more Pods are created, but the Pods are [usually](#pod-backoff-failure-policy) not deleted either. Keeping them around allows you to still view the logs of completed pods to check for errors, warnings, or other diagnostic output. The job object also remains after it is completed so that you can view its status. It is up to the user to delete old jobs after noting their status. Delete the job with `kubectl` (e.g. `kubectl delete jobs/pi` or `kubectl delete -f ./job.yaml`). When you delete the job using `kubectl`, all the pods it created are deleted too. By default, a Job will run uninterrupted unless a Pod fails (`restartPolicy=Never`) or a Container exits in error (`restartPolicy=OnFailure`), at which point the Job defers to the `.spec.backoffLimit` described above. Once `.spec.backoffLimit` has been reached the Job will be marked as failed and any running Pods will be terminated. Another way to terminate a Job is by setting an active deadline. Do this by setting the `.spec.activeDeadlineSeconds` field of the Job to a number of seconds. The `activeDeadlineSeconds` applies to the duration of the job, no matter how many Pods are created. Once a Job reaches `activeDeadlineSeconds`, all of its running Pods are terminated and the Job status will become `type: Failed` with `reason: DeadlineExceeded`. Note that a Job's `.spec.activeDeadlineSeconds` takes precedence over its `.spec.backoffLimit`. Therefore, a Job that is retrying one or more failed Pods will not deploy additional Pods once it reaches the time limit specified by `activeDeadlineSeconds`, even if the `backoffLimit` is not yet reached. Example: ```yaml apiVersion: batch/v1 kind: Job metadata: name: pi-with-timeout spec: backoffLimit: 5 activeDeadlineSeconds: 100 template: spec: containers: - name: pi image: perl:5.34.0 command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] restartPolicy: Never ``` Note that both the Job spec and the [Pod template spec](/docs/concepts/workloads/pods/init-containers/#detailed-behavior) within the Job have an `activeDeadlineSeconds` field. Ensure that you set this field at the proper level. Keep in mind that the `restartPolicy` applies to the Pod, and not to the Job itself: there is no automatic Job restart once the Job status is `type: Failed`. That is, the Job termination mechanisms activated with `.spec.activeDeadlineSeconds` and `.spec.backoffLimit` result in a permanent Job failure that requires manual intervention to resolve. ### Terminal Job conditions A Job has two possible terminal states, each of which has a corresponding Job condition: \* Succeeded: Job condition `Complete` \* Failed: Job condition `Failed` Jobs fail for the following reasons: - The number of Pod failures exceeded the specified `.spec.backoffLimit` in the Job specification. For details, see [Pod backoff failure policy](#pod-backoff-failure-policy). - The Job runtime exceeded the specified `.spec.activeDeadlineSeconds` - An indexed Job that used `.spec.backoffLimitPerIndex` has failed indexes. For details, see [Backoff limit per index](#backoff-limit-per-index). - The number of failed indexes in the Job exceeded the specified `spec.maxFailedIndexes`. For details, see [Backoff limit per index](#backoff-limit-per-index) - A failed Pod matches a rule in `.spec.podFailurePolicy` that has the `FailJob` action. For details about how Pod failure policy rules might affect failure evaluation, see [Pod failure policy](#pod-failure-policy). Jobs succeed for the following reasons: - The number of succeeded Pods reached the specified `.spec.completions` - The criteria specified in `.spec.successPolicy` are met. For details, see [Success policy](#success-policy). In Kubernetes v1.31 and later the Job controller delays the addition of the terminal conditions,`Failed` or `Complete`, until all of the Job Pods are terminated. In Kubernetes v1.30 and earlier, the Job controller added the `Complete` or the `Failed` Job terminal conditions as soon as the Job termination process was triggered and all Pod finalizers were removed. However,
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/job.md
|
[
-0.01020264532417059,
0.012268942780792713,
0.03258032351732254,
0.021576594561338425,
0.04866103082895279,
-0.048323098570108414,
-0.012662703171372414,
-0.09976831823587418,
0.05541350319981575,
0.04532793536782265,
0.014170568436384201,
0.04386216774582863,
-0.036099500954151154,
-0.05373893678188324,
0.0030999304726719856,
-0.04549850896000862,
-0.011208557523787022,
-0.025731278583407402,
-0.04469865560531616,
-0.04435286298394203,
0.04646551236510277,
-0.005902105942368507,
0.03458049148321152,
0.07275886833667755,
-0.03768278658390045,
0.038819994777441025,
-0.009702535346150398,
-0.04589929059147835,
-0.008622649125754833,
0.001448752940632403,
-0.05412964150309563,
-0.007354449015110731,
0.020316610112786293,
0.014681796543300152,
0.0399165004491806,
0.11456737667322159,
-0.029221054166555405,
-0.08195960521697998,
-0.07524270564317703,
-0.014940662309527397,
0.02592294104397297,
-0.0255010724067688,
-0.16748033463954926,
0.01008389238268137,
0.015497580170631409,
0.0053887683898210526,
-0.07315411418676376,
-0.10360503196716309,
0.009118674322962761,
-0.008350104093551636,
0.02388494461774826,
-0.04607129842042923,
0.09647846966981888,
0.06324084103107452,
0.08787404000759125,
0.05035942420363426,
0.016466984525322914,
-0.0032519495580345392,
0.04462147876620293,
0.03310628980398178,
0.04486459121108055,
-0.02317606657743454,
-0.05973153933882713,
-0.039319153875112534,
0.05651097372174263,
-0.049544285982847214,
-0.03612900525331497,
-0.0385151281952858,
0.03668483719229698,
0.0007227176101878285,
0.014234250411391258,
-0.018095310777425766,
-0.009445074014365673,
-0.010039889253675938,
-0.03718270733952522,
0.012448836117982864,
0.0067625041119754314,
0.020564885810017586,
-0.05382227152585983,
-0.03729723021388054,
-0.01567784696817398,
-0.05354536324739456,
0.07703462988138199,
-0.023953089490532875,
-0.10535363852977753,
-0.01491458434611559,
-0.028490250930190086,
-0.06362707912921906,
0.08500406891107559,
0.00028047963860444725,
0.04376792535185814,
0.011774079874157906,
0.05145527049899101,
-0.05106831714510918,
0.03418150544166565,
-0.0409507229924202,
0.012696844525635242,
0.07748928666114807,
0.012744431383907795,
0.006896506994962692,
0.044094085693359375,
-0.03497158735990524,
0.007605456281453371,
0.02698478475213051,
0.03857823461294174,
-0.03359357640147209,
-0.0842965841293335,
-0.009106348268687725,
0.010106014087796211,
0.03365559130907059,
-0.009815891273319721,
0.0010701385326683521,
0.009512485936284065,
0.1063106507062912,
-0.013471240177750587,
0.0718790665268898,
-0.043554265052080154,
0.07176411151885986,
-0.018260732293128967,
0.044108882546424866,
0.06461985409259796,
-0.0281771719455719,
0.03424279764294624,
-0.0001442154753021896,
-0.06490202993154526,
0.025723453611135483,
0.027136055752635002,
7.167666343747652e-34,
0.04824642837047577,
-0.10464870184659958,
-0.04958844557404518,
-0.030499715358018875,
0.09886351972818375,
-0.03208998218178749,
-0.0381476990878582,
0.0317789688706398,
0.04486239701509476,
0.006956186611205339,
-0.05119412764906883,
0.08936430513858795,
-0.05827998369932175,
-0.0063097840175032616,
0.025346843525767326,
-0.045622654259204865,
-0.03294821083545685,
0.09093380719423294,
0.029340548440814018,
-0.00014448317233473063,
0.08587640523910522,
-0.014497841708362103,
-0.09639161825180054,
0.07971787452697754,
0.046950116753578186,
0.02882542833685875,
0.051293350756168365,
-0.07816015183925629,
-0.08331349492073059,
0.0490749329328537,
-0.028043700382113457,
0.047427698969841,
-0.013345707207918167,
0.018442288041114807,
-0.12195542454719543,
-0.005818135570734739,
-0.05865665152668953,
0.022167785093188286,
-0.0613604299724102,
-0.055110640823841095,
0.02960498072206974,
-0.010202326811850071,
-0.06236916407942772,
-0.031247351318597794,
0.04003980755805969,
-0.14381615817546844,
0.07356220483779907,
-0.03850119933485985,
0.05442694574594498,
0.10262130945920944,
0.031838446855545044,
-0.03305269032716751,
0.06000842526555061,
-0.07044878602027893,
-0.01254658680409193,
0.016603123396635056,
0.06359188258647919,
-0.01289362646639347,
-0.059534065425395966,
-0.0406000018119812,
0.030253605917096138,
0.036518801003694534,
-0.026231052353978157,
-0.002730167703703046,
-0.012821383774280548,
0.07061663269996643,
-0.022447960451245308,
0.07578578591346741,
0.01702430099248886,
0.003504036692902446,
-0.07415692508220673,
0.09197629988193512,
-0.016455261036753654,
-0.018416009843349457,
-0.00976216048002243,
-0.048859622329473495,
0.03349866345524788,
-0.0038369058165699244,
-0.12436553090810776,
0.02275639958679676,
0.06394701451063156,
-0.004090576432645321,
-0.07713755965232849,
-0.006058551836758852,
0.06645897775888443,
0.04851589351892471,
0.03361093997955322,
-0.025316372513771057,
-0.021934527903795242,
0.07107657194137573,
-0.0312776118516922,
-0.03635010868310928,
-0.04763321205973625,
0.04693735018372536,
-0.05877155065536499,
-3.090607175788066e-33,
0.09760957956314087,
-0.023363232612609863,
-0.0406322255730629,
-0.0009114702697843313,
-0.052332643419504166,
0.0080929696559906,
-0.0013186396099627018,
0.058429472148418427,
-0.030902059748768806,
-0.11214245855808258,
-0.04691898077726364,
-0.029246794059872627,
0.04003462195396423,
0.08629097044467926,
-0.09874247014522552,
0.019281355664134026,
-0.06348051130771637,
-0.08714456856250763,
-0.12851643562316895,
0.032855890691280365,
-0.022462019696831703,
-0.049366313964128494,
0.039944760501384735,
0.08266791701316833,
-0.06248653680086136,
-0.02542276866734028,
-0.01453839149326086,
-0.028824852779507637,
-0.03563091903924942,
-0.040852390229701996,
0.057300783693790436,
-0.10647756606340408,
0.010510510765016079,
0.05117592588067055,
0.04327050596475601,
-0.10890437662601471,
-0.08311528712511063,
0.0657137781381607,
0.014312226325273514,
0.022064300253987312,
0.09266023337841034,
-0.014769583940505981,
-0.019915001466870308,
-0.017919721081852913,
-0.060840096324682236,
-0.0038076883647590876,
0.014971435070037842,
-0.026223693042993546,
0.013475492596626282,
-0.11311586946249008,
0.001837782678194344,
-0.002419528318569064,
-0.06361041963100433,
0.07902440428733826,
-0.05114467814564705,
-0.04216952621936798,
0.033485595136880875,
0.011470983736217022,
-0.09905339032411575,
0.006024118512868881,
0.05409183353185654,
-0.02207101881504059,
0.07453634589910507,
0.07147565484046936,
0.02627289853990078,
-0.07925683259963989,
0.018152659758925438,
0.05654899403452873,
0.057266559451818466,
-0.01329604908823967,
0.07274062186479568,
0.06483784317970276,
-0.008838776499032974,
0.04420923814177513,
0.005439180880784988,
0.025379950180649757,
-0.053089044988155365,
-0.10253207385540009,
0.021458016708493233,
0.07006771117448807,
-0.010180133394896984,
0.05058877915143967,
-0.0471794456243515,
0.03744788467884064,
0.0017569313058629632,
0.04340868815779686,
0.007122829556465149,
0.06103534623980522,
0.038828782737255096,
0.07340002804994583,
0.04951958730816841,
-0.027665412053465843,
-0.05167385935783386,
0.09513899683952332,
-0.027628077194094658,
-4.560628141803136e-8,
0.06234189495444298,
0.03142963722348213,
0.0235002264380455,
0.030116695910692215,
0.06561977416276932,
-0.07421871274709702,
0.03824637457728386,
0.06528589874505997,
-0.015177816152572632,
-0.05492532625794411,
-0.016489822417497635,
0.044070638716220856,
-0.11136338114738464,
0.00882788561284542,
0.09043506532907486,
-0.04871806874871254,
0.07263901829719543,
0.06654823571443558,
0.039101455360651016,
-0.05549411103129387,
-0.07459841668605804,
-0.06632985919713974,
0.006546046584844589,
0.030957628041505814,
-0.016016913577914238,
0.09617674350738525,
0.05180545151233673,
0.05574416741728783,
0.02880440652370453,
0.007352983579039574,
0.003835776587948203,
-0.007802858483046293,
-0.01667184568941593,
0.03956279158592224,
-0.0029949748422950506,
0.030255509540438652,
-0.050526347011327744,
-0.00525882700458169,
0.026182103902101517,
0.03505167365074158,
-0.004035074729472399,
0.036021023988723755,
-0.0566585399210453,
0.0022807808127254248,
-0.01805184781551361,
0.016901003196835518,
0.019695580005645752,
0.038109663873910904,
-0.04197315126657486,
-0.015294189564883709,
-0.0626286193728447,
-0.060380324721336365,
-0.029030565172433853,
0.09634995460510254,
-0.034101422876119614,
-0.03450204059481621,
0.021636150777339935,
-0.05633370578289032,
-0.05526650696992874,
-0.0000011685216350088012,
0.056167613714933395,
-0.026735808700323105,
0.010971840471029282,
-0.032122764736413956
] | 0.170289
|
delays the addition of the terminal conditions,`Failed` or `Complete`, until all of the Job Pods are terminated. In Kubernetes v1.30 and earlier, the Job controller added the `Complete` or the `Failed` Job terminal conditions as soon as the Job termination process was triggered and all Pod finalizers were removed. However, some Pods would still be running or terminating at the moment that the terminal condition was added. In Kubernetes v1.31 and later, the controller only adds the Job terminal conditions \_after\_ all of the Pods are terminated. You can control this behavior by using the `JobManagedBy` and the `JobPodReplacementPolicy` (both enabled by default) [feature gates](/docs/reference/command-line-tools-reference/feature-gates/). ### Termination of Job pods The Job controller adds the `FailureTarget` condition or the `SuccessCriteriaMet` condition to the Job to trigger Pod termination after a Job meets either the success or failure criteria. Factors like `terminationGracePeriodSeconds` might increase the amount of time from the moment that the Job controller adds the `FailureTarget` condition or the `SuccessCriteriaMet` condition to the moment that all of the Job Pods terminate and the Job controller adds a [terminal condition](#terminal-job-conditions) (`Failed` or `Complete`). You can use the `FailureTarget` or the `SuccessCriteriaMet` condition to evaluate whether the Job has failed or succeeded without having to wait for the controller to add a terminal condition. For example, you might want to decide when to create a replacement Job that replaces a failed Job. If you replace the failed Job when the `FailureTarget` condition appears, your replacement Job runs sooner, but could result in Pods from the failed and the replacement Job running at the same time, using extra compute resources. Alternatively, if your cluster has limited resource capacity, you could choose to wait until the `Failed` condition appears on the Job, which would delay your replacement Job but would ensure that you conserve resources by waiting until all of the failed Pods are removed. ## Clean up finished jobs automatically Finished Jobs are usually no longer needed in the system. Keeping them around in the system will put pressure on the API server. If the Jobs are managed directly by a higher level controller, such as [CronJobs](/docs/concepts/workloads/controllers/cron-jobs/), the Jobs can be cleaned up by CronJobs based on the specified capacity-based cleanup policy. ### TTL mechanism for finished Jobs {{< feature-state for\_k8s\_version="v1.23" state="stable" >}} Another way to clean up finished Jobs (either `Complete` or `Failed`) automatically is to use a TTL mechanism provided by a [TTL controller](/docs/concepts/workloads/controllers/ttlafterfinished/) for finished resources, by specifying the `.spec.ttlSecondsAfterFinished` field of the Job. When the TTL controller cleans up the Job, it will delete the Job cascadingly, i.e. delete its dependent objects, such as Pods, together with the Job. Note that when the Job is deleted, its lifecycle guarantees, such as finalizers, will be honored. For example: ```yaml apiVersion: batch/v1 kind: Job metadata: name: pi-with-ttl spec: ttlSecondsAfterFinished: 100 template: spec: containers: - name: pi image: perl:5.34.0 command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] restartPolicy: Never ``` The Job `pi-with-ttl` will be eligible to be automatically deleted, `100` seconds after it finishes. If the field is set to `0`, the Job will be eligible to be automatically deleted immediately after it finishes. If the field is unset, this Job won't be cleaned up by the TTL controller after it finishes. {{< note >}} It is recommended to set `ttlSecondsAfterFinished` field because unmanaged jobs (Jobs that you created directly, and not indirectly through other workload APIs such as CronJob) have a default deletion policy of `orphanDependents` causing Pods created by an unmanaged Job to be left around after that Job is fully deleted. Even though the {{< glossary\_tooltip text="control plane" term\_id="control-plane"
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/job.md
|
[
0.03349387273192406,
-0.018964942544698715,
0.07995621114969254,
0.0054581961594522,
0.03342897817492485,
-0.0024332082830369473,
-0.04093683883547783,
-0.04611615091562271,
0.07976198196411133,
0.09375549852848053,
0.019029298797249794,
-0.000516951025929302,
-0.016841858625411987,
-0.016400054097175598,
0.034459494054317474,
-0.03539782762527466,
0.010750344023108482,
0.012771598994731903,
-0.04958145692944527,
-0.06901925802230835,
0.07022474706172943,
0.01957574486732483,
0.01080006081610918,
0.021240152418613434,
-0.08939136564731598,
0.012827233411371708,
-0.07284269481897354,
-0.06158195436000824,
0.0013079235795885324,
-0.029524721205234528,
-0.12685701251029968,
-0.01349551323801279,
0.0066039892844855785,
0.013290252536535263,
0.08461034297943115,
0.0649683028459549,
-0.012661095708608627,
0.004890181124210358,
-0.04220987483859062,
0.005666995421051979,
0.031559210270643234,
-0.030211495235562325,
-0.11530259251594543,
-0.015490734949707985,
-0.010195639915764332,
0.006460790056735277,
-0.020498277619481087,
-0.09333985298871994,
-0.004972786642611027,
-0.016688186675310135,
0.031798429787158966,
-0.03042628802359104,
0.09595666825771332,
0.05816224589943886,
0.11232796311378479,
0.041132159531116486,
-0.007632020860910416,
0.033540625125169754,
0.07184036821126938,
0.046363383531570435,
-0.006550371181219816,
-0.033944904804229736,
-0.07017450034618378,
-0.04157700389623642,
0.07353585958480835,
-0.03464550897479057,
0.026318566873669624,
-0.04138249158859253,
0.010797963477671146,
0.05158116668462753,
0.05374797806143761,
-0.04095564782619476,
-0.049353402107954025,
-0.004045306704938412,
-0.019176147878170013,
0.02374146319925785,
0.030107108876109123,
0.038973867893218994,
-0.03147298842668533,
-0.04228826239705086,
0.0001913867163239047,
-0.021295661106705666,
0.05323769897222519,
-0.03451758995652199,
-0.08564579486846924,
0.005079880356788635,
-0.03306296095252037,
-0.03935190662741661,
0.0562262125313282,
-0.022131048142910004,
0.011201241053640842,
-0.0572056770324707,
-0.006596317049115896,
-0.08017399907112122,
0.019906679168343544,
-0.038070887327194214,
0.013907050713896751,
0.05401720479130745,
0.04283663257956505,
-0.02874014899134636,
0.02338729426264763,
-0.04379407688975334,
-0.024526093155145645,
0.0016470319824293256,
0.10462013632059097,
-0.05443717539310455,
-0.046786654740571976,
-0.01108613982796669,
-0.0005161039880476892,
0.018979189917445183,
0.01856902427971363,
-0.022252671420574188,
0.033317457884550095,
0.05425324663519859,
0.03126673400402069,
0.08823083341121674,
-0.008109897375106812,
0.045088030397892,
0.004362521227449179,
0.02547803707420826,
0.07983282208442688,
-0.02909236028790474,
0.01690661907196045,
0.012850523926317692,
-0.06416932493448257,
0.017792221158742905,
0.03358951956033707,
3.1645619335021116e-33,
0.024287203326821327,
-0.12851832807064056,
-0.032750535756349564,
-0.0365421287715435,
0.057837676256895065,
-0.039609815925359726,
-0.035500530153512955,
0.045983705669641495,
0.056835271418094635,
-0.016961585730314255,
-0.1081293374300003,
-0.0030691251158714294,
-0.06599784642457962,
-0.03832434117794037,
-0.030205566436052322,
-0.03699837997555733,
-0.00132848194334656,
0.021929064765572548,
0.020478511229157448,
0.04184531047940254,
0.0742960199713707,
-0.09968754649162292,
-0.08515529334545135,
0.06724211573600769,
0.07625368237495422,
-0.04666086286306381,
0.026170823723077774,
-0.06734922528266907,
-0.022933674976229668,
0.033117037266492844,
-0.07539762556552887,
0.024178413674235344,
0.010670611634850502,
0.028859371319413185,
-0.1475188136100769,
-0.04641564562916756,
-0.025313792750239372,
0.010788091458380222,
0.028175953775644302,
-0.034191399812698364,
-0.04886156693100929,
0.0025998856872320175,
-0.0625154972076416,
0.00476357014849782,
0.04021674767136574,
-0.13290183246135712,
0.05070638284087181,
-0.05711449682712555,
0.03660847991704941,
0.11351224035024643,
0.044694360345602036,
-0.0011861063539981842,
0.07868587970733643,
-0.02980576828122139,
-0.010444843210279942,
0.02523105964064598,
0.07216231524944305,
-0.04236244410276413,
-0.06074964627623558,
0.024072619155049324,
-0.02123260125517845,
-0.014369235374033451,
-0.010080158710479736,
-0.02058662474155426,
0.048256054520606995,
0.044265009462833405,
0.0060133314691483974,
0.03611063212156296,
0.024826951324939728,
-0.0035846037790179253,
-0.08916325122117996,
0.005794770084321499,
0.0022321518044918776,
-0.003994273953139782,
0.015472638420760632,
-0.08231993019580841,
0.030775101855397224,
-0.0014878696529194713,
-0.13189952075481415,
0.016946883872151375,
0.0783439502120018,
-0.014075684361159801,
-0.06502824276685715,
-0.007683446630835533,
0.08814821392297745,
0.03275587409734726,
0.05614017695188522,
-0.0649712085723877,
-0.05516287684440613,
0.003485816763713956,
0.011891506612300873,
-0.03639382869005203,
-0.0116460882127285,
0.11834754794836044,
-0.002048134570941329,
-3.843687998984349e-33,
0.10091844946146011,
-0.03699377551674843,
-0.025476783514022827,
-0.011349125765264034,
-0.017637232318520546,
0.00013856346777174622,
-0.032663460820913315,
-0.0076738568022847176,
-0.056930385529994965,
-0.12591677904129028,
-0.026713546365499496,
-0.04657459259033203,
0.0250876322388649,
0.0887535810470581,
-0.15987707674503326,
0.010523617267608643,
-0.014197141863405704,
-0.037806276232004166,
-0.03827419877052307,
0.04168074578046799,
0.047907207161188126,
-0.05493927001953125,
-0.0159741397947073,
0.05099433287978172,
-0.019473055377602577,
-0.03167499229311943,
0.015166249126195908,
-0.00046243355609476566,
-0.03889870643615723,
-0.003614522749558091,
0.02316391095519066,
-0.08514989912509918,
0.0009077926515601575,
0.06173871457576752,
0.07285536825656891,
-0.057588133960962296,
-0.045202020555734634,
0.041595228016376495,
0.006307631731033325,
0.03611259162425995,
0.1307663917541504,
-0.01652541570365429,
0.0037909438833594322,
0.004805735312402248,
-0.04891416057944298,
-0.031546030193567276,
0.05808289349079132,
-0.050127044320106506,
0.016526343300938606,
-0.10113551467657089,
0.002621900290250778,
0.023976532742381096,
-0.05572674795985222,
0.12600725889205933,
-0.02048303373157978,
-0.07184986025094986,
0.021639226004481316,
0.01656796969473362,
-0.05109289288520813,
0.004987293388694525,
-0.003500555641949177,
-0.03768680617213249,
0.16624990105628967,
0.006247129291296005,
0.06540678441524506,
-0.06790675967931747,
0.05894491448998451,
0.0582301951944828,
0.05332649126648903,
0.020341472700238228,
0.05785113573074341,
0.04470355436205864,
0.00653316592797637,
0.07788704335689545,
-0.015857351943850517,
0.004893967416137457,
-0.03145015239715576,
-0.100162573158741,
0.024916674941778183,
0.023067088797688484,
-0.04052921012043953,
0.044501617550849915,
-0.04898655414581299,
0.023760195821523666,
-0.018345264717936516,
0.14665274322032928,
0.046412721276283264,
0.1299414038658142,
0.04221145063638687,
0.03788098320364952,
0.06836516410112381,
-0.017027631402015686,
0.008716304786503315,
0.09903696924448013,
-0.049572985619306564,
-4.7798902613749306e-8,
0.08406582474708557,
-0.015571249648928642,
-0.04443034157156944,
0.004924973472952843,
0.06770224869251251,
-0.06189821660518646,
0.031981974840164185,
0.036046769469976425,
-0.043986473232507706,
-0.054807472974061966,
-0.004342092666774988,
0.10658027976751328,
-0.041839174926280975,
0.022154992446303368,
0.08636278659105301,
-0.009663725271821022,
0.060075793415308,
0.009260617196559906,
0.04724389687180519,
-0.06130993738770485,
-0.0428353026509285,
-0.05792885646224022,
-0.02422274835407734,
-0.002462988719344139,
-0.041442472487688065,
0.07853664457798004,
0.024862855672836304,
0.01743367873132229,
0.03456299751996994,
-0.010860086418688297,
-0.005664554424583912,
-0.028091009706258774,
-0.08373180776834488,
0.04992343857884407,
0.0306136142462492,
0.043795157223939896,
-0.03859645873308182,
-0.04122687503695488,
-0.029401712119579315,
0.024341441690921783,
0.040999505668878555,
0.04212162643671036,
-0.05845159292221069,
-0.001375924563035369,
0.0157941784709692,
0.012095250189304352,
0.02643800899386406,
0.06315752118825912,
-0.035920679569244385,
-0.02184702269732952,
-0.03365220129489899,
-0.04752979800105095,
-0.024494707584381104,
0.05371527373790741,
-0.06943082064390182,
-0.07489671558141708,
-0.00877505075186491,
-0.06114816665649414,
-0.011099884286522865,
0.04057012498378754,
0.00507389847189188,
-0.02615527994930744,
0.001055518863722682,
-0.010364629328250885
] | 0.095859
|
because unmanaged jobs (Jobs that you created directly, and not indirectly through other workload APIs such as CronJob) have a default deletion policy of `orphanDependents` causing Pods created by an unmanaged Job to be left around after that Job is fully deleted. Even though the {{< glossary\_tooltip text="control plane" term\_id="control-plane" >}} eventually [garbage collects](/docs/concepts/workloads/pods/pod-lifecycle/#pod-garbage-collection) the Pods from a deleted Job after they either fail or complete, sometimes those lingering pods may cause cluster performance degradation or in worst case cause the cluster to go offline due to this degradation. You can use [LimitRanges](/docs/concepts/policy/limit-range/) and [ResourceQuotas](/docs/concepts/policy/resource-quotas/) to place a cap on the amount of resources that a particular namespace can consume. {{< /note >}} ## Job patterns The Job object can be used to process a set of independent but related \*work items\*. These might be emails to be sent, frames to be rendered, files to be transcoded, ranges of keys in a NoSQL database to scan, and so on. In a complex system, there may be multiple different sets of work items. Here we are just considering one set of work items that the user wants to manage together — a \*batch job\*. There are several different patterns for parallel computation, each with strengths and weaknesses. The tradeoffs are: - One Job object for each work item, versus a single Job object for all work items. One Job per work item creates some overhead for the user and for the system to manage large numbers of Job objects. A single Job for all work items is better for large numbers of items. - Number of Pods created equals number of work items, versus each Pod can process multiple work items. When the number of Pods equals the number of work items, the Pods typically requires less modification to existing code and containers. Having each Pod process multiple work items is better for large numbers of items. - Several approaches use a work queue. This requires running a queue service, and modifications to the existing program or container to make it use the work queue. Other approaches are easier to adapt to an existing containerised application. - When the Job is associated with a [headless Service](/docs/concepts/services-networking/service/#headless-services), you can enable the Pods within a Job to communicate with each other to collaborate in a computation. The tradeoffs are summarized here, with columns 2 to 4 corresponding to the above tradeoffs. The pattern names are also links to examples and more detailed description. | Pattern | Single Job object | Fewer pods than work items? | Use app unmodified? | | ----------------------------------------------- |:-----------------:|:---------------------------:|:-------------------:| | [Queue with Pod Per Work Item] | ✓ | | sometimes | | [Queue with Variable Pod Count] | ✓ | ✓ | | | [Indexed Job with Static Work Assignment] | ✓ | | ✓ | | [Job with Pod-to-Pod Communication] | ✓ | sometimes | sometimes | | [Job Template Expansion] | | | ✓ | When you specify completions with `.spec.completions`, each Pod created by the Job controller has an identical [`spec`](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status). This means that all pods for a task will have the same command line and the same image, the same volumes, and (almost) the same environment variables. These patterns are different ways to arrange for pods to work on different things. This table shows the required settings for `.spec.parallelism` and `.spec.completions` for each of the patterns. Here, `W` is the number of work items. | Pattern | `.spec.completions` | `.spec.parallelism` | | ----------------------------------------------- |:-------------------:|:--------------------:| | [Queue with Pod Per Work Item] | W | any | | [Queue with Variable Pod Count] | null
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/job.md
|
[
-0.06294743716716766,
-0.030346840620040894,
0.05566905811429024,
0.08066616952419281,
0.04127928614616394,
-0.044285789132118225,
0.029003305360674858,
-0.10425528883934021,
0.09961370378732681,
0.03772847726941109,
-0.002951083006337285,
0.008048167452216148,
-0.04812369868159294,
0.00012320374662522227,
-0.026960253715515137,
0.013619683682918549,
-0.01937250792980194,
-0.09837456047534943,
-0.0736805722117424,
-0.05113847181200981,
0.06229337677359581,
0.06543882936239243,
0.00349242752417922,
0.05034983903169632,
-0.008144410327076912,
0.028178216889500618,
-0.061713870614767075,
-0.061504751443862915,
0.0493977852165699,
0.023891257122159004,
-0.015605129301548004,
0.06621188670396805,
-0.024957837536931038,
0.022391773760318756,
0.10397100448608398,
0.122564896941185,
-0.029513491317629814,
-0.021333103999495506,
-0.01877838745713234,
0.0011850500013679266,
0.042463961988687515,
0.0332159660756588,
-0.0948481559753418,
0.01628497987985611,
-0.07549464702606201,
0.011716234497725964,
-0.06690244376659393,
-0.05870674178004265,
-0.0052520111203193665,
-0.007909775711596012,
0.013558139093220234,
-0.08885291963815689,
0.06708478182554245,
0.030559368431568146,
0.09496870636940002,
0.028070393949747086,
0.008729198016226292,
0.016278479248285294,
0.040184136480093,
-0.012367365881800652,
0.004040088038891554,
-0.05360938236117363,
-0.024512622505426407,
-0.08509788662195206,
0.06779292225837708,
-0.0432223379611969,
-0.01389400940388441,
0.0444091372191906,
-0.03981640189886093,
0.0033316074404865503,
0.033286113291978836,
-0.014883749186992645,
-0.03694457188248634,
0.004795173183083534,
0.005796502809971571,
0.07140718400478363,
0.009858104400336742,
-0.004386131651699543,
-0.031050004065036774,
-0.056776903569698334,
-0.0023334661964327097,
-0.00826601218432188,
0.05436226353049278,
0.035397447645664215,
-0.04918215423822403,
-0.01036951132118702,
0.0027429063338786364,
-0.09340327233076096,
0.11434631049633026,
0.006476211361587048,
0.03448216989636421,
0.014370780438184738,
0.09641145169734955,
-0.07949909567832947,
0.046529412269592285,
-0.05514953285455704,
0.0607379749417305,
0.05639798939228058,
-0.034266408532857895,
0.017003871500492096,
0.031086787581443787,
0.018203647807240486,
0.030658021569252014,
-0.0014987498288974166,
0.004944405984133482,
0.026704031974077225,
-0.08421207219362259,
0.005787630565464497,
0.0025070158299058676,
0.05874652415513992,
-0.022342730313539505,
0.06775986403226852,
-0.03402102738618851,
0.06453676521778107,
-0.012277464382350445,
-0.003361673327162862,
-0.05285961925983429,
-0.0019448937382549047,
-0.010420356877148151,
0.08996288478374481,
0.021497558802366257,
-0.062260184437036514,
-0.05328388139605522,
-0.05956490710377693,
-0.07296033203601837,
0.026774685829877853,
-0.006960403174161911,
2.6812506353348124e-33,
0.023211926221847534,
-0.10443337261676788,
-0.07578779757022858,
-0.017225608229637146,
0.0380292572081089,
-0.0935765728354454,
-0.07043671607971191,
0.06908809393644333,
-0.0005952318315394223,
-0.035485874861478806,
-0.0566280372440815,
0.07857783883810043,
-0.025863930583000183,
-0.053886331617832184,
0.023357488214969635,
-0.025053026154637337,
0.049787960946559906,
0.08225005865097046,
0.0431692935526371,
0.0152965746819973,
0.029666181653738022,
0.006064611952751875,
-0.07687125355005264,
-0.022057799622416496,
0.004664919804781675,
0.006319768261164427,
0.021624475717544556,
-0.08444429934024811,
-0.02718038111925125,
0.027229567989706993,
-0.011971058323979378,
0.09567426145076752,
0.029398931190371513,
0.0007428658427670598,
-0.11100692301988602,
-0.004082726314663887,
-0.05112641677260399,
-0.03585566207766533,
-0.052904874086380005,
-0.09589029103517532,
0.018624182790517807,
0.014352750033140182,
-0.022391876205801964,
-0.03554850071668625,
0.014817318879067898,
-0.061548687517642975,
0.10545287281274796,
-0.10452498495578766,
0.0179270189255476,
0.1029280424118042,
0.02391740120947361,
0.005978805013000965,
0.020018279552459717,
0.012280859053134918,
-0.01808178797364235,
0.01323375292122364,
0.0263599194586277,
-0.027753224596381187,
0.040172088891267776,
-0.0174808818846941,
-0.043678589165210724,
0.04645906016230583,
0.0005480121471919119,
0.05166574567556381,
0.09785108268260956,
0.04802226647734642,
0.031402893364429474,
0.07891493290662766,
0.014047608710825443,
0.023306837305426598,
-0.014169291593134403,
0.04621070995926857,
0.006708897650241852,
-0.005145127885043621,
0.03365958482027054,
-0.11751296371221542,
0.04930329695343971,
-0.03383348509669304,
-0.1768433153629303,
-0.00812970194965601,
0.07540791481733322,
-0.0666060522198677,
-0.008350956253707409,
-0.037065885961055756,
0.04076511040329933,
-0.02916794829070568,
0.03422410413622856,
-0.03030824474990368,
-0.06272365897893906,
0.06159534677863121,
0.010757656767964363,
-0.055710356682538986,
-0.08201034367084503,
0.0030933013185858727,
-0.08250956237316132,
-4.203060131917739e-33,
0.12335877865552902,
-0.04150936380028725,
-0.044889166951179504,
-0.028468962758779526,
-0.02615336887538433,
0.003969987388700247,
0.0068401857279241085,
0.05428176000714302,
-0.029979942366480827,
-0.030422352254390717,
-0.08214913308620453,
-0.004145961720496416,
0.05586288124322891,
0.08203277736902237,
-0.03339286148548126,
0.0199096892029047,
-0.04811244085431099,
-0.07123295217752457,
-0.05363018438220024,
-0.006196700036525726,
0.05429321900010109,
0.01932472176849842,
0.03142080828547478,
0.06057548522949219,
-0.03186378628015518,
0.003448812523856759,
-0.05674557760357857,
-0.0011596308322623372,
0.009723389521241188,
-0.014813720248639584,
-0.02916490100324154,
-0.04279958829283714,
-0.005457047373056412,
0.016562119126319885,
0.050595954060554504,
-0.10937543958425522,
-0.09534227848052979,
0.06915611028671265,
0.006268652155995369,
-0.005835029296576977,
0.08324404060840607,
0.01309928484261036,
-0.02904558926820755,
-0.0556584857404232,
-0.0014433769974857569,
-0.03435248136520386,
-0.024739576503634453,
0.012089325115084648,
0.012971102260053158,
-0.06192220374941826,
0.05911263823509216,
-0.01424491312354803,
-0.04724894091486931,
0.055687349289655685,
0.01714324578642845,
0.012002779170870781,
0.0529446117579937,
-0.06820100545883179,
-0.04166281223297119,
0.0022481612395495176,
0.04957697540521622,
-0.03987333923578262,
-0.0354621596634388,
0.0377984456717968,
0.06007097288966179,
-0.05373188108205795,
-0.0009210251155309379,
0.021719027310609818,
0.027062349021434784,
-0.00910804234445095,
0.016934435814619064,
0.09411154687404633,
0.04746638610959053,
0.02184344455599785,
-0.06133108586072922,
0.03322230279445648,
0.009801195934414864,
-0.11004994809627533,
0.03245335444808006,
0.027773117646574974,
-0.032251156866550446,
0.08738323301076889,
0.0404195673763752,
0.04433659464120865,
-0.010911678895354271,
0.06499031186103821,
-0.027659647166728973,
0.08470523357391357,
0.027148962020874023,
0.08172772824764252,
0.0282656941562891,
-0.09435651451349258,
-0.022101523354649544,
0.14011812210083008,
-0.0074240779504179955,
-5.1655117516702376e-8,
0.03570318967103958,
0.11117453128099442,
0.03188038244843483,
0.05083916708827019,
0.06927022337913513,
-0.14398637413978577,
0.04884366691112518,
0.10052783787250519,
0.02877471037209034,
0.04410208761692047,
-0.019914137199521065,
-0.030830388888716698,
-0.11403708159923553,
0.049145352095365524,
0.05499892681837082,
-0.018225310370326042,
-0.02550203539431095,
-0.009240526705980301,
-0.0034798828419297934,
-0.07558459788560867,
-0.04330727458000183,
-0.08771403133869171,
-0.019680051133036613,
0.02070031873881817,
-0.047430310398340225,
0.017457084730267525,
0.06837505847215652,
0.07133958488702774,
-0.029637454077601433,
-0.027312010526657104,
-0.033846665173769,
-0.016240578144788742,
-0.04500143975019455,
0.010707269422709942,
-0.046617016196250916,
-0.0039296336472034454,
-0.0710558295249939,
-0.051938652992248535,
0.017942585051059723,
0.019458727911114693,
-0.022398177534341812,
0.034153249114751816,
-0.009583080187439919,
-0.008424153551459312,
0.02992630936205387,
0.03703141584992409,
-0.04959694668650627,
0.08363541215658188,
-0.00774784479290247,
-0.0017594057135283947,
-0.06536557525396347,
-0.013899892568588257,
-0.03273444622755051,
0.09848346561193466,
-0.003855557646602392,
-0.06542330235242844,
0.033016324043273926,
-0.023826610296964645,
-0.027408692985773087,
0.0024438316468149424,
0.06271807849407196,
-0.014127088710665703,
0.007394585758447647,
-0.005566675215959549
] | 0.115761
|
the required settings for `.spec.parallelism` and `.spec.completions` for each of the patterns. Here, `W` is the number of work items. | Pattern | `.spec.completions` | `.spec.parallelism` | | ----------------------------------------------- |:-------------------:|:--------------------:| | [Queue with Pod Per Work Item] | W | any | | [Queue with Variable Pod Count] | null | any | | [Indexed Job with Static Work Assignment] | W | any | | [Job with Pod-to-Pod Communication] | W | W | | [Job Template Expansion] | 1 | should be 1 | [Queue with Pod Per Work Item]: /docs/tasks/job/coarse-parallel-processing-work-queue/ [Queue with Variable Pod Count]: /docs/tasks/job/fine-parallel-processing-work-queue/ [Indexed Job with Static Work Assignment]: /docs/tasks/job/indexed-parallel-processing-static/ [Job with Pod-to-Pod Communication]: /docs/tasks/job/job-with-pod-to-pod-communication/ [Job Template Expansion]: /docs/tasks/job/parallel-processing-expansion/ ## Advanced usage ### Suspending a Job {{< feature-state for\_k8s\_version="v1.24" state="stable" >}} When a Job is created, the Job controller will immediately begin creating Pods to satisfy the Job's requirements and will continue to do so until the Job is complete. However, you may want to temporarily suspend a Job's execution and resume it later, or start Jobs in suspended state and have a custom controller decide later when to start them. To suspend a Job, you can update the `.spec.suspend` field of the Job to true; later, when you want to resume it again, update it to false. Creating a Job with `.spec.suspend` set to true will create it in the suspended state. In Kubernetes 1.35 or later the `.status.startTime` field is cleared on Job suspension when the [MutableSchedulingDirectivesForSuspendedJobs](#mutable-scheduling-directives-for-suspended-jobs) feature gate is enabled. When a Job is resumed from suspension, its `.status.startTime` field will be reset to the current time. This means that the `.spec.activeDeadlineSeconds` timer will be stopped and reset when a Job is suspended and resumed. When you suspend a Job, any running Pods that don't have a status of `Completed` will be [terminated](/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination) with a SIGTERM signal. The Pod's graceful termination period will be honored and your Pod must handle this signal in this period. This may involve saving progress for later or undoing changes. Pods terminated this way will not count towards the Job's `completions` count. An example Job definition in the suspended state can be like so: ```shell kubectl get job myjob -o yaml ``` ```yaml apiVersion: batch/v1 kind: Job metadata: name: myjob spec: suspend: true parallelism: 1 completions: 5 template: spec: ... ``` You can also toggle Job suspension by patching the Job using the command line. Suspend an active Job: ```shell kubectl patch job/myjob --type=strategic --patch '{"spec":{"suspend":true}}' ``` Resume a suspended Job: ```shell kubectl patch job/myjob --type=strategic --patch '{"spec":{"suspend":false}}' ``` The Job's status can be used to determine if a Job is suspended or has been suspended in the past: ```shell kubectl get jobs/myjob -o yaml ``` ```yaml apiVersion: batch/v1 kind: Job # .metadata and .spec omitted status: conditions: - lastProbeTime: "2021-02-05T13:14:33Z" lastTransitionTime: "2021-02-05T13:14:33Z" status: "True" type: Suspended startTime: "2021-02-05T13:13:48Z" ``` The Job condition of type "Suspended" with status "True" means the Job is suspended; the `lastTransitionTime` field can be used to determine how long the Job has been suspended for. If the status of that condition is "False", then the Job was previously suspended and is now running. If such a condition does not exist in the Job's status, the Job has never been stopped. Events are also created when the Job is suspended and resumed: ```shell kubectl describe jobs/myjob ``` ``` Name: myjob ... Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal SuccessfulCreate 12m job-controller Created pod: myjob-hlrpl Normal SuccessfulDelete 11m job-controller Deleted pod: myjob-hlrpl Normal Suspended 11m job-controller Job suspended Normal SuccessfulCreate 3s job-controller Created pod: myjob-jvb44 Normal Resumed 3s
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/job.md
|
[
-0.044477544724941254,
0.008875507861375809,
-0.025590064004063606,
0.043869875371456146,
-0.058619242161512375,
-0.05553404614329338,
0.06146884337067604,
-0.06954390555620193,
-0.056973446160554886,
0.014261994510889053,
0.03230329230427742,
-0.0496981255710125,
-0.053089044988155365,
-0.027651801705360413,
0.025203736498951912,
0.0070860241539776325,
0.04987053573131561,
-0.046671245247125626,
-0.02721000462770462,
-0.09198994189500809,
0.08847229182720184,
0.030320553109049797,
0.07245828956365585,
-0.012572424486279488,
-0.05433833599090576,
0.023399660363793373,
-0.09523233026266098,
-0.04317415505647659,
0.04836663976311684,
-0.01787738688290119,
0.014731943607330322,
0.014380126260221004,
-0.01668958179652691,
0.04823280870914459,
0.0981074795126915,
0.06077147647738457,
0.008362071588635445,
-0.07650243490934372,
-0.03760184720158577,
0.06112058460712433,
0.042195968329906464,
0.021508123725652695,
-0.10854333639144897,
-0.0036592488177120686,
-0.021128950640559196,
-0.03818833455443382,
-0.05600578710436821,
-0.053906943649053574,
-0.001317551825195551,
-0.023749107494950294,
-0.06410656869411469,
-0.0918637216091156,
0.02346397563815117,
0.026905102655291557,
0.10406540334224701,
0.004621145315468311,
0.035376839339733124,
-0.06028212234377861,
0.03302725777029991,
-0.05235309526324272,
-0.013896767981350422,
-0.09454049915075302,
-0.02665477991104126,
-0.030110785737633705,
0.029376838356256485,
-0.036972228437662125,
-0.0022237510420382023,
0.038457147777080536,
0.0310842115432024,
0.008179930970072746,
0.00941435620188713,
-0.03223598375916481,
-0.049887124449014664,
0.02423769049346447,
-0.026935691013932228,
0.031471945345401764,
0.052981048822402954,
-0.016815409064292908,
-0.08800825476646423,
-0.1232684850692749,
-0.06790617108345032,
-0.014753740280866623,
0.012668903917074203,
-0.10820366442203522,
0.017289141193032265,
-0.057961754500865936,
-0.05085179582238197,
-0.03682803735136986,
0.03902825713157654,
-0.011242262087762356,
0.034424006938934326,
-0.027982529252767563,
-0.04224994406104088,
-0.07584270089864731,
0.10016324371099472,
0.03182769939303398,
0.013110911473631859,
0.03701303154230118,
0.013609092682600021,
0.059498678892850876,
0.0531306266784668,
-0.03862452507019043,
0.07794659584760666,
0.024202337488532066,
0.003251967951655388,
0.03222188353538513,
-0.07121236622333527,
-0.010157516226172447,
-0.08230368793010712,
-0.00880016852170229,
0.02499852329492569,
0.053180139511823654,
0.01682031899690628,
0.042341820895671844,
-0.011399432085454464,
0.021827394142746925,
0.02037428319454193,
0.006334345787763596,
0.009653442539274693,
0.12875506281852722,
0.0688256174325943,
0.018747031688690186,
0.057370468974113464,
0.0025777798146009445,
-0.03865299001336098,
-0.008597216568887234,
0.051123060286045074,
-5.797211938573169e-33,
0.04290672019124031,
-0.06944364309310913,
-0.02732246182858944,
-0.029042990878224373,
0.0865003690123558,
-0.010729361325502396,
0.03890988603234291,
0.0747651532292366,
-0.032007165253162384,
0.013125739060342312,
-0.07455478608608246,
0.018410637974739075,
-0.03607369214296341,
0.030552541837096214,
-0.07688118517398834,
-0.055132485926151276,
0.06130033731460571,
0.0790897011756897,
-0.0003756734076887369,
0.03379283845424652,
0.08293770998716354,
-0.07214676588773727,
-0.10562434047460556,
0.0698697566986084,
-0.009409881196916103,
0.012068292126059532,
0.03879813477396965,
-0.12700146436691284,
-0.019307564944028854,
0.05649698153138161,
0.011176994070410728,
0.04743596538901329,
0.03623834624886513,
0.002845080103725195,
-0.06450475752353668,
0.0556640587747097,
0.03488077223300934,
0.00464797206223011,
-0.016160013154149055,
-0.11070005595684052,
-0.0003294757625553757,
-0.01547836884856224,
-0.0023348641116172075,
-0.05669041723012924,
-0.06606141477823257,
-0.06971145421266556,
0.008014890365302563,
-0.045035362243652344,
0.016489477828145027,
0.05772380530834198,
0.02441306971013546,
-0.055239126086235046,
0.027729393914341927,
-0.02687975764274597,
0.05928778648376465,
-0.00974542647600174,
0.03191365301609039,
0.07104644924402237,
0.05686565116047859,
0.09024772047996521,
-0.07152757048606873,
0.01321529783308506,
-0.05570707097649574,
0.038143739104270935,
0.053253497928380966,
0.028788011521100998,
-0.03084702417254448,
0.03323908895254135,
0.10194792598485947,
0.06600306183099747,
-0.07591483741998672,
0.0462847463786602,
-0.00706830807030201,
0.01480836421251297,
-0.008249103091657162,
0.0032125699799507856,
0.03953094780445099,
-0.07239818572998047,
-0.1886555552482605,
0.01229588221758604,
-0.1196918860077858,
0.11985941976308823,
-0.01795509085059166,
-0.042700864374637604,
-0.027300728484988213,
0.014649396762251854,
0.039947763085365295,
0.02414878085255623,
-0.0426163449883461,
-0.0617070235311985,
0.029083039611577988,
0.005225303582847118,
-0.02363726682960987,
-0.030903592705726624,
-0.027224106714129448,
2.420403296099562e-33,
0.05018002167344093,
0.006217293906956911,
-0.027888810262084007,
0.024256998673081398,
0.05300591140985489,
-0.046223729848861694,
0.002724883845075965,
-0.04671553894877434,
-0.018534095957875252,
-0.04611596092581749,
-0.07689481973648071,
-0.05698049068450928,
0.036419227719306946,
-0.01672670990228653,
-0.00974190328270197,
-0.013470804318785667,
-0.05219873785972595,
-0.057237088680267334,
0.018413860350847244,
0.0740995854139328,
-0.03259992226958275,
0.00972801260650158,
0.035071082413196564,
0.06251481920480728,
0.00954943336546421,
0.0030706299003213644,
-0.03296053409576416,
-0.08073816448450089,
0.009755483828485012,
0.0028749729972332716,
0.022574277594685555,
-0.09809257835149765,
-0.04680407792329788,
0.04828353971242905,
0.050530608743429184,
-0.051075372844934464,
-0.05895246937870979,
0.14229145646095276,
0.00852191261947155,
0.07362551242113113,
0.11661075800657272,
-0.007348178885877132,
-0.054226625710725784,
0.002287378069013357,
-0.08207918703556061,
-0.0073674931190907955,
0.03230591490864754,
-0.05973859131336212,
-0.025600483641028404,
-0.08893388509750366,
-0.03380594030022621,
-0.015801193192601204,
-0.0553758405148983,
0.1313045173883438,
-0.010858402587473392,
-0.015019647777080536,
0.022833319380879402,
-0.06600312888622284,
-0.04978134483098984,
0.0027867392636835575,
0.018665006384253502,
-0.023688284680247307,
0.042344748973846436,
0.0005055076908320189,
0.0798187330365181,
-0.05956815555691719,
-0.013600850477814674,
-0.051860030740499496,
0.03599186986684799,
0.031771473586559296,
-0.011375189758837223,
0.08847133070230484,
0.022173359990119934,
0.03334077075123787,
0.01474894117563963,
-0.006400059908628464,
-0.016056183725595474,
-0.014226444065570831,
0.03163546323776245,
0.06602026522159576,
-0.04452183097600937,
0.05614977702498436,
-0.020133642479777336,
0.03286650404334068,
-0.008355310186743736,
0.02482139691710472,
0.10993366688489914,
0.09386255592107773,
-0.028261972591280937,
0.006901767570525408,
0.00401647575199604,
0.0040091825649142265,
-0.0006567121599800885,
0.009207549504935741,
-0.04198363423347473,
-4.3609812649947344e-8,
0.017967188730835915,
0.0002001986576942727,
-0.01919463835656643,
0.07911012321710587,
0.0969526395201683,
-0.04515831917524338,
-0.024169817566871643,
0.04018038138747215,
-0.04899956285953522,
0.0037844788748770952,
0.011846964247524738,
-0.06818883121013641,
-0.01542243268340826,
0.016426747664809227,
0.07723093032836914,
-0.05559172481298447,
0.055136311799287796,
0.04683202505111694,
-0.035683196038007736,
-0.07495223730802536,
0.014638745225965977,
0.023170607164502144,
-0.018893742933869362,
-0.014996450394392014,
-0.07424364984035492,
0.09066076576709747,
0.07391929626464844,
0.006419641897082329,
0.06908199936151505,
0.009968943893909454,
-0.007706671021878719,
-0.03953583911061287,
-0.054325900971889496,
0.012944824062287807,
-0.002965319901704788,
-0.05224825069308281,
-0.013956388458609581,
0.002826491603627801,
0.005029831547290087,
0.0411771722137928,
-0.012192155234515667,
-0.0450623594224453,
-0.002557378262281418,
0.01157437264919281,
0.07921893149614334,
0.02045086957514286,
-0.12009629607200623,
0.017348771914839745,
-0.021619316190481186,
0.016401605680584908,
-0.028861915692687035,
-0.050856705754995346,
0.04675017297267914,
0.08979196846485138,
-0.02763579972088337,
0.009055892005562782,
0.0834856629371643,
-0.10762789845466614,
0.002231998136267066,
-0.012677597813308239,
0.0595441535115242,
-0.08965478837490082,
-0.04064521566033363,
0.03476058691740036
] | 0.130899
|
```shell kubectl describe jobs/myjob ``` ``` Name: myjob ... Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal SuccessfulCreate 12m job-controller Created pod: myjob-hlrpl Normal SuccessfulDelete 11m job-controller Deleted pod: myjob-hlrpl Normal Suspended 11m job-controller Job suspended Normal SuccessfulCreate 3s job-controller Created pod: myjob-jvb44 Normal Resumed 3s job-controller Job resumed ``` The last four events, particularly the "Suspended" and "Resumed" events, are directly a result of toggling the `.spec.suspend` field. In the time between these two events, we see that no Pods were created, but Pod creation restarted as soon as the Job was resumed. ### Mutable Scheduling Directives {{< feature-state for\_k8s\_version="v1.27" state="stable" >}} In most cases, a parallel job will want the pods to run with constraints, like all in the same zone, or all either on GPU model x or y but not a mix of both. The [suspend](#suspending-a-job) field is the first step towards achieving those semantics. Suspend allows a custom queue controller to decide when a job should start; However, once a job is unsuspended, a custom queue controller has no influence on where the pods of a job will actually land. This feature allows updating a Job's scheduling directives before it starts, which gives custom queue controllers the ability to influence pod placement while at the same time offloading actual pod-to-node assignment to kube-scheduler. The fields in a Job's pod template that can be updated are node affinity, node selector, tolerations, labels, annotations and [scheduling gates](/docs/concepts/scheduling-eviction/pod-scheduling-readiness/). #### Mutable Scheduling Directives for suspended Jobs {{< feature-state feature\_gate\_name="MutableSchedulingDirectivesForSuspendedJobs" >}} In Kubernetes 1.34 or earlier mutating of Pod's scheduling directives is allowed only for suspended Jobs that have never been unsuspended before. In Kubernetes 1.35, this is allowed for any suspended Jobs when the `MutableSchedulingDirectivesForSuspendedJobs` feature gate is enabled. Additionally, this feature gate enables clearing of the `.status.startTime` field on [Job suspension](#suspending-a-job). ### Mutable Pod resources for suspended Jobs {{< feature-state feature\_gate\_name="MutablePodResourcesForSuspendedJobs" >}} A cluster administrator can define admission controls in Kubernetes, modifying the resource requests or limits for a Job, based on policy rules. With 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. This is different from \_in-place Pod resize\_ which lets you update resources, one Pod at a time, for Pods that are already running. The 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. ### Specifying your own Pod selector Normally, when you create a Job object, you do not specify `.spec.selector`. The system defaulting logic adds this field when the Job is created. It picks a selector value that will not overlap with any other jobs. However, in some cases, you might need to override this automatically set selector. To do this, you can specify the `.spec.selector` of the Job. Be very careful when doing this. If you specify a label selector which is not unique to the pods of that Job, and which matches unrelated Pods, then pods of the unrelated job may be deleted, or this Job may count other Pods as completing it, or one or both Jobs may refuse to create Pods or run to completion. If a non-unique selector is chosen, then other controllers (e.g. ReplicationController) and their Pods may behave in unpredictable ways too. Kubernetes will not stop you from making a mistake when specifying `.spec.selector`. Here is an example of a case when you might want to use this feature. Say Job `old` is already running. You
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/job.md
|
[
-0.025851193815469742,
-0.009801145642995834,
0.05678922310471535,
0.047039732336997986,
0.03342105448246002,
0.03211664408445358,
-0.01858513057231903,
-0.05014058202505112,
0.049013569951057434,
0.04341670870780945,
0.025774899870157242,
0.005343222990632057,
-0.025121569633483887,
-0.03354544937610626,
-0.016513537615537643,
-0.0032371256966143847,
0.044531986117362976,
-0.06333689391613007,
-0.06447727978229523,
-0.04944518581032753,
0.06407314538955688,
0.002533149439841509,
-0.012682583183050156,
0.008748866617679596,
-0.06654687225818634,
-0.02645411714911461,
-0.01527748815715313,
-0.04801319167017937,
0.0010885595111176372,
-0.034428711980581284,
-0.08038574457168579,
-0.007019927725195885,
0.019122827798128128,
-0.04464619234204292,
0.10877388715744019,
0.1078428328037262,
0.017914310097694397,
-0.04181719943881035,
-0.08543345332145691,
-0.019401205703616142,
0.0299084335565567,
-0.09276694804430008,
-0.09009694308042526,
-0.03173378109931946,
-0.039338868111371994,
-0.00008580664143664762,
-0.047920942306518555,
-0.12370708584785461,
-0.07277554273605347,
-0.02846473641693592,
0.004631281830370426,
-0.05084884911775589,
0.09075741469860077,
0.04477297514677048,
0.09617304801940918,
0.010141938924789429,
-0.04179425165057182,
0.025614744052290916,
0.09126895666122437,
0.0025876087602227926,
-0.04527398943901062,
-0.044939104467630386,
-0.023619038984179497,
-0.016500208526849747,
0.036414314061403275,
-0.025200016796588898,
-0.013340015895664692,
-0.012574334628880024,
0.015729088336229324,
-0.0006287459982559085,
0.0015701662050560117,
-0.008701752871274948,
-0.03076997399330139,
-0.005767154041677713,
-0.013824548572301865,
0.01580388844013214,
0.040408939123153687,
0.04029170423746109,
-0.005817136727273464,
-0.10884017497301102,
-0.059595782309770584,
-0.0400625579059124,
-0.012772905640304089,
-0.05153209716081619,
-0.03165687993168831,
-0.012586642988026142,
-0.014436549507081509,
-0.04962792247533798,
0.04274857044219971,
0.04689092934131622,
0.0326867513358593,
-0.018365010619163513,
0.06272975355386734,
-0.0016868805978447199,
0.005031529348343611,
-0.02178861014544964,
0.033270761370658875,
0.12434123456478119,
0.031843073666095734,
0.023408686742186546,
0.022460704669356346,
0.03418591618537903,
0.012459597550332546,
0.0824253186583519,
0.04911644384264946,
-0.01532230619341135,
-0.10821123421192169,
-0.055002521723508835,
-0.046192049980163574,
0.037713952362537384,
0.016945891082286835,
0.030999822542071342,
0.0026376184541732073,
0.02125430665910244,
0.005376442335546017,
0.10807430744171143,
-0.03611734136939049,
0.022179529070854187,
0.0026529631577432156,
0.032595135271549225,
0.06862802803516388,
-0.03366599231958389,
0.019020723178982735,
-0.0054207537323236465,
-0.07362337410449982,
0.0387268103659153,
0.029210997745394707,
2.1778345266776134e-33,
0.08669103682041168,
-0.10540731251239777,
-0.10526192933320999,
0.0003322196425870061,
0.057584140449762344,
-0.06421143561601639,
-0.09899144619703293,
0.035940464586019516,
-0.006328640040010214,
0.01984548009932041,
-0.07532718032598495,
0.02433624304831028,
-0.02734328806400299,
-0.07752303034067154,
-0.02216293290257454,
-0.03813045099377632,
-0.04409677907824516,
0.04556974396109581,
0.016053607687354088,
0.008815707638859749,
0.01913292706012726,
-0.02237805165350437,
-0.09864850342273712,
0.0719725713133812,
0.06306503713130951,
0.018124576658010483,
0.06083044409751892,
-0.09356903284788132,
-0.03696243464946747,
0.06616908311843872,
-0.021664002910256386,
0.014922126196324825,
0.011707981117069721,
0.018518920987844467,
-0.09951408207416534,
0.011379665695130825,
-0.0027568861842155457,
-0.006371394265443087,
-0.05831903591752052,
-0.0563586987555027,
-0.030784286558628082,
-0.02493223175406456,
-0.045484524220228195,
-0.08866063505411148,
0.04715786129236221,
-0.11653311550617218,
0.0616629533469677,
-0.061074841767549515,
0.0033237647730857134,
0.0793890655040741,
0.01403522677719593,
0.010934391990303993,
0.12188225984573364,
-0.03762008994817734,
0.045202918350696564,
0.03302264213562012,
0.10303256660699844,
0.017975687980651855,
0.007509532850235701,
0.06828360259532928,
0.0022340582218021154,
0.0311921127140522,
-0.00038482178933918476,
-0.0012160975020378828,
0.02647685445845127,
0.059363335371017456,
-0.0017898386577144265,
0.03654097765684128,
0.01556991133838892,
0.03768058866262436,
-0.039288587868213654,
0.05102916061878204,
-0.019057774916291237,
0.02710164338350296,
0.00413801334798336,
-0.057319510728120804,
0.018889175727963448,
0.005536370445042849,
-0.1235007494688034,
0.02917272038757801,
0.13222874701023102,
-0.012878133915364742,
-0.0785401314496994,
-0.005368999671190977,
0.02975023165345192,
-0.0036716083995997906,
0.010502652265131474,
0.002186201512813568,
-0.053992584347724915,
0.03743412718176842,
0.0028996786568313837,
0.0009632281726226211,
0.015606936067342758,
0.04678981006145477,
-0.06624894589185715,
-3.2615758496174596e-33,
0.08467768877744675,
-0.00412017572671175,
-0.061727747321128845,
0.02959286980330944,
0.03359566256403923,
0.00668950192630291,
0.010245941579341888,
0.010684669017791748,
-0.10237057507038116,
-0.07334189862012863,
-0.024726463481783867,
-0.05059641972184181,
-0.025339527055621147,
0.05215043947100639,
-0.05369511619210243,
0.0192062109708786,
-0.07157891988754272,
-0.029825076460838318,
-0.07757923752069473,
0.03498673811554909,
0.020850926637649536,
0.028341609984636307,
-0.0015842483844608068,
0.05531509965658188,
0.0009295583586208522,
0.013235324062407017,
-0.0003673238679766655,
0.0391312874853611,
-0.031240565702319145,
0.0064070625230669975,
-0.009953247383236885,
-0.09486570954322815,
-0.029806412756443024,
0.06376731395721436,
0.0031117848120629787,
-0.11061310768127441,
-0.1056971475481987,
0.056697383522987366,
0.016699163243174553,
-0.040883246809244156,
0.10417340695858002,
0.04235917329788208,
-0.044427357614040375,
0.024364503100514412,
-0.09192553162574768,
0.06626243889331818,
0.0355868823826313,
-0.051958564668893814,
0.029563166201114655,
-0.07865379005670547,
-0.020285677164793015,
-0.027081569656729698,
-0.029591111466288567,
0.08135411143302917,
-0.035712432116270065,
-0.029883604496717453,
0.02689714916050434,
-0.0346505343914032,
-0.08116411417722702,
0.03180435672402382,
0.05124414339661598,
-0.07370828092098236,
0.10940945893526077,
0.017941540107131004,
0.08597783744335175,
-0.020098797976970673,
0.056306347250938416,
-0.0158401969820261,
0.01892022415995598,
-0.02819945476949215,
0.049764811992645264,
-0.0025538248009979725,
-0.017890753224492073,
0.018977612257003784,
0.002127898158505559,
-0.02477836050093174,
-0.02126130647957325,
-0.0324367955327034,
0.0007063393131829798,
0.0027354140765964985,
-0.07945118099451065,
0.04744850471615791,
0.019759029150009155,
0.04654833674430847,
0.01668984815478325,
0.09870786964893341,
0.011952315457165241,
0.11490049213171005,
0.08837393671274185,
0.029656121507287025,
-0.010148872621357441,
0.020150523632764816,
-0.07858669012784958,
0.1408674567937851,
-0.021539408713579178,
-5.1651564803023575e-8,
0.07887396216392517,
0.0014834239846095443,
-0.032700397074222565,
0.037589285522699356,
0.06728929281234741,
-0.09356711059808731,
-0.0022030845284461975,
-0.005083613097667694,
-0.019091272726655006,
0.006928447633981705,
-0.0026616014074534178,
0.02384769171476364,
-0.07064259797334671,
0.02943251095712185,
0.1215449720621109,
-0.03668767213821411,
0.02508901245892048,
0.06406572461128235,
-0.009121430106461048,
-0.0763704925775528,
0.008860223926603794,
0.01023457944393158,
0.02274707332253456,
0.0252243485301733,
-0.04131034016609192,
0.07673264294862747,
0.011273280717432499,
0.08246833831071854,
0.09734150767326355,
-0.01023209746927023,
-0.02462639845907688,
0.011897450312972069,
-0.04884794354438782,
0.003213606309145689,
-0.0758959949016571,
0.04616614803671837,
-0.09652433544397354,
-0.03818782418966293,
0.024898385629057884,
-0.005033875349909067,
0.04737076908349991,
0.009923896752297878,
-0.0722055733203888,
0.039353687316179276,
0.014894010499119759,
0.05097286030650139,
-0.04739946126937866,
0.05251919850707054,
-0.03861428052186966,
0.03846322372555733,
-0.11298389732837677,
-0.02768925204873085,
0.02398999035358429,
0.08591807633638382,
-0.01221392210572958,
-0.005299119278788567,
0.03247322142124176,
-0.07828772068023682,
0.02404996007680893,
-0.027096450328826904,
0.08483804017305374,
-0.07957758754491806,
-0.077406145632267,
-0.030185842886567116
] | 0.154892
|
is chosen, then other controllers (e.g. ReplicationController) and their Pods may behave in unpredictable ways too. Kubernetes will not stop you from making a mistake when specifying `.spec.selector`. Here is an example of a case when you might want to use this feature. Say Job `old` is already running. You want existing Pods to keep running, but you want the rest of the Pods it creates to use a different pod template and for the Job to have a new name. You cannot update the Job because these fields are not updatable. Therefore, you delete Job `old` but \_leave its pods running\_, using `kubectl delete jobs/old --cascade=orphan`. Before deleting it, you make a note of what selector it uses: ```shell kubectl get job old -o yaml ``` The output is similar to this: ```yaml kind: Job metadata: name: old ... spec: selector: matchLabels: batch.kubernetes.io/controller-uid: a8f3d00d-c6d2-11e5-9f87-42010af00002 ... ``` Then you create a new Job with name `new` and you explicitly specify the same selector. Since the existing Pods have label `batch.kubernetes.io/controller-uid=a8f3d00d-c6d2-11e5-9f87-42010af00002`, they are controlled by Job `new` as well. You need to specify `manualSelector: true` in the new Job since you are not using the selector that the system normally generates for you automatically. ```yaml kind: Job metadata: name: new ... spec: manualSelector: true selector: matchLabels: batch.kubernetes.io/controller-uid: a8f3d00d-c6d2-11e5-9f87-42010af00002 ... ``` The new Job itself will have a different uid from `a8f3d00d-c6d2-11e5-9f87-42010af00002`. Setting `manualSelector: true` tells the system that you know what you are doing and to allow this mismatch. ### Job tracking with finalizers {{< feature-state for\_k8s\_version="v1.26" state="stable" >}} The control plane keeps track of the Pods that belong to any Job and notices if any such Pod is removed from the API server. To do that, the Job controller creates Pods with the finalizer `batch.kubernetes.io/job-tracking`. The controller removes the finalizer only after the Pod has been accounted for in the Job status, allowing the Pod to be removed by other controllers or users. {{< note >}} See [My pod stays terminating](/docs/tasks/debug/debug-application/debug-pods/) if you observe that pods from a Job are stuck with the tracking finalizer. {{< /note >}} ### Elastic Indexed Jobs {{< feature-state feature\_gate\_name="ElasticIndexedJob" >}} You can scale Indexed Jobs up or down by mutating both `.spec.parallelism` and `.spec.completions` together such that `.spec.parallelism == .spec.completions`. When scaling down, Kubernetes removes the Pods with higher indexes. Use cases for elastic Indexed Jobs include batch workloads which require scaling an indexed Job, such as MPI, Horovod, Ray, and PyTorch training jobs. ### Delayed creation of replacement pods {#pod-replacement-policy} {{< feature-state feature\_gate\_name="JobPodReplacementPolicy" >}} By default, the Job controller recreates Pods as soon they either fail or are terminating (have a deletion timestamp). This means that, at a given time, when some of the Pods are terminating, the number of running Pods for a Job can be greater than `parallelism` or greater than one Pod per index (if you are using an Indexed Job). You may choose to create replacement Pods only when the terminating Pod is fully terminal (has `status.phase: Failed`). To do this, set the `.spec.podReplacementPolicy: Failed`. The default replacement policy depends on whether the Job has a `podFailurePolicy` set. With no Pod failure policy defined for a Job, omitting the `podReplacementPolicy` field selects the `TerminatingOrFailed` replacement policy: the control plane creates replacement Pods immediately upon Pod deletion (as soon as the control plane sees that a Pod for this Job has `deletionTimestamp` set). For Jobs with a Pod failure policy set, the default `podReplacementPolicy` is `Failed`, and no other value is permitted. See [Pod failure policy](#pod-failure-policy) to learn more about Pod failure policies for Jobs. ```yaml kind: Job metadata: name:
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/job.md
|
[
-0.027608323842287064,
-0.010486139915883541,
0.021816158667206764,
0.0045967441983520985,
0.029080085456371307,
-0.011695163324475288,
-0.013586440123617649,
-0.1172160878777504,
0.08046599477529526,
0.05008388310670853,
0.032842934131622314,
0.021391820162534714,
-0.02945282682776451,
-0.06520543247461319,
0.021919557824730873,
0.015513843856751919,
0.021218683570623398,
-0.009918649680912495,
-0.041298482567071915,
-0.037073325365781784,
0.01600784994661808,
0.027224715799093246,
0.015742596238851547,
0.035607852041721344,
-0.028906578198075294,
-0.026498012244701385,
-0.009838245809078217,
-0.01934296265244484,
-0.02376728318631649,
-0.06397970020771027,
-0.03484327346086502,
0.03461121395230293,
0.025523994117975235,
-0.02453964576125145,
0.10711702704429626,
0.05717230215668678,
0.007657887879759073,
-0.033009592443704605,
-0.027044065296649933,
0.012432483024895191,
0.0685221254825592,
-0.047994207590818405,
-0.14101475477218628,
-0.04135255143046379,
-0.01895381510257721,
0.035143546760082245,
-0.04329035058617592,
-0.053978756070137024,
0.00018642531358636916,
-0.012331466190516949,
0.029154233634471893,
-0.09005476534366608,
0.05955652520060539,
0.04385804757475853,
0.08424746245145798,
0.04411223158240318,
0.01868191733956337,
0.02346627414226532,
0.0979381799697876,
0.03253325819969177,
0.054023630917072296,
-0.007088969927281141,
-0.0008639923180453479,
-0.04400581866502762,
0.017064539715647697,
-0.09004166722297668,
-0.00671673659235239,
-0.030725261196494102,
0.046120770275592804,
0.00029095099307596684,
0.03989953175187111,
-0.027231095358729362,
0.015078147873282433,
-0.02064605988562107,
-0.031167371198534966,
0.046852875500917435,
0.006036112084984779,
0.018967220559716225,
-0.034688517451286316,
-0.07141199707984924,
-0.008182964287698269,
-0.0192450862377882,
0.0009774834616109729,
-0.05674171820282936,
-0.09458734095096588,
-0.028431085869669914,
-0.04536488279700279,
-0.07889178395271301,
0.0899120569229126,
-0.043500564992427826,
0.01876886934041977,
-0.04068745672702789,
0.0736711397767067,
-0.09300744533538818,
0.04324617609381676,
-0.034014586359262466,
0.02167942374944687,
0.061164163053035736,
0.04362781345844269,
0.022533521056175232,
-0.0025160741060972214,
-0.027901658788323402,
-0.02675061859190464,
0.07051637023687363,
0.007318013813346624,
-0.021277302876114845,
-0.08140287548303604,
0.02378140389919281,
-0.005386499222368002,
0.06690908968448639,
0.00007601188553962857,
0.027429088950157166,
-0.04908427596092224,
0.10910868644714355,
0.02160041406750679,
0.01895894855260849,
-0.01201917976140976,
0.08931367844343185,
-0.06449275463819504,
0.10174338519573212,
0.039603374898433685,
-0.06554953008890152,
0.0012096496066078544,
0.0788537934422493,
-0.14839258790016174,
0.048048779368400574,
0.025152845308184624,
2.3759916501575574e-33,
0.07705868780612946,
-0.05807666853070259,
-0.03702772781252861,
-0.0230419784784317,
0.07936495542526245,
-0.03559078276157379,
-0.005462925415486097,
0.03862415999174118,
0.03170464560389519,
0.022595327347517014,
-0.03892172500491142,
0.003027724102139473,
-0.04304084926843643,
-0.04598472639918327,
-0.012578262016177177,
-0.000990982400253415,
-0.08823778480291367,
0.04581151157617569,
0.07902564853429794,
-0.012299236841499805,
0.10288805514574051,
0.06451710313558578,
-0.10713205486536026,
0.02034355327486992,
0.016457166522741318,
-0.012540891766548157,
0.038396067917346954,
-0.093299001455307,
-0.05606463924050331,
0.02136240154504776,
-0.04342705383896828,
-0.020199937745928764,
0.004814096726477146,
0.04689282178878784,
-0.1299154907464981,
0.0071483636274933815,
0.0038713698741048574,
-0.04082323610782623,
-0.0832352414727211,
-0.021205956116318703,
0.005452756769955158,
0.02007097564637661,
-0.017906926572322845,
-0.029422692954540253,
0.0796852707862854,
-0.07373850792646408,
0.06607918441295624,
-0.03626050800085068,
0.040979765355587006,
0.05294734984636307,
0.01500584278255701,
-0.05880197882652283,
0.09020371735095978,
-0.08486641943454742,
-0.025485653430223465,
-0.005553561728447676,
0.07028838992118835,
-0.021884862333536148,
0.02697613090276718,
-0.060404203832149506,
0.03439657762646675,
0.003544782055541873,
-0.04876140132546425,
0.04004964977502823,
0.04340555891394615,
0.08030253648757935,
0.016996774822473526,
0.04246266186237335,
0.010710461065173149,
0.031158123165369034,
-0.08257238566875458,
0.07251304388046265,
-0.08147799223661423,
0.0024340215604752302,
0.025571033358573914,
-0.10925029218196869,
0.009310971014201641,
0.024934757500886917,
-0.12870806455612183,
0.04728958383202553,
0.051948510110378265,
0.05675520375370979,
-0.142464742064476,
0.07256975024938583,
0.0618475042283535,
0.008852086029946804,
0.023439938202500343,
0.010505491867661476,
0.009430492296814919,
0.05443676933646202,
0.06052490323781967,
-0.016654131934046745,
-0.07829873263835907,
0.04265335947275162,
-0.04371592029929161,
-3.4638523461130664e-33,
0.08810285478830338,
0.0036559593863785267,
0.008422533981502056,
0.02062029205262661,
-0.01831395924091339,
-0.044998086988925934,
0.0006408600602298975,
0.07773518562316895,
-0.06273721903562546,
-0.10177142173051834,
-0.03938223421573639,
-0.06516224145889282,
0.00920206867158413,
0.026314619928598404,
-0.039487700909376144,
0.016390467062592506,
-0.13537918031215668,
-0.09814124554395676,
-0.13687138259410858,
0.057019997388124466,
-0.0034715929068624973,
-0.027666086331009865,
0.012916098348796368,
0.05417410284280777,
0.017244501039385796,
-0.029917944222688675,
-0.006557623855769634,
0.016840748488903046,
-0.02090819925069809,
-0.009620144963264465,
-0.0157527644187212,
-0.03315150737762451,
0.030289793387055397,
0.024037480354309082,
0.04054582864046097,
-0.058742012828588486,
-0.06575967371463776,
0.04514211043715477,
0.021391412243247032,
0.0398528128862381,
0.003611638443544507,
-0.002905299887061119,
-0.032780133187770844,
0.0005561757716350257,
-0.05749600753188133,
0.024463728070259094,
0.06334240734577179,
0.02619200199842453,
0.0382414236664772,
-0.11464985460042953,
0.010285669937729836,
-0.007824263535439968,
-0.13917450606822968,
0.041617706418037415,
-0.012258066795766354,
-0.012861931696534157,
0.01200386043637991,
0.0749940276145935,
-0.057638294994831085,
-0.011047331616282463,
0.07864613831043243,
0.01351679116487503,
0.08040894567966461,
0.02680056169629097,
0.031116018071770668,
-0.050507016479969025,
0.03577781841158867,
0.024704905226826668,
0.02819853648543358,
-0.007303549908101559,
0.0341438390314579,
-0.0023987474851310253,
0.011091900058090687,
0.019217776134610176,
-0.0019414215348660946,
-0.0571727454662323,
-0.020114555954933167,
0.01603657938539982,
0.0025541442446410656,
0.0729554295539856,
-0.04024277254939079,
0.04117969423532486,
-0.028529349714517593,
0.022432100027799606,
0.02097814716398716,
0.10086441040039062,
0.09480435401201248,
0.08980868756771088,
-0.007280867081135511,
0.029390383511781693,
0.052496537566185,
-0.03081708773970604,
0.02393297664821148,
0.08343902975320816,
-0.08103852719068527,
-4.94347993651445e-8,
0.07120045274496078,
0.032155007123947144,
0.003893699264153838,
0.055605217814445496,
0.023178845643997192,
-0.06132044270634651,
-0.015171811915934086,
0.051401205360889435,
0.007887814193964005,
-0.04452520236372948,
-0.027836084365844727,
0.08967282623052597,
-0.08210442960262299,
0.007030534092336893,
0.054140519350767136,
-0.06998035311698914,
0.0377693809568882,
0.018438670784235,
0.04251914843916893,
-0.049497175961732864,
-0.07152700424194336,
0.01034485548734665,
-0.0008985023014247417,
-0.007872668094933033,
-0.015682997182011604,
0.10017743706703186,
0.024654697626829147,
0.01714763417840004,
0.07198501378297806,
0.016228599473834038,
0.03143635019659996,
-0.008244805969297886,
-0.042789701372385025,
0.07093020528554916,
0.005515960045158863,
0.004197403322905302,
-0.09181524813175201,
0.01316493283957243,
-0.015226616524159908,
0.04572448134422302,
-0.029677463695406914,
0.027976827695965767,
-0.11407723277807236,
-0.01674601435661316,
-0.02281571552157402,
0.01753176376223564,
0.010112808085978031,
0.00768243195489049,
-0.06297948211431503,
-0.005220420192927122,
-0.04652798920869827,
-0.07247721403837204,
-0.007122462149709463,
0.07593313604593277,
-0.04792741686105728,
-0.03926878049969673,
0.0049906144849956036,
-0.10287099331617355,
-0.03773732855916023,
-0.00036109177744947374,
0.07510266453027725,
-0.036431364715099335,
0.017122166231274605,
-0.031780507415533066
] | 0.121665
|
the control plane sees that a Pod for this Job has `deletionTimestamp` set). For Jobs with a Pod failure policy set, the default `podReplacementPolicy` is `Failed`, and no other value is permitted. See [Pod failure policy](#pod-failure-policy) to learn more about Pod failure policies for Jobs. ```yaml kind: Job metadata: name: new ... spec: podReplacementPolicy: Failed ... ``` Provided your cluster has the feature gate enabled, you can inspect the `.status.terminating` field of a Job. The value of the field is the number of Pods owned by the Job that are currently terminating. ```shell kubectl get jobs/myjob -o yaml ``` ```yaml apiVersion: batch/v1 kind: Job # .metadata and .spec omitted status: terminating: 3 # three Pods are terminating and have not yet reached the Failed phase ``` ### Delegation of managing a Job object to external controller {{< feature-state feature\_gate\_name="JobManagedBy" >}} This feature allows you to disable the built-in Job controller, for a specific Job, and delegate reconciliation of the Job to an external controller. You indicate the controller that reconciles the Job by setting a custom value for the `spec.managedBy` field - any value other than `kubernetes.io/job-controller`. The value of the field is immutable. {{< note >}} When using this feature, make sure the controller indicated by the field is installed, otherwise the Job may not be reconciled at all. {{< /note >}} {{< note >}} When developing an external Job controller be aware that your controller needs to operate in a fashion conformant with the definitions of the API spec and status fields of the Job object. Please review these in detail in the [Job API](/docs/reference/kubernetes-api/workload-resources/job-v1/). We also recommend that you run the e2e conformance tests for the Job object to verify your implementation. Finally, when developing an external Job controller make sure it does not use the `batch.kubernetes.io/job-tracking` finalizer, reserved for the built-in controller. {{< /note >}} ## Alternatives ### Bare Pods When the node that a Pod is running on reboots or fails, the pod is terminated and will not be restarted. However, a Job will create new Pods to replace terminated ones. For this reason, we recommend that you use a Job rather than a bare Pod, even if your application requires only a single Pod. ### Replication Controller Jobs are complementary to [Replication Controllers](/docs/concepts/workloads/controllers/replicationcontroller/). A Replication Controller manages Pods which are not expected to terminate (e.g. web servers), and a Job manages Pods that are expected to terminate (e.g. batch tasks). As discussed in [Pod Lifecycle](/docs/concepts/workloads/pods/pod-lifecycle/), `Job` is \*only\* appropriate for pods with `RestartPolicy` equal to `OnFailure` or `Never`. {{< note >}} If `RestartPolicy` is not set, the default value is `Always`. {{< /note >}} ### Single Job starts controller Pod Another pattern is for a single Job to create a Pod which then creates other Pods, acting as a sort of custom controller for those Pods. This allows the most flexibility, but may be somewhat complicated to get started with and offers less integration with Kubernetes. An advantage of this approach is that the overall process gets the completion guarantee of a Job object, but maintains complete control over what Pods are created and how work is assigned to them. ## {{% heading "whatsnext" %}} \* Learn about [Pods](/docs/concepts/workloads/pods). \* Read about different ways of running Jobs: \* [Coarse Parallel Processing Using a Work Queue](/docs/tasks/job/coarse-parallel-processing-work-queue/) \* [Fine Parallel Processing Using a Work Queue](/docs/tasks/job/fine-parallel-processing-work-queue/) \* Use an [indexed Job for parallel processing with static work assignment](/docs/tasks/job/indexed-parallel-processing-static/) \* Create multiple Jobs based on a template: [Parallel Processing using Expansions](/docs/tasks/job/parallel-processing-expansion/) \* Follow the links within [Clean up finished jobs automatically](#clean-up-finished-jobs-automatically) to learn more about how your cluster
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/job.md
|
[
0.015432890504598618,
-0.03222823888063431,
-0.02072061598300934,
0.047580890357494354,
0.03522917628288269,
-0.0171162448823452,
0.027987195178866386,
-0.060818661004304886,
0.010045218281447887,
0.05357380211353302,
0.004894104786217213,
-0.012476630508899689,
-0.034699440002441406,
-0.0198808740824461,
0.012471592053771019,
-0.007040860131382942,
0.041615892201662064,
-0.04751616343855858,
-0.05559917166829109,
-0.09037236869335175,
0.05117123946547508,
0.07008391618728638,
0.009433536790311337,
0.05055011808872223,
-0.08234551548957825,
0.013756995089352131,
-0.03630627319216728,
-0.014510150998830795,
-0.02013348788022995,
-0.013349369168281555,
-0.09459535032510757,
0.019878892228007317,
-0.003353055799379945,
0.017467498779296875,
0.14658840000629425,
0.1038522869348526,
0.018430626019835472,
-0.08562161028385162,
-0.018403643742203712,
-0.04901750013232231,
0.06545095145702362,
-0.016410617157816887,
-0.09423696249723434,
-0.02602173574268818,
-0.020196106284856796,
0.014181206934154034,
-0.07836136221885681,
-0.05207925662398338,
-0.006598059553653002,
-0.015276972204446793,
0.015021842904388905,
-0.01633390225470066,
0.13338403403759003,
0.09354225546121597,
0.09605748951435089,
0.017567815259099007,
0.049934789538383484,
0.028889914974570274,
0.007652117870748043,
0.002017831662669778,
0.02812475524842739,
-0.04044989123940468,
-0.024543220177292824,
-0.053899433463811874,
0.015734728425741196,
-0.049248430877923965,
-0.021940935403108597,
-0.055419035255908966,
0.013487550429999828,
-0.06157277524471283,
0.01454166043549776,
-0.0778370201587677,
-0.051862865686416626,
-0.0004356860008556396,
-0.03876258060336113,
0.04866630211472511,
0.036148276180028915,
-0.0018125127535313368,
-0.029776548966765404,
-0.06687992066144943,
-0.04834337905049324,
-0.03424045071005821,
0.04713186249136925,
0.0024874613154679537,
-0.08255041390657425,
-0.0074989041313529015,
-0.006342669948935509,
-0.03823182359337807,
0.09851227700710297,
0.03984496369957924,
-0.01632794179022312,
-0.03652871027588844,
0.029309673234820366,
-0.09145428240299225,
0.05985298380255699,
-0.004974284674972296,
-0.009818400256335735,
0.03631678968667984,
0.004144715610891581,
0.013978112488985062,
0.03987082093954086,
-0.022485550493001938,
-0.024960599839687347,
-0.03403518721461296,
0.04564514756202698,
-0.0013939691707491875,
-0.05882742628455162,
-0.042744915932416916,
0.005629357881844044,
0.056189678609371185,
-0.016307439655065536,
0.0394924134016037,
0.012228949926793575,
0.058635029941797256,
0.037644460797309875,
0.03059512749314308,
-0.021617986261844635,
0.07119657099246979,
-0.04051874950528145,
0.009763277135789394,
0.054582688957452774,
-0.05175955593585968,
0.05078646540641785,
0.032478611916303635,
-0.0830511525273323,
0.014534701593220234,
0.011412907391786575,
4.5146048665061496e-35,
0.041650984436273575,
-0.12560182809829712,
-0.032801251858472824,
-0.042613834142684937,
0.11617869138717651,
0.016716742888092995,
-0.03670553117990494,
0.05878810957074165,
0.044085174798965454,
0.0008008653530851007,
-0.09587627649307251,
-0.0009572755661793053,
-0.01778901368379593,
-0.0796479806303978,
0.020810693502426147,
-0.029986897483468056,
-0.028865927830338478,
0.05644623562693596,
0.04212009161710739,
0.014679497107863426,
0.08624614030122757,
-0.015541343949735165,
-0.09412875026464462,
0.0075507210567593575,
0.03193627670407295,
0.00606531323865056,
-0.0013928089756518602,
-0.1061943918466568,
-0.02607397921383381,
0.06400736421346664,
-0.03124011680483818,
0.0753229558467865,
-0.011728276498615742,
0.007443780545145273,
-0.10013692826032639,
-0.03709915652871132,
-0.050607044249773026,
-0.014104831032454967,
-0.038435064256191254,
-0.07091724872589111,
-0.02327687479555607,
-0.06384866684675217,
-0.03524724394083023,
-0.0284664798527956,
0.003876298200339079,
-0.10831037163734436,
0.09175749868154526,
-0.029382072389125824,
0.03070269338786602,
0.09258061647415161,
-0.0016783449100330472,
-0.05286112427711487,
0.07691115140914917,
-0.09331902116537094,
0.025153737515211105,
0.006612896919250488,
0.0852026417851448,
-0.000896336161531508,
-0.005658665671944618,
-0.019399002194404602,
-0.004727077204734087,
0.024094460532069206,
-0.02856258861720562,
0.021000739187002182,
0.028460169211030006,
0.06326867640018463,
0.02423323132097721,
0.06010635569691658,
0.007278259843587875,
0.029991842806339264,
-0.08512178063392639,
0.07256501168012619,
-0.012175863608717918,
0.01965632103383541,
-0.036226578056812286,
-0.12154807150363922,
0.08696926385164261,
0.010161908343434334,
-0.13395211100578308,
0.019131142646074295,
0.045722655951976776,
-0.020393911749124527,
-0.0716484934091568,
-0.0024521597661077976,
0.05087446793913841,
0.040593601763248444,
0.006304092705249786,
0.01717025600373745,
-0.042721427977085114,
0.022262226790189743,
-0.014307770878076553,
-0.045343175530433655,
-0.06933990865945816,
0.03434399887919426,
-0.06660422682762146,
-3.0134073189817814e-33,
0.06432707607746124,
-0.017328552901744843,
-0.008755140006542206,
-0.03522834554314613,
-0.03564104065299034,
-0.0591043122112751,
0.013887710869312286,
0.060760319232940674,
-0.05605122074484825,
-0.0655495822429657,
-0.0895375907421112,
-0.025495121255517006,
0.02149876579642296,
0.035951871424913406,
-0.09836915880441666,
-0.008359470404684544,
-0.10361859947443008,
-0.08894088864326477,
-0.04364752769470215,
0.03492898494005203,
-0.023573484271764755,
-0.03442472964525223,
0.03229444846510887,
0.10917861759662628,
-0.035066720098257065,
-0.009667567908763885,
0.00009476063132751733,
-0.03041982650756836,
-0.059170473366975784,
-0.047578345984220505,
0.05596480518579483,
-0.08150705695152283,
-0.03332825005054474,
0.10222676396369934,
0.007456029765307903,
-0.0924481526017189,
-0.040365397930145264,
0.023270977661013603,
-0.02044014260172844,
0.020297858864068985,
0.08443330973386765,
0.037885405123233795,
-0.04735886678099632,
0.043011270463466644,
-0.0475630983710289,
-0.019477320834994316,
0.050840601325035095,
0.013187072239816189,
-0.0061904508620500565,
-0.07671623677015305,
-0.03243642672896385,
-0.016074221581220627,
-0.055852245539426804,
0.16114255785942078,
-0.008850311860442162,
-0.013292989693582058,
0.02884816937148571,
0.021335158497095108,
-0.041208550333976746,
-0.02691386081278324,
0.02750013768672943,
-0.04961886256933212,
0.0827101618051529,
0.10642873495817184,
0.03274165466427803,
-0.07429805397987366,
0.06962961703538895,
0.05379889905452728,
0.056495338678359985,
0.01759595051407814,
0.07841330766677856,
0.05761580169200897,
0.03391570225358009,
0.046621907502412796,
-0.013377100229263306,
0.010370614938437939,
-0.05230322480201721,
-0.09917948395013809,
-0.01178784016519785,
0.06977424770593643,
0.0024444088339805603,
0.04115540161728859,
-0.028579553589224815,
0.03195028007030487,
0.06644821166992188,
0.08468632400035858,
0.028716281056404114,
0.14112785458564758,
0.017880607396364212,
0.026311691850423813,
-0.02288101799786091,
-0.001541151199489832,
-0.03624643757939339,
0.08347967267036438,
-0.03405381739139557,
-4.7353594823107414e-8,
0.04276778921484947,
0.01959998346865177,
0.035638537257909775,
-0.0028023123741149902,
0.03660665825009346,
-0.07859034091234207,
0.02951967529952526,
0.03009624220430851,
-0.05105316638946533,
-0.0015578914899379015,
-0.008068648166954517,
0.035412658005952835,
-0.12890902161598206,
0.02248489484190941,
0.04975466802716255,
-0.06764834374189377,
0.0744846910238266,
0.07050776481628418,
0.034934744238853455,
-0.0484454371035099,
-0.03969370201230049,
-0.0477558970451355,
0.0021025098394602537,
0.021723439916968346,
-0.02992362715303898,
0.0886385515332222,
-0.01145326066762209,
0.05396775156259537,
0.023265305906534195,
0.014199427329003811,
0.005990765523165464,
-0.01853295788168907,
0.011294567957520485,
0.026117073372006416,
-0.04869422689080238,
0.04757484421133995,
-0.048424094915390015,
0.005858424119651318,
0.005439365282654762,
0.002580885775387287,
-0.005908168852329254,
0.07308132946491241,
-0.06443952769041061,
0.018403423950076103,
0.015005949884653091,
0.05940413475036621,
-0.0027544309850782156,
0.02675749361515045,
-0.015966355800628662,
-0.009757639840245247,
-0.02243301272392273,
-0.0363946408033371,
-0.007976329885423183,
0.153681218624115,
-0.06543407589197159,
-0.007464675232768059,
-0.04144123196601868,
-0.06330936402082443,
-0.026308612897992134,
0.05031699687242508,
0.017447995021939278,
-0.0014623295282945037,
0.002904495457187295,
-0.02033434994518757
] | 0.197501
|
Queue](/docs/tasks/job/coarse-parallel-processing-work-queue/) \* [Fine Parallel Processing Using a Work Queue](/docs/tasks/job/fine-parallel-processing-work-queue/) \* Use an [indexed Job for parallel processing with static work assignment](/docs/tasks/job/indexed-parallel-processing-static/) \* Create multiple Jobs based on a template: [Parallel Processing using Expansions](/docs/tasks/job/parallel-processing-expansion/) \* Follow the links within [Clean up finished jobs automatically](#clean-up-finished-jobs-automatically) to learn more about how your cluster can clean up completed and / or failed tasks. \* `Job` is part of the Kubernetes REST API. Read the {{< api-reference page="workload-resources/job-v1" >}} object definition to understand the API for jobs. \* Read about [`CronJob`](/docs/concepts/workloads/controllers/cron-jobs/), which you can use to define a series of Jobs that will run based on a schedule, similar to the UNIX tool `cron`. \* Practice how to configure handling of retriable and non-retriable pod failures using `podFailurePolicy`, based on the step-by-step [examples](/docs/tasks/job/pod-failure-policy/).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/job.md
|
[
-0.0734645202755928,
0.0012396742822602391,
0.012356371618807316,
-0.010888609103858471,
-0.058224812150001526,
-0.025342434644699097,
-0.024360831826925278,
-0.06338264048099518,
0.010356391780078411,
0.03684329241514206,
-0.014700055122375488,
-0.026444289833307266,
-0.013028697110712528,
-0.014189479872584343,
-0.01350677851587534,
-0.05164504796266556,
-0.008846097625792027,
0.007672537583857775,
-0.0434316024184227,
-0.11048366129398346,
0.04142991080880165,
-0.004604674410074949,
0.029007986187934875,
0.030186288058757782,
-0.0847921296954155,
0.021583708003163338,
-0.04255775362253189,
-0.0412805937230587,
0.004148419946432114,
0.007924455218017101,
-0.025099193677306175,
-0.054362326860427856,
0.01450811605900526,
0.031054148450493813,
0.04476136341691017,
0.1348949819803238,
0.03317120298743248,
-0.07561078667640686,
-0.04423917084932327,
0.07114388048648834,
0.012156419456005096,
-0.0037793852388858795,
-0.11677737534046173,
-0.055741798132658005,
0.02856522984802723,
-0.024999862536787987,
-0.09871058166027069,
-0.06268813461065292,
-0.022716641426086426,
-0.018892379477620125,
-0.001787391141988337,
-0.12307464331388474,
0.006681384984403849,
0.05586795136332512,
0.08335825055837631,
0.06265580654144287,
-0.007881192490458488,
-0.02300458587706089,
0.08804981410503387,
-0.05698056146502495,
0.051305096596479416,
-0.025399064645171165,
0.034761641174554825,
-0.007510785944759846,
0.03901343420147896,
-0.04215787723660469,
-0.013777200132608414,
0.004448110703378916,
0.021594353020191193,
-0.0564396046102047,
0.01766158454120159,
0.01441949326545,
-0.07998562604188919,
-0.02172648161649704,
-0.024541236460208893,
0.027017787098884583,
-0.001014568260870874,
-0.0030264377128332853,
-0.10649904608726501,
-0.06680731475353241,
-0.03687749430537224,
-0.049562059342861176,
0.03682738542556763,
-0.024337071925401688,
-0.06449525058269501,
-0.007014215458184481,
-0.017168736085295677,
-0.04569390043616295,
0.08098204433917999,
-0.06289540976285934,
0.0491194911301136,
0.010365228168666363,
0.02392161265015602,
-0.13065817952156067,
0.0402459055185318,
0.048580169677734375,
-0.0497945211827755,
0.06887783855199814,
0.01956856995820999,
0.00045758672058582306,
0.04864738881587982,
-0.010681968182325363,
0.04966841638088226,
-0.02108863554894924,
0.05633204057812691,
0.033423908054828644,
-0.023410726338624954,
0.051236849278211594,
-0.06949774920940399,
-0.03172535449266434,
-0.016665805131196976,
0.09929180145263672,
-0.00497799227014184,
0.04087991639971733,
0.020073266699910164,
0.046662893146276474,
0.03183070197701454,
0.012922280468046665,
0.019474174827337265,
0.16223172843456268,
0.07810653001070023,
-0.038405440747737885,
-0.04706837981939316,
-0.040576737374067307,
0.037488903850317,
-0.01304942462593317,
0.019868632778525352,
1.4885288637882473e-33,
0.042119234800338745,
-0.016571257263422012,
0.05665147304534912,
-0.05086468160152435,
0.052443742752075195,
-0.10780804604291916,
-0.018356075510382652,
0.045326024293899536,
-0.03642928972840309,
-0.0598001629114151,
-0.08217289298772812,
0.06651687622070312,
0.0004015746235381812,
0.02868361584842205,
-0.0862356573343277,
-0.08291535079479218,
0.026410140097141266,
0.000058676327171269804,
0.0730573758482933,
0.009197711944580078,
0.04502978175878525,
-0.04638947919011116,
-0.08694947510957718,
0.07784149795770645,
-0.013641705736517906,
-0.04766985401511192,
0.07942194491624832,
-0.0754711925983429,
-0.03255816921591759,
0.024685019627213478,
0.022273240610957146,
0.06534536182880402,
-0.029181893914937973,
0.055249180644750595,
-0.15021097660064697,
0.06615713238716125,
-0.05778827518224716,
0.03753011301159859,
-0.061043668538331985,
-0.03708065673708916,
-0.01545438077300787,
-0.020796779543161392,
-0.05746631696820259,
-0.07971716672182083,
0.025056511163711548,
-0.030474195256829262,
0.014361347071826458,
-0.11405178159475327,
0.07461867481470108,
0.03134988248348236,
0.01655498333275318,
-0.0028422509785741568,
0.10373509675264359,
-0.004117142409086227,
0.04527074843645096,
0.05120030790567398,
0.10064849257469177,
-0.0293472521007061,
-0.019462037831544876,
0.0566481351852417,
-0.0341603122651577,
-0.03264835104346275,
-0.07210443168878555,
0.03992414474487305,
0.027996962890028954,
-0.03815866634249687,
0.01827183924615383,
0.06178755685687065,
0.06737591326236725,
0.006251708138734102,
-0.03376350924372673,
0.0474671833217144,
0.05124792829155922,
0.008500542491674423,
0.04833574593067169,
-0.03362952172756195,
0.003545860992744565,
-0.04427090659737587,
-0.1931523084640503,
0.01868779957294464,
-0.015574151650071144,
-0.016912570223212242,
-0.007572147995233536,
-0.05784144997596741,
0.036426108330488205,
-0.019647222012281418,
0.03879445418715477,
0.031698405742645264,
0.041615985333919525,
0.008512751199305058,
-0.002992846304550767,
-0.026267848908901215,
-0.02948825992643833,
0.009080331772565842,
-0.037768296897411346,
-2.570715595449131e-33,
0.08188702911138535,
-0.037742339074611664,
-0.034712053835392,
0.04906235635280609,
0.03221825510263443,
0.02327137067914009,
0.018984444439411163,
0.013811943121254444,
-0.0013615792850032449,
-0.037631530314683914,
-0.10585469752550125,
-0.03385959193110466,
0.009396814741194248,
-0.0030315336771309376,
-0.05675743147730827,
-0.016988078132271767,
0.0071734171360731125,
-0.005667292047291994,
-0.018146894872188568,
0.05287843942642212,
-0.055908553302288055,
0.007143751718103886,
0.030055800452828407,
0.046886082738637924,
0.032240867614746094,
0.046516455709934235,
-0.023168079555034637,
-0.02171892672777176,
-0.0523652620613575,
-0.0001067776174750179,
-0.0597844235599041,
-0.1351717710494995,
0.030188731849193573,
0.06384371221065521,
0.0600711815059185,
-0.08458258211612701,
-0.03728713467717171,
0.07947854697704315,
0.03951820358633995,
-0.0029209533240646124,
0.08777927607297897,
-0.00566102983430028,
0.001133647165261209,
-0.03828699141740799,
-0.058768924325704575,
-0.00016591559688095003,
-0.02469698339700699,
-0.011868396773934364,
-0.1331683099269867,
-0.07460880279541016,
-0.052954308688640594,
0.005852903239428997,
-0.08567680418491364,
0.10650953650474548,
0.06318503618240356,
0.007285858504474163,
0.03976268693804741,
-0.023986628279089928,
-0.020558124408125877,
0.08823717385530472,
-0.0032493439503014088,
-0.0568399615585804,
0.033173587173223495,
0.05268052592873573,
0.06888600438833237,
-0.10021169483661652,
0.005551665090024471,
-0.030205562710762024,
0.0017745757941156626,
0.04110855981707573,
-0.055591046810150146,
0.10051441192626953,
0.03223707899451256,
0.0784790888428688,
-0.023648155853152275,
-0.05992729961872101,
-0.005395050160586834,
-0.05793815106153488,
-0.011905748397111893,
0.0930769145488739,
0.007125594187527895,
0.004094501491636038,
-0.02218465879559517,
0.0683276355266571,
-0.037142809480428696,
0.04726598784327507,
0.06639809161424637,
0.05151229351758957,
0.02825293131172657,
-0.023806462064385414,
-0.0031409133225679398,
0.019010011106729507,
0.025612154975533485,
0.07584591209888458,
0.013597475364804268,
-4.710245349315301e-8,
0.0657322108745575,
-0.01867765001952648,
0.021327313035726547,
0.07191997766494751,
0.05152212083339691,
-0.08539899438619614,
-0.02238861285150051,
0.08107650279998779,
-0.019391871988773346,
-0.007960779592394829,
0.007222170475870371,
-0.05389808490872383,
0.013926876708865166,
0.035968903452157974,
0.06349485367536545,
0.0028729934711009264,
0.05178425461053848,
0.06559332460165024,
0.004973120521754026,
-0.04401681199669838,
-0.002248473232612014,
-0.00555901974439621,
-0.0010776389390230179,
0.031432464718818665,
0.01987839676439762,
0.08424901217222214,
0.08389530330896378,
0.04260624945163727,
-0.004538585897535086,
-0.04758412763476372,
-0.06275647133588791,
-0.03760196268558502,
-0.046574752777814865,
0.01845366507768631,
-0.025004349648952484,
-0.012554751709103584,
-0.013360783457756042,
0.016694480553269386,
-0.009238292463123798,
0.03624214231967926,
0.05490189418196678,
0.010330239310860634,
-0.012572725303471088,
-0.006507908925414085,
0.09391067177057266,
0.01657131500542164,
-0.06558679789304733,
0.0728290006518364,
-0.02610025741159916,
-0.02635696902871132,
0.007485642097890377,
-0.04700061306357384,
0.04933242127299309,
0.07395733892917633,
-0.04941202327609062,
-0.012914340011775494,
0.04467111825942993,
-0.10880356281995773,
0.048547521233558655,
0.02752068266272545,
0.07585005462169647,
0.015295874327421188,
-0.0254520233720541,
-0.007565292529761791
] | 0.162146
|
Kubernetes provides several built-in APIs for declarative management of your {{< glossary\_tooltip text="workloads" term\_id="workload" >}} and the components of those workloads. Ultimately, your applications run as containers inside {{< glossary\_tooltip term\_id="Pod" text="Pods" >}}; however, managing individual Pods would be a lot of effort. For example, if a Pod fails, you probably want to run a new Pod to replace it. Kubernetes can do that for you. You use the Kubernetes API to create a workload {{< glossary\_tooltip text="object" term\_id="object" >}} that represents a higher abstraction level than a Pod, and then the Kubernetes {{< glossary\_tooltip text="control plane" term\_id="control-plane" >}} automatically manages Pod objects on your behalf, based on the specification for the workload object you defined. The built-in APIs for managing workloads are: [Deployment](/docs/concepts/workloads/controllers/deployment/) (and, indirectly, [ReplicaSet](/docs/concepts/workloads/controllers/replicaset/)), the most common way to run an application on your cluster. Deployment is a good fit for managing a stateless application workload on your cluster, where any Pod in the Deployment is interchangeable and can be replaced if needed. (Deployments are a replacement for the legacy {{< glossary\_tooltip text="ReplicationController" term\_id="replication-controller" >}} API). A [StatefulSet](/docs/concepts/workloads/controllers/statefulset/) lets you manage one or more Pods – all running the same application code – where the Pods rely on having a distinct identity. This is different from a Deployment where the Pods are expected to be interchangeable. The most common use for a StatefulSet is to be able to make a link between its Pods and their persistent storage. For example, you can run a StatefulSet that associates each Pod with a [PersistentVolume](/docs/concepts/storage/persistent-volumes/). If one of the Pods in the StatefulSet fails, Kubernetes makes a replacement Pod that is connected to the same PersistentVolume. A [DaemonSet](/docs/concepts/workloads/controllers/daemonset/) defines Pods that provide facilities that are local to a specific {{< glossary\_tooltip text="node" term\_id="node" >}}; for example, a driver that lets containers on that node access a storage system. You use a DaemonSet when the driver, or other node-level service, has to run on the node where it's useful. Each Pod in a DaemonSet performs a role similar to a system daemon on a classic Unix / POSIX server. A DaemonSet might be fundamental to the operation of your cluster, such as a plugin to let that node access [cluster networking](/docs/concepts/cluster-administration/networking/#how-to-implement-the-kubernetes-network-model), it might help you to manage the node, or it could provide less essential facilities that enhance the container platform you are running. You can run DaemonSets (and their pods) across every node in your cluster, or across just a subset (for example, only install the GPU accelerator driver on nodes that have a GPU installed). You can use a [Job](/docs/concepts/workloads/controllers/job/) and / or a [CronJob](/docs/concepts/workloads/controllers/cron-jobs/) to define tasks that run to completion and then stop. A Job represents a one-off task, whereas each CronJob repeats according to a schedule. Other topics in this section:
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/_index.md
|
[
-0.025058364495635033,
-0.009233055636286736,
0.08028741180896759,
0.013798514381051064,
-0.055924996733665466,
-0.045588139444589615,
0.061614155769348145,
-0.011117551475763321,
0.09019558876752853,
0.025438647717237473,
-0.039260122925043106,
-0.0457732118666172,
-0.021477922797203064,
-0.021474212408065796,
0.07367444783449173,
-0.007961987517774105,
0.05269376561045647,
0.0034761286806315184,
-0.05433637276291847,
-0.028480617329478264,
0.0822950229048729,
0.059318725019693375,
0.012970427982509136,
0.041171569377183914,
-0.059655021876096725,
0.05053580552339554,
-0.056894686073064804,
-0.0015915922122076154,
0.06448852270841599,
0.01962229795753956,
-0.04010839760303497,
0.023411422967910767,
-0.06794630736112595,
0.08413023501634598,
0.03501647710800171,
0.07309704273939133,
-0.02624817006289959,
0.02010335586965084,
-0.03354596346616745,
-0.009227661415934563,
0.008062846958637238,
-0.03743596002459526,
-0.12113460153341293,
0.0180369783192873,
-0.0008301614434458315,
-0.009275494143366814,
-0.012886048294603825,
-0.06959579139947891,
0.012660910375416279,
0.013252726756036282,
0.02171327732503414,
-0.13009439408779144,
0.049966197460889816,
0.04209597781300545,
0.06933687627315521,
0.008645378984510899,
-0.007904978469014168,
0.004560899455100298,
0.06318625062704086,
0.0014723329804837704,
0.0004434267175383866,
0.00038511629099957645,
0.02184167504310608,
-0.00009802592103369534,
0.0589476116001606,
-0.009292170405387878,
0.03918365761637688,
0.03162543475627899,
-0.0006163375801406801,
-0.05525917187333107,
0.03660963475704193,
-0.03081720508635044,
0.028848234564065933,
-0.02574986219406128,
-0.032289307564496994,
-0.012993636541068554,
-0.06323059648275375,
0.03981437906622887,
-0.012410267256200314,
-0.0807628259062767,
0.08536408096551895,
0.1084003895521164,
0.0974273532629013,
0.04586131498217583,
-0.029214855283498764,
-0.04174768924713135,
0.03475075587630272,
-0.02341380901634693,
0.03560648858547211,
-0.006519703660160303,
-0.0075777871534228325,
-0.10422736406326294,
0.1008288636803627,
-0.1243075430393219,
0.07686612010002136,
-0.019212631508708,
0.023422373458743095,
-0.03898501396179199,
0.013795796781778336,
-0.0038780278991907835,
0.0323723629117012,
-0.046465788036584854,
0.015837807208299637,
-0.06771259754896164,
0.03398376703262329,
0.005689895711839199,
-0.11176207661628723,
-0.04163190349936485,
0.0004371755348984152,
0.01252569817006588,
-0.04640160873532295,
0.05914734676480293,
-0.046747077256441116,
0.029725199565291405,
-0.02431369014084339,
-0.08816986531019211,
-0.03492861986160278,
-0.01681179367005825,
0.05212273448705673,
0.08386556804180145,
0.010656007565557957,
-0.09181486815214157,
0.02189232036471367,
-0.006495273672044277,
-0.03376612812280655,
0.0733034685254097,
-0.04361146688461304,
1.0162211110996063e-33,
0.058340512216091156,
-0.09814490377902985,
-0.034405339509248734,
0.024732740595936775,
-0.03323100879788399,
-0.08188003301620483,
-0.015589018352329731,
0.02457187883555889,
-0.04322539642453194,
-0.010325283743441105,
-0.019295979291200638,
0.1281520426273346,
-0.0316169299185276,
-0.01368845533579588,
0.05427595227956772,
0.026638146489858627,
-0.06615027040243149,
0.07191099226474762,
0.05906778201460838,
-0.01545883622020483,
-0.01428154855966568,
-0.07034407556056976,
-0.04063822701573372,
-0.01461817603558302,
0.09500880539417267,
-0.009639324620366096,
0.004283343907445669,
-0.06980109959840775,
-0.04331878572702408,
0.016770783811807632,
-0.0012620921479538083,
-0.025664053857326508,
0.04987062141299248,
0.020022518932819366,
-0.15102531015872955,
-0.03571763634681702,
-0.07113074511289597,
-0.03084317222237587,
0.00785338506102562,
-0.06548997014760971,
0.031220970675349236,
-0.03003520891070366,
0.005085760727524757,
-0.04531114920973778,
0.004949101246893406,
0.06122956424951553,
0.029689935967326164,
-0.07946750521659851,
0.0535954050719738,
-0.033123038709163666,
0.03371124714612961,
-0.027645140886306763,
0.012119386345148087,
0.01527367439121008,
0.053046032786369324,
0.02564992383122444,
0.03803080692887306,
-0.08440542221069336,
-0.020859364420175552,
-0.022713743150234222,
-0.09815965592861176,
0.01588118076324463,
-0.05305119976401329,
0.01787509396672249,
0.07616882026195526,
0.036766331642866135,
-0.0034386334009468555,
0.1056305542588234,
-0.006273607723414898,
-0.012334633618593216,
-0.043025869876146317,
0.001683221897110343,
-0.002671231282874942,
0.02077915146946907,
0.052592214196920395,
-0.0692291110754013,
0.01779206283390522,
-0.007673640735447407,
-0.12898455560207367,
0.020212819799780846,
0.009861442260444164,
-0.064320869743824,
-0.016397418454289436,
0.08280916512012482,
0.03423845022916794,
-0.012707466259598732,
0.01975555159151554,
-0.060448821634054184,
-0.057556986808776855,
0.021633189171552658,
-0.04570714756846428,
-0.04330361634492874,
-0.12622371315956116,
0.01348512340337038,
-0.13111558556556702,
-3.249366504074247e-33,
0.13313433527946472,
-0.04087396711111069,
-0.013741718605160713,
0.051652692258358,
0.017200134694576263,
0.015587572008371353,
-0.0007624095305800438,
0.04329042136669159,
-0.02580913156270981,
-0.03909055516123772,
-0.056167855858802795,
0.01055215299129486,
0.02164900116622448,
0.0914553627371788,
-0.05618850886821747,
0.02076847106218338,
-0.11921695619821548,
-0.0005494009819813073,
-0.0001524123945273459,
0.0005479914834722877,
-0.011764364317059517,
-0.05264690890908241,
0.07192502915859222,
0.014860589988529682,
-0.021594783291220665,
-0.04846253991127014,
0.031915292143821716,
0.004955063574016094,
-0.017767880111932755,
-0.04755691811442375,
0.00003300714524812065,
-0.04988804832100868,
-0.004820114467293024,
-0.035621803253889084,
0.02086385153234005,
-0.05344952270388603,
0.006803485099226236,
-0.03985434025526047,
-0.01788627728819847,
0.02357880398631096,
0.045551784336566925,
-0.0018442093860358,
-0.037886492908000946,
-0.0846879780292511,
-0.03041037917137146,
-0.027904322370886803,
-0.05401568487286568,
0.0024811720941215754,
-0.008733335882425308,
-0.09703133255243301,
0.04221596568822861,
-0.015267256647348404,
-0.0648493617773056,
0.025388352572917938,
-0.0384182408452034,
0.01514036487787962,
0.04148373752832413,
-0.053535427898168564,
-0.05840042978525162,
0.009329065680503845,
-0.0013820681488141418,
-0.0933825895190239,
0.06817036122083664,
0.042849622666835785,
-0.018307670950889587,
-0.05561913549900055,
0.0002595703408587724,
0.018516061827540398,
-0.025422267615795135,
0.0039358194917440414,
-0.010334650985896587,
-0.04364483058452606,
0.056783732026815414,
-0.00845821388065815,
0.01677483133971691,
0.0004384139901958406,
0.11923789978027344,
-0.08952004462480545,
0.09670403599739075,
-0.09204696863889694,
0.04483526572585106,
0.054663125425577164,
0.014242428354918957,
0.0077520133927464485,
0.019849732518196106,
0.07053034752607346,
0.051773801445961,
0.12374011427164078,
0.026595711708068848,
0.047381144016981125,
-0.01398372557014227,
0.026673434302210808,
0.013967384584248066,
0.14240124821662903,
-0.0049615222960710526,
-4.7664080682352505e-8,
0.011144522577524185,
0.16614477336406708,
0.016209838911890984,
0.0321887843310833,
-0.043760817497968674,
0.007843093946576118,
0.029403479769825935,
0.03950665146112442,
-0.02722848393023014,
-0.02705693431198597,
-0.0067865788005292416,
0.05481342598795891,
-0.05575152114033699,
0.0689743310213089,
0.0004818807356059551,
0.05289843678474426,
-0.03336834907531738,
0.023976564407348633,
0.021144390106201172,
-0.06960655003786087,
-0.020231865346431732,
0.00817920733243227,
0.03243941813707352,
0.04565628245472908,
0.004483275581151247,
0.024593893438577652,
0.044096942991018295,
0.011413810774683952,
0.013040314428508282,
0.017129214480519295,
-0.03995603322982788,
0.04018993303179741,
-0.10458128154277802,
0.12031251192092896,
0.0239371620118618,
-0.024600055068731308,
-0.15348844230175018,
0.015389836393296719,
0.09154245257377625,
0.08729064464569092,
-0.012495969422161579,
-0.040200572460889816,
-0.07976675033569336,
-0.007940993644297123,
0.044212184846401215,
0.06937623023986816,
-0.021694526076316833,
0.06915106624364853,
-0.011636140756309032,
-0.005706217139959335,
-0.04022575914859772,
0.012167542241513729,
-0.03876473754644394,
0.07120013982057571,
-0.012007051147520542,
-0.005885066464543343,
0.01960436813533306,
0.002252546139061451,
0.04587053880095482,
-0.007366166450083256,
-0.006682767067104578,
-0.01742514781653881,
0.008899006061255932,
0.046502485871315
] | 0.100066
|
{{< note >}} 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. {{< /note >}} A \_ReplicationController\_ ensures that a specified number of pod replicas are running at any one time. In other words, a ReplicationController makes sure that a pod or a homogeneous set of pods is always up and available. ## How a ReplicationController works If there are too many pods, the ReplicationController terminates the extra pods. If there are too few, the ReplicationController starts more pods. Unlike manually created pods, the pods maintained by a ReplicationController are automatically replaced if they fail, are deleted, or are terminated. For example, your pods are re-created on a node after disruptive maintenance such as a kernel upgrade. For this reason, you should use a ReplicationController even if your application requires only a single pod. A ReplicationController is similar to a process supervisor, but instead of supervising individual processes on a single node, the ReplicationController supervises multiple pods across multiple nodes. ReplicationController is often abbreviated to "rc" in discussion, and as a shortcut in kubectl commands. A simple case is to create one ReplicationController object to reliably run one instance of a Pod indefinitely. A more complex use case is to run several identical replicas of a replicated service, such as web servers. ## Running an example ReplicationController This example ReplicationController config runs three copies of the nginx web server. {{% code\_sample file="controllers/replication.yaml" %}} Run the example job by downloading the example file and then running this command: ```shell kubectl apply -f https://k8s.io/examples/controllers/replication.yaml ``` The output is similar to this: ``` replicationcontroller/nginx created ``` Check on the status of the ReplicationController using this command: ```shell kubectl describe replicationcontrollers/nginx ``` The output is similar to this: ``` Name: nginx Namespace: default Selector: app=nginx Labels: app=nginx Annotations: Replicas: 3 current / 3 desired Pods Status: 0 Running / 3 Waiting / 0 Succeeded / 0 Failed Pod Template: Labels: app=nginx Containers: nginx: Image: nginx Port: 80/TCP Environment: Mounts: Volumes: Events: FirstSeen LastSeen Count From SubobjectPath Type Reason Message --------- -------- ----- ---- ------------- ---- ------ ------- 20s 20s 1 {replication-controller } Normal SuccessfulCreate Created pod: nginx-qrm3m 20s 20s 1 {replication-controller } Normal SuccessfulCreate Created pod: nginx-3ntk0 20s 20s 1 {replication-controller } Normal SuccessfulCreate Created pod: nginx-4ok8v ``` Here, three pods are created, but none is running yet, perhaps because the image is being pulled. A little later, the same command may show: ```shell Pods Status: 3 Running / 0 Waiting / 0 Succeeded / 0 Failed ``` To list all the pods that belong to the ReplicationController in a machine readable form, you can use a command like this: ```shell pods=$(kubectl get pods --selector=app=nginx --output=jsonpath={.items..metadata.name}) echo $pods ``` The output is similar to this: ``` nginx-3ntk0 nginx-4ok8v nginx-qrm3m ``` Here, the selector is the same as the selector for the ReplicationController (seen in the `kubectl describe` output), and in a different form in `replication.yaml`. The `--output=jsonpath` option specifies an expression with the name from each pod in the returned list. ## Writing a ReplicationController Manifest As with all other Kubernetes config, a ReplicationController needs `apiVersion`, `kind`, and `metadata` fields. When the control plane creates new Pods for a ReplicationController, the `.metadata.name` of the ReplicationController is part of the basis for naming those Pods. The name of a ReplicationController must be a valid [DNS subdomain](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names) value, but this can produce unexpected results for the Pod hostnames. For best compatibility, the name should follow the more restrictive rules for a [DNS label](/docs/concepts/overview/working-with-objects/names#dns-label-names). For general information about working with configuration files, see [object management](/docs/concepts/overview/working-with-objects/object-management/). A ReplicationController also needs a [`.spec`
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/replicationcontroller.md
|
[
-0.03037889301776886,
-0.09706129878759384,
-0.06445758044719696,
-0.00903519056737423,
0.009261714294552803,
0.002291112905368209,
-0.032145462930202484,
0.005719681270420551,
0.02187923900783062,
0.09491005539894104,
0.06895775347948074,
0.06870926916599274,
0.03618994355201721,
-0.049239061772823334,
0.021851995959877968,
0.0077094146981835365,
0.06413475424051285,
-0.029822666198015213,
-0.012782770209014416,
-0.0024971517268568277,
0.03730963170528412,
-0.021721109747886658,
-0.000205651595024392,
0.07014533877372742,
-0.10221228748559952,
-0.030840598046779633,
-0.047025419771671295,
-0.08618832379579544,
-0.01681610383093357,
-0.008188853040337563,
-0.032918114215135574,
0.018443545326590538,
-0.0015026251785457134,
0.01061514113098383,
0.06839529424905777,
-0.014889480546116829,
0.055486273020505905,
-0.06157926097512245,
-0.05314520001411438,
-0.049441028386354446,
0.060693688690662384,
-0.017118973657488823,
-0.09710737317800522,
0.028725260868668556,
-0.04309529438614845,
0.04359603300690651,
-0.04098548740148544,
0.028161827474832535,
0.02944049797952175,
-0.03750018775463104,
0.04610190913081169,
-0.056513309478759766,
0.01931254379451275,
0.01376569177955389,
0.051448240876197815,
-0.032574016600847244,
0.01017267070710659,
-0.037099871784448624,
0.09648119658231735,
0.07002755999565125,
0.10879427194595337,
0.04726424068212509,
-0.055168308317661285,
-0.027565622702240944,
0.0947553813457489,
-0.09721788018941879,
0.0044479151256382465,
0.04109687730669975,
0.0587897002696991,
0.03094763122498989,
0.005934905260801315,
0.021777942776679993,
0.01895439811050892,
0.012784779071807861,
-0.04635638743638992,
-0.08002535998821259,
-0.010830721817910671,
-0.02003289759159088,
0.0003588362887967378,
0.04589327424764633,
-0.04217655211687088,
0.0025389431975781918,
0.03303225710988045,
-0.030523110181093216,
-0.07196129858493805,
-0.03629456087946892,
0.002452307380735874,
-0.03447457775473595,
0.06912405788898468,
-0.00636669946834445,
0.03233099356293678,
0.02977900579571724,
0.08895409107208252,
-0.07191761583089828,
0.004864251706749201,
-0.015443728305399418,
0.02326921932399273,
-0.003655075328424573,
0.0026385157834738493,
-0.0015072660753503442,
-0.001733610057272017,
-0.05727425217628479,
0.11097177118062973,
-0.018975425511598587,
0.018220748752355576,
-0.05930259823799133,
-0.09641396254301071,
-0.010397525504231453,
0.015976227819919586,
0.0487750768661499,
0.02278292551636696,
0.021423151716589928,
-0.014447486028075218,
0.08607044070959091,
0.04160923883318901,
0.040142033249139786,
-0.026944071054458618,
0.02121829241514206,
-0.03107692115008831,
0.07777265459299088,
-0.009180420078337193,
-0.03774971514940262,
0.060115229338407516,
-0.0006104307249188423,
-0.0441715270280838,
0.00007195842044893652,
-0.02993050031363964,
2.9535245143440247e-33,
0.046565424650907516,
-0.0074035003781318665,
-0.04056276008486748,
0.08599594980478287,
0.0807381272315979,
0.04909277707338333,
0.0049370164051651955,
0.025511663407087326,
-0.01239841803908348,
-0.030030466616153717,
0.0011692545376718044,
0.007165639195591211,
-0.036813896149396896,
0.10753796994686127,
-0.04629907384514809,
-0.09499114006757736,
-0.05601636692881584,
0.06803519278764725,
0.07744678109884262,
-0.015177867375314236,
0.006823163479566574,
-0.01817949488759041,
-0.070061095058918,
0.05458546057343483,
0.0668732225894928,
-0.010434728115797043,
0.01660262793302536,
-0.06006661802530289,
0.001922386116348207,
0.02165939472615719,
-0.011455250903964043,
0.010753465816378593,
-0.02384340763092041,
0.02072284184396267,
-0.035622723400592804,
-0.03061552532017231,
0.010626534931361675,
-0.07365937530994415,
-0.12250293046236038,
-0.06300709396600723,
-0.06001584976911545,
0.024966174736618996,
-0.052372440695762634,
-0.06587499380111694,
0.09359205514192581,
0.02469586953520775,
0.08278415352106094,
-0.03830116242170334,
0.027505649253726006,
-0.01723352260887623,
-0.0015945511404424906,
-0.023885294795036316,
0.051230669021606445,
-0.0604541189968586,
0.006631368305534124,
-0.05513004586100578,
0.05112561583518982,
-0.07785481959581375,
0.0020389817655086517,
-0.02617719955742359,
-0.025213947519659996,
-0.08645676076412201,
-0.010850481688976288,
0.021010641008615494,
0.05752689018845558,
0.13621340692043304,
-0.03682858496904373,
-0.06433850526809692,
0.10063958168029785,
0.09582746773958206,
-0.027785006910562515,
-0.0017276047728955746,
-0.030375011265277863,
-0.016850493848323822,
-0.019665874540805817,
-0.057058338075876236,
-0.004143624100834131,
0.03538024052977562,
-0.13557370007038116,
0.07830394804477692,
-0.04540269821882248,
0.03932361677289009,
-0.18992429971694946,
0.07093110680580139,
-0.01671476662158966,
-0.017112409695982933,
0.0322331041097641,
0.007672279607504606,
-0.06509101390838623,
-0.00203218893148005,
0.06429018825292587,
-0.02101188898086548,
-0.019147230312228203,
0.0015889175701886415,
-0.010423241183161736,
-4.012551068557832e-33,
0.05593831464648247,
-0.03302768990397453,
0.058890484273433685,
0.012833300046622753,
0.027243122458457947,
-0.03416687622666359,
-0.034137215465307236,
0.0417206734418869,
-0.018999001011252403,
-0.13790372014045715,
-0.04460141062736511,
-0.06582675129175186,
0.009459546767175198,
0.030284974724054337,
-0.1434336155653,
-0.026594791561365128,
-0.02286951243877411,
-0.11617831140756607,
0.011610377579927444,
0.013673809356987476,
-0.021547529846429825,
-0.043282125145196915,
0.10424964874982834,
0.028916770592331886,
0.06072027608752251,
-0.024027569219470024,
-0.05802840739488602,
0.032119449228048325,
0.04679080471396446,
-0.05996711924672127,
0.0523967482149601,
-0.0626419335603714,
0.04660237208008766,
-0.015340849757194519,
-0.017774496227502823,
0.059034235775470734,
-0.006899835076183081,
0.1467607170343399,
0.010349784046411514,
-0.05127078667283058,
0.07763464003801346,
-0.05128910019993782,
-0.024853045120835304,
0.0279578547924757,
-0.023161327466368675,
-0.0451008677482605,
0.0391983836889267,
0.05583241209387779,
0.012712282128632069,
-0.04413251951336861,
-0.008512782864272594,
-0.08279457688331604,
-0.07118882983922958,
0.004568411968648434,
-0.015048447996377945,
-0.020108936354517937,
0.013384458608925343,
0.11815036833286285,
-0.029361816123127937,
0.04278102144598961,
0.02826394885778427,
-0.03043113462626934,
0.012467851862311363,
0.047309525310993195,
-0.09660407900810242,
-0.04162641614675522,
0.07074665278196335,
0.07482356578111649,
0.043425556272268295,
0.036401718854904175,
0.026971500366926193,
0.03452785685658455,
0.06809231638908386,
0.0020228393841534853,
-0.025514474138617516,
-0.05227331817150116,
-0.014124291948974133,
-0.08921708911657333,
0.05563167482614517,
0.026007309556007385,
-0.1747591644525528,
0.06255953013896942,
-0.03193400800228119,
0.0661565512418747,
0.0035006538964807987,
0.013216310180723667,
0.113726407289505,
0.021581431850790977,
0.07037492096424103,
0.053714074194431305,
-0.014458710327744484,
0.008884754031896591,
-0.024630261585116386,
0.03113034926354885,
-0.09447183459997177,
-4.911773743287995e-8,
0.04378112778067589,
0.042787130922079086,
0.050020232796669006,
-0.001080022077076137,
0.007569176144897938,
0.02311970852315426,
0.07578593492507935,
-0.030555760487914085,
-0.006669231690466404,
0.06105700507760048,
0.009389757178723812,
0.06810931861400604,
-0.08279995620250702,
0.03760043531656265,
0.04624868556857109,
-0.05165737867355347,
0.015682844445109367,
-0.030976761132478714,
-0.01966981776058674,
-0.025763532146811485,
-0.07475726306438446,
-0.043847497552633286,
-0.005804446991533041,
0.02171560749411583,
-0.033603839576244354,
0.06846045702695847,
0.017045140266418457,
-0.002883194712921977,
-0.01447893213480711,
-0.0007472975412383676,
0.061392806470394135,
0.030150260776281357,
-0.04682095721364021,
0.0363457016646862,
-0.006305536720901728,
0.010810837149620056,
-0.10438013076782227,
-0.014956857077777386,
-0.002494512591511011,
-0.03493078425526619,
0.0029128564056009054,
-0.02499757520854473,
0.00004713903763331473,
0.016303593292832375,
0.007042362820357084,
0.027420787140727043,
-0.04690743610262871,
-0.03347579389810562,
-0.04120049625635147,
0.002363185165449977,
-0.00851602666079998,
-0.04946024343371391,
0.025152530521154404,
0.05618301406502724,
-0.0682186633348465,
0.03851189464330673,
0.011601600795984268,
-0.022674664855003357,
0.0731639564037323,
0.031473029404878616,
0.06533735990524292,
0.04301045462489128,
0.009380673058331013,
-0.010163226164877415
] | 0.131023
|
ReplicationController must be a valid [DNS subdomain](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names) value, but this can produce unexpected results for the Pod hostnames. For best compatibility, the name should follow the more restrictive rules for a [DNS label](/docs/concepts/overview/working-with-objects/names#dns-label-names). For general information about working with configuration files, see [object management](/docs/concepts/overview/working-with-objects/object-management/). A ReplicationController also needs a [`.spec` section](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status). ### Pod Template The `.spec.template` is the only required field of the `.spec`. The `.spec.template` is a [pod template](/docs/concepts/workloads/pods/#pod-templates). It has exactly the same schema as a {{< glossary\_tooltip text="Pod" term\_id="pod" >}}, except it is nested and does not have an `apiVersion` or `kind`. In addition to required fields for a Pod, a pod template in a ReplicationController must specify appropriate labels and an appropriate restart policy. For labels, make sure not to overlap with other controllers. See [pod selector](#pod-selector). Only 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. For local container restarts, ReplicationControllers delegate to an agent on the node, for example the [Kubelet](/docs/reference/command-line-tools-reference/kubelet/). ### Labels on the ReplicationController The ReplicationController can itself have labels (`.metadata.labels`). Typically, you would set these the same as the `.spec.template.metadata.labels`; if `.metadata.labels` is not specified then it defaults to `.spec.template.metadata.labels`. However, they are allowed to be different, and the `.metadata.labels` do not affect the behavior of the ReplicationController. ### Pod Selector The `.spec.selector` field is a [label selector](/docs/concepts/overview/working-with-objects/labels/#label-selectors). A ReplicationController manages all the pods with labels that match the selector. It does not distinguish between pods that it created or deleted and pods that another person or process created or deleted. This allows the ReplicationController to be replaced without affecting the running pods. If specified, the `.spec.template.metadata.labels` must be equal to the `.spec.selector`, or it will be rejected by the API. If `.spec.selector` is unspecified, it will be defaulted to `.spec.template.metadata.labels`. Also you should not normally create any pods whose labels match this selector, either directly, with another ReplicationController, or with another controller such as Job. If you do so, the ReplicationController thinks that it created the other pods. Kubernetes does not stop you from doing this. If you do end up with multiple controllers that have overlapping selectors, you will have to manage the deletion yourself (see [below](#working-with-replicationcontrollers)). ### Multiple Replicas You can specify how many pods should run concurrently by setting `.spec.replicas` to the number of pods you would like to have running concurrently. The number running at any time may be higher or lower, such as if the replicas were just increased or decreased, or if a pod is gracefully shutdown, and a replacement starts early. If you do not specify `.spec.replicas`, then it defaults to 1. ## Working with ReplicationControllers ### Deleting a ReplicationController and its Pods To delete a ReplicationController and all its pods, use [`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete). Kubectl will scale the ReplicationController to zero and wait for it to delete each pod before deleting the ReplicationController itself. If this kubectl command is interrupted, it can be restarted. When using the REST API or [client library](/docs/reference/using-api/client-libraries), you need to do the steps explicitly (scale replicas to 0, wait for pod deletions, then delete the ReplicationController). ### Deleting only a ReplicationController You can delete a ReplicationController without affecting any of its pods. Using kubectl, specify the `--cascade=orphan` option to [`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete). When using the REST API or [client library](/docs/reference/using-api/client-libraries), you can delete the ReplicationController object. Once the original is deleted, you can create a new ReplicationController to replace it. As long as the old and new `.spec.selector` are the same, then the new one will adopt the old pods. However, it will not make any effort to make existing pods match a new,
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/replicationcontroller.md
|
[
-0.042656995356082916,
-0.025092624127864838,
0.023601915687322617,
-0.008394671604037285,
-0.04562579467892647,
-0.028565499931573868,
-0.020015297457575798,
-0.013486020267009735,
0.0116111533716321,
0.036088909953832626,
-0.03571410849690437,
-0.020506620407104492,
-0.03547373414039612,
0.024134675040841103,
0.05890917032957077,
0.0037728494498878717,
0.05471743270754814,
-0.03257197141647339,
0.0322367288172245,
0.037793442606925964,
0.09025910496711731,
0.06737817078828812,
0.035584498196840286,
0.02041027881205082,
-0.07420974224805832,
-0.028796914964914322,
-0.0742688775062561,
0.010853921063244343,
0.002028718823567033,
-0.007634196896106005,
0.056774724274873734,
0.060284391045570374,
-0.02575644664466381,
0.022847240790724754,
0.17808111011981964,
-0.0028739601839333773,
0.03288109973073006,
-0.05847877264022827,
-0.05456016585230827,
-0.01680552028119564,
0.13542680442333221,
-0.02229274995625019,
-0.0012385997688397765,
-0.005808532238006592,
-0.02284136600792408,
0.06442845612764359,
0.008121112361550331,
0.022068873047828674,
-0.021342875435948372,
0.008437011390924454,
-0.016430918127298355,
-0.11223883926868439,
0.07681922614574432,
-0.0035938399378210306,
0.05539386346936226,
0.034084197133779526,
0.016668036580085754,
0.02018832042813301,
0.11622107774019241,
0.009588087908923626,
0.05374453216791153,
0.00858034286648035,
-0.0006053193937987089,
-0.05675998330116272,
0.030565647408366203,
-0.0559103898704052,
0.04476609826087952,
0.05017582327127457,
0.016510318964719772,
0.05210641026496887,
0.0404934324324131,
0.044368926435709,
0.020350409671664238,
-0.016386032104492188,
-0.02856825664639473,
0.010295942425727844,
-0.046255677938461304,
-0.01980658620595932,
-0.004050788003951311,
-0.08866780996322632,
0.02701410837471485,
0.055760931223630905,
-0.01172592118382454,
-0.05647077411413193,
-0.044188518077135086,
-0.02264465019106865,
0.0259772427380085,
-0.028027385473251343,
0.0012215238530188799,
-0.005273147951811552,
0.015864737331867218,
-0.10787981003522873,
0.008984226733446121,
-0.11982478201389313,
0.011403634212911129,
0.003321344032883644,
0.04723980650305748,
-0.016879873350262642,
-0.01675787940621376,
-0.010516438633203506,
0.0042642815969884396,
0.022819558158516884,
0.03306291997432709,
0.00465186545625329,
0.06213894858956337,
0.010940156877040863,
-0.02438771165907383,
0.04082247614860535,
0.021390151232481003,
0.15384331345558167,
0.02431773580610752,
0.07965085655450821,
0.005934777203947306,
0.03200480341911316,
0.016648348420858383,
-0.024714753031730652,
-0.024416722357273102,
0.03377093747258186,
0.0174541175365448,
0.00686781108379364,
0.005277622491121292,
-0.0473363883793354,
0.0025297191459685564,
0.02390746772289276,
-0.0626247301697731,
0.04185611382126808,
-0.04995021969079971,
-7.204579621428357e-34,
0.051328349858522415,
0.020387941971421242,
-0.04699570685625076,
0.06404543668031693,
0.09475136548280716,
-0.022764677181839943,
0.013406312093138695,
0.03970421850681305,
-0.056705813854932785,
0.06630886346101761,
-0.020131496712565422,
-0.029550695791840553,
0.002551701618358493,
-0.030590558424592018,
-0.08318053185939789,
0.01901167444884777,
-0.04140660911798477,
0.05716105177998543,
0.03719731792807579,
0.03713004291057587,
0.01355043239891529,
-0.000959219818469137,
-0.018713777884840965,
0.035340771079063416,
-0.048921991139650345,
0.03284084424376488,
-0.03971211984753609,
-0.07628029584884644,
0.02037021331489086,
-0.005467762239277363,
0.01885189488530159,
-0.03956783562898636,
0.060832127928733826,
0.023067686706781387,
0.000024458362531731836,
-0.05470051243901253,
0.09448684006929398,
-0.04551958292722702,
-0.1489458531141281,
-0.038297586143016815,
-0.012632060796022415,
0.030378641560673714,
-0.10275831818580627,
-0.012472625821828842,
0.03390329331159592,
-0.0042404960840940475,
0.08097020536661148,
-0.07097405940294266,
0.10149405151605606,
-0.00535982009023428,
-0.02202610671520233,
-0.08713169395923615,
0.010961474850773811,
-0.1399199217557907,
0.03671172261238098,
-0.018650099635124207,
0.0349581204354763,
-0.0065926313400268555,
-0.012938834726810455,
-0.047612279653549194,
-0.04318751394748688,
-0.045484840869903564,
-0.059263817965984344,
-0.034290362149477005,
0.04505595564842224,
0.07763385772705078,
-0.002064479049295187,
0.0032476079650223255,
0.04858982563018799,
0.038121648132801056,
-0.001617393339984119,
0.04986228793859482,
-0.06468220800161362,
0.04223152995109558,
-0.01235863845795393,
-0.06022915989160538,
-0.029213018715381622,
0.011025172658264637,
-0.10160379111766815,
0.06372392177581787,
-0.040063995867967606,
0.09286472201347351,
-0.1541043370962143,
0.08393120020627975,
-0.06293857097625732,
0.03198288753628731,
0.07200007140636444,
0.038331035524606705,
-0.06878822296857834,
-0.043883614242076874,
0.07792830467224121,
-0.03234897926449776,
-0.041103675961494446,
0.002884943038225174,
-0.05207519605755806,
7.278073273116193e-34,
0.035915911197662354,
-0.026472190394997597,
0.0012314500054344535,
0.027459299191832542,
-0.027084263041615486,
-0.05989588797092438,
0.00967719778418541,
0.0799909457564354,
-0.020469730719923973,
-0.11931788921356201,
0.02191888727247715,
-0.13195915520191193,
-0.028810882940888405,
-0.03402099385857582,
-0.0042204344645142555,
0.0008891604375094175,
-0.0852217748761177,
-0.1394791156053543,
0.007154874503612518,
0.041601959615945816,
0.019751064479351044,
0.012855214066803455,
-0.009719044901430607,
0.06124318391084671,
0.004828162956982851,
0.015022304840385914,
-0.024126838892698288,
0.01898479461669922,
0.029511431232094765,
-0.05860525742173195,
0.045582450926303864,
-0.016740085557103157,
-0.005343814846128225,
0.00013643504644278437,
-0.03217441216111183,
0.003921158146113157,
-0.027728542685508728,
0.08024196326732635,
-0.006161918397992849,
-0.05969326198101044,
0.02461574226617813,
-0.012300907634198666,
-0.09000151604413986,
0.02079286426305771,
-0.06393728405237198,
-0.019289741292595863,
0.0800844356417656,
0.06522196531295776,
0.06898732483386993,
-0.08160924911499023,
0.034580741077661514,
-0.1169598326086998,
-0.10864314436912537,
-0.0274667851626873,
0.019606100395321846,
0.006217155605554581,
-0.0015771600883454084,
0.03466913476586342,
-0.024394486099481583,
0.03872710466384888,
0.07244418561458588,
-0.010286322794854641,
0.029324114322662354,
0.07197251170873642,
-0.021547337993979454,
0.02713431790471077,
-0.0038542989641427994,
0.014164482243359089,
0.10942031443119049,
-0.004577382002025843,
-0.004581056535243988,
-0.017546843737363815,
0.040494002401828766,
0.016571689397096634,
0.03136393427848816,
-0.04230206832289696,
-0.012776886112987995,
0.017404988408088684,
0.031764015555381775,
0.02373533882200718,
-0.10660586506128311,
0.07553219050168991,
-0.07606677711009979,
0.054007116705179214,
0.09431770443916321,
0.026873892173171043,
0.11486218869686127,
0.0995902270078659,
-0.024342382326722145,
0.06688286364078522,
0.02316700853407383,
0.00934645812958479,
-0.00958292093127966,
0.056092385202646255,
-0.08037567138671875,
-4.704593337123697e-8,
0.0294170044362545,
0.059176068753004074,
-0.05529655143618584,
0.0010613891063258052,
-0.0416465699672699,
0.04846956208348274,
0.06136087328195572,
-0.07507926970720291,
-0.0009126814547926188,
0.09488807618618011,
-0.07632864266633987,
0.008811986073851585,
-0.09134989976882935,
0.046772077679634094,
0.010027188807725906,
-0.1093023419380188,
0.03294554352760315,
0.08148719370365143,
-0.04016079753637314,
-0.026788216084241867,
-0.07614073157310486,
-0.02123579941689968,
-0.05389046296477318,
-0.12266456335783005,
-0.030729101970791817,
0.08759655058383942,
0.028235558420419693,
-0.022965233772993088,
0.04433653876185417,
0.05681628733873367,
0.018142398446798325,
0.005153067875653505,
-0.039935123175382614,
0.03569204732775688,
0.013758101500570774,
0.030436662957072258,
-0.004396369680762291,
0.025743180885910988,
0.04047410190105438,
-0.008338548243045807,
-0.007548511028289795,
-0.021068638190627098,
-0.035685084760189056,
-0.01842190884053707,
-0.004615660756826401,
0.023070603609085083,
0.009740187786519527,
0.07448239624500275,
0.018281958997249603,
0.02787507139146328,
-0.0050945277325809,
-0.08271539956331253,
0.019306359812617302,
0.01746710017323494,
-0.08605635911226273,
0.0019011314725503325,
-0.011005823500454426,
-0.02293665148317814,
0.001968713477253914,
-0.015100715681910515,
0.10850867629051208,
-0.013682866469025612,
0.0017514851642772555,
0.010943171568214893
] | 0.098215
|
ReplicationController object. Once the original is deleted, you can create a new ReplicationController to replace it. As long as the old and new `.spec.selector` are the same, then the new one will adopt the old pods. However, it will not make any effort to make existing pods match a new, different pod template. To update pods to a new spec in a controlled way, use a [rolling update](#rolling-updates). ### Isolating pods from a ReplicationController Pods 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). ## Common usage patterns ### Rescheduling As 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). ### Scaling The ReplicationController enables scaling the number of replicas up or down, either manually or by an auto-scaling control agent, by updating the `replicas` field. ### Rolling updates The ReplicationController is designed to facilitate rolling updates to a service by replacing pods one-by-one. As 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. Ideally, 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. The 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. ### Multiple release tracks In 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. For 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. ### Using ReplicationControllers with Services Multiple ReplicationControllers can sit behind a single service, so that, for example, some traffic goes to the old version, and some goes to the new version. A 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. ## Writing programs for Replication Pods created by a
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/replicationcontroller.md
|
[
-0.023286743089556694,
-0.06398065388202667,
-0.014328503981232643,
0.027575744315981865,
0.04647374153137207,
0.004499190021306276,
-0.02405169978737831,
-0.05289287120103836,
0.000022706783056491986,
0.06720559298992157,
0.03755006194114685,
0.05842652916908264,
-0.028660977259278297,
-0.06508933752775192,
0.03237590193748474,
-0.011582959443330765,
0.06468595564365387,
0.012055044993758202,
-0.017090648412704468,
0.06423097848892212,
0.021168004721403122,
-0.009905415587127209,
-0.04282267764210701,
0.06161391735076904,
-0.06056457385420799,
0.012928743846714497,
-0.0055081662721931934,
-0.057483408600091934,
-0.02184661477804184,
-0.05152849480509758,
0.0021327941212803125,
0.014840908348560333,
0.04687715321779251,
0.02352636307477951,
0.083378866314888,
-0.03177715092897415,
0.03690541908144951,
-0.02300133928656578,
-0.0003425679460633546,
-0.061710234731435776,
0.0665464773774147,
-0.04247923195362091,
-0.15933647751808167,
0.021469416096806526,
-0.023868301883339882,
0.06426676362752914,
-0.06400472670793533,
0.0013152497122064233,
-0.006320573389530182,
-0.0005010069580748677,
0.03723694756627083,
-0.08125264197587967,
0.0007947164122015238,
0.016739536076784134,
0.06298567354679108,
0.029911058023571968,
0.07890929281711578,
0.0526190847158432,
0.11303414404392242,
0.07039520889520645,
0.07814545929431915,
0.010883918032050133,
-0.0009921584278345108,
-0.006117142271250486,
0.1041627749800682,
-0.11162233352661133,
0.016597751528024673,
0.032691434025764465,
0.10642862319946289,
0.02853487804532051,
0.00956263579428196,
0.02566676214337349,
0.05223117768764496,
-0.03936818242073059,
-0.021285781636834145,
0.012452447786927223,
-0.05743666738271713,
-0.003184945322573185,
-0.011102191172540188,
0.03345192223787308,
-0.028451943770051003,
0.02147890441119671,
0.010381040163338184,
-0.065104641020298,
-0.039700377732515335,
-0.022130854427814484,
-0.0076425750739872456,
-0.04650791734457016,
0.03872743621468544,
-0.038314349949359894,
0.007347755134105682,
0.010077386163175106,
0.10592488944530487,
-0.11149086058139801,
-0.04806305468082428,
-0.04841693490743637,
0.011851646937429905,
-0.027049075812101364,
0.055907100439071655,
0.029614867642521858,
-0.025377729907631874,
0.013287799432873726,
0.0035195592790842056,
-0.011774114333093166,
0.010876450687646866,
-0.07134982943534851,
-0.0653768852353096,
0.006992858834564686,
0.00014773017028346658,
0.06694045662879944,
0.02847650647163391,
0.04429580643773079,
-0.03688382729887962,
0.07360656559467316,
0.026360001415014267,
0.01629125140607357,
-0.016841834411025047,
0.04588703438639641,
-0.0491776242852211,
0.06800366193056107,
0.02636137045919895,
-0.06782216578722,
0.08042068779468536,
0.013680530712008476,
-0.07849589735269547,
0.05473729968070984,
-0.013786821626126766,
3.76425690696341e-33,
0.02195550873875618,
-0.01174154132604599,
-0.06284996122121811,
0.01552306767553091,
0.10713104903697968,
0.0025546790566295385,
0.03653017804026604,
0.02991328202188015,
0.009703004732728004,
-0.01093968190252781,
0.019603271037340164,
0.056432340294122696,
-0.02912747673690319,
0.03726654127240181,
-0.026625411584973335,
-0.07959795743227005,
-0.08998128026723862,
0.08693214505910873,
0.09903143346309662,
-0.04982808977365494,
0.00022756301041226834,
0.029010776430368423,
-0.05147937685251236,
0.014269066974520683,
0.05007397383451462,
0.03145047277212143,
-0.00004941084625897929,
-0.04729876667261124,
-0.019511157646775246,
0.01718680001795292,
-0.004962117876857519,
0.01841413415968418,
-0.042634353041648865,
0.07263718545436859,
-0.09408502280712128,
-0.051846474409103394,
0.030509820207953453,
-0.08124873787164688,
-0.07646501064300537,
-0.03552095964550972,
-0.0014524823054671288,
0.00674654683098197,
-0.03258778899908066,
-0.053193751722574234,
0.056600913405418396,
-0.0034549864940345287,
0.0649440586566925,
-0.05566412955522537,
0.015856033191084862,
-0.06788678467273712,
-0.010928487405180931,
-0.033586807548999786,
0.019903110340237617,
-0.11678905040025711,
-0.07082576304674149,
-0.07121727615594864,
0.04524621367454529,
-0.05116279050707817,
0.08162207901477814,
-0.04995725676417351,
0.04225274547934532,
-0.017644699662923813,
-0.037211958318948746,
0.040450867265462875,
0.07227519899606705,
0.13798975944519043,
-0.012853936292231083,
-0.04902111738920212,
0.06377355009317398,
0.07696302235126495,
-0.023262986913323402,
0.020485736429691315,
-0.06526092439889908,
-0.019102098420262337,
-0.02490786835551262,
-0.06565210968255997,
-0.02733335830271244,
0.0708649605512619,
-0.14974141120910645,
0.027846049517393112,
-0.028047004714608192,
0.07046520709991455,
-0.15952104330062866,
0.049267686903476715,
0.030307218432426453,
-0.03678210452198982,
0.028236601501703262,
0.01901337318122387,
-0.029953252524137497,
-0.0015744103584438562,
0.07692453265190125,
-0.032822102308273315,
-0.07100867480039597,
-0.008789454586803913,
0.023375563323497772,
-4.321560248056195e-33,
0.055085595697164536,
-0.042953915894031525,
0.03903083875775337,
0.09522442519664764,
-0.026585619896650314,
-0.06820284575223923,
-0.05517849326133728,
0.08853034675121307,
-0.04140636697411537,
-0.10148511081933975,
-0.04656846821308136,
-0.086674265563488,
0.007995097897946835,
0.020094605162739754,
-0.11774850636720657,
0.03866045922040939,
-0.11020752787590027,
-0.1058349460363388,
-0.07230861485004425,
0.02148047648370266,
-0.001306538819335401,
-0.013207445852458477,
0.07575621455907822,
0.018000444397330284,
0.006135615054517984,
-0.03982878848910332,
0.033638760447502136,
0.055558156222105026,
0.08204913884401321,
-0.08565817028284073,
0.012167618609964848,
-0.05418381094932556,
0.018302010372281075,
0.01446275133639574,
0.047862470149993896,
0.011311784386634827,
-0.016599267721176147,
0.0890793651342392,
-0.02768593095242977,
0.03306462615728378,
0.05232055112719536,
-0.05112641677260399,
-0.0646275207400322,
0.009717629291117191,
0.0169061291962862,
-0.008641151711344719,
0.04136422276496887,
0.045970674604177475,
0.030429653823375702,
-0.10875889658927917,
0.057519279420375824,
-0.06566300988197327,
-0.07554592937231064,
-0.006700551602989435,
-0.02233942225575447,
0.0035769944079220295,
0.04592795670032501,
0.057178471237421036,
-0.030802035704255104,
-0.0038780325558036566,
0.08411239087581635,
0.00623405771329999,
0.03389786183834076,
0.026756811887025833,
0.0010314795654267073,
-0.02115178480744362,
0.04978854954242706,
0.009759579785168171,
-0.001919239410199225,
0.02484005130827427,
0.05483969673514366,
-0.006222682539373636,
0.04430098831653595,
-0.02635739929974079,
0.006494259461760521,
-0.09789569675922394,
-0.06482143700122833,
-0.05733799934387207,
0.034619804471731186,
0.010148518718779087,
-0.09370272606611252,
0.04913535714149475,
-0.012963621877133846,
0.01379895769059658,
0.04086213558912277,
0.05954134836792946,
0.07575474679470062,
0.11214520782232285,
0.03226126357913017,
0.051443301141262054,
-0.040785036981105804,
0.009845796041190624,
-0.009944334626197815,
0.053560152649879456,
-0.09635316580533981,
-5.22096854638221e-8,
0.029616642743349075,
0.03183687850832939,
0.0366918109357357,
0.08961072564125061,
0.06113994121551514,
-0.017181547358632088,
-0.020827777683734894,
-0.0033689928241074085,
-0.003953918814659119,
0.01623961143195629,
-0.021139685064554214,
0.056042809039354324,
-0.03674299269914627,
0.04990463703870773,
0.060787707567214966,
-0.04434211924672127,
0.028531398624181747,
0.0043411566875875,
0.0037550837732851505,
-0.03763565793633461,
-0.10853013396263123,
-0.0016735541867092252,
0.03131886199116707,
0.005386692937463522,
-0.028188005089759827,
0.05850490182638168,
0.0303710475564003,
-0.00881282053887844,
0.05777321383357048,
-0.00923307053744793,
0.022885413840413094,
-0.002214894164353609,
0.008607051335275173,
0.0789545327425003,
0.004083549603819847,
-0.024702372029423714,
-0.12804818153381348,
0.031145595014095306,
-0.0027913388330489397,
0.016178138554096222,
-0.007569463457912207,
-0.04895300790667534,
-0.10269772261381149,
0.013415430672466755,
-0.04146115481853485,
-0.016508614644408226,
-0.017340930178761482,
-0.040450673550367355,
-0.05471093952655792,
0.042391207069158554,
-0.015031221322715282,
-0.05682256072759628,
-0.014558599330484867,
0.02822461724281311,
-0.06453460454940796,
0.0015086415223777294,
0.0013274488737806678,
-0.05999337136745453,
0.030828556045889854,
0.032373394817113876,
0.052397072315216064,
-0.02719692327082157,
0.0576799102127552,
-0.058290161192417145
] | 0.127347
|
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. ## Writing programs for Replication Pods 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. ## Responsibilities of the ReplicationController The 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. The 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)). The 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. ## API Object Replication controller is a top-level resource in the Kubernetes REST API. More details about the API object can be found at: [ReplicationController API object](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#replicationcontroller-v1-core). ## Alternatives to ReplicationController ### ReplicaSet [`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). It's mainly used by [Deployment](/docs/concepts/workloads/controllers/deployment/) as a mechanism to orchestrate pod creation, deletion and updates. Note that we recommend using Deployments instead of directly using Replica Sets, unless you require custom update orchestration or don't require updates at all. ### Deployment (Recommended) [`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. ### Bare Pods Unlike 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
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/replicationcontroller.md
|
[
-0.044892314821481705,
-0.04523729905486107,
-0.0459325835108757,
0.018406741321086884,
-0.06659625470638275,
-0.03230834752321243,
-0.005604699719697237,
-0.017358604818582535,
0.020278912037611008,
0.0991266518831253,
-0.014435661025345325,
0.12007994204759598,
0.04487346112728119,
-0.013146745041012764,
0.044082991778850555,
-0.07825467735528946,
0.1410580277442932,
-0.04423576593399048,
-0.028031321242451668,
-0.015589888207614422,
0.007190406788140535,
-0.030539091676473618,
0.007753506302833557,
0.06776349991559982,
-0.08882433921098709,
-0.047067008912563324,
-0.0326685793697834,
-0.06370919942855835,
-0.007742226589471102,
-0.05017635598778725,
-0.017711302265524864,
-0.014644429087638855,
0.00929913017898798,
0.011760594323277473,
0.047512248158454895,
-0.009407342411577702,
0.05760105699300766,
-0.054635774344205856,
-0.04697853699326515,
-0.0169077105820179,
0.03577309474349022,
-0.08502063900232315,
-0.1223987489938736,
0.02607725001871586,
-0.024126309901475906,
0.033475130796432495,
-0.007418118417263031,
0.033087313175201416,
-0.02379605546593666,
0.006510096602141857,
0.023077433928847313,
-0.046987973153591156,
0.03347999230027199,
0.061430200934410095,
0.06798356026411057,
0.015681006014347076,
0.07285156100988388,
-0.008468551561236382,
0.0704054981470108,
0.03785667568445206,
0.06303203105926514,
0.04155654460191727,
0.0052756937220692635,
0.010631940327584743,
0.06262020021677017,
-0.059485696256160736,
0.05948977917432785,
0.05974849313497543,
0.09080817550420761,
-0.0124594047665596,
0.010972273536026478,
-0.03563361614942551,
-0.01840203069150448,
0.006170033942908049,
-0.022574787959456444,
-0.04750567302107811,
-0.0437578409910202,
-0.025768205523490906,
-0.030854105949401855,
0.025442633777856827,
-0.04674439877271652,
0.00891350768506527,
0.05281265452504158,
0.007148782256990671,
-0.07165592908859253,
-0.01908230595290661,
-0.015983957797288895,
-0.012148041278123856,
0.13560493290424347,
-0.058594685047864914,
0.027621854096651077,
0.0661190003156662,
0.044527944177389145,
-0.14366595447063446,
0.01378531102091074,
-0.0669427216053009,
0.08340155333280563,
-0.0022410638630390167,
0.011426650919020176,
-0.013612544164061546,
0.038202833384275436,
-0.046942707151174545,
0.09212630987167358,
0.01155195850878954,
0.08902398496866226,
-0.058946289122104645,
-0.04882882162928581,
-0.030557241290807724,
0.025378696620464325,
0.037189699709415436,
-0.0019778942223638296,
-0.008731014095246792,
0.008707893081009388,
0.08024132251739502,
0.04279275983572006,
0.07387866824865341,
0.024535873904824257,
-0.006567147094756365,
-0.04227074235677719,
0.09151679277420044,
0.06979094445705414,
-0.07763315737247467,
0.04286753013730049,
-0.007715884130448103,
-0.041130244731903076,
0.042770568281412125,
-0.017938947305083275,
4.8907937547838724e-33,
0.023331237956881523,
-0.04048847407102585,
0.007239405531436205,
0.007215521764010191,
0.0985792949795723,
0.00443080672994256,
0.007444353308528662,
-0.02400905266404152,
-0.016637912020087242,
-0.055870603770017624,
-0.009061360731720924,
0.06805436313152313,
-0.008469820022583008,
0.08771208673715591,
0.0022961311042308807,
-0.03942348062992096,
-0.07544279843568802,
0.08225050568580627,
0.10176612436771393,
-0.0003579002805054188,
0.033090367913246155,
0.01685296930372715,
-0.06425604224205017,
0.05043703317642212,
0.07578137516975403,
-0.01752421073615551,
-0.01990010216832161,
-0.08972211182117462,
0.00004745609840028919,
0.023956719785928726,
-0.005187029950320721,
0.002746846992522478,
-0.06093483790755272,
0.04403400048613548,
-0.08218366652727127,
-0.011398124508559704,
-0.05983814224600792,
-0.0307318065315485,
-0.04842226579785347,
-0.0709204450249672,
-0.028111014515161514,
-0.02042347937822342,
-0.009482447057962418,
-0.06465255469083786,
0.010333476588129997,
-0.017844723537564278,
0.0666837990283966,
-0.03833138942718506,
-0.03812401741743088,
-0.03225313127040863,
0.05204419419169426,
0.004739453084766865,
0.041689708828926086,
-0.052709925919771194,
0.030179457738995552,
-0.016627617180347443,
0.09127478301525116,
-0.04691251739859581,
-0.012157793156802654,
-0.0020084066782146692,
-0.04375593736767769,
-0.07789179682731628,
-0.047900062054395676,
0.03761546313762665,
0.06619083136320114,
0.04938836768269539,
0.002390257315710187,
-0.04891883209347725,
0.08202361315488815,
0.056020304560661316,
-0.013031351380050182,
0.006432168185710907,
-0.01859300211071968,
-0.044396113604307175,
-0.0036483933217823505,
-0.044642847031354904,
-0.009782829321920872,
0.02241336740553379,
-0.14937414228916168,
0.050382841378450394,
-0.022358817979693413,
0.04501115903258324,
-0.14339186251163483,
0.016174687072634697,
-0.025793910026550293,
-0.0530191995203495,
0.059041451662778854,
0.0443488284945488,
-0.08739040791988373,
0.011254978366196156,
0.05811409652233124,
-0.020399054512381554,
0.03019586019217968,
0.029085971415042877,
0.007617787458002567,
-4.3104566018867246e-33,
-0.007859408855438232,
-0.08696551620960236,
0.004820125177502632,
0.10396415740251541,
-0.003101838519796729,
-0.03738066926598549,
-0.05866151675581932,
-0.004408557433634996,
0.00322127528488636,
-0.09267956763505936,
-0.11261357367038727,
-0.10562510788440704,
-0.02399643138051033,
0.06368951499462128,
-0.09176896512508392,
0.00909637100994587,
-0.03470737114548683,
-0.0896378755569458,
-0.02291727066040039,
0.01703771762549877,
-0.017298031598329544,
0.020190345123410225,
0.038138773292303085,
0.005894819274544716,
0.07165931165218353,
-0.01689419150352478,
-0.047602757811546326,
-0.018671289086341858,
0.04921954125165939,
-0.07548397034406662,
-0.03782312944531441,
-0.0889359712600708,
0.00035399349872022867,
-0.010798497125506401,
-0.035026296973228455,
0.009414661675691605,
-0.02229958400130272,
0.14750438928604126,
0.006003532558679581,
-0.04536733031272888,
0.12403260916471481,
-0.04604877158999443,
-0.07807780802249908,
0.009838838130235672,
0.013004030101001263,
0.024123169481754303,
-0.04580520838499069,
0.01181838009506464,
-0.047548454254865646,
-0.024594107642769814,
-0.008320271968841553,
-0.04811803996562958,
-0.03118153102695942,
0.031982775777578354,
-0.005633614957332611,
-0.008092926815152168,
0.03329886496067047,
0.12560327351093292,
-0.04489157348871231,
0.020611749961972237,
0.06738433241844177,
-0.03981223702430725,
0.03932563588023186,
0.045663151890039444,
-0.05152030661702156,
-0.012354977428913116,
0.08171170949935913,
0.04668085649609566,
0.04628555849194527,
-0.019237935543060303,
0.09534960985183716,
0.015741249546408653,
0.0465669147670269,
0.02028937265276909,
0.018671950325369835,
-0.01158886682242155,
-0.020219553261995316,
-0.07348769158124924,
-0.012309081852436066,
0.01010154839605093,
-0.14323607087135315,
0.04074516147375107,
-0.0417703352868557,
0.08854763954877853,
-0.030872393399477005,
0.02592824399471283,
0.09786573797464371,
0.09334903210401535,
0.047316763550043106,
0.018258128315210342,
-0.006980090402066708,
-0.028800252825021744,
-0.10511516034603119,
0.0656292587518692,
-0.06319364160299301,
-5.3619466200416355e-8,
0.03206818550825119,
-0.00920194573700428,
0.043543491512537,
0.05584819242358208,
0.027432730421423912,
-0.023057298734784126,
0.08771990984678268,
-0.02287258766591549,
0.026400184258818626,
0.10993766784667969,
0.02464490383863449,
0.0015825849259272218,
-0.017489735037088394,
-0.0068907709792256355,
0.08626200258731842,
0.031115787103772163,
0.0490814633667469,
-0.020100420340895653,
-0.056249164044857025,
-0.026529809460043907,
-0.02828117646276951,
-0.01341166626662016,
-0.008184035308659077,
0.06317654997110367,
-0.06736280769109726,
0.06378235667943954,
0.06740275770425797,
-0.043716732412576675,
0.02485348843038082,
0.023683292791247368,
-0.003666679374873638,
-0.01076971460133791,
-0.009187737479805946,
0.052166130393743515,
-0.02659197896718979,
-0.059340137988328934,
-0.06073766574263573,
-0.02673329785466194,
0.005865645594894886,
0.020037047564983368,
-0.018575411289930344,
-0.007265404798090458,
-0.03569367527961731,
0.010928253643214703,
0.04638192802667618,
0.019232124090194702,
-0.06772424280643463,
-0.033546049147844315,
-0.014676685445010662,
-0.012931144796311855,
-0.011185537092387676,
-0.025165047496557236,
0.05596429854631424,
0.05313180759549141,
-0.022760169580578804,
0.04461319372057915,
0.061611372977495193,
-0.049430008977651596,
0.0778433308005333,
0.07185675203800201,
0.031519826501607895,
0.03481750935316086,
0.033342983573675156,
-0.029431220144033432
] | 0.18914
|
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. ### Job Use a [`Job`](/docs/concepts/workloads/controllers/job/) instead of a ReplicationController for pods that are expected to terminate on their own (that is, batch jobs). ### DaemonSet Use a [`DaemonSet`](/docs/concepts/workloads/controllers/daemonset/) instead of a ReplicationController for pods that provide a machine-level function, such as machine monitoring or machine logging. These pods have a lifetime that is tied to a machine lifetime: the pod needs to be running on the machine before other pods start, and are safe to terminate when the machine is otherwise ready to be rebooted/shutdown. ## {{% heading "whatsnext" %}} \* Learn about [Pods](/docs/concepts/workloads/pods). \* Learn about [Deployment](/docs/concepts/workloads/controllers/deployment/), the replacement for ReplicationController. \* `ReplicationController` is part of the Kubernetes REST API. Read the {{< api-reference page="workload-resources/replication-controller-v1" >}} object definition to understand the API for replication controllers.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/workloads/controllers/replicationcontroller.md
|
[
-0.04184868931770325,
-0.04547989368438721,
-0.019685173407197,
-0.01981152966618538,
0.039412952959537506,
-0.025982871651649475,
-0.0721091628074646,
0.029812196269631386,
0.010876094922423363,
0.07657098770141602,
0.014001447707414627,
0.09597110748291016,
0.0004039518826175481,
-0.047625117003917694,
0.014394945465028286,
-0.0015225722454488277,
0.09687994420528412,
0.01725911535322666,
0.0025981783401221037,
-0.01607382483780384,
-0.016059743240475655,
0.008935157209634781,
0.0326400026679039,
0.07529160380363464,
-0.07716864347457886,
-0.03194069117307663,
-0.04868539795279503,
-0.09205258637666702,
-0.020682182163000107,
-0.0195542573928833,
-0.030063822865486145,
0.004792265128344297,
-0.01493125967681408,
0.007056787144392729,
0.050191350281238556,
0.06302843242883682,
0.06765587627887726,
-0.06910255551338196,
-0.06373988091945648,
-0.03782234340906143,
0.0812913104891777,
-0.04785856604576111,
-0.10734998434782028,
0.03136828541755676,
-0.03036043606698513,
0.01969926804304123,
-0.043418463319540024,
-0.027284907177090645,
0.011891517788171768,
-0.026056207716464996,
0.016101501882076263,
-0.06273533403873444,
0.07402216643095016,
0.025376038625836372,
0.059377532452344894,
-0.0058654192835092545,
0.038698259741067886,
-0.01729642041027546,
0.11894330382347107,
0.0788794681429863,
0.05725683644413948,
0.04158317670226097,
-0.038252294063568115,
-0.028187302872538567,
0.090871162712574,
-0.08218389004468918,
0.008346104994416237,
0.03331270068883896,
0.07106833904981613,
0.008373390883207321,
0.030066125094890594,
-0.013251092284917831,
0.004037213046103716,
-0.026372922584414482,
-0.06611810624599457,
-0.034052833914756775,
0.00038751086685806513,
-0.041416071355342865,
-0.029451923444867134,
0.010634505189955235,
-0.04935760051012039,
-0.01556728221476078,
0.048605408519506454,
-0.03779328987002373,
-0.08247465640306473,
-0.02704189345240593,
-0.01122997421771288,
-0.03441070392727852,
0.07385709136724472,
-0.01877616159617901,
0.05287220701575279,
0.025341177359223366,
0.09180114418268204,
-0.11693631112575531,
0.001948294579051435,
-0.017784569412469864,
0.023568090051412582,
0.015515600331127644,
0.028980256989598274,
0.014355985447764397,
0.024428799748420715,
-0.03961563482880592,
0.032559867948293686,
-0.0029689723160117865,
0.07408679276704788,
-0.057029422372579575,
-0.060702428221702576,
-0.014804448001086712,
-0.0010599220404401422,
0.004133747424930334,
-0.00012916627747472376,
0.019675862044095993,
-0.028848739340901375,
0.08747843652963638,
0.0440065898001194,
0.021629856899380684,
-0.006755894050002098,
0.030009828507900238,
-0.0353616438806057,
0.07499971240758896,
0.056983038783073425,
-0.034188322722911835,
0.044370464980602264,
0.02845020219683647,
-0.07545040547847748,
0.008458957076072693,
-0.011985087767243385,
3.709369769645656e-33,
0.03438759222626686,
-0.03934232145547867,
-0.013631900772452354,
0.04020855948328972,
0.08531999588012695,
0.0009354435605928302,
-0.020959816873073578,
-0.004341559950262308,
-0.0031105519738048315,
-0.02692127786576748,
-0.034021709114313126,
0.02571791596710682,
-0.010223012417554855,
0.03987659886479378,
0.0008228585356846452,
-0.09981238096952438,
-0.09515111893415451,
0.07134829461574554,
0.1045316830277443,
0.01577046513557434,
0.07740926742553711,
-0.02338576503098011,
-0.07438276708126068,
0.0684887170791626,
0.0760476365685463,
-0.027405375614762306,
0.03690609708428383,
-0.0754161849617958,
0.025081921368837357,
0.023945113644003868,
-0.04813090339303017,
0.02847743034362793,
-0.017345275729894638,
0.03932533785700798,
-0.14653202891349792,
-0.030776016414165497,
-0.02158355712890625,
-0.05717909336090088,
-0.1065320372581482,
-0.08910468220710754,
-0.04918282479047775,
-0.007265639957040548,
-0.06620248407125473,
-0.0841912105679512,
0.0644591748714447,
-0.021955644711852074,
0.05187900364398956,
-0.04692285507917404,
0.016364548355340958,
-0.02312425523996353,
0.006766985636204481,
-0.04158766567707062,
0.051347292959690094,
-0.06693077832460403,
0.007487374823540449,
-0.019203785806894302,
0.08876070380210876,
-0.07953688502311707,
0.010100966319441795,
-0.02998802438378334,
-0.025312041863799095,
-0.055698029696941376,
-0.011123234406113625,
0.0013421702897176147,
0.024426795542240143,
0.07611190527677536,
0.01967621222138405,
-0.02596374787390232,
0.068783238530159,
0.10191512107849121,
-0.05994802713394165,
0.05880577117204666,
-0.016281919553875923,
-0.029603641480207443,
-0.007449586410075426,
-0.05921986326575279,
-0.034519847482442856,
0.031119655817747116,
-0.14706721901893616,
0.07688533514738083,
0.031021468341350555,
-0.003307825420051813,
-0.14922046661376953,
0.06847383826971054,
0.04691072925925255,
-0.022350866347551346,
-0.0065483772195875645,
0.04644326865673065,
-0.07736736536026001,
0.04794606193900108,
0.040275152772665024,
-0.02429061196744442,
0.005205429624766111,
0.02131042443215847,
-0.0628112331032753,
-4.408997191290203e-33,
0.09108187258243561,
-0.05196109414100647,
0.031187981367111206,
0.05589890480041504,
0.00979805737733841,
-0.032479409128427505,
-0.05098038539290428,
0.03407356142997742,
-0.03975286707282066,
-0.09824889153242111,
-0.06913907080888748,
-0.0980108454823494,
0.029017150402069092,
0.03345760703086853,
-0.11140982061624527,
-0.017926733940839767,
-0.0659828782081604,
-0.09921272099018097,
-0.0189654640853405,
0.009385273791849613,
-0.066796213388443,
0.011135058477520943,
0.04015754535794258,
0.045253537595272064,
0.026059303432703018,
-0.013431954197585583,
-0.08123422414064407,
0.04137605428695679,
-0.0287824347615242,
-0.05955608934164047,
0.023299435153603554,
-0.0926826000213623,
0.06337568163871765,
0.004732155241072178,
0.017169825732707977,
0.04789651930332184,
-0.01081462949514389,
0.10943184047937393,
0.0021249549463391304,
-0.016229625791311264,
0.12040559202432632,
-0.03579334542155266,
-0.027179108932614326,
0.014809765852987766,
-0.029734687879681587,
0.005621112417429686,
-0.012680449523031712,
0.04463239014148712,
0.014990215189754963,
-0.0614168681204319,
-0.029500331729650497,
-0.047224078327417374,
-0.05018840357661247,
0.02750922180712223,
-0.027757899835705757,
-0.05977149307727814,
0.03258434310555458,
0.08347530663013458,
-0.048468638211488724,
0.06574255228042603,
0.06814002990722656,
-0.0688147246837616,
0.06040484458208084,
0.047668423503637314,
-0.04016145318746567,
-0.06097505986690521,
0.06128118932247162,
0.06374718993902206,
0.04970478266477585,
0.0485006645321846,
0.0782836452126503,
0.03701769560575485,
0.04503142461180687,
0.05764837935566902,
-0.045200906693935394,
-0.021064355969429016,
-0.009787359274923801,
-0.11301839351654053,
0.035632211714982986,
0.015835057944059372,
-0.14414437115192413,
0.05210451781749725,
-0.02525986172258854,
0.08500895649194717,
0.020887000486254692,
0.03586861491203308,
0.1018325611948967,
0.07876713573932648,
0.10240824520587921,
-0.0019116075709462166,
-0.021832512691617012,
-0.014399763196706772,
-0.054760973900556564,
0.057900507003068924,
-0.05938556045293808,
-5.5945776011867565e-8,
0.06781578063964844,
0.019107962027192116,
0.049301255494356155,
0.054673418402671814,
0.027288833633065224,
0.010229992680251598,
0.0695839673280716,
-0.001217435346916318,
-0.008660746738314629,
0.0655873715877533,
-0.019603781402111053,
0.04434977471828461,
-0.08304198831319809,
0.020260460674762726,
0.05747491866350174,
-0.04288744926452637,
0.04451315850019455,
0.018475888296961784,
0.00834508053958416,
-0.028833376243710518,
-0.07905770093202591,
-0.03383976221084595,
0.00906808115541935,
0.022384917363524437,
-0.06828203052282333,
0.07640457153320312,
0.068729929625988,
0.025566739961504936,
0.03502214327454567,
-0.029122840613126755,
0.009752233512699604,
0.008816678076982498,
-0.04555224999785423,
0.0842505544424057,
-0.025382831692695618,
-0.0008756110910326242,
-0.0957021564245224,
-0.009424371644854546,
0.008041095919907093,
-0.0025424601044505835,
-0.003956520464271307,
-0.014479711651802063,
-0.048307593911886215,
0.008039821870625019,
0.00004122685277252458,
0.027362782508134842,
-0.04276512563228607,
-0.01691471040248871,
-0.01567789353430271,
0.037944864481687546,
0.0014772098511457443,
-0.037499018013477325,
0.026500608772039413,
0.0545017272233963,
-0.0029822573997080326,
0.0022939692717045546,
0.005307052284479141,
-0.05998164415359497,
0.03840870037674904,
0.02547929808497429,
0.06705385446548462,
-0.016669584438204765,
0.025373520329594612,
-0.011525742709636688
] | 0.189583
|
{{< feature-state state="beta" for\_k8s\_version="v1.11" >}} Cloud infrastructure technologies let you run Kubernetes on public, private, and hybrid clouds. Kubernetes believes in automated, API-driven infrastructure without tight coupling between components. {{< glossary\_definition term\_id="cloud-controller-manager" length="all" prepend="The cloud-controller-manager is">}} The cloud-controller-manager is structured using a plugin mechanism that allows different cloud providers to integrate their platforms with Kubernetes. ## Design  The cloud controller manager runs in the control plane as a replicated set of processes (usually, these are containers in Pods). Each cloud-controller-manager implements multiple {{< glossary\_tooltip text="controllers" term\_id="controller" >}} in a single process. {{< note >}} You can also run the cloud controller manager as a Kubernetes {{< glossary\_tooltip text="addon" term\_id="addons" >}} rather than as part of the control plane. {{< /note >}} ## Cloud controller manager functions {#functions-of-the-ccm} The controllers inside the cloud controller manager include: ### Node controller The node controller is responsible for updating {{< glossary\_tooltip text="Node" term\_id="node" >}} objects when new servers are created in your cloud infrastructure. The node controller obtains information about the hosts running inside your tenancy with the cloud provider. The node controller performs the following functions: 1. Update a Node object with the corresponding server's unique identifier obtained from the cloud provider API. 1. Annotating and labelling the Node object with cloud-specific information, such as the region the node is deployed into and the resources (CPU, memory, etc) that it has available. 1. Obtain the node's hostname and network addresses. 1. Verifying the node's health. In case a node becomes unresponsive, this controller checks with your cloud provider's API to see if the server has been deactivated / deleted / terminated. If the node has been deleted from the cloud, the controller deletes the Node object from your Kubernetes cluster. Some cloud provider implementations split this into a node controller and a separate node lifecycle controller. ### Route controller The route controller is responsible for configuring routes in the cloud appropriately so that containers on different nodes in your Kubernetes cluster can communicate with each other. Depending on the cloud provider, the route controller might also allocate blocks of IP addresses for the Pod network. ### Service controller {{< glossary\_tooltip text="Services" term\_id="service" >}} integrate with cloud infrastructure components such as managed load balancers, IP addresses, network packet filtering, and target health checking. The service controller interacts with your cloud provider's APIs to set up load balancers and other infrastructure components when you declare a Service resource that requires them. ## Authorization This section breaks down the access that the cloud controller manager requires on various API objects, in order to perform its operations. ### Node controller {#authorization-node-controller} The Node controller only works with Node objects. It requires full access to read and modify Node objects. `v1/Node`: - get - list - create - update - patch - watch - delete ### Route controller {#authorization-route-controller} The route controller listens to Node object creation and configures routes appropriately. It requires Get access to Node objects. `v1/Node`: - get ### Service controller {#authorization-service-controller} The service controller watches for Service object \*\*create\*\*, \*\*update\*\* and \*\*delete\*\* events and then configures load balancers for those Services appropriately. To access Services, it requires \*\*list\*\*, and \*\*watch\*\* access. To update Services, it requires \*\*patch\*\* and \*\*update\*\* access to the `status` subresource. `v1/Service`: - list - get - watch - patch - update ### Others {#authorization-miscellaneous} The implementation of the core of the cloud controller manager requires access to create Event objects, and to ensure secure operation, it requires access to create ServiceAccounts. `v1/Event`: - create - patch - update `v1/ServiceAccount`: - create The {{< glossary\_tooltip term\_id="rbac" text="RBAC" >}} ClusterRole
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/architecture/cloud-controller.md
|
[
-0.05804014205932617,
-0.0009840951533988118,
0.02708897925913334,
0.020361917093396187,
-0.009663745760917664,
0.00197623367421329,
0.026260778307914734,
-0.03501560539007187,
0.05977262556552887,
0.0708349347114563,
0.0190593134611845,
-0.04115000739693642,
0.00155001156963408,
-0.051736317574977875,
0.039261944591999054,
0.05380524322390556,
0.06221700832247734,
-0.05009180307388306,
-0.06580840796232224,
-0.036219801753759384,
0.025425398722290993,
0.03835170716047287,
0.006192558445036411,
0.016393564641475677,
-0.10098683834075928,
0.04317774996161461,
-0.048660021275281906,
-0.022388998419046402,
0.02905702218413353,
0.013158167712390423,
-0.01062852144241333,
-0.04329444468021393,
-0.08032146841287613,
0.0835188552737236,
0.0259174183011055,
0.0604596771299839,
-0.004139740485697985,
-0.04864821210503578,
-0.07584565132856369,
-0.003041128860786557,
0.0640682727098465,
-0.06156707927584648,
-0.12249784171581268,
-0.07823198288679123,
0.027252700179815292,
0.0474197119474411,
-0.06610152125358582,
-0.055688075721263885,
0.0062802438624203205,
-0.037010256201028824,
0.00622232211753726,
-0.15387602150440216,
0.026034794747829437,
0.027723463252186775,
0.03674347326159477,
-0.0006420316058211029,
-0.03738978132605553,
0.029046058654785156,
0.09082784503698349,
0.00834396481513977,
0.018408367410302162,
-0.0021955305710434914,
0.011163609102368355,
0.02225601300597191,
0.013225206173956394,
-0.02716939151287079,
0.025149451568722725,
0.03245138004422188,
0.0005070766201242805,
-0.05598470941185951,
0.04670459404587746,
-0.041502445936203,
-0.02000197023153305,
-0.02047361619770527,
0.00662424648180604,
-0.056702375411987305,
-0.06840407103300095,
0.0628010481595993,
0.022766314446926117,
-0.07837383449077606,
0.055150244385004044,
0.07664855569601059,
0.0711599588394165,
0.07274957746267319,
-0.0996323823928833,
-0.029408540576696396,
-0.007504324894398451,
-0.03553587570786476,
0.06016227602958679,
-0.007420103065669537,
0.013868450187146664,
-0.07990095019340515,
0.09532849490642548,
-0.08538419008255005,
0.026203949004411697,
0.0019774821121245623,
-0.00033995311241596937,
-0.022875096648931503,
0.014899621717631817,
0.01601564697921276,
-0.016940541565418243,
0.01279410533607006,
0.06102302297949791,
-0.010347176343202591,
0.058691415935754776,
-0.009192075580358505,
-0.10014695674180984,
-0.0018013982335105538,
-0.0022524164523929358,
-0.010485101491212845,
-0.006448584143072367,
0.06265953183174133,
-0.040266528725624084,
0.033879347145557404,
0.031150907278060913,
-0.07113685458898544,
-0.01622707210481167,
-0.015415622852742672,
0.07854145765304565,
0.10187461227178574,
0.010857118293642998,
-0.12465111166238785,
0.018017880618572235,
0.021597150713205338,
-0.03822403401136398,
0.07773376256227493,
-0.09134950488805771,
4.6988777716228255e-33,
0.06610198318958282,
-0.06196696683764458,
-0.008906994014978409,
-0.005359495524317026,
0.02429761178791523,
-0.06796254217624664,
-0.010637015104293823,
-0.02336689457297325,
-0.04976917430758476,
0.031091799959540367,
-0.03391522914171219,
0.0827447697520256,
-0.029459411278367043,
0.023721633478999138,
0.047010958194732666,
-0.02871069125831127,
-0.06049581244587898,
0.06413745880126953,
0.08782785385847092,
-0.039656974375247955,
0.009637140668928623,
0.006283769849687815,
-0.010405930690467358,
-0.04482582211494446,
0.10349725186824799,
-0.014683982357382774,
0.010178702883422375,
-0.03160741925239563,
0.00953685399144888,
-0.004062984138727188,
0.010210146196186543,
0.011031017638742924,
0.026143008843064308,
0.031359024345874786,
-0.11385748535394669,
-0.024340035393834114,
-0.0671481192111969,
-0.02336740866303444,
-0.07016092538833618,
0.017898302525281906,
-0.0025040158070623875,
-0.07418578863143921,
-0.04699622467160225,
-0.08290649205446243,
-0.020382355898618698,
0.026032619178295135,
0.04372015222907066,
-0.09820556640625,
0.10941323637962341,
-0.025607379153370857,
-0.027976974844932556,
-0.012392777018249035,
0.033702872693538666,
-0.007306679617613554,
0.0859348326921463,
0.0016437160084024072,
0.0780564546585083,
-0.06297885626554489,
0.01147523894906044,
-0.03297704830765724,
-0.11391271650791168,
-0.010477007366716862,
-0.032098058611154556,
0.020718054845929146,
0.019498378038406372,
-0.027010973542928696,
-0.029868660494685173,
0.06941155344247818,
0.007125121541321278,
-0.050453636795282364,
-0.0670628696680069,
0.015961069613695145,
0.011749290861189365,
-0.010283158160746098,
0.08477950841188431,
-0.13752765953540802,
-0.03435209393501282,
0.012485390529036522,
-0.11517266929149628,
0.053896497935056686,
-0.013850986026227474,
-0.028330320492386818,
-0.0415419340133667,
0.1016409620642662,
-0.0019134980393573642,
-0.03259669244289398,
0.045718997716903687,
-0.007064437493681908,
-0.029124954715371132,
0.011511656455695629,
-0.056265950202941895,
-0.08592935651540756,
-0.01579408347606659,
-0.017172612249851227,
-0.08971266448497772,
-6.098100288817273e-33,
0.10175809264183044,
-0.0564655177295208,
-0.006886337883770466,
0.03179362043738365,
0.03554162010550499,
0.009831028059124947,
0.02687854692339897,
0.05526662990450859,
-0.044865842908620834,
-0.05379185453057289,
-0.0026343802455812693,
0.027185823768377304,
0.04564668610692024,
0.05494461581110954,
-0.05739403888583183,
0.05518637225031853,
-0.08960551768541336,
-0.047598257660865784,
-0.0013682610588148236,
-0.0240638367831707,
0.006120510399341583,
-0.03872597590088844,
0.07991798967123032,
0.012446029111742973,
-0.0345488004386425,
-0.033406324684619904,
0.05665897578001022,
0.04962245747447014,
0.023667367175221443,
-0.015308382920920849,
-0.02082614041864872,
-0.05277162045240402,
0.014602858573198318,
0.025343816727399826,
-0.02125796116888523,
-0.04490882158279419,
-0.006286241114139557,
0.010764638893306255,
-0.028076164424419403,
-0.0089472820982337,
0.030524134635925293,
-0.07441350817680359,
-0.021471528336405754,
-0.08528176695108414,
-0.004492107313126326,
0.07627827674150467,
0.013362019322812557,
0.003818914759904146,
-0.07356089353561401,
-0.11943139135837555,
0.014949941076338291,
0.010395826771855354,
-0.10650347173213959,
0.04441124573349953,
-0.051298338919878006,
0.0002258242602692917,
0.09455537796020508,
0.03142307326197624,
-0.052165865898132324,
-0.006945620756596327,
0.07083892822265625,
-0.13328558206558228,
0.07943844795227051,
0.05261944234371185,
0.0037527389358729124,
-0.0068498337641358376,
-0.016963815316557884,
0.023009710013866425,
-0.005901999305933714,
0.008211106061935425,
-0.063583143055439,
-0.05896266549825668,
0.060594022274017334,
-0.006356530822813511,
0.03857579827308655,
-0.06762601435184479,
0.034978531301021576,
-0.08049005270004272,
0.08959908038377762,
-0.053506046533584595,
-0.02428659051656723,
0.029053911566734314,
-0.003998918924480677,
0.0213882215321064,
0.029596559703350067,
0.03659330680966377,
0.07425655424594879,
0.10906418412923813,
0.04407300427556038,
0.058205343782901764,
-0.012261326424777508,
0.034521572291851044,
0.043849918991327286,
0.17000934481620789,
-0.011304277926683426,
-5.632455923887392e-8,
0.020496265962719917,
0.11635347455739975,
-0.0084835859015584,
0.011704613454639912,
-0.006836061365902424,
-0.009596635587513447,
0.06871764361858368,
-0.027477119117975235,
-0.04980916529893875,
-0.01032689306885004,
-0.015490317717194557,
0.08133599907159805,
-0.0571950264275074,
0.0324711948633194,
0.04867633432149887,
0.019918356090784073,
-0.046773761510849,
0.04942052811384201,
0.04701109230518341,
-0.06050197780132294,
-0.006665279157459736,
0.014993385411798954,
0.015949992462992668,
0.027694841846823692,
0.03170882165431976,
0.09687007963657379,
0.030982527881860733,
0.023907743394374847,
0.0016673504142090678,
0.02933673746883869,
-0.04290410876274109,
0.01338269654661417,
-0.08411944657564163,
0.09050507843494415,
0.04320510849356651,
0.019969014450907707,
-0.12146761268377304,
0.009412971325218678,
0.09602314978837967,
0.004526895936578512,
-0.017896132543683052,
-0.03664866462349892,
-0.09687860310077667,
-0.005970644298940897,
0.031922128051519394,
0.09338812530040741,
0.01337549090385437,
0.016462910920381546,
-0.0268715750426054,
0.03739980608224869,
-0.006330473348498344,
-0.015507948584854603,
-0.00011642794561339542,
0.06413392722606659,
-0.008895470760762691,
-0.04258512705564499,
0.023712994530797005,
-0.05651046335697174,
0.06308892369270325,
0.010977503843605518,
0.009467667900025845,
0.011356295086443424,
0.0404755175113678,
-0.0011748512042686343
] | 0.078652
|
patch - update ### Others {#authorization-miscellaneous} The implementation of the core of the cloud controller manager requires access to create Event objects, and to ensure secure operation, it requires access to create ServiceAccounts. `v1/Event`: - create - patch - update `v1/ServiceAccount`: - create The {{< glossary\_tooltip term\_id="rbac" text="RBAC" >}} ClusterRole for the cloud controller manager looks like: ```yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: cloud-controller-manager rules: - apiGroups: - "" resources: - events verbs: - create - patch - update - apiGroups: - "" resources: - nodes verbs: - '\*' - apiGroups: - "" resources: - nodes/status verbs: - patch - apiGroups: - "" resources: - services verbs: - list - watch - apiGroups: - "" resources: - services/status verbs: - patch - update - apiGroups: - "" resources: - serviceaccounts verbs: - create - apiGroups: - "" resources: - persistentvolumes verbs: - get - list - update - watch ``` ## {{% heading "whatsnext" %}} \* [Cloud Controller Manager Administration](/docs/tasks/administer-cluster/running-cloud-controller/#cloud-controller-manager) has instructions on running and managing the cloud controller manager. \* To upgrade a HA control plane to use the cloud controller manager, see [Migrate Replicated Control Plane To Use Cloud Controller Manager](/docs/tasks/administer-cluster/controller-manager-leader-migration/). \* Want to know how to implement your own cloud controller manager, or extend an existing project? - The cloud controller manager uses Go interfaces, specifically, `CloudProvider` interface defined in [`cloud.go`](https://github.com/kubernetes/cloud-provider/blob/release-1.21/cloud.go#L42-L69) from [kubernetes/cloud-provider](https://github.com/kubernetes/cloud-provider) to allow implementations from any cloud to be plugged in. - The implementation of the shared controllers highlighted in this document (Node, Route, and Service), and some scaffolding along with the shared cloudprovider interface, is part of the Kubernetes core. Implementations specific to cloud providers are outside the core of Kubernetes and implement the `CloudProvider` interface. - For more information about developing plugins, see [Developing Cloud Controller Manager](/docs/tasks/administer-cluster/developing-cloud-controller-manager/).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/architecture/cloud-controller.md
|
[
-0.07950537651777267,
-0.04966581240296364,
-0.038091547787189484,
0.04831565171480179,
-0.00014773222210351378,
0.03059546835720539,
0.05205905809998512,
-0.10284882038831711,
-0.0012779483804479241,
0.142672598361969,
0.0623476542532444,
-0.039511874318122864,
0.05601678043603897,
-0.033064499497413635,
0.05131715163588524,
0.06495442241430283,
0.05669920891523361,
-0.0396631695330143,
-0.09036637842655182,
-0.06446325778961182,
-0.05197789892554283,
0.06339328736066818,
-0.04045481979846954,
0.07844840735197067,
-0.09549292922019958,
-0.008188157342374325,
-0.0969800353050232,
-0.026946483179926872,
0.03284977748990059,
0.006659925449639559,
-0.0270636435598135,
-0.050818827003240585,
0.0005962295108474791,
0.04233049228787422,
0.06756005436182022,
0.021968621760606766,
0.03969958424568176,
-0.053887832909822464,
-0.026480834931135178,
0.03174259513616562,
0.08028057962656021,
-0.0060068476013839245,
-0.04716440662741661,
-0.09406851977109909,
0.009599660523235798,
0.029798636212944984,
0.012825185433030128,
-0.027781140059232712,
-0.04837867617607117,
-0.0059958454221487045,
0.09096961468458176,
-0.09269801527261734,
-0.013034483417868614,
-0.002819074084982276,
-0.026966605335474014,
-0.014226701110601425,
-0.018022283911705017,
0.051325809210538864,
0.07455411553382874,
-0.021352604031562805,
0.018335212022066116,
-0.056754760444164276,
0.01142681110650301,
-0.03662081062793732,
-0.08734436333179474,
-0.04630599543452263,
0.009623429737985134,
-0.027672769501805305,
-0.017738407477736473,
-0.019097881391644478,
0.02319524809718132,
-0.012962581589818,
-0.0015779145760461688,
-0.04716920480132103,
0.036247484385967255,
0.02946595661342144,
-0.020330607891082764,
0.053481049835681915,
0.06262187659740448,
-0.10199489444494247,
0.031235510483384132,
0.03575196862220764,
0.052842877805233,
0.10594843327999115,
-0.06985465437173843,
0.005118898581713438,
0.010392601601779461,
-0.04090185463428497,
0.08734337240457535,
0.014473285526037216,
0.04337890073657036,
0.0026430010329931974,
0.08003085106611252,
-0.09385718405246735,
-0.01301032304763794,
0.037955544888973236,
-0.027141135185956955,
-0.0033895669039338827,
-0.08246137201786041,
0.05629321187734604,
-0.03704769164323807,
-0.05080067366361618,
-0.07964383065700531,
0.030629178509116173,
0.016636697575449944,
0.021323312073946,
-0.10702989995479584,
0.025258079171180725,
-0.027797233313322067,
0.04743392765522003,
0.04462914168834686,
0.07819333672523499,
-0.053797632455825806,
-0.061291974037885666,
-0.0635385811328888,
0.03317052870988846,
0.045222070068120956,
-0.029185540974140167,
-0.0023100704420357943,
0.038370706140995026,
0.10992194712162018,
-0.04809563234448433,
0.032492075115442276,
0.0150978434830904,
-0.02960730344057083,
0.037629641592502594,
-0.016580743715167046,
1.9194235831554345e-33,
0.08730415254831314,
0.04332459717988968,
-0.04402938112616539,
0.03378063812851906,
0.08374615758657455,
-0.008996240794658661,
0.0023795415181666613,
-0.04319985955953598,
0.028802821412682533,
-0.03198430314660072,
-0.04607418179512024,
0.07119389623403549,
0.005006615072488785,
-0.02911229059100151,
-0.0032157471869140863,
0.013422648422420025,
0.0011877263896167278,
0.05618470907211304,
0.046127039939165115,
0.01729113608598709,
0.01883205771446228,
0.026257509365677834,
0.009867899119853973,
-0.059365853667259216,
0.019292330369353294,
0.03132348135113716,
-0.012285484001040459,
-0.08604485541582108,
0.09759363532066345,
0.012266888283193111,
0.038110628724098206,
0.027175666764378548,
0.04608258232474327,
-0.023936346173286438,
-0.03959497809410095,
-0.03641057386994362,
-0.04192085564136505,
-0.03491484001278877,
-0.0629771500825882,
-0.05257761478424072,
0.04579751193523407,
-0.01885794661939144,
-0.0765247792005539,
-0.09257868677377701,
0.06396780163049698,
-0.050255946815013885,
-0.0020392732694745064,
-0.03590816631913185,
0.10176663100719452,
-0.0094682015478611,
-0.03813675791025162,
0.005722695495933294,
0.01616388000547886,
-0.08267626911401749,
0.04292125999927521,
-0.029083769768476486,
0.05472264811396599,
-0.014056810177862644,
0.0060275462456047535,
-0.026888104155659676,
0.007267449516803026,
-0.0308268740773201,
0.01310605276376009,
0.030653614550828934,
0.006080607883632183,
-0.02885974943637848,
-0.032545559108257294,
0.03058723174035549,
0.025957053527235985,
0.0022164315450936556,
-0.05125775933265686,
0.07059811800718307,
-0.011017822660505772,
0.1071963757276535,
-0.054287321865558624,
-0.14009234309196472,
0.011225167661905289,
0.0992479994893074,
-0.09552713483572006,
0.011796325445175171,
-0.024556729942560196,
-0.087143674492836,
-0.055926013737916946,
0.1036890298128128,
-0.05143722891807556,
-0.07458948343992233,
0.024254316464066505,
0.06549419462680817,
-0.0027658974286168814,
-0.07714838534593582,
-0.004231743048876524,
-0.08803416043519974,
0.0461314395070076,
-0.048983413726091385,
-0.10070282220840454,
-4.6926425087756825e-33,
0.024944698438048363,
-0.08293575048446655,
-0.03726019337773323,
0.008530811406672001,
0.010859777219593525,
-0.0746060162782669,
0.018628109246492386,
0.06350846588611603,
-0.014531339518725872,
0.019247883930802345,
0.04322603717446327,
0.06126073747873306,
-0.009789484553039074,
0.02830539643764496,
-0.028560537844896317,
-0.017358018085360527,
-0.10098995268344879,
-0.06180726736783981,
-0.025640109553933144,
0.013078227639198303,
-0.07243646681308746,
0.0007030583219602704,
0.1115598976612091,
0.07723433524370193,
0.017962779849767685,
-0.032994214445352554,
0.0281499195843935,
0.01916414499282837,
0.04101697728037834,
0.016078947111964226,
-0.042272914201021194,
-0.023407306522130966,
-0.07815274596214294,
0.026885690167546272,
-0.033511195331811905,
-0.04609515145421028,
0.020364562049508095,
0.021411161869764328,
-0.08576607704162598,
-0.01247196551412344,
0.04738139361143112,
-0.058090537786483765,
-0.019065700471401215,
-0.014322887174785137,
0.02267051488161087,
0.045142557471990585,
0.04545532166957855,
0.023829080164432526,
-0.13017375767230988,
-0.03409448266029358,
0.018468422815203667,
-0.036708563566207886,
0.006005096714943647,
0.08791367709636688,
-0.025845760479569435,
0.037455350160598755,
0.04397156089544296,
0.022004805505275726,
-0.01719403639435768,
0.039934493601322174,
0.03238590061664581,
-0.06403046101331711,
-0.005323139950633049,
0.06366986781358719,
0.0016538428608328104,
0.004319657105952501,
-0.03530539199709892,
0.02487996034324169,
-0.0075196255929768085,
-0.006380227394402027,
0.00048009847523644567,
-0.07490801066160202,
-0.016131773591041565,
-0.04182136058807373,
0.025497527793049812,
-0.05516761168837547,
-0.021840684115886688,
-0.13052761554718018,
0.01140811387449503,
-0.00520694674924016,
-0.09619849175214767,
-0.028806284070014954,
-0.012859111651778221,
0.06431203335523605,
0.04926098510622978,
-0.0036497381515800953,
0.08581694215536118,
0.08048465847969055,
0.037947118282318115,
0.04823153465986252,
-0.14711563289165497,
-0.047011490911245346,
-0.031028538942337036,
0.07681269198656082,
-0.056605014950037,
-5.485994591936105e-8,
0.007856463082134724,
0.10442986339330673,
-0.07420744746923447,
0.02513272687792778,
0.05637426674365997,
-0.00038111492176540196,
-0.041324470192193985,
-0.03609446436166763,
-0.008889930322766304,
0.03207135200500488,
0.02026216872036457,
0.05129994451999664,
-0.06882375478744507,
-0.07085166126489639,
0.013586314395070076,
0.027246685698628426,
-0.09535596519708633,
0.04888979718089104,
0.02892233617603779,
-0.0683622807264328,
-0.06581482291221619,
0.03881489485502243,
0.00043720053508877754,
-0.07456586509943008,
0.021707050502300262,
0.06353016942739487,
0.0021268369164317846,
0.04885543882846832,
0.0028346835169941187,
0.005592837929725647,
0.038382817059755325,
-0.060847315937280655,
0.031638119369745255,
0.06664271652698517,
-0.043350812047719955,
-0.00943615473806858,
-0.0661456435918808,
0.01798125170171261,
0.09831415116786957,
-0.002660105237737298,
0.0062634870409965515,
0.0676179900765419,
-0.03330042585730553,
0.025889446958899498,
-0.02718649059534073,
0.09853707253932953,
0.024903638288378716,
-0.004997080657631159,
0.01682555116713047,
0.010789521969854832,
0.000196708831936121,
-0.03444628790020943,
0.01616450771689415,
0.08161399513483047,
-0.03045078180730343,
-0.012232485227286816,
0.024129973724484444,
-0.08393147587776184,
0.10460332036018372,
0.01673334464430809,
0.003354213200509548,
-0.004198946990072727,
0.011281870305538177,
0.01136833243072033
] | 0.091397
|
This document catalogs the communication paths between the {{< glossary\_tooltip term\_id="kube-apiserver" text="API server" >}} and the Kubernetes {{< glossary\_tooltip text="cluster" term\_id="cluster" length="all" >}}. The intent is to allow users to customize their installation to harden the network configuration such that the cluster can be run on an untrusted network (or on fully public IPs on a cloud provider). ## Node to Control Plane Kubernetes has a "hub-and-spoke" API pattern. All API usage from nodes (or the pods they run) terminates at the API server. None of the other control plane components are designed to expose remote services. The API server is configured to listen for remote connections on a secure HTTPS port (typically 443) with one or more forms of client [authentication](/docs/reference/access-authn-authz/authentication/) enabled. One or more forms of [authorization](/docs/reference/access-authn-authz/authorization/) should be enabled, especially if [anonymous requests](/docs/reference/access-authn-authz/authentication/#anonymous-requests) or [service account tokens](/docs/reference/access-authn-authz/authentication/#service-account-tokens) are allowed. Nodes should be provisioned with the public root {{< glossary\_tooltip text="certificate" term\_id="certificate" >}} for the cluster such that they can connect securely to the API server along with valid client credentials. A good approach is that the client credentials provided to the kubelet are in the form of a client certificate. See [kubelet TLS bootstrapping](/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/) for automated provisioning of kubelet client certificates. {{< glossary\_tooltip text="Pods" term\_id="pod" >}} that wish to connect to the API server can do so securely by leveraging a service account so that Kubernetes will automatically inject the public root certificate and a valid bearer token into the pod when it is instantiated. The `kubernetes` service (in `default` namespace) is configured with a virtual IP address that is redirected (via `{{< glossary\_tooltip text="kube-proxy" term\_id="kube-proxy" >}}`) to the HTTPS endpoint on the API server. The control plane components also communicate with the API server over the secure port. As a result, the default operating mode for connections from the nodes and pod running on the nodes to the control plane is secured by default and can run over untrusted and/or public networks. ## Control plane to node There are two primary communication paths from the control plane (the API server) to the nodes. The first is from the API server to the {{< glossary\_tooltip text="kubelet" term\_id="kubelet" >}} process which runs on each node in the cluster. The second is from the API server to any node, pod, or service through the API server's \_proxy\_ functionality. ### API server to kubelet The connections from the API server to the kubelet are used for: \* Fetching logs for pods. \* Attaching (usually through `kubectl`) to running pods. \* Providing the kubelet's port-forwarding functionality. These connections terminate at the kubelet's HTTPS endpoint. By default, the API server does not verify the kubelet's serving certificate, which makes the connection subject to man-in-the-middle attacks and \*\*unsafe\*\* to run over untrusted and/or public networks. To verify this connection, use the `--kubelet-certificate-authority` flag to provide the API server with a root certificate bundle to use to verify the kubelet's serving certificate. If that is not possible, use [SSH tunneling](#ssh-tunnels) between the API server and kubelet if required to avoid connecting over an untrusted or public network. Finally, [Kubelet authentication and/or authorization](/docs/reference/access-authn-authz/kubelet-authn-authz/) should be enabled to secure the kubelet API. ### API server to nodes, pods, and services The connections from the API server to a node, pod, or service default to plain HTTP connections and are therefore neither authenticated nor encrypted. They can be run over a secure HTTPS connection by prefixing `https:` to the node, pod, or service name in the API URL, but they will not validate the certificate provided by the HTTPS endpoint nor provide client credentials. So while the
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/architecture/control-plane-node-communication.md
|
[
-0.01841139607131481,
-0.02141803503036499,
0.010177314281463623,
0.0038242607843130827,
-0.029453974217176437,
0.0029741902835667133,
0.029605943709611893,
-0.06871693581342697,
0.12570907175540924,
0.04462843015789986,
-0.0065863849595189095,
-0.007827524095773697,
0.007114826701581478,
-0.06147002428770065,
0.05554317310452461,
0.02189110592007637,
0.0823841318488121,
-0.07564568519592285,
0.001174478093162179,
-0.05940068140625954,
0.00976316537708044,
0.04506604000926018,
-0.024463176727294922,
0.014969765208661556,
-0.07567471265792847,
-0.016703398898243904,
-0.0033261782955378294,
0.002053101547062397,
0.029983609914779663,
0.03371170163154602,
-0.05414165183901787,
0.01969526708126068,
-0.05019434913992882,
0.08034269511699677,
-0.03832006826996803,
0.004243688192218542,
0.05573037639260292,
-0.010657962411642075,
-0.05096858739852905,
0.058516230434179306,
0.07809986174106598,
-0.06490512937307358,
-0.08146452158689499,
-0.03041139990091324,
-0.053229980170726776,
0.030207999050617218,
-0.06959471851587296,
-0.04548537731170654,
-0.03376144543290138,
-0.011684908531606197,
0.004521806258708239,
-0.12524627149105072,
0.03693227097392082,
0.03799092397093773,
0.0739852786064148,
-0.019441887736320496,
-0.05139101296663284,
0.10028529912233353,
0.0972796157002449,
0.029780089855194092,
0.05803656950592995,
-0.045741233974695206,
0.011047334410250187,
0.01126744132488966,
-0.0056303138844668865,
-0.008607273921370506,
0.013687707483768463,
0.01754317246377468,
-0.0028832119423896074,
-0.08139044791460037,
0.050745610147714615,
-0.010807989165186882,
-0.06286156177520752,
-0.002060007071122527,
0.03139994665980339,
0.023799952119588852,
-0.06016857549548149,
0.029995594173669815,
0.008252935484051704,
-0.09384498745203018,
0.017405405640602112,
0.09006901830434799,
0.07096624374389648,
0.07409105449914932,
-0.08713500201702118,
-0.0028110218700021505,
-0.006091770716011524,
-0.05926051735877991,
0.07819821685552597,
0.019353264942765236,
-0.0382995679974556,
-0.06622514873743057,
0.015495747327804565,
-0.09931568801403046,
0.05071617662906647,
0.015256254933774471,
-0.030080173164606094,
-0.07332603633403778,
-0.02740052342414856,
-0.011421116068959236,
0.03307511284947395,
-0.017737865447998047,
-0.031198935583233833,
-0.049262456595897675,
0.00047061871737241745,
-0.020216258242726326,
-0.06489065289497375,
-0.02680390514433384,
0.055476702749729156,
0.09291239827871323,
-0.07465217262506485,
0.046956826001405716,
-0.035818807780742645,
0.03109820932149887,
-0.015217079780995846,
-0.04038459435105324,
0.03972911089658737,
-0.019167723134160042,
0.09809607267379761,
0.03944513946771622,
-0.02059730514883995,
-0.09753412753343582,
-0.0007658271351829171,
0.03307441622018814,
-0.051354870200157166,
0.029297858476638794,
-0.03813841566443443,
3.088773771942768e-33,
0.04056772589683533,
-0.040974412113428116,
-0.0045498330146074295,
-0.031148891896009445,
0.03374731168150902,
-0.06092247739434242,
-0.04122435301542282,
-0.06330780684947968,
-0.050972845405340195,
-0.025712206959724426,
-0.08178508281707764,
0.08635709434747696,
0.05599069967865944,
-0.0495145358145237,
0.08399289101362228,
0.006083488464355469,
-0.0348716638982296,
0.04101674258708954,
0.09132719039916992,
0.0072022550739347935,
0.03226910158991814,
-0.051316745579242706,
0.027499616146087646,
0.009348400868475437,
0.03622850775718689,
-0.02937006577849388,
0.0015723459655418992,
-0.07169219106435776,
0.01618688926100731,
0.02764098159968853,
-0.060596268624067307,
0.03545403853058815,
0.03916599228978157,
0.013458197936415672,
-0.10775641351938248,
0.020993715152144432,
-0.03208988532423973,
-0.05989481508731842,
-0.055970724672079086,
-0.01357488613575697,
0.006073556840419769,
-0.05548112839460373,
-0.05112474039196968,
-0.04498232156038284,
0.02440599538385868,
0.0416596494615078,
-0.02021387219429016,
-0.08506536483764648,
0.06850521266460419,
0.02822774462401867,
-0.08735062181949615,
-0.020257001742720604,
0.04792463779449463,
-0.002376099582761526,
0.08152603358030319,
0.005814353469759226,
0.09313206374645233,
-0.022574083879590034,
-0.07986275851726532,
0.031838007271289825,
-0.041276294738054276,
-0.03278553485870361,
-0.016192572191357613,
0.005828749388456345,
0.01874949224293232,
0.021408261731266975,
-0.03721170872449875,
0.11379773169755936,
-0.02779068984091282,
-0.02370258793234825,
-0.06312794983386993,
0.08965887129306793,
0.01160513050854206,
0.029058486223220825,
-0.022008400410413742,
-0.09619105607271194,
-0.05070813372731209,
0.03659180924296379,
-0.02465915121138096,
0.047825783491134644,
-0.00007397519220830873,
-0.0435451976954937,
-0.024874072521924973,
0.09445162117481232,
-0.0033825396094471216,
-0.06120750308036804,
0.0006663097883574665,
-0.009513886645436287,
-0.06980817764997482,
0.050924722105264664,
0.006177612580358982,
-0.0380001999437809,
-0.061870064586400986,
0.054484155029058456,
-0.12828601896762848,
-5.489997592011718e-33,
0.07365740090608597,
-0.013403714634478092,
-0.03740652650594711,
0.027549240738153458,
-0.015012353658676147,
0.011284181848168373,
-0.002186607336625457,
0.09949374198913574,
-0.03449255973100662,
-0.013315469957888126,
0.007409832905977964,
-0.02396576479077339,
0.045307863503694534,
0.02009030058979988,
0.0015049325302243233,
-0.04033443704247475,
-0.05066321790218353,
0.006980355829000473,
-0.012191864661872387,
-0.01380952075123787,
0.015524194575846195,
-0.06922261416912079,
0.019167350605130196,
-0.005197341553866863,
-0.023829657584428787,
-0.020222574472427368,
0.006004659924656153,
0.04058404639363289,
-0.08112557977437973,
-0.01088739838451147,
0.016285602003335953,
-0.05037711560726166,
-0.006435888819396496,
0.012809542939066887,
-0.007357369177043438,
-0.030037913471460342,
0.04973172768950462,
0.0317753329873085,
-0.01311581488698721,
-0.0918908640742302,
0.0363677479326725,
-0.016886133700609207,
-0.0469939224421978,
-0.042860642075538635,
-0.019695153459906578,
0.03620350733399391,
0.0008878556545823812,
-0.005051800515502691,
-0.08014143258333206,
-0.11731789261102676,
0.024629632011055946,
-0.003419645596295595,
-0.02976425364613533,
0.09295862913131714,
-0.08427082747220993,
0.07499994337558746,
0.060777608305215836,
0.08392028510570526,
0.03466061130166054,
0.013971841894090176,
0.054430898278951645,
-0.12018978595733643,
0.020235132426023483,
0.11449919641017914,
0.011371771804988384,
-0.01646442711353302,
0.048290498554706573,
0.08891673386096954,
0.03236495330929756,
0.06167737394571304,
-0.021103061735630035,
-0.025421878322958946,
0.05054216831922531,
0.024709951132535934,
0.011967001482844353,
-0.026917079463601112,
0.06774363666772842,
-0.07359311729669571,
-0.0056839147582650185,
-0.006277797743678093,
-0.030091460794210434,
0.044483717530965805,
-0.0410814993083477,
0.02635418251156807,
0.13278037309646606,
0.0481223501265049,
0.02820439450442791,
0.08566393703222275,
0.035180963575839996,
0.0862063392996788,
-0.03683179244399071,
-0.013770242221653461,
-0.04614168405532837,
0.11990487575531006,
-0.0397833026945591,
-5.775811118269303e-8,
0.00926123559474945,
0.07752326875925064,
-0.029542701318860054,
-0.004441115539520979,
0.014257808215916157,
0.03243861347436905,
0.028971657156944275,
-0.030882863327860832,
-0.06654706597328186,
0.020292557775974274,
-0.009694034233689308,
0.054177023470401764,
-0.0883902981877327,
0.02083071507513523,
0.030574703589081764,
0.020829318091273308,
-0.039026472717523575,
-0.03845810890197754,
0.04905121400952339,
-0.06439431011676788,
-0.0864148885011673,
-0.06950641423463821,
-0.022111346945166588,
0.016229473054409027,
0.004269876983016729,
0.0663861632347107,
0.025469738990068436,
0.05997559800744057,
0.011049438267946243,
0.011837450787425041,
-0.09271164238452911,
-0.009498104453086853,
-0.07759157568216324,
0.07217162847518921,
-0.06057188659906387,
0.080851711332798,
-0.1559927761554718,
0.014783745631575584,
0.05660836398601532,
0.09050191938877106,
-0.014236204326152802,
0.004989737644791603,
-0.05149222910404205,
0.007284877821803093,
0.0678100511431694,
0.14142900705337524,
0.00998341478407383,
0.06115894764661789,
-0.01613389514386654,
-0.03298168256878853,
-0.0368686318397522,
0.003754518460482359,
-0.02306472510099411,
0.08863220363855362,
-0.05458816513419151,
-0.0040725520811975,
-0.04626830667257309,
-0.08837149292230606,
0.03596281260251999,
0.03862591087818146,
-0.012689920142292976,
0.05577239766716957,
0.024693502113223076,
-0.004200636874884367
] | 0.188337
|
connections and are therefore neither authenticated nor encrypted. They can be run over a secure HTTPS connection by prefixing `https:` to the node, pod, or service name in the API URL, but they will not validate the certificate provided by the HTTPS endpoint nor provide client credentials. So while the connection will be encrypted, it will not provide any guarantees of integrity. These connections \*\*are not currently safe\*\* to run over untrusted or public networks. ### SSH tunnels Kubernetes supports [SSH tunnels](https://www.ssh.com/academy/ssh/tunneling) to protect the control plane to nodes communication paths. In this configuration, the API server initiates an SSH tunnel to each node in the cluster (connecting to the SSH server listening on port 22) and passes all traffic destined for a kubelet, node, pod, or service through the tunnel. This tunnel ensures that the traffic is not exposed outside of the network in which the nodes are running. {{< note >}} SSH tunnels are currently deprecated, so you shouldn't opt to use them unless you know what you are doing. The [Konnectivity service](#konnectivity-service) is a replacement for this communication channel. {{< /note >}} ### Konnectivity service {{< feature-state for\_k8s\_version="v1.18" state="beta" >}} As a replacement to the SSH tunnels, the Konnectivity service provides TCP level proxy for the control plane to cluster communication. The Konnectivity service consists of two parts: the Konnectivity server in the control plane network and the Konnectivity agents in the nodes network. The Konnectivity agents initiate connections to the Konnectivity server and maintain the network connections. After enabling the Konnectivity service, all control plane to nodes traffic goes through these connections. Follow the [Konnectivity service task](/docs/tasks/extend-kubernetes/setup-konnectivity/) to set up the Konnectivity service in your cluster. ## {{% heading "whatsnext" %}} \* Read about the [Kubernetes control plane components](/docs/concepts/architecture/#control-plane-components) \* Learn more about [Hubs and Spoke model](https://book.kubebuilder.io/multiversion-tutorial/conversion-concepts.html#hubs-spokes-and-other-wheel-metaphors) \* Learn how to [Secure a Cluster](/docs/tasks/administer-cluster/securing-a-cluster/) \* Learn more about the [Kubernetes API](/docs/concepts/overview/kubernetes-api/) \* [Set up Konnectivity service](/docs/tasks/extend-kubernetes/setup-konnectivity/) \* [Use Port Forwarding to Access Applications in a Cluster](/docs/tasks/access-application-cluster/port-forward-access-application-cluster/) \* Learn how to [Fetch logs for Pods](/docs/tasks/debug/debug-application/debug-running-pod/#examine-pod-logs), [use kubectl port-forward](/docs/tasks/access-application-cluster/port-forward-access-application-cluster/#forward-a-local-port-to-a-port-on-the-pod)
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/architecture/control-plane-node-communication.md
|
[
0.001109074568375945,
0.013779927045106888,
-0.005993212573230267,
0.012514973990619183,
-0.04731544107198715,
0.049075350165367126,
-0.004952806979417801,
-0.04897548630833626,
0.09311552345752716,
0.033215638250112534,
-0.04675768315792084,
-0.021254679188132286,
0.02326422743499279,
0.000051846283895429224,
0.04587751626968384,
0.027664948254823685,
0.019070394337177277,
-0.004370884504169226,
-0.007090484257787466,
-0.05739269778132439,
-0.053019311279058456,
-0.06196451187133789,
-0.04490956291556358,
0.025394873693585396,
-0.0571184903383255,
0.017143769189715385,
0.005644742865115404,
-0.028811005875468254,
-0.013176210224628448,
0.047826897352933884,
-0.12792980670928955,
-0.059273283928632736,
-0.08066932111978531,
0.08964752405881882,
-0.0835084468126297,
0.027798883616924286,
0.09644719213247299,
0.01942938193678856,
-0.05834142863750458,
0.10499783605337143,
0.02083941549062729,
-0.11439817398786545,
-0.09677248448133469,
-0.030271686613559723,
-0.06331199407577515,
0.0288412943482399,
-0.05879533663392067,
-0.11897513270378113,
-0.018399223685264587,
-0.02534221112728119,
-0.024635178968310356,
0.002624316606670618,
0.060623012483119965,
0.10433607548475266,
-0.021450422704219818,
-0.05897683650255203,
-0.003037490649148822,
0.04007825255393982,
0.028187409043312073,
0.07647763192653656,
0.08746933192014694,
-0.021352672949433327,
-0.03457989543676376,
0.007395997643470764,
-0.027958214282989502,
-0.06799241900444031,
-0.004693923518061638,
0.048469457775354385,
0.04755686968564987,
0.002185272052884102,
0.10511653125286102,
-0.025741785764694214,
-0.010706761851906776,
-0.039054032415151596,
-0.000881121086422354,
-0.04230332747101784,
-0.038605138659477234,
-0.049571212381124496,
-0.014155078679323196,
-0.002377377590164542,
0.08093385398387909,
-0.001939253881573677,
-0.003839614102616906,
-0.011011471971869469,
-0.08909671008586884,
0.0898117795586586,
0.009831871837377548,
-0.08762865513563156,
0.052085328847169876,
0.021540235728025436,
0.012226616963744164,
-0.03559587895870209,
-0.029456941410899162,
-0.08778350055217743,
0.12729455530643463,
0.02063826285302639,
-0.07339825481176376,
-0.06518246233463287,
-0.011860636062920094,
-0.04062846675515175,
-0.0008251620456576347,
-0.038617126643657684,
-0.01720019429922104,
-0.06137760728597641,
0.02329866960644722,
0.0855206623673439,
-0.014089777134358883,
-0.04352507367730141,
0.048230014741420746,
0.12269516289234161,
0.03343230113387108,
-0.03916746377944946,
0.024539809674024582,
0.06321801245212555,
-0.023236224427819252,
0.05003468692302704,
-0.031043563038110733,
-0.013793552294373512,
0.08394796401262283,
0.1210990846157074,
0.008661746047437191,
-0.004510723985731602,
0.0514223612844944,
0.05508324131369591,
-0.08253984153270721,
-0.048191238194704056,
-0.0015446847537532449,
5.080382259130291e-33,
0.06646700203418732,
-0.03518944978713989,
0.048101384192705154,
-0.055707067251205444,
0.026681283488869667,
-0.019621560350060463,
-0.02950194478034973,
-0.0347171351313591,
-0.02818402089178562,
-0.01155511848628521,
-0.09502619504928589,
-0.000010323425158276223,
-0.004782764241099358,
-0.025086715817451477,
0.04595440998673439,
0.022802503779530525,
-0.05429649353027344,
-0.007936413399875164,
0.11094161868095398,
0.050130654126405716,
0.015707779675722122,
-0.1012575626373291,
0.03385119140148163,
0.007806736510246992,
-0.01185237243771553,
-0.07577440142631531,
0.04916367307305336,
-0.04956106096506119,
-0.013024209067225456,
0.0153507674112916,
-0.06115305796265602,
-0.011469251476228237,
0.048112884163856506,
-0.0036311678122729063,
-0.06976938247680664,
0.03084271028637886,
-0.007845821790397167,
0.006135847885161638,
-0.039825234562158585,
-0.05075908079743385,
0.04194074496626854,
-0.043902985751628876,
0.02198791690170765,
0.043525438755750656,
-0.00108651805203408,
-0.007260811980813742,
-0.006952675059437752,
-0.035411156713962555,
0.028842691332101822,
0.04446537420153618,
-0.06868620961904526,
-0.0012491075322031975,
-0.015492471866309643,
-0.06887208670377731,
0.024317489936947823,
0.022052332758903503,
0.07303472608327866,
0.008319870568811893,
-0.12087827175855637,
0.0411326102912426,
-0.08803053945302963,
-0.04646644368767738,
-0.014970767311751842,
0.004653243348002434,
0.0656251534819603,
0.052534427493810654,
-0.025189202278852463,
0.09900972992181778,
-0.018177874386310577,
-0.00675899488851428,
-0.09588347375392914,
0.009629221633076668,
0.027295278385281563,
0.003809107467532158,
-0.011983477510511875,
-0.06482250988483429,
-0.024725500494241714,
0.10046020895242691,
0.07326869666576385,
-0.006693169474601746,
0.007863862439990044,
-0.011684905737638474,
-0.04713273420929909,
0.13826173543930054,
-0.056768082082271576,
0.05871843919157982,
0.03884655609726906,
-0.026797426864504814,
-0.023769639432430267,
0.05211927369236946,
0.04458049312233925,
0.001138064544647932,
0.017556805163621902,
0.024276074022054672,
-0.10943635553121567,
-7.025164928852809e-33,
0.05444470793008804,
0.01829361729323864,
-0.029416365548968315,
0.0012930164812132716,
0.06686469912528992,
0.01316371001303196,
0.00771647272631526,
0.06169363856315613,
0.018091389909386635,
0.027115685865283012,
0.024121975526213646,
0.027039507403969765,
0.05223921313881874,
-0.048819467425346375,
0.006151056382805109,
-0.08859497308731079,
-0.012325919233262539,
0.025847751647233963,
-0.045094359666109085,
-0.05366761237382889,
0.02939964458346367,
-0.03617948293685913,
0.0016451248666271567,
-0.01710714027285576,
0.022302230820059776,
-0.02734566293656826,
-0.04618486762046814,
0.019694991409778595,
-0.051640115678310394,
0.05055994540452957,
0.08930710703134537,
-0.04555359110236168,
-0.03326336666941643,
0.02432164177298546,
-0.052693068981170654,
-0.03318019211292267,
0.04294665902853012,
0.007989856414496899,
0.03796941787004471,
-0.10287526994943619,
0.022318273782730103,
0.010366201400756836,
-0.033592015504837036,
0.01793799176812172,
0.00845166202634573,
0.030023040249943733,
-0.043067339807748795,
0.016359202563762665,
-0.06411763280630112,
-0.08176487684249878,
-0.08015606552362442,
0.015941673889756203,
-0.08182718604803085,
0.020846419036388397,
-0.046531952917575836,
0.06746955215930939,
-0.08000379800796509,
0.1282316893339157,
-0.007634560111910105,
0.03531315550208092,
0.07977495342493057,
-0.02129484713077545,
-0.016541769728064537,
0.04772408306598663,
-0.020392712205648422,
-0.038744889199733734,
-0.035017699003219604,
0.02359498105943203,
0.02642718143761158,
0.0485985204577446,
0.004253877326846123,
-0.005418512970209122,
0.04563256353139877,
0.02854180335998535,
-0.030523309484124184,
-0.08403310924768448,
0.032907016575336456,
-0.019231479614973068,
0.030483076348900795,
0.056862425059080124,
-0.001622393261641264,
0.08286114782094955,
-0.08467601984739304,
0.02981518767774105,
0.13891376554965973,
0.06678828597068787,
0.0690946877002716,
0.024275818839669228,
0.05661695823073387,
0.039647944271564484,
-0.027529215440154076,
0.01317552849650383,
-0.0535430870950222,
0.0678308978676796,
0.004453103523701429,
-5.0709321186559464e-8,
0.10363037884235382,
0.012915771454572678,
-0.04223102331161499,
-0.019817981868982315,
-0.06529013067483902,
0.007692126091569662,
0.003895851317793131,
-0.035834770649671555,
-0.05737576261162758,
0.03454133868217468,
-0.03237622603774071,
0.006632928270846605,
-0.09532921016216278,
0.002482909243553877,
-0.010084522888064384,
0.022598469629883766,
0.0012765249703079462,
-0.009604009799659252,
0.02302989363670349,
-0.03287157788872719,
0.0012750199530273676,
-0.07382606714963913,
-0.07068318128585815,
0.09858192503452301,
-0.06504017114639282,
0.09683128446340561,
0.011486097238957882,
0.0012006369652226567,
-0.08719785511493683,
0.08334685862064362,
-0.021909212693572044,
-0.043151259422302246,
-0.02618386223912239,
0.07747302949428558,
-0.043440330773591995,
0.08483178168535233,
-0.10573787987232208,
-0.01544756069779396,
-0.01242003869265318,
0.09071308374404907,
-0.0012998448219150305,
-0.0244868453592062,
-0.006453603971749544,
0.02145165391266346,
0.0185305867344141,
0.0808054581284523,
0.0050822896882891655,
0.08721130341291428,
-0.039883486926555634,
0.05769127234816551,
-0.007297263480722904,
-0.04252578690648079,
-0.03730153664946556,
0.01366637647151947,
-0.005361354909837246,
-0.017126234248280525,
-0.05641491338610649,
-0.04699081555008888,
0.04042644053697586,
0.026608740910887718,
-0.02303325943648815,
0.049000002443790436,
0.06113629415631294,
-0.06450630724430084
] | 0.146733
|
{{< feature-state feature\_gate\_name="UnknownVersionInteroperabilityProxy" >}} Kubernetes {{< skew currentVersion >}} includes an alpha feature that lets an {{< glossary\_tooltip text="API Server" term\_id="kube-apiserver" >}} proxy resource requests to other \_peer\_ API servers. It also lets clients get a holistic view of resources served across the entire cluster through discovery. This is useful when there are multiple API servers running different versions of Kubernetes in one cluster (for example, during a long-lived rollout to a new release of Kubernetes). This enables cluster administrators to configure highly available clusters that can be upgraded more safely, by : 1. ensuring that controllers relying on discovery to show a comprehensive list of resources for important tasks always get the complete view of all resources. We call this complete cluster wide discovery- \_Peer-aggregated discovery\_ 1. directing resource requests (made during the upgrade) to the correct kube-apiserver. This proxying prevents users from seeing unexpected 404 Not Found errors that stem from the upgrade process. This mechanism is called the \_Mixed Version Proxy\_. ## Enabling Peer-aggregated Discovery and Mixed Version Proxy Ensure that `UnknownVersionInteroperabilityProxy` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/#UnknownVersionInteroperabilityProxy) is enabled when you start the {{< glossary\_tooltip text="API Server" term\_id="kube-apiserver" >}}: ```shell kube-apiserver \ --feature-gates=UnknownVersionInteroperabilityProxy=true \ # required command line arguments for this feature --peer-ca-file= --proxy-client-cert-file=, --proxy-client-key-file=, --requestheader-client-ca-file=, # requestheader-allowed-names can be set to blank to allow any Common Name --requestheader-allowed-names=, # optional flags for this feature --peer-advertise-ip=`IP of this kube-apiserver that should be used by peers to proxy requests` --peer-advertise-port=`port of this kube-apiserver that should be used by peers to proxy requests` # …and other flags as usual ``` ### Proxy transport and authentication between API servers {#transport-and-authn} \* The source kube-apiserver reuses the [existing APIserver client authentication flags](/docs/tasks/extend-kubernetes/configure-aggregation-layer/#kubernetes-apiserver-client-authentication) `--proxy-client-cert-file` and `--proxy-client-key-file` to present its identity that will be verified by its peer (the destination kube-apiserver). The destination API server verifies that peer connection based on the configuration you specify using the `--requestheader-client-ca-file` command line argument. \* To authenticate the destination server's serving certs, you must configure a certificate authority bundle by specifying the `--peer-ca-file` command line argument to the \*\*source\*\* API server. ### Configuration for peer API server connectivity To set the network location of a kube-apiserver that peers will use to proxy requests, use the `--peer-advertise-ip` and `--peer-advertise-port` command line arguments to kube-apiserver or specify these fields in the API server configuration file. If these flags are unspecified, peers will use the value from either `--advertise-address` or `--bind-address` command line argument to the kube-apiserver. If those too, are unset, the host's default interface is used. ## Peer-aggregated discovery When you enable the feature, discovery requests are automatically enabled to serve a comprehensive discovery document (listing all resources served by any apiserver in the cluster) by default. If you would like to request a non peer-aggregated discovery document, you can indicate so by adding the following Accept header to the discovery request: ``` application/json;g=apidiscovery.k8s.io;v=v2;as=APIGroupDiscoveryList;profile=nopeer ``` {{< note >}} Peer-aggregated discovery is only supported for [Aggregated Discovery](/docs/concepts/overview/kubernetes-api/#aggregated-discovery) requests to the `/apis` endpoint and not for [Unaggregated (Legacy) Discovery](/docs/concepts/overview/kubernetes-api/#unaggregated-discovery) requests. {{< /note >}} ## Mixed version proxying When you enable mixed version proxying, the [aggregation layer](/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/) loads a special filter that does the following: \* When a resource request reaches an API server that cannot serve that API (either because it is at a version pre-dating the introduction of the API or the API is turned off on the API server) the API server attempts to send the request to a peer API server that can serve the requested API. It does so by identifying API groups / versions / resources that the local server doesn't recognise, and tries to proxy those
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/architecture/mixed-version-proxy.md
|
[
-0.049711693078279495,
0.0006722561083734035,
0.045395392924547195,
0.019581060856580734,
0.030057689175009727,
-0.009702028706669807,
0.0209700595587492,
-0.10308928042650223,
0.026947446167469025,
0.03982212767004967,
-0.023044666275382042,
-0.017485737800598145,
0.006856435909867287,
-0.009252750314772129,
0.047390252351760864,
0.05006445571780205,
0.10089778900146484,
-0.011094720102846622,
-0.012293212115764618,
-0.06536836177110672,
-0.023879168555140495,
-0.009134277701377869,
-0.012123815715312958,
0.0417744405567646,
-0.056074108928442,
0.003102114424109459,
-0.07437712699174881,
-0.08869980275630951,
0.04586011543869972,
0.03025692328810692,
-0.10377862304449081,
0.04350278526544571,
-0.10937541723251343,
0.01468959916383028,
0.035666484385728836,
0.02762109600007534,
-0.011052525602281094,
0.011650150641798973,
-0.03500284627079964,
0.002751481020823121,
0.10429320484399796,
-0.01897534169256687,
-0.0894387736916542,
-0.03520951792597771,
-0.06080567464232445,
0.015900680795311928,
-0.021481111645698547,
-0.04816370829939842,
-0.008612094447016716,
-0.020438596606254578,
0.018864881247282028,
-0.13561411201953888,
-0.0037783293519169092,
0.028949294239282608,
0.0869506299495697,
-0.05103711038827896,
-0.040403395891189575,
0.02359931729733944,
0.06441283226013184,
0.04988233745098114,
0.06581973284482956,
-0.059700384736061096,
0.02909383364021778,
-0.01411716639995575,
-0.017577456310391426,
-0.027814475819468498,
0.04994119703769684,
0.008686344139277935,
0.024614445865154266,
-0.05041467398405075,
-0.0048105958849191666,
0.014369098469614983,
-0.043813154101371765,
-0.013937787152826786,
0.04165427386760712,
0.03773529827594757,
-0.0003032999811694026,
0.06713102757930756,
0.048447806388139725,
-0.13346244394779205,
0.006020831409841776,
0.06351055204868317,
0.044037383049726486,
0.06298143416643143,
-0.036380548030138016,
-0.028271719813346863,
-0.030650069937109947,
-0.08089079707860947,
0.08368673920631409,
0.01924607902765274,
-0.0031330205965787172,
-0.09790438413619995,
0.06838797777891159,
-0.08654551953077316,
0.015609933994710445,
0.054670024663209915,
-0.026008784770965576,
-0.08583328872919083,
0.009377025999128819,
0.030440788716077805,
0.037304677069187164,
0.0242252629250288,
0.06681572645902634,
-0.037111591547727585,
-0.018869904801249504,
-0.0188384260982275,
-0.05472226068377495,
0.03002190962433815,
0.011525720357894897,
0.07476074993610382,
-0.02969144657254219,
0.05861424282193184,
0.004060210660099983,
-0.027730422094464302,
-0.02876562625169754,
-0.010577426292002201,
0.0707065761089325,
-0.021705947816371918,
0.0325283519923687,
0.05294949188828468,
0.0561104379594326,
-0.08802692592144012,
0.07035589963197708,
0.022736528888344765,
-0.02100742608308792,
0.06439884006977081,
-0.09901741147041321,
4.979373131590086e-33,
0.09654064476490021,
-0.041016820818185806,
-0.010267330333590508,
-0.00587481539696455,
-0.01737571321427822,
-0.05652898550033569,
-0.004153802525252104,
-0.0450330451130867,
-0.06878605484962463,
-0.06773801892995834,
-0.017456717789173126,
0.07428227365016937,
0.01883716508746147,
-0.02881607972085476,
0.060728657990694046,
-0.008356323465704918,
-0.03166859596967697,
0.11412505060434341,
0.12499959021806717,
-0.009360900148749352,
0.03297828510403633,
-0.08130129426717758,
0.006818659603595734,
-0.0452885627746582,
0.05520717799663544,
-0.017010245472192764,
0.010892500169575214,
-0.07192045450210571,
-0.036469168961048126,
0.03314092755317688,
-0.005834358278661966,
0.0017042193794623017,
0.043612703680992126,
0.04231427609920502,
-0.152206689119339,
-0.0256857518106699,
-0.0640011727809906,
-0.08274906873703003,
-0.022755183279514313,
0.008791044354438782,
-0.02674982324242592,
-0.004197148606181145,
-0.019249549135565758,
-0.09270761907100677,
0.09543987363576889,
0.00995771586894989,
0.008797026239335537,
-0.06319106370210648,
0.049717970192432404,
-0.05308789759874344,
0.003903395961970091,
-0.015155134722590446,
0.0900275781750679,
-0.05565139651298523,
0.03636830672621727,
0.01861783303320408,
0.08284298330545425,
-0.0521092563867569,
-0.016914797946810722,
-0.032366130501031876,
-0.021818185225129128,
-0.04881921410560608,
-0.042267411947250366,
0.019239434972405434,
0.009667576290667057,
0.02192516252398491,
-0.00509822741150856,
0.10836952924728394,
-0.02634071186184883,
0.01748041622340679,
-0.03938416391611099,
0.0033963376190513372,
-0.007422758266329765,
0.020232174545526505,
-0.01614505797624588,
-0.11330622434616089,
0.005903656128793955,
0.007592865265905857,
-0.0015740860253572464,
-0.0034252190962433815,
0.03901488706469536,
-0.11963564157485962,
-0.03646889701485634,
0.08628649264574051,
-0.047325365245342255,
-0.04487694427371025,
0.01565713621675968,
-0.040102165192365646,
-0.04509994760155678,
0.007206665351986885,
-0.02833917923271656,
-0.027700046077370644,
-0.09552066773176193,
0.052255090326070786,
-0.10840529948472977,
-6.763419071123148e-33,
0.08475147932767868,
-0.053858112543821335,
0.03343812748789787,
-0.008625755086541176,
-0.022012555971741676,
-0.009548899717628956,
-0.002119707874953747,
0.06966215372085571,
-0.030241122469305992,
-0.05405586212873459,
-0.042813193053007126,
0.0007031427230685949,
-0.015078356489539146,
-0.021501785144209862,
-0.04909413680434227,
0.023557016626000404,
-0.05700300633907318,
-0.02866429090499878,
-0.016528261825442314,
0.05829204246401787,
-0.03510774299502373,
-0.01791458949446678,
-0.0052238572388887405,
0.04278944432735443,
-0.007020591292530298,
-0.012229235842823982,
-0.028899574652314186,
0.024585535749793053,
-0.05598072335124016,
-0.043082159012556076,
0.011021357960999012,
-0.07662366330623627,
-0.04107765480875969,
-0.06690265983343124,
-0.002447757637128234,
0.011937202885746956,
0.045120999217033386,
0.015090440399944782,
-0.07267245650291443,
0.00915520079433918,
0.044400740414857864,
-0.01894759014248848,
-0.022223172709345818,
-0.02383366972208023,
0.02898484468460083,
0.03863728418946266,
0.010510427877306938,
0.0004988947184756398,
-0.05335426703095436,
-0.07250518351793289,
0.02899155579507351,
-0.0014478430384770036,
-0.010861319489777088,
0.06705226004123688,
-0.09252355247735977,
0.05898512899875641,
0.014895427040755749,
0.10643105208873749,
-0.04157260060310364,
0.02864464558660984,
0.04738060384988785,
-0.09927494078874588,
-0.019262412562966347,
0.08841190487146378,
-0.006066394504159689,
-0.04092966765165329,
0.02281392738223076,
0.046322621405124664,
-0.02875465154647827,
0.0394747368991375,
-0.06005535647273064,
-0.03975179046392441,
-0.03688089922070503,
-0.04803260788321495,
0.0026803649961948395,
-0.02585042454302311,
0.10490283370018005,
-0.09724801778793335,
0.03015017881989479,
0.02121790125966072,
-0.07423341274261475,
0.05417822301387787,
-0.015410477295517921,
0.016832849010825157,
0.08472614735364914,
0.012990056537091732,
0.04232533648610115,
0.1202441081404686,
0.05335929989814758,
0.012432455085217953,
-0.07360327243804932,
-0.019882019609212875,
-0.13528844714164734,
0.09956326335668564,
0.004259047098457813,
-5.6484743993223674e-8,
0.03782225027680397,
0.14475974440574646,
-0.04887566342949867,
0.040751632302999496,
0.0668986588716507,
0.0032273950055241585,
-0.038371894508600235,
0.05553586408495903,
-0.044018350541591644,
0.02808527834713459,
-0.015388988889753819,
0.059729039669036865,
-0.026458896696567535,
0.045998189598321915,
0.07050725817680359,
0.009093794040381908,
-0.03870540112257004,
0.03261423110961914,
-0.028063539415597916,
-0.06370911747217178,
-0.06334903836250305,
0.006728198379278183,
0.030700555071234703,
-0.01618199050426483,
-0.00262951897457242,
-0.01733393780887127,
0.03700515627861023,
0.037736520171165466,
0.048201851546764374,
-0.00445034634321928,
-0.06382763385772705,
-0.029952000826597214,
-0.04103992506861687,
0.06590040773153305,
0.009297795593738556,
0.08578404784202576,
-0.13839468359947205,
0.01696028746664524,
0.06723999977111816,
0.09658390283584595,
0.029128769412636757,
0.0068745603784918785,
-0.03065480850636959,
0.05410277843475342,
0.032363638281822205,
0.09955906867980957,
-0.039907414466142654,
0.044983867555856705,
-0.009707679972052574,
-0.011953282169997692,
-0.007372542750090361,
-0.035191286355257034,
-0.014157976023852825,
0.08344737440347672,
0.001140813110396266,
-0.009319516830146313,
-0.05730217695236206,
-0.01615176349878311,
0.05130862817168236,
0.012225271202623844,
0.09694412350654602,
-0.01216638833284378,
-0.021222079172730446,
0.02213921584188938
] | 0.158411
|
the API is turned off on the API server) the API server attempts to send the request to a peer API server that can serve the requested API. It does so by identifying API groups / versions / resources that the local server doesn't recognise, and tries to proxy those requests to a peer API server that is capable of handling the request. \* If the peer API server fails to respond, the \_source\_ API server responds with 503 ("Service Unavailable") error. ### How it works under the hood When an API Server receives a resource request, it first checks which API servers can serve the requested resource. This check happens using the non peer-aggregated discovery document. \* 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. \* 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. \* If there is no peer known for that API group / version / resource, the handling API server passes the request to its own handler chain which should eventually return a 404 ("Not Found") response. \* If the handling API server has identified and selected a peer API server, but that peer fails to respond (for reasons such as network connectivity issues, or a data race between the request being received and a controller registering the peer's info into the control plane), then the handling API server responds with a 503 ("Service Unavailable") error.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/architecture/mixed-version-proxy.md
|
[
-0.08492843061685562,
0.019959039986133575,
0.051329419016838074,
0.022151781246066093,
0.08756789565086365,
-0.06404870003461838,
-0.0544910803437233,
-0.07730147242546082,
0.08484141528606415,
0.07348141074180603,
0.00268423929810524,
-0.007272884249687195,
0.03470023348927498,
-0.008708973415195942,
0.04362218827009201,
0.012399015948176384,
0.07540535926818848,
-0.06956018507480621,
-0.02616928331553936,
-0.017034415155649185,
0.04190026968717575,
0.020627526566386223,
-0.03917296603322029,
0.04066009446978569,
0.01988994888961315,
-0.009763081558048725,
-0.07329849153757095,
-0.049841105937957764,
0.054746437817811966,
0.06269901990890503,
-0.10022630542516708,
0.015579133294522762,
-0.08234331011772156,
0.03667772188782692,
0.05611196160316467,
0.06869566440582275,
0.004575813189148903,
-0.06835591793060303,
-0.03490959107875824,
0.050773173570632935,
0.06651999056339264,
-0.024915199726819992,
-0.12644444406032562,
-0.03465072065591812,
-0.009802880696952343,
-0.005624356679618359,
-0.021369384601712227,
-0.020758168771862984,
-0.11775403469800949,
-0.014338869601488113,
-0.04987383633852005,
-0.029352394863963127,
0.02975519374012947,
0.04538359120488167,
0.030542075634002686,
-0.10585850477218628,
-0.051821980625391006,
0.10493721067905426,
0.015909496694803238,
0.05851849913597107,
0.039244573563337326,
-0.09442790597677231,
-0.02007880248129368,
-0.02240033820271492,
0.03739377111196518,
-0.024610286578536034,
-0.03369951993227005,
0.012816314585506916,
0.03424113616347313,
-0.10049910098314285,
0.02770991437137127,
0.0009207409457303584,
-0.04878487437963486,
0.046108365058898926,
0.07545816153287888,
0.005941586568951607,
0.04916110634803772,
0.031210308894515038,
0.04212980717420578,
-0.14772389829158783,
-0.03646758571267128,
0.011099757626652718,
0.00957871787250042,
0.09231825172901154,
-0.05542316287755966,
0.01331231091171503,
-0.01293422281742096,
0.03148908168077469,
0.025624791160225868,
0.019389905035495758,
0.04128202423453331,
-0.02315976843237877,
-0.012445179745554924,
-0.03017815575003624,
0.12265089899301529,
0.04258166253566742,
-0.04693489894270897,
-0.05205106735229492,
0.027011271566152573,
0.040701594203710556,
0.014351950027048588,
0.036553941667079926,
-0.008038329891860485,
-0.026945004239678383,
0.045510612428188324,
-0.0431910902261734,
-0.04877679422497749,
0.01283485908061266,
0.04868048056960106,
0.09591885656118393,
0.004436675924807787,
-0.030924424529075623,
0.028537511825561523,
0.03596769645810127,
-0.01889163814485073,
0.05786385387182236,
0.029206423088908195,
-0.008937235921621323,
-0.015949908643960953,
-0.01569938473403454,
0.05173902213573456,
-0.07136210054159164,
0.0548490509390831,
-0.03857972100377083,
-0.051737602800130844,
0.027416935190558434,
0.011909491382539272,
1.3961144366624761e-33,
0.07578825205564499,
-0.09606136381626129,
0.04043301194906235,
-0.004182460252195597,
0.0006017867708578706,
-0.09583007544279099,
0.0180534515529871,
0.006365795619785786,
-0.061189450323581696,
-0.0598735511302948,
-0.029103044420480728,
0.07107491046190262,
0.020701555535197258,
-0.019631609320640564,
-0.020761985331773758,
0.008394164964556694,
0.04579193890094757,
0.04003973677754402,
0.10755812376737595,
0.08626125752925873,
0.045217059552669525,
-0.08258264511823654,
0.005170361138880253,
0.01873466931283474,
-0.0429224967956543,
0.03297850862145424,
-0.0416564866900444,
-0.05609109625220299,
-0.013408266007900238,
0.018088389188051224,
0.010034721344709396,
-0.045831892639398575,
0.03946388512849808,
-0.008112238720059395,
-0.055505868047475815,
-0.04253678768873215,
-0.022089989855885506,
-0.0266204122453928,
-0.08796515315771103,
-0.026611721143126488,
-0.007690724451094866,
0.016152704134583473,
-0.0564931221306324,
-0.04707811027765274,
-0.021372269839048386,
-0.042961087077856064,
-0.0065284427255392075,
-0.058460772037506104,
0.019101761281490326,
0.05655554682016373,
0.006126720923930407,
0.043236080557107925,
0.055813394486904144,
-0.020818326622247696,
0.060889169573783875,
-0.003495887853205204,
-0.0061243814416229725,
-0.025875691324472427,
-0.004714688286185265,
-0.04666450619697571,
0.07976066321134567,
-0.07114139199256897,
-0.003019098425284028,
0.017547564581036568,
0.05757450312376022,
0.06728623062372208,
-0.028349142521619797,
0.062035199254751205,
-0.00005267211963655427,
0.0559593103826046,
-0.030249306932091713,
0.05009758099913597,
0.039008866995573044,
0.04252944514155388,
-0.05131072551012039,
-0.12325572222471237,
0.05106055364012718,
0.013821488246321678,
-0.014951052144169807,
-0.004535433370620012,
-0.008704877458512783,
-0.048249758780002594,
-0.03409541770815849,
0.015545973554253578,
-0.16756457090377808,
-0.00835019163787365,
0.008015958592295647,
-0.045044537633657455,
-0.022950762882828712,
0.010152417235076427,
-0.018662963062524796,
-0.014553901739418507,
-0.12718895077705383,
0.019159121438860893,
-0.048576418310403824,
-3.747560479077918e-33,
0.029755203053355217,
-0.052881572395563126,
0.002974978182464838,
-0.06041252240538597,
-0.03220203146338463,
-0.04115911200642586,
-0.031008437275886536,
0.09038220345973969,
0.050087135285139084,
0.035208623856306076,
-0.004395663738250732,
-0.018015125766396523,
0.03208198770880699,
-0.005767642520368099,
-0.018623171374201775,
0.018556835129857063,
-0.058882541954517365,
-0.019487880170345306,
-0.002253179671242833,
0.08079366385936737,
-0.04702407121658325,
0.050432607531547546,
0.042454540729522705,
0.03890661522746086,
-0.03234774246811867,
0.04048480466008186,
-0.07649838179349899,
0.004430913832038641,
-0.028265418484807014,
-0.06888999044895172,
0.10704927891492844,
-0.07781127840280533,
-0.05851881951093674,
-0.014562292024493217,
-0.019824445247650146,
-0.0009275687043555081,
-0.04808016121387482,
0.0971834808588028,
-0.060793206095695496,
-0.06496012955904007,
0.05461834743618965,
-0.021580006927251816,
-0.026056339964270592,
-0.007617035415023565,
0.025075620040297508,
-0.03569641709327698,
0.03154377266764641,
0.022109761834144592,
-0.08273010700941086,
-0.12988115847110748,
0.0971689447760582,
0.014272334985435009,
0.027379699051380157,
0.07406758517026901,
-0.005323714576661587,
0.09254177659749985,
0.020533593371510506,
0.10379107296466827,
0.0013356769923120737,
-0.02806795947253704,
0.046983812004327774,
-0.12174670398235321,
-0.07917474955320358,
0.10344075411558151,
-0.03221198916435242,
-0.029737308621406555,
0.014452709816396236,
0.059477660804986954,
0.06927306950092316,
0.025018880143761635,
0.010647237300872803,
0.0038288345094770193,
-0.00415969081223011,
-0.00943304505199194,
0.00717023154720664,
0.03045840561389923,
-0.038939639925956726,
-0.028650451451539993,
-0.022597987204790115,
0.0393303707242012,
-0.09100606292486191,
0.0906350314617157,
-0.004244273994117975,
0.09245175123214722,
0.048489272594451904,
-0.011657667346298695,
0.06269893050193787,
0.0825275257229805,
0.013460904359817505,
0.03564498573541641,
-0.01078079454600811,
-0.007785400375723839,
-0.1097416952252388,
0.09339143335819244,
0.008667616173624992,
-5.2897338065349686e-8,
0.03418098762631416,
0.02546110935509205,
-0.015597552061080933,
0.06913798302412033,
0.029973400756716728,
0.04227336496114731,
0.02776358090341091,
0.010976365767419338,
-0.013726050965487957,
0.07172045856714249,
-0.035109035670757294,
-0.020207131281495094,
-0.05814914405345917,
-0.05298078432679176,
0.03758343309164047,
-0.0398031510412693,
-0.05285919830203056,
0.04007291793823242,
-0.027548084035515785,
-0.078725166618824,
-0.07913703471422195,
-0.06799322366714478,
0.04399972781538963,
-0.08973116427659988,
-0.011035016737878323,
0.020222973078489304,
0.0659366250038147,
0.02409517392516136,
-0.07972545176744461,
-0.06245418265461922,
-0.06724727898836136,
-0.0010442049242556095,
-0.019646480679512024,
-0.026251109316945076,
-0.010644570924341679,
0.06781090050935745,
-0.06765361875295639,
0.02430756390094757,
-0.0382593497633934,
0.02683415077626705,
-0.02836000919342041,
-0.004065512213855982,
0.001013142173178494,
0.004107344895601273,
0.06105703115463257,
0.0513114407658577,
-0.033704109489917755,
0.08179289102554321,
0.02170797809958458,
-0.017036883160471916,
0.02029293030500412,
-0.08221070468425751,
-0.040234897285699844,
0.027861159294843674,
-0.019171956926584244,
0.006245464086532593,
-0.07549460232257843,
-0.02674846723675728,
0.02681555226445198,
-0.03531733155250549,
0.12689076364040375,
0.06752986460924149,
0.022815514355897903,
-0.005527548026293516
] | 0.140003
|
Kubernetes is designed with self-healing capabilities that help maintain the health and availability of workloads. It automatically replaces failed containers, reschedules workloads when nodes become unavailable, and ensures that the desired state of the system is maintained. ## Self-Healing capabilities {#self-healing-capabilities} - \*\*Container-level restarts:\*\* If a container inside a Pod fails, Kubernetes restarts it based on the [`restartPolicy`](/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy). - \*\*Replica replacement:\*\* If a Pod in a [Deployment](/docs/concepts/workloads/controllers/deployment/) or [StatefulSet](/docs/concepts/workloads/controllers/statefulset/) fails, Kubernetes creates a replacement Pod to maintain the specified number of replicas. If a Pod that is part of a [DaemonSet](/docs/concepts/workloads/controllers/daemonset/) fails, the control plane creates a replacement Pod to run on the same node. - \*\*Persistent storage recovery:\*\* If a node is running a Pod with a PersistentVolume (PV) attached, and the node fails, Kubernetes can reattach the volume to a new Pod on a different node. - \*\*Load balancing for Services:\*\* If a Pod behind a [Service](/docs/concepts/services-networking/service/) fails, Kubernetes automatically removes it from the Service's endpoints to route traffic only to healthy Pods. Here are some of the key components that provide Kubernetes self-healing: - \*\*[kubelet](/docs/concepts/architecture/#kubelet):\*\* Ensures that containers are running, and restarts those that fail. - \*\*Deployment (via ReplicaSet), ReplicaSet, StatefulSet and DaemonSet controllers:\*\* Maintain the desired number of Pod replicas. - \*\*PersistentVolume controller:\*\* Manages volume attachment and detachment for stateful workloads. ## Considerations {#considerations} - \*\*Storage Failures:\*\* If a persistent volume becomes unavailable, recovery steps may be required. - \*\*Application Errors:\*\* Kubernetes can restart containers, but underlying application issues must be addressed separately. ## {{% heading "whatsnext" %}} - Read more about [Pods](/docs/concepts/workloads/pods/) - Learn about [Kubernetes Controllers](/docs/concepts/architecture/controller/) - Explore [PersistentVolumes](/docs/concepts/storage/persistent-volumes/) - Read about [node autoscaling](/docs/concepts/cluster-administration/node-autoscaling/). Node autoscaling also provides automatic healing if or when nodes fail in your cluster.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/architecture/self-healing.md
|
[
-0.05226960405707359,
-0.010357619263231754,
0.07144230604171753,
0.021986784413456917,
0.031637150794267654,
-0.020081615075469017,
0.014779632911086082,
-0.06458016484975815,
0.09235689789056778,
0.055419132113456726,
-0.018616119399666786,
0.025472519919276237,
-0.011411922983825207,
-0.015362441539764404,
0.016691479831933975,
-0.01209260430186987,
0.05448829382658005,
0.010621791705489159,
-0.07479115575551987,
-0.018198871985077858,
0.0231467355042696,
0.03713209554553032,
-0.006803827825933695,
0.04369070753455162,
-0.09242793917655945,
0.007355471141636372,
-0.10147722065448761,
-0.05208112671971321,
-0.013467407785356045,
-0.025601720437407494,
-0.05211507901549339,
0.023012368008494377,
-0.06793729215860367,
0.013484371826052666,
0.09473379701375961,
0.13069693744182587,
-0.013230779208242893,
-0.045568641275167465,
-0.10049216449260712,
-0.003306396072730422,
0.034541092813014984,
-0.04642388969659805,
-0.08628792315721512,
0.008069452829658985,
-0.02185576595366001,
0.03382660076022148,
-0.0767832100391388,
-0.032113999128341675,
-0.0045223357155919075,
-0.04041560739278793,
0.0066949184983968735,
-0.06886158883571625,
0.07566690444946289,
0.09968342632055283,
0.14228948950767517,
0.07055314630270004,
0.010576162487268448,
0.031145799905061722,
0.04242270439863205,
0.008254632353782654,
0.08568118512630463,
0.00099885871168226,
0.0068685091100633144,
-0.029491281136870384,
0.05738510191440582,
0.005047662183642387,
0.022246381267905235,
-0.004260082263499498,
0.02122432179749012,
-0.010540375486016273,
0.04184255748987198,
0.018912293016910553,
-0.051591161638498306,
0.033493220806121826,
-0.012478633783757687,
0.0208369679749012,
-0.016164587810635567,
0.0008623229805380106,
-0.018983853980898857,
-0.019944803789258003,
-0.027990929782390594,
0.013583475723862648,
0.04661747068166733,
-0.03807021304965019,
-0.055508844554424286,
-0.008863743394613266,
-0.0044333795085549355,
-0.0497664138674736,
0.09700793027877808,
0.03385021537542343,
-0.011854485608637333,
0.013931023888289928,
0.07067250460386276,
-0.09754741191864014,
0.06159922480583191,
-0.008960570208728313,
-0.019301336258649826,
0.016013646498322487,
0.0405922532081604,
0.01015479676425457,
0.03114403784275055,
-0.018635675311088562,
0.019331106916069984,
0.004720674827694893,
0.07334456592798233,
-0.06999436020851135,
-0.06313258409500122,
-0.00856657326221466,
0.005983083974570036,
0.019858095794916153,
0.023158187046647072,
0.014050069265067577,
0.06803986430168152,
0.06603692471981049,
0.013722050935029984,
-0.014379422180354595,
-0.026305392384529114,
0.00205555884167552,
-0.011540732346475124,
0.05231647193431854,
0.05261647328734398,
-0.08032186329364777,
0.10158875584602356,
-0.011754211969673634,
-0.05289348214864731,
0.03279043734073639,
-0.0063898018561303616,
2.201748857219139e-33,
0.03281356394290924,
-0.0998544991016388,
0.045208390802145004,
-0.0015643181977793574,
0.07320715487003326,
-0.08178756386041641,
-0.04874250292778015,
-0.015292275696992874,
-0.0001381715846946463,
-0.07353246957063675,
-0.08908244967460632,
0.060463033616542816,
-0.009907823987305164,
-0.05013369768857956,
0.018644051626324654,
-0.05345624312758446,
-0.05337081849575043,
0.04024025797843933,
0.09013963490724564,
-0.004528454039245844,
0.03827344626188278,
-0.024244442582130432,
-0.03156726062297821,
-0.01686912402510643,
0.01758767105638981,
-0.0363679938018322,
-0.0015955534763634205,
-0.060352832078933716,
0.009546725079417229,
0.02692241035401821,
-0.03307998925447464,
0.029190026223659515,
0.023843398317694664,
0.014632347039878368,
-0.1433521956205368,
-0.039418578147888184,
-0.023410381749272346,
-0.008759081363677979,
-0.11368482559919357,
-0.09376376867294312,
-0.04639863222837448,
0.007941002026200294,
-0.006357560865581036,
0.005827435292303562,
0.04774979501962662,
-0.10407264530658722,
0.029688827693462372,
-0.034152958542108536,
-0.008080273866653442,
0.0007135767373256385,
0.03124329075217247,
-0.00742329703643918,
0.05998395010828972,
-0.10775643587112427,
-0.019580360502004623,
-0.0030187948141247034,
0.0654541552066803,
-0.029188737273216248,
-0.059675853699445724,
0.04513987526297569,
0.013771122321486473,
-0.04075324907898903,
-0.039578646421432495,
0.0010450257686898112,
0.0939386859536171,
0.07857337594032288,
0.014021963812410831,
0.01636199839413166,
-0.01719040982425213,
0.03080492466688156,
-0.043451689183712006,
0.009875880554318428,
-0.018469052389264107,
0.005739626940339804,
-0.025846458971500397,
-0.10292820632457733,
0.0032995990477502346,
-0.001615034299902618,
-0.15763245522975922,
0.027112282812595367,
0.008747374638915062,
-0.06981348246335983,
-0.07880077511072159,
0.07890214025974274,
0.00026561415870673954,
-0.040881965309381485,
0.009595734067261219,
-0.017306793481111526,
-0.03280266001820564,
-0.011936312541365623,
0.06128666549921036,
-0.06305693835020065,
-0.04739424213767052,
0.01208734791725874,
-0.03232574090361595,
-3.1932417916102676e-33,
0.09572488069534302,
-0.017136098816990852,
-0.007415675558149815,
0.0328926257789135,
0.039794452488422394,
-0.0156036876142025,
-0.025394944474101067,
0.056349799036979675,
-0.03160744532942772,
-0.0948149561882019,
-0.054115038365125656,
-0.08158973604440689,
0.013172613456845284,
0.047254253178834915,
-0.13514024019241333,
-0.04978090524673462,
-0.0914982482790947,
-0.10148219764232635,
-0.02982056885957718,
0.044496286660432816,
0.01760624349117279,
0.0005342780495993793,
0.03839778155088425,
0.07686587423086166,
0.004508974030613899,
0.04222970828413963,
-0.031716011464595795,
0.06242970749735832,
-0.03567913919687271,
-0.07074028253555298,
0.058611463755369186,
-0.14022570848464966,
-0.018766332417726517,
0.06221657246351242,
0.059162043035030365,
0.005535623989999294,
-0.04309205710887909,
0.06634806841611862,
-0.02962661348283291,
-0.0038881769869476557,
0.11113240569829941,
0.008768263272941113,
-0.016113819554448128,
0.01906467229127884,
-0.026118937879800797,
-0.007157941814512014,
0.0275434497743845,
0.026183336973190308,
0.0027205655351281166,
-0.10395413637161255,
-0.01071422453969717,
-0.018951894715428352,
-0.0561039000749588,
0.12616297602653503,
-0.00448665302246809,
0.0548059418797493,
0.029115933924913406,
0.05290459468960762,
-0.04096416383981705,
0.023636775091290474,
0.025344453752040863,
-0.12792745232582092,
0.04830484837293625,
0.08633121103048325,
-0.001982202287763357,
-0.06161760911345482,
0.01879032887518406,
0.06187555193901062,
0.0305926576256752,
0.006852683611214161,
0.09166504442691803,
0.04093824326992035,
0.01737995631992817,
-0.0024575581774115562,
-0.010404087603092194,
-0.06299746036529541,
-0.012865010648965836,
-0.09490035474300385,
0.020648298785090446,
0.041155360639095306,
-0.11985064297914505,
0.03118286281824112,
-0.06199651584029198,
0.05879581347107887,
0.03990636020898819,
0.05256520211696625,
0.07015320658683777,
0.09438434988260269,
0.07376936823129654,
0.07490462064743042,
-0.007048801053315401,
0.034836750477552414,
-0.07406115531921387,
0.11886908859014511,
-0.054558515548706055,
-4.836974909494529e-8,
0.047907229512929916,
0.013784298673272133,
0.012816149741411209,
0.0487416610121727,
0.03741556406021118,
-0.04770303890109062,
0.08352944254875183,
-0.009308980777859688,
-0.05368327349424362,
0.00800757110118866,
0.002918076701462269,
0.07999146729707718,
-0.018650388345122337,
-0.023302217945456505,
0.025680791586637497,
-0.03741663321852684,
0.016362842172384262,
0.04953068867325783,
-0.016873609274625778,
-0.08878070116043091,
-0.09118818491697311,
-0.05629483237862587,
0.006513654720038176,
0.017661022022366524,
-0.058983657509088516,
0.06764807552099228,
0.069460928440094,
0.01950082741677761,
0.004581321496516466,
0.007722392678260803,
-0.019605785608291626,
-0.027151038870215416,
-0.0018217096803709865,
0.047057971358299255,
-0.038155026733875275,
0.06505752354860306,
-0.11623042821884155,
0.020397542044520378,
0.016795873641967773,
0.004236958455294371,
-0.016059478744864464,
0.008842609822750092,
-0.052557095885276794,
0.041085418313741684,
0.05489154905080795,
0.010896340943872929,
-0.021909037604928017,
0.05173921957612038,
-0.010579182766377926,
-0.02525031380355358,
0.002415120368823409,
-0.03876332938671112,
-0.016065631061792374,
0.06329834461212158,
-0.034990131855010986,
-0.011121854186058044,
0.04413386806845665,
0.0004510499711614102,
0.03496347367763519,
0.05330133065581322,
0.05315086245536804,
0.020732881501317024,
0.05196929723024368,
-0.007032269146293402
] | 0.210134
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.